/* ==========================================================================
   Bama Collector UI: design tokens, base, layout, components.
   RTL-first (logical properties), light/dark themes, WCAG 2.2 AA contrast.
   ========================================================================== */

@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/Vazirmatn-wght.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --font: "Vazirmatn", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;

  /* surfaces & ink */
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-2: #f8f9fb;
  --surface-3: #eef1f5;
  --border: #e4e7ec;
  --border-strong: #cfd5dd;
  --text: #101828;
  --text-2: #475467;
  --text-3: #667085;

  /* brand & semantic */
  --accent: #2a78d6;
  --accent-hover: #256abf;
  --accent-text: #1d5fae;
  --accent-soft: #eaf2fc;
  --on-accent: #ffffff;
  --success: #067a37;
  --success-soft: #e7f6ed;
  --danger: #c4302b;
  --danger-soft: #fdeceb;
  --warning: #8a5a00;
  --warning-soft: #fff3d6;
  --neutral-soft: #eef1f5;

  /* data viz (dataviz reference palette) */
  --series-1: #2a78d6;
  --grid: #e9ebef;
  --axis: #c3c2b7;
  --status-good: #0ca30c;
  --status-warning: #fab219;
  --status-serious: #ec835a;
  --status-critical: #d03b3b;
  --status-neutral: #98a2b3;

  /* shape & depth */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow-md: 0 4px 12px rgba(16, 24, 40, 0.08), 0 1px 3px rgba(16, 24, 40, 0.06);
  --shadow-lg: 0 24px 48px rgba(16, 24, 40, 0.18);
  --focus-ring: 0 0 0 3px rgba(42, 120, 214, 0.35);

  /* spacing scale (4px base) */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px; --s-6: 24px; --s-8: 32px; --s-10: 40px;

  --sidebar-w: 248px;
  --header-h: 64px;
  --ease: cubic-bezier(0.2, 0, 0, 1);
}

@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;
    --bg: #0d1117; --surface: #161b22; --surface-2: #1b2129; --surface-3: #232b35;
    --border: #2a323c; --border-strong: #3a4552;
    --text: #e6edf3; --text-2: #b8c1cb; --text-3: #8d98a5;
    --accent: #3987e5; --accent-hover: #4f95ea; --accent-text: #7db0f0; --accent-soft: rgba(57, 135, 229, 0.16);
    --success: #4ac26b; --success-soft: rgba(74, 194, 107, 0.14);
    --danger: #f47b74; --danger-soft: rgba(244, 123, 116, 0.14);
    --warning: #e6b54a; --warning-soft: rgba(230, 181, 74, 0.14);
    --neutral-soft: #232b35;
    --series-1: #3987e5; --grid: #262e38; --axis: #3a4552; --status-neutral: #6e7a88;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 24px 48px rgba(0, 0, 0, 0.6);
    --focus-ring: 0 0 0 3px rgba(57, 135, 229, 0.45);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d1117; --surface: #161b22; --surface-2: #1b2129; --surface-3: #232b35;
  --border: #2a323c; --border-strong: #3a4552;
  --text: #e6edf3; --text-2: #b8c1cb; --text-3: #8d98a5;
  --accent: #3987e5; --accent-hover: #4f95ea; --accent-text: #7db0f0; --accent-soft: rgba(57, 135, 229, 0.16);
  --success: #4ac26b; --success-soft: rgba(74, 194, 107, 0.14);
  --danger: #f47b74; --danger-soft: rgba(244, 123, 116, 0.14);
  --warning: #e6b54a; --warning-soft: rgba(230, 181, 74, 0.14);
  --neutral-soft: #232b35;
  --series-1: #3987e5; --grid: #262e38; --axis: #3a4552; --status-neutral: #6e7a88;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 24px 48px rgba(0, 0, 0, 0.6);
  --focus-ring: 0 0 0 3px rgba(57, 135, 229, 0.45);
}

/* ---------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01";
}
h1, h2, h3, h4 { margin: 0; line-height: 1.35; font-weight: 700; }
p { margin: 0; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: var(--r-sm); }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--text-3); }
.secondary { color: var(--text-2); }
.nowrap { white-space: nowrap; }
.ltr { direction: ltr; unicode-bidi: isolate; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; inset-inline-start: var(--s-4); top: -60px; z-index: 100;
  background: var(--accent); color: var(--on-accent); padding: var(--s-2) var(--s-4); border-radius: var(--r-md);
}
.skip-link:focus { top: var(--s-4); }
.boot, .noscript { padding: var(--s-10); text-align: center; color: var(--text-3); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ---------------------------------------------------------------- app shell */
.app { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: var(--s-2);
  padding: var(--s-5) var(--s-4);
  background: var(--surface);
  border-inline-end: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-1) var(--s-2) var(--s-5); }
