﻿:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --line: #d8deea;
  --text: #162131;
  --muted: #5a6475;
  --accent: #0b6bcc;
  --danger: #b42318;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Segoe UI, Arial, sans-serif;
  background: linear-gradient(180deg, #edf2fb 0%, #f8fbff 40%, #f5f7fb 100%);
  color: var(--text);
}

.hidden { display: none !important; }
.error { color: var(--danger); }

.center-card {
  max-width: 440px;
  margin: 64px auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
}

label {
  display: block;
  margin: 10px 0;
  font-weight: 600;
}

input, select, textarea, button {
  width: 100%;
  margin-top: 6px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 14px;
}

textarea { min-height: 90px; }
button {
  background: var(--accent);
  color: white;
  border: none;
  cursor: pointer;
}
button.secondary { background: #6f7785; }
button.danger { background: #b42318; }

#app-view {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

aside {
  padding: 18px;
  border-right: 1px solid var(--line);
  background: #eaf0f9;
}
aside h2 { margin-top: 0; }
#whoami {
  margin: 8px 0 14px;
}

.whoami-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 8px;
  border: 1px solid #d3dceb;
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  text-align: left;
}

.whoami-btn:hover {
  background: #f6faff;
  border-color: #c4d4ec;
}

.whoami-avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  overflow: hidden;
  flex: 0 0 34px;
}

.whoami-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.whoami-meta {
  display: grid;
  min-width: 0;
}

.whoami-meta strong {
  font-size: 13px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.whoami-meta small {
  color: var(--muted);
  font-size: 11px;
}

#menu button {
  margin-bottom: 8px;
  text-align: left;
}

main { padding: 20px; }
header {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
}

#filters {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 10px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}


#filters.contact-filters {
  display: block;
  background: #ffffff;
  border-color: #d3dceb;
  box-shadow: 0 2px 10px rgba(22, 33, 49, 0.04);
  padding: 12px;
  margin-bottom: 14px;
}

#filters.contact-filters > label.search-label-wide {
  margin: 0;
}

#filters.contact-filters > label.search-label-wide input {
  min-height: 40px;
}

#filters.contact-filters .contact-row {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

#filters.contact-filters .contact-row label {
  margin: 0;
}

#filters.contact-filters .contact-row select {
  min-height: 36px;
  padding: 7px 9px;
  font-size: 13px;
}
#filters.org-filters {
  display: block;
  padding: 14px;
  margin-bottom: 16px;
}

.filter-row {
  display: grid;
  gap: 10px;
}

.filter-row + .filter-row {
  margin-top: 10px;
}

.filter-row-top {
  grid-template-columns: 1fr auto;
  align-items: end;
}

.filter-row-top-left {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
}

.filter-row-bottom {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}


.page-heading h1 {
  margin: 0;
}

#page-subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

#actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

#filters.org-filters {
  background: #ffffff;
  border-color: #d3dceb;
  box-shadow: 0 2px 10px rgba(22, 33, 49, 0.04);
}

.org-table thead th {
  background: #f7f9fd;
  font-size: 12px;
  color: #4d5a6d;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-bottom: 1px solid #d8e0ee;
}

.org-sub {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.contact-stack {
  min-width: 200px;
}

.org-table tbody tr:last-child td {
  border-bottom: none;
}
.search-label-wide {
  margin: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--panel);
  border: 1px solid var(--line);
}
th, td {
  padding: 9px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.table-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px;
  margin-top: 8px;
}


.contact-table {
  border: none;
}

.contact-table th,
.contact-table td {
  padding: 6px 8px;
}

.contact-table thead th {
  background: #f7f9fd;
  font-size: 12px;
  color: #4d5a6d;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-bottom: 1px solid #d8e0ee;
}

.contact-table tbody tr:hover {
  background: #f7fbff;
}
.org-table {
  border: none;
}

.org-table th,
.org-table td {
  padding: 6px 8px;
}

