/* ================================================================
   Customer overview — desktop table + purpose-built mobile cards
   ================================================================ */

.dashboard-page {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 30px clamp(20px, 2.4vw, 42px) 48px;
}

/* ---------- page heading ---------- */
.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}
.page-heading-copy { min-width: 0; }
.page-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
  color: var(--color-muted);
  font-size: 11px;
  font-weight: 680;
  letter-spacing: 0.06em;
}
.page-eyebrow i {
  width: 7px;
  height: 7px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #12b76a;
  box-shadow: 0 0 0 2px rgba(18, 183, 106, 0.16);
}
.page-heading h1 {
  margin: 0;
  color: var(--color-text);
  font-size: clamp(25px, 2.2vw, 34px);
  font-weight: 730;
  letter-spacing: -0.04em;
  line-height: 1.16;
}
.page-heading p { margin: 8px 0 0; color: var(--color-muted); font-size: 13px; }
.page-heading-actions { display: flex; align-items: center; gap: 14px; flex: 0 0 auto; }
.refresh-state { display: inline-flex; align-items: center; gap: 7px; color: var(--color-subtle); font-size: 11px; white-space: nowrap; }
.refresh-state svg { width: 16px; height: 16px; }
.page-new-btn { min-height: 42px; padding-inline: 16px; }
.page-new-btn svg { width: 17px; height: 17px; stroke-width: 2; }