.brand-mark {
  width: 36px; height: 36px; border-radius: var(--r-md); display: grid; place-items: center;
  background: var(--accent); color: var(--on-accent); flex: none;
}
.brand-name { font-weight: 800; font-size: 15px; }
.brand-sub { font-size: 12px; color: var(--text-3); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: var(--s-3);
  padding: 9px var(--s-3); border-radius: var(--r-md);
  color: var(--text-2); font-weight: 500;
  transition: background 120ms var(--ease), color 120ms var(--ease);
}
.nav-item:hover { background: var(--surface-3); color: var(--text); text-decoration: none; }
.nav-item[aria-current="page"] { background: var(--accent-soft); color: var(--accent-text); font-weight: 700; }
.nav-item .icon { flex: none; }
.nav-group { display: flex; flex-direction: column; gap: var(--s-2); margin: var(--s-3) 0 var(--s-1); padding: 0 var(--s-1); }
.nav-group-label { font-size: 11.5px; font-weight: 700; color: var(--text-3); padding-inline-start: var(--s-2); }
.nav-sep { height: 1px; background: var(--border); margin: var(--s-3) var(--s-2); }
.source-switch { display: flex; }
.source-switch button { flex: 1; justify-content: center; }
.topbar .source-switch { display: none; }
.topbar h1 { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; }
/* Which marketplace a page, an ad or a message belongs to. */
.source-tag { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700;
  line-height: 1.6; vertical-align: middle; background: var(--src-soft, var(--neutral-soft)); color: var(--src-text, var(--text-2)); }
.source-tag.bama { --src-soft: var(--accent-soft); --src-text: var(--accent-text); }
.source-tag.divar { --src-soft: var(--danger-soft); --src-text: var(--danger); }
.sidebar-footer { margin-top: auto; display: flex; flex-direction: column; gap: var(--s-3); }
.mode-card {
  display: flex; align-items: center; gap: var(--s-2); padding: var(--s-3);
  border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface-2); font-size: 12.5px;
}

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: var(--s-4); min-height: var(--header-h);
  padding: var(--s-3) var(--s-8);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar h1 { font-size: 19px; }
.topbar .page-sub { font-size: 12.5px; color: var(--text-3); }
.topbar-actions { margin-inline-start: auto; display: flex; align-items: center; gap: var(--s-2); }
.content { padding: var(--s-6) var(--s-8) var(--s-10); width: 100%; max-width: 1480px; }
.mobile-nav { display: none; }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  height: 38px; padding: 0 var(--s-4); border-radius: var(--r-md);
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  font-weight: 600; font-size: 13.5px; cursor: pointer; white-space: nowrap;
  transition: background 120ms var(--ease), border-color 120ms var(--ease), box-shadow 120ms var(--ease);
}
.btn:hover { background: var(--surface-3); text-decoration: none; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-3); color: var(--text); }
.btn-sm { height: 32px; padding: 0 var(--s-3); font-size: 12.5px; }
.icon-btn {
  width: 38px; height: 38px; display: inline-grid; place-items: center; flex: none;
  border-radius: var(--r-md); border: 1px solid transparent; background: transparent; color: var(--text-2);
  cursor: pointer; transition: background 120ms var(--ease), color 120ms var(--ease);
}
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.icon-btn.bordered { border-color: var(--border-strong); background: var(--surface); }
.btn .count {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; display: inline-grid; place-items: center;
  background: var(--accent); color: var(--on-accent); font-size: 11.5px;
}

/* ---------------------------------------------------------------- form controls */
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.input, .select {
  height: 38px; width: 100%; padding: 0 var(--s-3);
  border: 1px solid var(--border-strong); border-radius: var(--r-md); background: var(--surface);
  transition: border-color 120ms var(--ease), box-shadow 120ms var(--ease);
}
.input::placeholder { color: var(--text-3); }
.input:focus, .select:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus-ring); }
.select {
  appearance: none; padding-inline-end: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23808a99' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-position: left 11px center;
  background-size: 16px 16px;
  background-repeat: no-repeat;
}
.search { position: relative; flex: 1 1 280px; min-width: 200px; }
.search .icon { position: absolute; inset-inline-start: 11px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.search .input { padding-inline-start: 38px; }
.search kbd {
  position: absolute; inset-inline-end: 9px; top: 50%; transform: translateY(-50%);
  font: 600 11px var(--font); color: var(--text-3); border: 1px solid var(--border); border-radius: 5px; padding: 0 6px;
  background: var(--surface-2);
}
.range { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--s-2); }
.chip-toggle {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 var(--s-3);
  border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface);
  cursor: pointer; font-size: 13px; user-select: none;
}
.chip-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.chip-toggle:has(input:checked) { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-text); font-weight: 600; }
.chip-toggle:has(input:focus-visible) { box-shadow: var(--focus-ring); }
.chip-toggle .c { color: var(--text-3); font-size: 11.5px; }
.chips-wrap { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: var(--s-2) 0; cursor: pointer; }
.switch { position: relative; width: 38px; height: 22px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--border-strong); transition: background 150ms var(--ease); }
.switch span::after {
  content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; box-shadow: var(--shadow-sm); transition: transform 150ms var(--ease);
}
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(-16px); }
.switch input:focus-visible + span { box-shadow: var(--focus-ring); }