.org-table tbody tr:hover {
  background: #f7fbff;
}

.org-name {
  font-weight: 600;
}

.org-meta,
.muted-small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid transparent;
}

.status-aktiivne {
  background: #e8f7ed;
  color: #1f7a3d;
  border-color: #b8e4c5;
}

.status-passiivne {
  background: #eef1f5;
  color: #4e5a6b;
  border-color: #d7dfe8;
}

.status-probleemne {
  background: #fff3e8;
  color: #a85112;
  border-color: #ffd9bd;
}

.status-lopetatud {
  background: #f4eefb;
  color: #5d3b89;
  border-color: #decef5;
}

.action-cell {
  white-space: nowrap;
}

.action-btn-sm {
  width: auto;
  margin-top: 0;
  margin-right: 6px;
  padding: 5px 8px;
  font-size: 12px;
  border-radius: 6px;
}

.action-btn-danger-sm {
  min-width: 36px;
}

.pager {
  margin-top: 8px;
  display: flex;
  gap: 8px;
  align-items: center;
}

.grid-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

dialog {
  width: min(680px, 94vw);
  border: 1px solid var(--line);
  border-radius: 10px;
}

@media (max-width: 900px) {
  #app-view { grid-template-columns: 1fr; }
  aside { border-right: none; border-bottom: 1px solid var(--line); }
  .grid-two { grid-template-columns: 1fr; }

  .filter-row-top,
  .filter-row-top-left {
    grid-template-columns: 1fr;
  }
}





.audit-block {
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

#event-users-select {
  min-height: 130px;
}


.list-page-container {
  margin-top: 8px;
}

.list-header {
  margin: 4px 0 12px;
  font-size: 16px;
  color: var(--muted);
}

.unified-table th {
  background: #f7f9fd;
  font-size: 12px;
  color: #4d5a6d;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.unified-table tbody tr:hover {
  background: #f7fbff;
}

.th-sort-btn {
  width: auto;
  background: transparent;
  color: inherit;
  border: none;
  padding: 0;
  margin: 0;
  font-size: 12px;
  font-weight: 600;
}

.bulk-actions-bar {
  display: flex;
  gap: 8px;
  align-items: center;
  background: #f7f9fd;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  margin-bottom: 10px;
}

.bulk-actions-bar button,
.bulk-actions-bar select {
  width: auto;
  margin-top: 0;
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 24px;
  text-align: center;
  color: var(--muted);
}

.empty-state h4 {
  margin: 0 0 8px;
}

.empty-state p {
  margin: 0 0 12px;
}

/* Modal UI unification */
#edit-dialog {
  position: relative;
}

.modal-close-x {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  margin: 0;
  padding: 0;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #f7f9fd;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.modal-close-x:hover {
  background: #eef3fb;
  color: var(--text);
}

.modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: nowrap;
}

.modal-action-btn {
  width: auto;
  margin-top: 0;
  min-width: 96px;
  white-space: nowrap;
}

@media (max-width: 680px) {
  .modal-actions {
    flex-wrap: wrap;
    justify-content: stretch;
  }

  .modal-action-btn {
    flex: 1 1 140px;
  }
}

.lang-switcher {
  margin: 10px 0 14px;
}

.lang-switcher label {
  margin: 0;
  font-weight: 600;
}

.lang-switcher select {
  min-height: 34px;
}

/* Unified CRM list UX system */
:root {
  --spacing-xs: 6px;
  --spacing-sm: 10px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
}

main {
  padding: var(--spacing-lg);
}

header {
  margin-bottom: var(--spacing-md);
}

.page-heading h1 {
  font-size: 2.05rem;
  line-height: 1.1;
  font-weight: 750;
}

#page-subtitle {
  margin-top: var(--spacing-xs);
  font-size: 13px;
  line-height: 1.35;
}

#filters {
  display: block;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
}