/* ---------- metrics ---------- */
.dashboard-stats { margin-bottom: 18px; }
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(122px, 1fr));
  gap: 10px;
}
.metric-card {
  position: relative;
  min-width: 0;
  min-height: 112px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 15px 16px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  color: var(--color-text);
  background: var(--color-surface);
  box-shadow: var(--shadow-xs);
  text-align: left;
}
button.metric-card {
  cursor: pointer;
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast), transform var(--duration-fast), background var(--duration-fast);
}
button.metric-card:hover { border-color: var(--color-border-strong); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
button.metric-card:active { transform: translateY(0); }
.metric-card::after {
  position: absolute;
  width: 56px;
  height: 56px;
  right: -24px;
  top: -26px;
  border-radius: 50%;
  content: "";
  background: var(--metric-accent, #98a2b3);
  opacity: 0.08;
  box-shadow: 0 0 0 15px var(--metric-accent, #98a2b3);
}
.metric-card > span { color: var(--color-muted); font-size: 11px; font-weight: 620; }
.metric-card > strong { margin-top: 5px; color: var(--color-text); font-size: 25px; font-weight: 720; letter-spacing: -0.035em; line-height: 1; }
.metric-card > small { max-width: 100%; overflow: hidden; margin-top: 8px; color: var(--color-subtle); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.metric-card.is-selected { border-color: rgba(79, 70, 229, 0.45); background: var(--color-primary-soft); box-shadow: 0 0 0 3px var(--color-primary-ring); }
.metric-total { --metric-accent: #4f46e5; }
.metric-attention { --metric-accent: #f04438; background: linear-gradient(145deg, #fff, #fffbfa); }
.metric-attention > strong { color: var(--color-danger); }
.metric-pending { --metric-accent: #667085; }
.metric-useful { --metric-accent: #f79009; }
.metric-qualified { --metric-accent: #2e90fa; }
.metric-won { --metric-accent: #12b76a; }
.metric-archive { --metric-accent: #7f56d9; }

.task-alerts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.task-alert {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-surface);
}
.task-alert-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 10px;
}
.task-alert-icon svg { width: 18px; height: 18px; }
.task-alert > span:last-child { min-width: 0; display: flex; flex: 1; flex-direction: column; }
.task-alert small { color: var(--color-muted); font-size: 10px; }
.task-alert strong { overflow: hidden; margin-top: 2px; font-size: 12px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.reply-alert { border-color: #fedf89; background: #fffcf5; }
.reply-alert .task-alert-icon { color: var(--color-warning); background: var(--color-warning-soft); }
.quota-alert .task-alert-icon { color: var(--color-primary); background: var(--color-primary-soft); }
.quota-alert i { height: 3px; margin-top: 7px; overflow: hidden; border-radius: 2px; background: #e9e7ff; }
.quota-alert i b { height: 100%; display: block; border-radius: inherit; background: var(--color-primary); }
.quota-alert.is-done { border-color: #abefc6; background: #f6fef9; }
.quota-alert.is-done .task-alert-icon { color: var(--color-success); background: var(--color-success-soft); }
.quota-alert.is-done i { background: #d1fadf; }
.quota-alert.is-done i b { background: var(--color-success); }

.archive-view-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid #ddd6fe;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #fafaff, #f5f3ff);
}
.archive-view-banner > div { min-width: 0; display: flex; align-items: center; gap: 12px; }
.archive-icon { width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; border-radius: 11px; color: #6941c6; background: #ede9fe; }
.archive-icon svg { width: 20px; height: 20px; }
.archive-view-banner > div > span:last-child { min-width: 0; display: flex; flex-direction: column; }
.archive-view-banner strong { font-size: 13px; font-weight: 680; }
.archive-view-banner small { margin-top: 2px; color: var(--color-muted); font-size: 11px; }
.archive-view-banner .btn svg { width: 17px; height: 17px; }

/* ---------- search and filters ---------- */
.customer-controls {
  position: relative;
  z-index: 2;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-xs);
}
.search-row { display: flex; align-items: center; gap: 8px; }
.search-field {
  min-width: 220px;
  height: 40px;
  display: flex;
  align-items: center;
  flex: 1;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  box-shadow: var(--shadow-xs);
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
}
.search-field:focus-within { border-color: rgba(79, 70, 229, 0.62); box-shadow: var(--shadow-xs), 0 0 0 2px var(--color-primary-ring); }
.search-field > svg { width: 18px; height: 18px; margin-left: 12px; flex: 0 0 auto; color: var(--color-subtle); }
.search-field input { width: 100%; height: 100%; padding: 0 12px 0 9px; border: 0; outline: none; color: var(--color-text); background: transparent; font-size: 13px; }
.search-field input:focus { outline: none; }
.search-field input::-webkit-search-cancel-button { opacity: 0.55; }
.search-submit svg { width: 16px; height: 16px; }
.mobile-filter-btn { display: none; }
.filter-count { min-width: 19px; height: 19px; display: inline-flex; align-items: center; justify-content: center; padding: 0 5px; border-radius: 10px; color: #fff; background: var(--color-primary); font-size: 10px; }
.filter-scrim, .filter-sheet-head, .apply-filter-btn { display: none; }
.filter-panel { margin-top: 12px; }
.filter-fields {
  display: grid;
  grid-template-columns: minmax(116px, 0.8fr) minmax(110px, 0.75fr) minmax(150px, 1.2fr) minmax(116px, 0.8fr) minmax(116px, 0.85fr) minmax(142px, 0.95fr);
  gap: 9px;
}
.filter-field { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.filter-field > span { padding-left: 2px; color: var(--color-muted); font-size: 10px; font-weight: 620; }
.filter-field .filter {
  width: 100%;
  height: 38px;
  min-width: 0;
  margin: 0;
  padding: 0 30px 0 10px;
  color: var(--color-text-secondary);
  background-color: var(--color-surface);
  font-size: 12px;
}
.filter-field input.filter { padding-right: 8px; }
.filter-field .filter:disabled { color: var(--color-subtle); background: var(--color-surface-subtle); }
.filter-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 10px; }
.filter-actions > span { color: var(--color-subtle); font-size: 10px; }
.filter-actions > div { display: flex; align-items: center; gap: 6px; }
.filter-actions .btn { min-height: 32px; padding: 6px 9px; font-size: 11px; }
.active-filters { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--color-border); }
.active-filter {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 7px 4px 8px;
  border: 1px solid #d9d6fe;
  border-radius: var(--radius-pill);
  color: #3e3a8f;
  background: #f5f3ff;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
}
.active-filter span { color: #7f78b6; font-weight: 520; }
.active-filter svg { width: 13px; height: 13px; margin-left: 2px; }
.active-filter:hover { border-color: #b9b4f8; background: #eeecff; }
.clear-all-filters { min-height: 28px; padding: 4px 7px; border: 0; color: var(--color-muted); background: transparent; font-size: 10px; cursor: pointer; }
.clear-all-filters:hover { color: var(--color-danger); }

/* ---------- result table ---------- */
.customer-results { min-width: 0; }
.results-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 2px 9px; }
.results-head > div { min-width: 0; display: flex; align-items: baseline; gap: 9px; }
.results-head h2 { margin: 0; font-size: 14px; font-weight: 680; }
.results-head #resultsCount { color: var(--color-subtle); font-size: 10px; }
.results-help { color: var(--color-subtle); font-size: 10px; }

.customer-table-wrap {
  position: relative;
  max-width: 100%;
  overflow: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-xs);
}
#grid { width: 100%; min-width: 1180px; table-layout: auto; }
#grid thead { position: sticky; z-index: 1; top: 0; }
#grid thead th {
  height: 42px;
  padding: 0 10px;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-muted);
  background: #fafbfc;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.015em;
  white-space: nowrap;
}
#grid tbody td {
  height: 58px;
  padding: 9px 10px;
  border-bottom: 1px solid #edf0f4;
  color: var(--color-text-secondary);
  font-size: 11px;
  vertical-align: middle;
  white-space: nowrap;
}
#grid tbody tr { outline: none; cursor: pointer; transition: background var(--duration-fast); }
#grid tbody tr:hover { background: #f9fafc; }
#grid tbody tr:last-child td { border-bottom: 0; }
#grid tbody tr:focus-visible { box-shadow: inset 0 0 0 2px var(--color-primary); }
.group-label { display: inline-flex; align-items: center; padding: 3px 7px; border-radius: var(--radius-pill); color: #475467; background: #f2f4f7; font-size: 10px; font-weight: 620; }
.table-person { display: inline-flex; align-items: center; gap: 7px; color: var(--color-text-secondary); font-weight: 580; }
.mini-avatar { width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; border-radius: 8px; color: #4338ca; background: #eef2ff; font-size: 10px; font-style: normal; font-weight: 700; }
#grid .cust-name { min-width: 90px; }
#grid .cust-name strong { display: block; color: var(--color-text); font-size: 12px; font-weight: 680; }
#grid .cust-name small { display: block; max-width: 105px; overflow: hidden; margin-top: 2px; color: var(--color-subtle); font-size: 9px; font-weight: 500; text-overflow: ellipsis; }
#grid .ellip { max-width: 105px; }
#grid .ellip-phone { max-width: 90px; }
#grid .ellip-amount { max-width: 118px; }
.badge { min-height: 22px; display: inline-flex; align-items: center; padding: 3px 8px; border-radius: var(--radius-pill); font-size: 10px; font-weight: 650; line-height: 1; }
.badge.pending { color: #475467; background: #f2f4f7; }
.badge.useful { color: #b54708; background: #fffaeb; }
.badge.qualified { color: #175cd3; background: #eff8ff; }
.badge.won { color: #067647; background: #ecfdf3; }
.badge.useless { color: #b42318; background: #fef3f2; }
.follow-state { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; font-weight: 620; white-space: nowrap; }
.follow-state i { width: 6px; height: 6px; flex: 0 0 auto; border-radius: 50%; }
.follow-state.done { color: var(--color-success); }
.follow-state.done i { background: #12b76a; box-shadow: 0 0 0 3px #ecfdf3; }
.follow-state.due { color: var(--color-danger); }
.follow-state.due i { background: #f04438; box-shadow: 0 0 0 3px #fef3f2; }
.follow-state.quiet { color: var(--color-subtle); font-weight: 520; }
.cell-count { min-width: 24px; display: inline-flex; align-items: center; justify-content: center; padding: 2px 6px; border-radius: var(--radius-pill); color: var(--color-muted); background: #f2f4f7; font-size: 10px; }
.comment-reviewed { margin-right: 5px; color: var(--color-success); font-size: 9px; font-weight: 650; }
.created-date, .created-age { display: block; }
.created-date { color: var(--color-text-secondary); font-size: 10px; }
.created-age { margin-top: 2px; color: var(--color-subtle); font-size: 9px; }

.customer-table-wrap.is-loading { pointer-events: none; }
.skeleton-row td { height: 62px; }
.skeleton-line { width: 72%; height: 11px; display: block; }
.skeleton-row td:nth-child(3) .skeleton-line { width: 90%; }
.skeleton-row:nth-child(2) .skeleton-line { width: 58%; }
.empty-state {
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 36px;
  border: 1px dashed #d9dee8;
  border-radius: var(--radius-md);
  color: var(--color-muted);
  background: linear-gradient(180deg, #fbfcff, #f8fafc);
  text-align: center;
}
.empty-icon { width: 46px; height: 46px; display: inline-flex; align-items: center; justify-content: center; border-radius: 14px; color: var(--color-primary); background: var(--color-primary-soft); box-shadow: inset 0 0 0 1px rgba(79, 70, 229, 0.08); }
.empty-icon svg { width: 23px; height: 23px; }
.empty-state strong, .mobile-empty strong { margin-top: 12px; color: var(--color-text); font-size: 13px; font-weight: 680; }
.empty-state p, .mobile-empty p { max-width: 340px; margin: 5px 0 14px; color: var(--color-muted); font-size: 11px; }
.customer-card-list { display: none; }

/* ---------- responsive overview ---------- */
@media (max-width: 1280px) {
  .metrics-grid { grid-template-columns: repeat(7, minmax(108px, 1fr)); }
  .metric-card { min-height: 106px; padding: 13px; }
  .filter-fields { grid-template-columns: repeat(6, minmax(105px, 1fr)); }
  .filter-owner { grid-column: span 1; }
}

@media (max-width: 980px) {
  .metrics-grid { grid-template-columns: repeat(4, minmax(130px, 1fr)); }
  .filter-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  body.has-filter-sheet { overflow: hidden; }
  .dashboard-page { padding: 18px 16px calc(34px + env(safe-area-inset-bottom)); }

  .page-heading { align-items: flex-start; margin-bottom: 14px; }
  .page-eyebrow { margin-bottom: 5px; font-size: 10px; }
  .page-heading h1 { font-size: 25px; }
  .page-heading p { max-width: 250px; margin-top: 6px; font-size: 11px; line-height: 1.5; }
  .page-heading-actions { padding-top: 1px; }
  .refresh-state { display: none; }
  .page-new-btn { width: 44px; min-width: 44px; height: 44px; padding: 0; border-radius: 12px; font-size: 0; }
  .page-new-btn svg { width: 19px; height: 19px; }

  .dashboard-stats { margin: 0 -16px 13px; }
  .metrics-grid {
    display: flex;
    gap: 8px;
    padding: 1px 16px 6px 24px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-padding-left: 24px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }
  .metrics-grid::-webkit-scrollbar { display: none; }
  .metric-card { min-width: 132px; min-height: 92px; padding: 12px 13px; scroll-snap-align: start; }
  .metric-card > strong { font-size: 23px; }
  .task-alerts { grid-template-columns: 1fr; margin: 3px 16px 0; }
  .task-alert { padding: 11px 12px; }
  .task-alert strong { font-size: 11px; }
  .archive-view-banner { align-items: stretch; flex-direction: column; margin: 0 16px; padding: 13px; }
  .archive-view-banner .btn { width: 100%; }

  .customer-controls { margin-bottom: 15px; padding: 0; border: 0; background: transparent; box-shadow: none; }
  .search-row { gap: 7px; }
  .search-field { height: 44px; min-width: 0; }
  .search-field input { min-width: 0; font-size: 16px; }
  .search-submit { width: 44px; min-width: 44px; height: 44px; padding: 0; font-size: 0; }
  .search-submit svg { width: 18px; height: 18px; }
  .mobile-filter-btn { position: relative; width: 48px; min-width: 48px; height: 44px; display: inline-flex; padding: 0; font-size: 0; }
  .mobile-filter-btn svg { width: 19px; height: 19px; }
  .filter-count { position: absolute; top: -5px; right: -5px; border: 2px solid var(--color-bg); font-size: 9px; }

  .filter-scrim {
    position: fixed;
    z-index: 89;
    inset: 0;
    display: block;
    background: rgba(16, 24, 40, 0.46);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
  }
  .filter-panel {
    position: fixed;
    z-index: 90;
    right: 0;
    bottom: 0;
    left: 0;
    max-height: min(80dvh, 680px);
    margin: 0;
    padding: 0 14px calc(14px + env(safe-area-inset-bottom));
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 22px 22px 0 0;
    background: var(--color-surface);
    box-shadow: 0 -16px 48px rgba(16, 24, 40, 0.22);
    transform: translateY(104%);
    visibility: hidden;
    transition: transform var(--duration-slow) var(--ease-emphasized), visibility var(--duration-slow);
  }
  .filter-panel.is-open { transform: translateY(0); visibility: visible; }
  .filter-sheet-head {
    position: sticky;
    z-index: 1;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0 11px;
    border-bottom: 1px solid var(--color-border);
    background: var(--color-surface);
  }
  .filter-sheet-head > div { display: flex; flex-direction: column; }
  .filter-sheet-head span { color: var(--color-text); font-size: 16px; font-weight: 690; }
  .filter-sheet-head small { margin-top: 2px; color: var(--color-muted); font-size: 10px; }
  .filter-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px 9px; padding: 13px 0; }
  .filter-owner, .filter-date { grid-column: 1 / -1; }
  .filter-field { gap: 6px; }
  .filter-field > span { font-size: 11px; }
  .filter-field .filter { height: 44px; padding-left: 11px; font-size: 13px; }
  .filter-actions {
    position: sticky;
    bottom: calc(-14px - env(safe-area-inset-bottom));
    margin: 0 -14px;
    padding: 10px 14px calc(14px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--color-border);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
  .filter-actions > span { display: none; }
  .filter-actions > div { width: 100%; }
  .filter-actions .btn { min-height: 44px; flex: 1; font-size: 12px; }
  .apply-filter-btn { display: inline-flex; }
  .active-filters { flex-wrap: nowrap; margin-top: 10px; padding: 9px 0 2px; overflow-x: auto; border: 0; scrollbar-width: none; }
  .active-filters::-webkit-scrollbar { display: none; }
  .active-filter { flex: 0 0 auto; min-height: 30px; }
  .clear-all-filters { flex: 0 0 auto; }

  .results-head { margin: 0 1px 10px; }
  .results-head h2 { font-size: 14px; }
  .results-help { display: none; }
  .customer-table-wrap { display: none; }
  .customer-card-list { display: grid; gap: 10px; }
  .customer-card {
    width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding: 14px;
    border: 1px solid var(--color-border);
    border-radius: 13px;
    color: var(--color-text);
    background: var(--color-surface);
    box-shadow: var(--shadow-xs);
    text-align: left;
    cursor: pointer;
    transition: border-color var(--duration-fast), box-shadow var(--duration-fast), transform var(--duration-fast);
  }
  .customer-card:active { border-color: rgba(79, 70, 229, 0.38); box-shadow: 0 0 0 3px var(--color-primary-ring); transform: scale(0.995); }
  .customer-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
  .customer-card-name { min-width: 0; display: flex; align-items: center; gap: 8px; }
  .customer-card-name small { flex: 0 0 auto; padding: 3px 6px; border-radius: 7px; color: var(--color-muted); background: #f2f4f7; font-size: 9px; font-weight: 620; }
  .customer-card-name strong { overflow: hidden; color: var(--color-text); font-size: 16px; font-weight: 700; letter-spacing: -0.02em; text-overflow: ellipsis; white-space: nowrap; }
  .customer-card-owner { display: flex; align-items: center; gap: 7px; margin-top: 10px; color: var(--color-muted); font-size: 11px; }
  .customer-card-owner b { color: var(--color-text-secondary); font-weight: 620; }
  .customer-card-owner i { width: 3px; height: 3px; border-radius: 50%; background: var(--color-border-strong); }
  .customer-card-facts { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 8px; margin-top: 10px; }
  .customer-card-facts > span { min-width: 0; display: flex; flex-direction: column; padding: 8px 9px; border-radius: 9px; background: var(--color-surface-subtle); }
  .customer-card-facts small { color: var(--color-subtle); font-size: 9px; }
  .customer-card-facts b { overflow: hidden; margin-top: 2px; color: var(--color-text-secondary); font-size: 11px; font-weight: 620; text-overflow: ellipsis; white-space: nowrap; }
  .customer-card-contact { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; color: var(--color-muted); font-size: 10px; }
  .customer-card-contact span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .customer-card-contact span:last-child { text-align: right; }
  .customer-card-foot { display: flex; align-items: center; gap: 10px; margin: 11px -14px -14px; padding: 10px 14px; border-top: 1px solid var(--color-border); }
  .customer-card-foot .follow-state { margin-right: auto; }
  .card-metric { color: var(--color-muted); font-size: 9px; white-space: nowrap; }
  .card-metric b { color: var(--color-text-secondary); font-size: 10px; font-weight: 670; }
  .card-age { padding-left: 9px; border-left: 1px solid var(--color-border); color: var(--color-subtle); font-size: 9px; white-space: nowrap; }
  .skeleton-card { min-height: 184px; cursor: default; }
  .skeleton-title { width: 45%; height: 18px; }
  .skeleton-copy { width: 88%; height: 13px; margin-top: 16px; }
  .skeleton-copy.short { width: 62%; margin-top: 11px; }
  .mobile-empty {
    min-height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 34px 18px;
    border: 1px dashed #d9dee8;
    border-radius: 13px;
    background: linear-gradient(180deg, #fbfcff, #f8fafc);
    text-align: center;
  }
}

@media (max-width: 390px) {
  .dashboard-page { padding-inline: 13px; }
  .dashboard-stats { margin-inline: -13px; }
  .metrics-grid { padding: 1px 13px 6px 21px; scroll-padding-left: 21px; }
  .task-alerts { margin-inline: 13px; }
  .archive-view-banner { margin-inline: 13px; }
  .page-heading p { max-width: 225px; }
  .customer-card { padding: 14px; }
  .customer-card-foot { gap: 8px; margin-inline: -14px; margin-bottom: -14px; padding-inline: 14px; }
  .customer-card-contact { gap: 7px; }
}