.segmented { display: inline-flex; padding: 3px; gap: 2px; border-radius: var(--r-md); background: var(--surface-3); }
.segmented button {
  height: 32px; padding: 0 var(--s-3); border: 0; border-radius: 8px; background: transparent; color: var(--text-2);
  font-weight: 600; font-size: 13px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
}
.segmented button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

/* ---------------------------------------------------------------- cards & layout helpers */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.card-head { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-4) var(--s-5) 0; }
.card-head h2 { font-size: 15px; }
.card-head .sub { font-size: 12.5px; color: var(--text-3); }
.card-head .actions { margin-inline-start: auto; display: flex; gap: var(--s-2); }
.card-body { padding: var(--s-4) var(--s-5) var(--s-5); }
.stack { display: flex; flex-direction: column; gap: var(--s-6); }
.grid-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-4); }
.grid-2-1 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: var(--s-4); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4); }
.row { display: flex; align-items: center; gap: var(--s-3); }
.row-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); }
.spacer { flex: 1; }

/* ---------------------------------------------------------------- stat tiles */
.tile { padding: var(--s-5); display: flex; flex-direction: column; gap: var(--s-2); min-height: 132px; }
.tile-label { display: flex; align-items: center; gap: var(--s-2); color: var(--text-2); font-weight: 600; font-size: 13px; }
.tile-label .icon-wrap { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); }
.tile-value { font-size: 30px; font-weight: 800; letter-spacing: -0.01em; line-height: 1.2; }
.tile-value.small { font-size: 22px; }
.tile-foot { font-size: 12.5px; color: var(--text-3); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- badges */
.badge {
  display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 9px; border-radius: 999px;
  font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--neutral-soft); color: var(--text-2);
}
.badge.sm { height: 20px; padding: 0 7px; font-size: 11.5px; }
.badge.accent { background: var(--accent-soft); color: var(--accent-text); }
.badge.success { background: var(--success-soft); color: var(--success); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.warning { background: var(--warning-soft); color: var(--warning); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; background: var(--status-neutral); }
.dot.good { background: var(--status-good); }
.dot.warning { background: var(--status-warning); }
.dot.serious { background: var(--status-serious); }
.dot.critical { background: var(--status-critical); }
.dot.live { box-shadow: 0 0 0 0 rgba(12, 163, 12, 0.5); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px rgba(12, 163, 12, 0); } 100% { box-shadow: 0 0 0 0 rgba(12, 163, 12, 0); } }
.delta { display: inline-flex; align-items: center; gap: 2px; font-weight: 700; font-size: 12.5px; white-space: nowrap; }
.delta.down { color: var(--success); }
.delta.up { color: var(--danger); }
.status-chip {
  display: inline-flex; align-items: center; gap: var(--s-2); height: 36px; padding: 0 var(--s-3);
  border: 1px solid var(--border); border-radius: 999px; background: var(--surface); font-size: 12.5px; color: var(--text-2);
}
.status-chip strong { color: var(--text); font-weight: 600; }