.list-toolbar {
  display: grid;
  grid-template-columns: minmax(420px, 1fr) auto;
  align-items: end;
  gap: var(--spacing-md);
}

.toolbar-left {
  display: flex;
  align-items: end;
  gap: var(--spacing-sm);
  min-width: 0;
}

.search-label {
  margin: 0;
  font-weight: 600;
}

.search-label-compact {
  width: min(520px, 100%);
  min-width: 240px;
}

.search-label-compact input {
  margin-top: var(--spacing-xs);
}

.search-apply-btn,
.toolbar-add-btn {
  width: auto;
  margin-top: 0;
  min-width: 92px;
  height: 38px;
  padding: 8px 14px;
}

.toolbar-right {
  display: flex;
  justify-content: flex-end;
  align-items: end;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
}

.filter-field {
  margin: 0;
  width: auto;
  min-width: 120px;
}

.filter-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 4px;
}

.filter-select {
  width: auto;
  min-width: 130px;
  max-width: 180px;
  margin-top: 0;
  height: 36px;
  padding: 7px 10px;
}

.list-page-container {
  margin-top: 0;
  padding: var(--spacing-md);
}

.list-header {
  margin: 0 0 var(--spacing-md);
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}

.unified-table {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.unified-table th,
.unified-table td {
  padding: 11px 12px;
  font-size: 13px;
  border-bottom: 1px solid #e5eaf3;
}

.unified-table thead th {
  background: #f7f9fd;
  color: #49566b;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.unified-table tbody tr:hover {
  background: #f6faff;
}

.clickable-row {
  cursor: pointer;
}

.action-cell {
  white-space: nowrap;
  width: 1%;
}

.action-btn-sm {
  width: auto;
  margin-top: 0;
  margin-right: 6px;
  padding: 6px 9px;
  font-size: 12px;
  border-radius: 7px;
}

.pager {
  margin-top: var(--spacing-md);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
}

.pager-btn {
  width: auto;
  min-width: 90px;
  margin-top: 0;
  padding: 7px 10px;
}

.pager-info {
  font-size: 13px;
  color: var(--muted);
  min-width: 96px;
  text-align: center;
}

.empty-state {
  border: 1px dashed #ccd5e4;
  border-radius: 12px;
  padding: 26px;
  text-align: center;
  background: #fbfdff;
}

.empty-state h4 {
  margin: 0 0 var(--spacing-xs);
  font-size: 16px;
  color: var(--text);
}

.empty-state p {
  margin: 0 0 var(--spacing-sm);
}

@media (max-width: 1100px) {
  .list-toolbar {
    grid-template-columns: 1fr;
  }

  .toolbar-right {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  main {
    padding: var(--spacing-md);
  }

  .toolbar-left {
    flex-wrap: wrap;
  }

  .search-label-compact {
    width: 100%;
    min-width: 0;
  }

  .search-apply-btn,
  .toolbar-add-btn {
    flex: 1 1 120px;
  }

  .filter-select {
    max-width: none;
    width: 100%;
  }

  .filter-field {
    min-width: 0;
    flex: 1 1 180px;
  }

  .pager {
    justify-content: space-between;
  }
}

/* Mobile UX enhancements */
.mobile-card-list {
  display: grid;
  gap: var(--spacing-sm);
}

.mobile-record-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 1px 6px rgba(22, 33, 49, 0.05);
}

.mobile-record-card:active {
  background: #f8fbff;
}

.mobile-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.mobile-card-title {
  margin: 0;
  font-size: 15px;
  line-height: 1.3;
  font-weight: 700;
}

.mobile-card-details {
  margin-top: 8px;
}

.mobile-card-details p {
  margin: 0 0 4px;
  font-size: 13px;
  color: var(--muted);
}

.mobile-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.mobile-card-actions .action-btn-sm {
  min-height: 40px;
  padding: 8px 10px;
}

.mobile-fab-add {
  position: fixed;
  right: 14px;
  bottom: 16px;
  z-index: 50;
  width: auto;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 999px;
  box-shadow: 0 8px 20px rgba(11, 107, 204, 0.28);
}

.mobile-filter-toggle {
  display: none;
  width: auto;
  min-height: 40px;
  margin-top: 0;
}

.mobile-filter-toggle.active {
  background: #4f5d74;
}

@media (max-width: 760px) {
  #filters {
    padding: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
  }

  .list-toolbar {
    grid-template-columns: 1fr;
    gap: var(--spacing-sm);
  }

  .toolbar-left {
    flex-wrap: wrap;
    align-items: stretch;
  }

  .search-label-compact {
    width: 100%;
  }

  .search-label-compact input,
  .search-apply-btn,
  .toolbar-add-btn,
  .mobile-filter-toggle,
  button,
  select,
  input,
  textarea {
    min-height: 42px;
  }

  .search-apply-btn,
  .toolbar-add-btn {
    flex: 1 1 calc(50% - 4px);
  }

  .mobile-filter-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .toolbar-right {
    width: 100%;
    justify-content: flex-start;
    gap: 8px;
    margin-top: 2px;
  }

  .toolbar-right.mobile-hidden {
    display: none;
  }

  .filter-field {
    width: calc(50% - 4px);
    min-width: 0;
  }

  .filter-select {
    width: 100%;
    max-width: none;
  }

  .unified-table {
    display: none;
  }

  #edit-dialog {
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    max-height: 100vh;
    margin: 0;
    border-radius: 0;
    padding: 14px;
  }

  #edit-form {
    max-height: calc(100vh - 28px);
    overflow: auto;
    padding-right: 4px;
  }

  .modal-actions {
    position: sticky;
    bottom: 0;
    background: #fff;
    padding-top: 8px;
  }

  .modal-close-x {
    top: 8px;
    right: 8px;
  }
}