/* ---------------------------------------------------------------- tables */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
table.data th {
  position: sticky; top: 0; z-index: 1;
  text-align: start; font-weight: 600; font-size: 12px; color: var(--text-3);
  background: var(--surface-2); padding: 10px var(--s-4); border-bottom: 1px solid var(--border); white-space: nowrap;
}
table.data td { padding: 12px var(--s-4); border-bottom: 1px solid var(--border); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data td.num, table.data th.num { text-align: end; }
table.data tbody tr.clickable { cursor: pointer; transition: background 100ms var(--ease); }
table.data tbody tr.clickable:hover { background: var(--surface-2); }
table.data tbody tr.selected { background: var(--accent-soft); }
.cell-main { display: flex; align-items: center; gap: var(--s-3); min-width: 260px; }
table.data.compact th, table.data.compact td { padding-inline: var(--s-3); }
table.data.compact .cell-main { min-width: 230px; }
.cell-title { font-weight: 700; color: var(--text); background: none; border: 0; padding: 0; text-align: start; cursor: pointer; }
.cell-title:hover { color: var(--accent-text); }
.cell-sub { font-size: 12px; color: var(--text-3); }
.price { font-weight: 700; white-space: nowrap; }
.price .unit { font-weight: 500; color: var(--text-3); font-size: 11.5px; margin-inline-start: 3px; }
.loading-frame { transition: opacity 150ms var(--ease); }
.loading-frame.is-loading { opacity: 0.55; pointer-events: none; }

/* ---------------------------------------------------------------- thumbnails & media */
.thumb {
  width: 64px; height: 46px; border-radius: 8px; overflow: hidden; flex: none;
  background: var(--surface-3); display: grid; place-items: center; color: var(--text-3);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.lg { width: 100%; height: auto; aspect-ratio: 16 / 10; border-radius: 0; }

/* ---------------------------------------------------------------- listing cards (grid view) */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: var(--s-4); padding: var(--s-4); }
.lcard { overflow: hidden; display: flex; flex-direction: column; cursor: pointer; transition: box-shadow 150ms var(--ease), transform 150ms var(--ease); text-align: start; padding: 0; }
.lcard:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.lcard-body { padding: var(--s-3) var(--s-4) var(--s-4); display: flex; flex-direction: column; gap: 6px; }
.lcard-title { font-weight: 700; font-size: 14px; }
.facts { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------------------------------------------------------------- lists in cards */
.list { list-style: none; margin: 0; padding: 0; }
.list-item {
  display: flex; align-items: center; gap: var(--s-3); padding: 10px var(--s-5);
  border-top: 1px solid var(--border); cursor: pointer; transition: background 100ms var(--ease);
  width: 100%; background: transparent; border-inline: 0; border-bottom: 0; text-align: start;
}
.list-item:hover { background: var(--surface-2); }
.list-item .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.list-item .title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------------------------------------------------------------- toolbar & filters */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); padding: var(--s-4); }
.toolbar .select { width: auto; min-width: 140px; }
.active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); padding: 0 var(--s-4) var(--s-4); }
.filter-chip {
  display: inline-flex; align-items: center; gap: 4px; height: 28px; padding-inline: 10px 4px;
  border-radius: 999px; background: var(--accent-soft); color: var(--accent-text); font-size: 12.5px; font-weight: 600;
}
.filter-chip button { width: 22px; height: 22px; border-radius: 50%; border: 0; background: transparent; color: inherit; display: grid; place-items: center; cursor: pointer; }
.filter-chip button:hover { background: rgba(42, 120, 214, 0.15); }
.results-bar { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-4); border-top: 1px solid var(--border); }
.results-bar .count { font-weight: 700; }

/* ---------------------------------------------------------------- pagination */
.pagination { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: var(--s-3) var(--s-4); border-top: 1px solid var(--border); flex-wrap: wrap; }
.pages { display: flex; gap: 4px; }
.pages button {
  min-width: 34px; height: 34px; padding: 0 8px; border-radius: 8px; border: 1px solid transparent;
  background: transparent; cursor: pointer; font-weight: 600; color: var(--text-2);
}
.pages button:hover:not(:disabled) { background: var(--surface-3); }
.pages button[aria-current="page"] { background: var(--accent); color: var(--on-accent); }
.pages button:disabled { opacity: 0.4; cursor: default; }

/* ---------------------------------------------------------------- empty / error / skeleton */
.state { display: flex; flex-direction: column; align-items: center; gap: var(--s-3); padding: var(--s-10) var(--s-6); text-align: center; color: var(--text-2); }
.state .state-icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--surface-3); color: var(--text-3); }
.state h3 { font-size: 15px; color: var(--text); }
.skeleton {
  border-radius: 6px; height: 12px;
  background: linear-gradient(90deg, var(--surface-3) 25%, var(--surface-2) 50%, var(--surface-3) 75%);
  background-size: 300% 100%; animation: shimmer 1.4s infinite linear;
}
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* ---------------------------------------------------------------- drawer (side sheet) */
.scrim { position: fixed; inset: 0; z-index: 50; background: rgba(15, 20, 30, 0.42); animation: fade 160ms var(--ease); }
.drawer {
  position: fixed; top: 0; bottom: 0; z-index: 51; width: min(620px, 100vw);
  background: var(--surface); box-shadow: var(--shadow-lg); display: flex; flex-direction: column;
  animation: slide-end 200ms var(--ease);
}
.drawer.end { inset-inline-end: 0; }
.drawer.start { inset-inline-start: 0; width: min(420px, 100vw); animation-name: slide-start; }
.drawer-head { display: flex; align-items: flex-start; gap: var(--s-3); padding: var(--s-4) var(--s-5); border-bottom: 1px solid var(--border); }
.drawer-head h2 { font-size: 17px; }
.drawer-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; }
.drawer-section { padding: var(--s-5); border-bottom: 1px solid var(--border); }
.drawer-section:last-child { border-bottom: 0; }
.drawer-section h3 { font-size: 14px; margin-bottom: var(--s-3); }
.drawer-foot { display: flex; gap: var(--s-2); padding: var(--s-3) var(--s-5); border-top: 1px solid var(--border); background: var(--surface-2); }
@keyframes fade { from { opacity: 0; } }
@keyframes slide-end { from { transform: translateX(-24px); opacity: 0; } }
@keyframes slide-start { from { transform: translateX(24px); opacity: 0; } }

.gallery-main { position: relative; background: var(--surface-3); }
.gallery-main img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.gallery-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0, 0, 0, 0.45); color: #fff; border: 0; }
.gallery-nav:hover { background: rgba(0, 0, 0, 0.6); color: #fff; }
.gallery-nav.prev { inset-inline-start: var(--s-3); }
.gallery-nav.next { inset-inline-end: var(--s-3); }
.gallery-count { position: absolute; bottom: var(--s-3); inset-inline-start: var(--s-3); background: rgba(0, 0, 0, 0.55); color: #fff; border-radius: 999px; padding: 2px 10px; font-size: 12px; }
.gallery-thumbs { display: flex; gap: 6px; padding: var(--s-3) var(--s-5) 0; overflow-x: auto; }
.gallery-thumbs button { padding: 0; border: 2px solid transparent; border-radius: 8px; background: none; cursor: pointer; flex: none; overflow: hidden; }
.gallery-thumbs button[aria-current="true"] { border-color: var(--accent); }
.gallery-thumbs img { width: 72px; height: 48px; object-fit: cover; }

.price-hero { display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--s-2) var(--s-3); }
.price-hero .value { font-size: 26px; font-weight: 800; }
.key-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-2); margin-top: var(--s-4); }
.key-fact { padding: var(--s-3); border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--border); }
.key-fact .k { font-size: 11.5px; color: var(--text-3); }
.key-fact .v { font-weight: 700; font-size: 13.5px; }
.specs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--s-6); }
.spec { display: flex; justify-content: space-between; gap: var(--s-3); padding: 9px 0; border-bottom: 1px dashed var(--border); font-size: 13.5px; }
.spec .k { color: var(--text-3); }
.spec .v { font-weight: 600; text-align: end; }
.description { white-space: pre-line; color: var(--text-2); line-height: 1.9; }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li { position: relative; padding-inline-start: 22px; padding-bottom: var(--s-4); }
.timeline li::before { content: ""; position: absolute; inset-inline-start: 5px; top: 8px; bottom: -4px; width: 2px; background: var(--border); }
.timeline li:last-child::before { display: none; }
.timeline li::after { content: ""; position: absolute; inset-inline-start: 1px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent); }
.timeline .when { font-size: 12px; color: var(--text-3); }
.change-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.old-value { color: var(--text-3); text-decoration: line-through; }

/* ---------------------------------------------------------------- charts */
.chart { position: relative; }
/* SVG text anchors are physical (left/right) regardless of page direction; text itself still shapes RTL. */
.chart svg { display: block; overflow: visible; direction: ltr; }
.chart .gridline { stroke: var(--grid); stroke-width: 1; }
.chart .baseline { stroke: var(--axis); stroke-width: 1; }
.chart .tick { fill: var(--text-3); font-size: 11px; font-family: var(--font); }
.chart .bar { fill: var(--series-1); transition: opacity 100ms var(--ease); }
.chart .bar.dim { opacity: 0.45; }
.chart .line { fill: none; stroke: var(--series-1); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { fill: var(--series-1); opacity: 0.1; }
.chart .marker { fill: var(--series-1); stroke: var(--surface); stroke-width: 2; }
.chart .crosshair { stroke: var(--border-strong); stroke-width: 1; }
.chart .end-label { fill: var(--text); font-size: 12px; font-weight: 700; font-family: var(--font); }
.chart .hit { fill: transparent; cursor: default; }
.chart-tooltip {
  position: absolute; z-index: 5; pointer-events: none; min-width: 120px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--shadow-md);
  padding: 8px 10px; font-size: 12px; transform: translate(-50%, calc(-100% - 10px)); white-space: nowrap;
}
.chart-tooltip .v { font-weight: 800; font-size: 13.5px; color: var(--text); }
.chart-tooltip .l { color: var(--text-3); }
.chart-tooltip .key { display: inline-block; width: 12px; height: 2px; background: var(--series-1); vertical-align: middle; margin-inline-end: 6px; }
.run-strip { display: flex; gap: 3px; align-items: flex-end; height: 34px; }
.run-strip .run { flex: 1; max-width: 14px; min-width: 6px; height: 100%; border-radius: 3px; background: var(--status-neutral); }
.run-strip .run.good { background: var(--status-good); }
.run-strip .run.warning { background: var(--status-warning); }
.run-strip .run.serious { background: var(--status-serious); }
.run-strip .run.critical { background: var(--status-critical); }
.legend { display: flex; flex-wrap: wrap; gap: var(--s-3); font-size: 12px; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }

/* ---------------------------------------------------------------- health cards */
.health-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-4); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px var(--s-4); font-size: 13px; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; font-weight: 600; text-align: end; }
.message-cell { max-width: 520px; color: var(--text-2); overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- expert-price valuation */
.gap { display: inline-flex; align-items: center; gap: 2px; font-weight: 700; font-size: 12.5px; color: var(--success); white-space: nowrap; }
.btn-open-source { color: var(--accent-text); }
.btn-open-source:hover { background: var(--accent-soft); border-color: var(--accent); }
.gap-toman { font-size: 12px; font-weight: 600; color: var(--success); white-space: nowrap; }
.btn-opportunity[aria-pressed="true"] { background: var(--success-soft); border-color: var(--success); color: var(--success); }
.btn-opportunity .count { background: var(--success); }
.chip-toggle.good:has(input:checked) { background: var(--success-soft); border-color: var(--success); color: var(--success); }
.val-head { margin-bottom: var(--s-3); }
.val-head h3 { margin: 0; }
.val-range { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-2); }
.val-range .cell { padding: var(--s-3); border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--border); }
.val-range .cell.main { background: var(--accent-soft); border-color: var(--accent); }
.val-range .k { font-size: 11.5px; color: var(--text-3); }
.val-range .main .k { color: var(--accent-text); font-weight: 600; }
.val-range .v { font-weight: 800; font-size: 15px; }
.val-band { margin-top: var(--s-4); }
.val-band .track { position: relative; height: 22px; }
.val-band .track::before { content: ""; position: absolute; inset-inline: 0; top: 10px; height: 2px; border-radius: 2px; background: var(--grid); }
.val-band .band { position: absolute; top: 6px; height: 10px; border-radius: 4px; background: var(--accent-soft); border: 1px solid var(--accent); }
.val-band .tick { position: absolute; top: 2px; width: 3px; height: 18px; margin-inline-start: -1.5px; border-radius: 2px; background: var(--accent); }
.val-band .ask { position: absolute; top: 4px; width: 14px; height: 14px; margin-inline-start: -7px; border-radius: 50%; background: var(--text-2); box-shadow: 0 0 0 2px var(--surface); }
.val-band .ask.below { background: var(--success); }
.val-band .legend { margin-top: var(--s-2); font-size: 11.5px; }
.val-band .legend i { display: inline-block; flex: none; }
.val-band .lg-band { width: 14px; height: 8px; border-radius: 3px; background: var(--accent-soft); border: 1px solid var(--accent); }
.val-band .lg-tick { width: 3px; height: 12px; border-radius: 2px; background: var(--accent); }
.val-band .lg-ask { width: 10px; height: 10px; border-radius: 50%; background: var(--text-2); }
.val-band .lg-ask.below { background: var(--success); }
.val-compare { display: grid; gap: 2px; margin-top: var(--s-4); padding: var(--s-3) var(--s-4); border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--border); font-size: 13px; color: var(--text-2); }
.val-compare.good { background: var(--success-soft); border-color: transparent; }
.val-compare .k { font-size: 12px; color: var(--text-2); font-weight: 600; }
.val-compare .gap-amount { font-size: 22px; font-weight: 800; color: var(--success); }
.val-specs { margin-top: var(--s-3); }
.val-specs .spec .v .cell-sub { font-weight: 400; }
.val-notes { margin: var(--s-3) 0 0; padding-inline-start: 18px; display: grid; gap: 4px; font-size: 12.5px; color: var(--text-2); }
.val-notes li.warn { color: var(--warning); font-weight: 600; }
.val-foot { margin-top: var(--s-3); font-size: 11.5px; }
.callout { display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-3) var(--s-4); border-radius: var(--r-md); background: var(--warning-soft); color: var(--text); font-size: 13px; }
.callout > .icon { color: var(--warning); flex: none; margin-top: 2px; }
.callout p { margin: 4px 0 0; color: var(--text-2); }
.cmd { display: block; margin-top: var(--s-2); padding: 6px 10px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--border); font: 12px ui-monospace, Consolas, monospace; overflow-wrap: anywhere; text-align: left; }
.val-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: var(--s-2); }
.val-stats > a { display: flex; flex-direction: column; gap: 2px; padding: var(--s-3); border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--border); color: var(--text); transition: border-color 120ms var(--ease); }
.val-stats > a:hover { text-decoration: none; border-color: var(--accent); }
.val-stats .k { font-size: 11.5px; color: var(--text-3); }
.val-stats .v { font-size: 20px; font-weight: 800; }
.val-stats .v.good { color: var(--success); }
.val-stats > div { display: flex; flex-direction: column; gap: 2px; padding: var(--s-3); border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--border); }
.gallery-video { position: absolute; inset-block-end: var(--s-3); inset-inline-start: var(--s-3); }
.sub-heading { font-size: 13.5px; margin: var(--s-5) 0 var(--s-3); }