@media (max-width: 760px) {
  #edit-form table,
  #edit-form tbody,
  #edit-form tr,
  #edit-form th,
  #edit-form td {
    display: block;
    width: 100%;
  }

  #edit-form tr {
    padding: 8px 0;
    border-bottom: 1px solid #e9eef6;
  }

  #edit-form th {
    font-size: 12px;
    color: var(--muted);
    padding: 0;
    margin-bottom: 3px;
  }

  #edit-form td {
    padding: 0;
    font-size: 14px;
    color: var(--text);
  }
}

/* Unified navigation system */
#sidebar {
  position: relative;
  z-index: 30;
}

#menu {
  display: grid;
  gap: 8px;
  margin: 14px 0;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 40px;
  margin: 0;
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid #cfd8e8;
  background: #f7f9fd;
  color: #334155;
}

.nav-item.active {
  background: #0b6bcc;
  color: #fff;
  border-color: #0b6bcc;
}

.nav-icon {
  width: 18px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  opacity: 0.9;
}

.nav-label {
  font-size: 14px;
  font-weight: 600;
}

#app-header {
  display: block;
  position: sticky;
  top: 0;
  z-index: 20;
  background: #f5f7fb;
  padding: 10px 0 12px;
  border-bottom: 1px solid #e0e7f2;
  margin-bottom: 12px;
}

.header-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.icon-btn {
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #d5dfef;
  color: #334155;
  display: none;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  color: #5b6475;
  overflow-x: auto;
  white-space: nowrap;
}

.crumb-link,
.crumb-current {
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  width: auto;
  color: inherit;
  font-size: 13px;
}

.crumb-link {
  cursor: pointer;
  text-decoration: underline;
}

.crumb-sep {
  opacity: 0.7;
  font-size: 12px;
}

#header-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.global-search-wrap {
  position: relative;
  width: 280px;
}

#global-search {
  margin-top: 0;
  min-height: 40px;
}