/* ---------------------------------------------------------------- bot settings page */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
.tab {
  display: inline-flex; align-items: center; gap: var(--s-2); padding: 10px var(--s-4); border: 0; background: none;
  color: var(--text-2); font-weight: 600; font-size: 13.5px; cursor: pointer; white-space: nowrap;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { color: var(--accent-text); border-bottom-color: var(--accent); }
.tab .count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--warning-soft); color: var(--warning); font-size: 11.5px; display: inline-grid; place-items: center; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4); align-items: start; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4) var(--s-5); }
.form-grid .wide, .field.wide { grid-column: 1 / -1; }
.form-stack { display: flex; flex-direction: column; gap: var(--s-4); }
.stack-sm { display: flex; flex-direction: column; gap: var(--s-3); }
.field-hint { display: block; font-size: 12px; color: var(--text-3); font-weight: 400; line-height: 1.7; }
.input-suffix { position: relative; display: flex; align-items: center; }
.input-suffix .input { flex: 1; }
.input-suffix .suffix { position: absolute; inset-inline-end: 12px; font-size: 12px; color: var(--text-3); pointer-events: none; }
.input-suffix .input:has(+ .suffix) { padding-inline-end: 96px; }
.input.ltr-num { direction: ltr; text-align: right; }
.input-sm { height: 32px; font-size: 13px; }
.textarea { height: auto; min-height: 110px; padding: 10px 12px; resize: vertical; font: 12.5px/1.6 ui-monospace, Consolas, monospace; white-space: pre; }
.grow { flex: 1 1 220px; min-width: 0; }
.small { font-size: 12px; }
.switch-field .switch-row { padding: 0; align-items: flex-start; }
.switch-label { display: block; font-weight: 600; font-size: 13.5px; }
.switch-list { display: flex; flex-direction: column; gap: var(--s-4); padding-top: var(--s-2); border-top: 1px dashed var(--border); }
.switch input:disabled + span { opacity: 0.5; }
td > .switch { display: inline-block; vertical-align: middle; }
/* Addresses, versions and tokens: Latin digits (the UI font draws digits in Persian). */
.mono { font-family: ui-monospace, Consolas, "Courier New", monospace; font-size: 12.5px; direction: ltr; unicode-bidi: isolate; }
.help-box { margin-top: var(--s-4); padding: var(--s-3) var(--s-4); border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--border); font-size: 13px; line-height: 1.9; color: var(--text-2); }
.callout.info { background: var(--accent-soft); }
.callout.info > .icon { color: var(--accent-text); }
.login-screen { min-height: 100vh; display: grid; place-items: center; padding: var(--s-4); background: var(--bg); }
.login-card { width: min(380px, 100%); padding: var(--s-8) var(--s-6); display: flex; flex-direction: column; gap: var(--s-3); align-items: stretch; }
.login-card h1 { font-size: 20px; text-align: center; }
.login-card > p { text-align: center; margin-bottom: var(--s-2); }
.login-mark { width: 52px; height: 52px; margin: 0 auto var(--s-2); border-radius: 14px; }
/* User name and password are typed left-to-right; the show/hide button sits on the left, inside the padding the
   field keeps free for it (physical sides: logical ones would follow the field's own LTR direction). */
.ltr-field { direction: ltr; text-align: left; }
.password-field { position: relative; display: flex; }
.password-field .input { flex: 1; padding-left: 46px; padding-right: 12px; }
.password-field .icon-btn { position: absolute; left: 4px; right: auto; top: 50%; transform: translateY(-50%); }
.login-card .field { display: flex; flex-direction: column; gap: var(--s-1); }

/* ---------------------------------------------------------------- sales follow-up */
.check-row { display: flex; align-items: flex-start; gap: var(--s-3); cursor: pointer; font-size: 13.5px; }
.check-row input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.check-row > span { display: flex; flex-direction: column; gap: 2px; }
.check-row.inline { align-items: center; gap: var(--s-2); white-space: nowrap; }
.lead-form { display: flex; flex-direction: column; gap: var(--s-4); }
.lead-box .lead-form { padding: var(--s-4) 0 0; margin: 0; border: 0; }
.lead-form .field { display: flex; flex-direction: column; gap: var(--s-1); }
.status-options { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.status-options[disabled] { opacity: 0.55; }
.status-options legend { margin-bottom: var(--s-2); padding: 0; }
.status-option { display: flex; align-items: center; gap: var(--s-2); padding: 9px var(--s-3); border: 1px solid var(--border);
  border-radius: var(--r-md); background: var(--surface); cursor: pointer; font-size: 13.5px; }
.status-option:hover { border-color: var(--border-strong); }
.status-option.selected { border-color: var(--accent); background: var(--accent-soft); }
.status-option input { accent-color: var(--accent); }
.status-option .n { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--surface-3); font-size: 11.5px; font-weight: 700; color: var(--text-2); }
.note-input { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; line-height: 1.7; }
.user-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
  background: var(--surface-3); font-size: 12.5px; color: var(--text-2); white-space: nowrap; }
.login-card .btn { margin-top: var(--s-2); height: 42px; }
.interval-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--s-3); }
.interval-row .field { flex: 1 1 220px; }
.status-line { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); font-size: 13px; color: var(--text-2); padding: var(--s-3) var(--s-4); border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--border); }
.status-line strong { color: var(--text); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.gap-min.below { font-size: 12px; font-weight: 700; color: var(--success); white-space: nowrap; }
.val-revalue { margin-top: var(--s-3); }
.form-error { color: var(--danger); font-size: 13px; }
.error-list { list-style: none; margin: var(--s-3) 0 0; padding: 0; display: grid; gap: 6px; font-size: 12.5px; }
.error-list li { display: flex; flex-wrap: wrap; gap: var(--s-2); padding: 6px 10px; border-radius: var(--r-sm); background: var(--danger-soft); }
.error-list code { font: 11.5px ui-monospace, Consolas, monospace; color: var(--text-2); overflow-wrap: anywhere; }
.order-btns { display: inline-flex; flex-direction: column; }
.order-btns .icon-btn { width: 26px; height: 20px; }
.proxy-error { max-width: 280px; white-space: normal; overflow-wrap: anywhere; color: var(--danger); }
.events { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13px; }
.events li { display: grid; grid-template-columns: 110px 1fr; gap: var(--s-3); padding: 6px 0; border-bottom: 1px dashed var(--border); }
.events li:last-child { border-bottom: 0; }
.events li.failover, .events li.no_working_proxy, .events li.activate_failed { color: var(--danger); }
.events li.activated { color: var(--success); }
.spinner { display: inline-block; border: 2px solid currentColor; border-inline-end-color: transparent; border-radius: 50%; animation: spin 0.8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.toasts { position: fixed; inset-inline-start: var(--s-5); bottom: var(--s-5); z-index: 60; display: flex; flex-direction: column; gap: var(--s-2); max-width: min(420px, calc(100vw - 32px)); }
.toast { display: flex; align-items: flex-start; gap: var(--s-2); padding: 10px 14px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow-md); font-size: 13px; animation: fade 150ms var(--ease); }
.toast.success .icon { color: var(--success); }
.toast.error { border-color: var(--danger); }
.toast.error .icon { color: var(--danger); }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1280px) {
  .grid-tiles, .health-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1080px) {
  :root { --sidebar-w: 76px; }
  .brand-text, .nav-label, .mode-card .mode-text { display: none; }
  .brand, .nav-item, .mode-card { justify-content: center; }
  .nav-group { display: none; }
  .topbar .source-switch { display: inline-flex; }
  .grid-2-1, .grid-2, .settings-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { display: none; }
  .topbar { padding: var(--s-3) var(--s-4); }
  .topbar .page-sub, .status-chip .hide-sm { display: none; }
  .content { padding: var(--s-4) var(--s-4) 96px; }
  .grid-tiles { gap: var(--s-3); }
  .tile { min-height: 0; padding: var(--s-4); }
  .tile-value { font-size: 24px; }
  .health-grid { grid-template-columns: minmax(0, 1fr); }
  .key-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .val-range { grid-template-columns: minmax(0, 1fr); }
  .specs { grid-template-columns: minmax(0, 1fr); }
  .settings-grid, .form-grid { grid-template-columns: minmax(0, 1fr); }
  .toasts { bottom: calc(76px + env(safe-area-inset-bottom)); inset-inline: var(--s-4); }
  .toolbar .select { flex: 1 1 140px; }
  .hide-sm { display: none !important; }
  .mobile-nav {
    display: grid; grid-template-columns: repeat(8, 1fr); position: fixed; bottom: 0; inset-inline: 0; z-index: 30;
    background: var(--surface); border-top: 1px solid var(--border); padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
  }
  .mobile-nav.expert-nav { grid-template-columns: repeat(2, 1fr); }
  .mobile-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; font-size: 10.5px; color: var(--text-3); border-radius: 8px; white-space: nowrap; }
  .topbar { flex-wrap: wrap; }
  .topbar h1 { font-size: 17px; }
  .mobile-nav a[aria-current="page"] { color: var(--accent-text); background: var(--accent-soft); }
  .mobile-nav a:hover { text-decoration: none; }
}
@media (forced-colors: active) {
  .bar, .line, .marker { forced-color-adjust: auto; }
  .btn, .badge, .chip-toggle { border: 1px solid CanvasText; }
}
@media print {
  .sidebar, .topbar-actions, .mobile-nav, .toolbar, .pagination { display: none !important; }
  .app { display: block; }
}