#global-search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 40;
  background: #fff;
  border: 1px solid #d5dfef;
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(22, 33, 49, 0.12);
  max-height: 300px;
  overflow: auto;
  padding: 6px;
}

.global-result-item {
  width: 100%;
  margin: 0;
  padding: 9px 10px;
  text-align: left;
  border-radius: 8px;
  background: #fff;
  color: #2f3d53;
  border: 1px solid transparent;
}

.global-result-item:hover {
  background: #f7fbff;
  border-color: #d8e7fb;
}

.quick-actions-wrap {
  position: relative;
}

#quick-actions-btn {
  width: auto;
  margin-top: 0;
  min-height: 40px;
  padding: 9px 12px;
}

#quick-actions-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 40;
  min-width: 190px;
  background: #fff;
  border: 1px solid #d5dfef;
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(22, 33, 49, 0.12);
  padding: 6px;
}

.quick-action-item {
  width: 100%;
  margin: 0;
  padding: 9px 10px;
  text-align: left;
  border-radius: 8px;
  background: #fff;
  color: #2f3d53;
  border: 1px solid transparent;
}

.quick-action-item:hover {
  background: #f7fbff;
  border-color: #d8e7fb;
}

.settings-card {
  max-width: 420px;
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #e0e7f2;
  border-radius: 10px;
  background: #fff;
}

@media (max-width: 980px) {
  #app-view {
    grid-template-columns: 1fr;
  }

  #sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(280px, 82vw);
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    box-shadow: 6px 0 24px rgba(15, 23, 42, 0.2);
    border-right: 1px solid #d8deea;
    overflow: auto;
  }

  #sidebar.open {
    transform: translateX(0);
  }

  #nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(20, 30, 45, 0.35);
    z-index: 25;
  }

  .icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .header-row {
    grid-template-columns: auto 1fr;
  }

  #header-tools {
    grid-column: 1 / -1;
    width: 100%;
  }

  .global-search-wrap {
    flex: 1 1 auto;
    width: 100%;
  }

  #quick-actions-btn {
    min-width: 96px;
  }
}




.profile-avatar-preview {
  margin-top: 8px;
}

.profile-avatar-preview img,
.profile-avatar-preview span {
  width: 64px;
  height: 64px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #fff;
  background: #627086;
  object-fit: cover;
  border: 1px solid #d6deeb;
}

.timeline-section {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfdff;
  padding: 12px;
}

.timeline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.timeline-header h4 {
  margin: 0;
  font-size: 15px;
}

.timeline-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.timeline-list {
  position: relative;
  display: grid;
  gap: 10px;
}

.timeline-day {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  margin-top: 2px;
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 12px 1fr;
  gap: 10px;
  align-items: start;
}

.timeline-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #9cb0cf;
  margin-top: 6px;
}

.timeline-card {
  border: 1px solid #dbe4f2;
  border-radius: 8px;
  background: #fff;
  padding: 8px 10px;
}

.timeline-type {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 4px;
}

.timeline-title {
  font-weight: 700;
  margin-bottom: 3px;
}

.timeline-content {
  color: #2f3d53;
  font-size: 13px;
  margin-bottom: 4px;
}

.timeline-meta {
  color: var(--muted);
  font-size: 12px;
}

.timeline-more {
  width: auto;
  margin-top: 10px;
}

.timeline-empty {
  color: var(--muted);
  border: 1px dashed #d5deeb;
  border-radius: 8px;
  padding: 10px;
  font-size: 13px;
}

.timeline-note .timeline-dot { background: #4f7ad4; }
.timeline-email .timeline-dot { background: #1f9d66; }
.timeline-system .timeline-dot { background: #9a6bd2; }

@media (max-width: 760px) {
  .timeline-section {
    padding: 10px;
  }

  .timeline-card {
    padding: 8px;
  }

  .timeline-actions .action-btn-sm {
    min-height: 40px;
  }
}
