/* =====================================================================
   FleetTruck360 — Design System (visual mockup)
   Shared tokens + components used by every mockup page.
   Real app: same tokens live in frontend/src/styles (data-theme / data-bs-theme).
   ===================================================================== */

/* ---------- 1. Tokens: default theme "ocean" = Fleet Blue ---------- */
:root {
  --tms-primary: #2563EB;
  --tms-primary-rgb: 37, 99, 235;
  --tms-primary-dark: #1E40AF;
  --tms-gradient: linear-gradient(135deg, #1E3A8A 0%, #2563EB 55%, #06B6D4 100%);
  --tms-accent: #F59E0B;
  --tms-accent-rgb: 245, 158, 11;

  --tms-surface: #FFFFFF;
  --tms-surface-2: #F4F7FC;
  --tms-surface-3: #EEF2F9;
  --tms-border: #E5E9F2;
  --tms-text: #0F172A;
  --tms-muted: #64748B;

  /* status */
  --st-draft: #64748B;
  --st-submitted: #3B82F6;
  --st-approved: #10B981;
  --st-rejected: #EF4444;
  --st-settled: #8B5CF6;
  --st-warning: #F59E0B;
  --st-trial: #06B6D4;

  /* chart palette */
  --c1: #2563EB; --c2: #10B981; --c3: #F59E0B; --c4: #8B5CF6;
  --c5: #EF4444; --c6: #06B6D4; --c7: #EC4899; --c8: #84CC16;

  --tms-radius: 16px;
  --tms-radius-sm: 12px;
  --tms-shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .06);
  --tms-shadow: 0 4px 6px -1px rgba(15, 23, 42, .06), 0 10px 24px -6px rgba(15, 23, 42, .10);
  --tms-shadow-lg: 0 20px 50px -12px rgba(15, 23, 42, .25);

  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-head: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
}

/* ---------- 2. Themes (from the conventions file) ---------- */
[data-theme="indigo"]  { --tms-primary:#4F46E5; --tms-primary-rgb:79,70,229;  --tms-primary-dark:#3730A3; --tms-gradient:linear-gradient(135deg,#312E81 0%,#4F46E5 55%,#818CF8 100%); }
[data-theme="emerald"] { --tms-primary:#059669; --tms-primary-rgb:5,150,105;  --tms-primary-dark:#047857; --tms-gradient:linear-gradient(135deg,#064E3B 0%,#059669 55%,#34D399 100%); }
[data-theme="sunset"]  { --tms-primary:#EA580C; --tms-primary-rgb:234,88,12;  --tms-primary-dark:#C2410C; --tms-gradient:linear-gradient(135deg,#7C2D12 0%,#EA580C 55%,#F59E0B 100%); --tms-accent:#0EA5E9; --tms-accent-rgb:14,165,233; }
[data-theme="royal"]   { --tms-primary:#7C3AED; --tms-primary-rgb:124,58,237; --tms-primary-dark:#5B21B6; --tms-gradient:linear-gradient(135deg,#4F46E5 0%,#7C3AED 50%,#DB2777 100%); }
[data-theme="rose"]    { --tms-primary:#E11D48; --tms-primary-rgb:225,29,72;  --tms-primary-dark:#BE123C; --tms-gradient:linear-gradient(135deg,#881337 0%,#E11D48 55%,#FB7185 100%); }
[data-theme="teal"]    { --tms-primary:#0D9488; --tms-primary-rgb:13,148,136; --tms-primary-dark:#0F766E; --tms-gradient:linear-gradient(135deg,#134E4A 0%,#0D9488 55%,#22D3EE 100%); }
[data-theme="slate"]   { --tms-primary:#334155; --tms-primary-rgb:51,65,85;   --tms-primary-dark:#1E293B; --tms-gradient:linear-gradient(135deg,#0F172A 0%,#334155 55%,#64748B 100%); }

/* ---------- 3. Dark mode ---------- */
[data-bs-theme="dark"] {
  --tms-surface: #111A2E;
  --tms-surface-2: #0B1220;
  --tms-surface-3: #17223A;
  --tms-border: #24324D;
  --tms-text: #E2E8F0;
  --tms-muted: #94A3B8;
  --tms-shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --tms-shadow: 0 10px 24px -6px rgba(0,0,0,.5);
  --bs-body-bg: #0B1220;
  --bs-body-color: #E2E8F0;
  --bs-border-color: #24324D;
  --bs-secondary-color: #94A3B8;
  --bs-tertiary-bg: #17223A;
}

/* ---------- 4. Base ---------- */
html, body { background: var(--tms-surface-2); color: var(--tms-text); }
body { font-family: var(--font-body); font-size: 14px; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, h5, h6, .font-head { font-family: var(--font-head); font-weight: 700; letter-spacing: -.01em; }
h1, h2, h3, h4, h5, h6 { color: var(--tms-text); }
.num, .kpi-value, td.num, .tabular { font-variant-numeric: tabular-nums; }
.text-muted, .text-secondary { color: var(--tms-muted) !important; }
a { color: var(--tms-primary); }
.text-primary { color: var(--tms-primary) !important; }
.bg-primary { background: var(--tms-primary) !important; }
.bg-gradient-tms { background: var(--tms-gradient) !important; color: #fff; }
.text-accent { color: var(--tms-accent) !important; }
.border-tms { border-color: var(--tms-border) !important; }
.small-caps { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; color: var(--tms-muted); }
::selection { background: rgba(var(--tms-primary-rgb), .2); }

/* Bootstrap buttons re-themed with tokens */
.btn { border-radius: var(--tms-radius-sm); font-weight: 600; padding: .55rem 1rem; }
.btn-sm { border-radius: 10px; padding: .35rem .7rem; }
.btn-lg { padding: .8rem 1.25rem; border-radius: 14px; }
.btn-primary {
  --bs-btn-bg: var(--tms-primary); --bs-btn-border-color: var(--tms-primary);
  --bs-btn-hover-bg: var(--tms-primary-dark); --bs-btn-hover-border-color: var(--tms-primary-dark);
  --bs-btn-active-bg: var(--tms-primary-dark); --bs-btn-active-border-color: var(--tms-primary-dark);
  box-shadow: 0 6px 16px -6px rgba(var(--tms-primary-rgb), .6);
}
.btn-accent { background: var(--tms-accent); color: #111827; border: 0; box-shadow: 0 8px 18px -6px rgba(var(--tms-accent-rgb), .7); }
.btn-accent:hover { filter: brightness(.95); color: #111827; }
.btn-soft { background: rgba(var(--tms-primary-rgb), .1); color: var(--tms-primary); border: 0; }
.btn-soft:hover { background: rgba(var(--tms-primary-rgb), .18); color: var(--tms-primary); }
.btn-ghost { background: transparent; border: 1px solid var(--tms-border); color: var(--tms-text); }
.btn-ghost:hover { background: var(--tms-surface-3); color: var(--tms-text); }
.btn-success-soft { background: rgba(16,185,129,.12); color: #059669; border: 0; }
.btn-danger-soft { background: rgba(239,68,68,.12); color: #DC2626; border: 0; }
.btn-gradient { background: var(--tms-gradient); color: #fff; border: 0; box-shadow: 0 8px 20px -8px rgba(var(--tms-primary-rgb), .8); }
.btn-gradient:hover { color: #fff; filter: brightness(1.05); }

.form-control, .form-select { border-radius: var(--tms-radius-sm); border-color: var(--tms-border); background-color: var(--tms-surface); color: var(--tms-text); padding: .6rem .85rem; }
.form-control:focus, .form-select:focus { border-color: var(--tms-primary); box-shadow: 0 0 0 4px rgba(var(--tms-primary-rgb), .15); }
.form-label { font-weight: 600; font-size: 12.5px; color: var(--tms-muted); margin-bottom: .3rem; }
.input-group-text { background: var(--tms-surface-3); border-color: var(--tms-border); border-radius: var(--tms-radius-sm); color: var(--tms-muted); }
.form-check-input:checked { background-color: var(--tms-primary); border-color: var(--tms-primary); }
.form-hint { font-size: 12px; color: var(--tms-muted); }
.field-auto { position: relative; }
.field-auto::after { content: "AUTO"; position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-size: 9px; font-weight: 700; letter-spacing: .08em; color: var(--tms-primary); background: rgba(var(--tms-primary-rgb), .1); padding: 2px 6px; border-radius: 6px; }

/* ---------- 5. Cards & KPI ---------- */
.tms-card { background: var(--tms-surface); border: 1px solid var(--tms-border); border-radius: var(--tms-radius); box-shadow: var(--tms-shadow-sm); }
.tms-card-header { padding: 14px 18px; border-bottom: 1px solid var(--tms-border); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tms-card-header h6, .tms-card-header .title { margin: 0; font-family: var(--font-head); font-weight: 700; font-size: 15px; }
.tms-card-body { padding: 18px; }
.tms-card.hover-lift { transition: transform .15s ease, box-shadow .15s ease; }
.tms-card.hover-lift:hover { transform: translateY(-2px); box-shadow: var(--tms-shadow); }

.kpi-card { background: var(--tms-surface); border: 1px solid var(--tms-border); border-radius: var(--tms-radius); padding: 16px; box-shadow: var(--tms-shadow-sm); position: relative; overflow: hidden; height: 100%; }
.kpi-card .kpi-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; }
.kpi-card .kpi-label { font-size: 12.5px; color: var(--tms-muted); font-weight: 600; margin-top: 12px; }
.kpi-card .kpi-value { font-family: var(--font-head); font-size: 26px; font-weight: 800; line-height: 1.15; margin-top: 2px; }
.kpi-card .kpi-sub { font-size: 12px; color: var(--tms-muted); }
.kpi-card.kpi-hero { background: var(--tms-gradient); color: #fff; border: 0; }
.kpi-card.kpi-hero .kpi-label, .kpi-card.kpi-hero .kpi-sub { color: rgba(255,255,255,.8); }
.kpi-card.kpi-hero .kpi-icon { background: rgba(255,255,255,.18); color: #fff; }
.kpi-card .kpi-spark { position: absolute; right: 12px; bottom: 10px; width: 90px; height: 34px; opacity: .9; }

.trend { display: inline-flex; align-items: center; gap: 2px; font-size: 11.5px; font-weight: 700; padding: 2px 7px; border-radius: 999px; }
.trend.up { color: #059669; background: rgba(16,185,129,.12); }
.trend.down { color: #DC2626; background: rgba(239,68,68,.12); }
.kpi-hero .trend.up, .kpi-hero .trend.down { color: #fff; background: rgba(255,255,255,.2); }

/* tints (icon circles, soft badges) */
.tint-blue   { background: rgba(37,99,235,.12);  color: #2563EB; }
.tint-green  { background: rgba(16,185,129,.14); color: #059669; }
.tint-amber  { background: rgba(245,158,11,.16); color: #D97706; }
.tint-violet { background: rgba(139,92,246,.14); color: #7C3AED; }
.tint-rose   { background: rgba(239,68,68,.12);  color: #DC2626; }
.tint-cyan   { background: rgba(6,182,212,.14);  color: #0891B2; }
.tint-pink   { background: rgba(236,72,153,.13); color: #DB2777; }
.tint-slate  { background: rgba(100,116,139,.14); color: #475569; }
.tint-primary{ background: rgba(var(--tms-primary-rgb),.12); color: var(--tms-primary); }
[data-bs-theme="dark"] .tint-slate { color: #CBD5E1; }

/* ---------- 6. Status badges ---------- */
.status-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; padding: 4px 10px; border-radius: 999px; white-space: nowrap; letter-spacing: .01em; }
.status-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-draft     { color: var(--st-draft);     background: rgba(100,116,139,.14); }
.status-submitted { color: #2563EB;             background: rgba(59,130,246,.13); }
.status-approved  { color: #059669;             background: rgba(16,185,129,.14); }
.status-rejected  { color: #DC2626;             background: rgba(239,68,68,.12); }
.status-settled   { color: #7C3AED;             background: rgba(139,92,246,.14); }
.status-warning   { color: #B45309;             background: rgba(245,158,11,.16); }
.status-trial     { color: #0891B2;             background: rgba(6,182,212,.14); }
.status-active    { color: #059669;             background: rgba(16,185,129,.14); }
.status-suspended { color: #DC2626;             background: rgba(239,68,68,.12); }
[data-bs-theme="dark"] .status-submitted { color: #60A5FA; }
[data-bs-theme="dark"] .status-approved, [data-bs-theme="dark"] .status-active { color: #34D399; }
[data-bs-theme="dark"] .status-rejected, [data-bs-theme="dark"] .status-suspended { color: #F87171; }
[data-bs-theme="dark"] .status-settled { color: #A78BFA; }
[data-bs-theme="dark"] .status-warning { color: #FBBF24; }
[data-bs-theme="dark"] .status-trial { color: #22D3EE; }
/* left colour edge on cards by status */
.edge-draft { box-shadow: inset 4px 0 0 var(--st-draft); }
.edge-submitted { box-shadow: inset 4px 0 0 var(--st-submitted); }
.edge-approved { box-shadow: inset 4px 0 0 var(--st-approved); }
.edge-rejected { box-shadow: inset 4px 0 0 var(--st-rejected); }
.edge-settled { box-shadow: inset 4px 0 0 var(--st-settled); }

.pill { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; }
.lock-badge { font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 6px; background: rgba(var(--tms-accent-rgb), .18); color: #B45309; }

/* ---------- 7. Desktop app shell ---------- */
.app-shell { display: grid; grid-template-columns: 264px 1fr; min-height: 100vh; }
.sidebar { background: #0F172A; color: #CBD5E1; padding: 18px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; }
[data-sidebar="light"] .sidebar { background: var(--tms-surface); color: var(--tms-text); border-right: 1px solid var(--tms-border); }
[data-sidebar="brand"] .sidebar { background: var(--tms-gradient); color: #fff; }
.sidebar .brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; }
.brand-logo { width: 38px; height: 38px; border-radius: 12px; background: var(--tms-gradient); display: grid; place-items: center; color: #fff; font-size: 20px; box-shadow: 0 6px 16px -6px rgba(var(--tms-primary-rgb), .9); }
[data-sidebar="brand"] .brand-logo { background: rgba(255,255,255,.2); }
.sidebar .brand-name { font-family: var(--font-head); font-weight: 800; font-size: 17px; color: #fff; line-height: 1.1; }
[data-sidebar="light"] .sidebar .brand-name { color: var(--tms-text); }
.sidebar .brand-sub { font-size: 11px; opacity: .65; }
.company-switch { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); border-radius: 12px; padding: 10px; display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
[data-sidebar="light"] .company-switch { background: var(--tms-surface-3); border-color: var(--tms-border); }
.company-avatar { width: 32px; height: 32px; border-radius: 9px; background: #F59E0B; color: #111; font-weight: 800; display: grid; place-items: center; font-size: 14px; flex-shrink: 0; }
.nav-section { font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; opacity: .5; font-weight: 700; padding: 14px 10px 6px; }
.side-link { display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 10px; color: inherit; text-decoration: none; font-weight: 500; font-size: 13.5px; opacity: .85; transition: background .12s; }
.side-link i { font-size: 17px; width: 20px; text-align: center; }
.side-link:hover { background: rgba(255,255,255,.07); color: inherit; opacity: 1; }
[data-sidebar="light"] .side-link:hover { background: var(--tms-surface-3); }
.side-link.active { background: var(--tms-primary); color: #fff; opacity: 1; box-shadow: 0 6px 16px -8px rgba(var(--tms-primary-rgb), .9); }
[data-sidebar="brand"] .side-link.active { background: rgba(255,255,255,.22); }
.side-link .badge-count { margin-left: auto; background: var(--tms-accent); color: #111; font-size: 10.5px; font-weight: 800; border-radius: 999px; padding: 1px 7px; }
.side-link .lock-badge { margin-left: auto; }
.sidebar .help-box { margin-top: auto; background: rgba(255,255,255,.06); border-radius: 14px; padding: 14px; font-size: 12.5px; }
[data-sidebar="light"] .sidebar .help-box { background: var(--tms-surface-3); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 64px; display: flex; align-items: center; gap: 12px; padding: 0 24px; background: rgba(255,255,255,.75); backdrop-filter: blur(12px); border-bottom: 1px solid var(--tms-border); position: sticky; top: 0; z-index: 20; }
[data-bs-theme="dark"] .topbar { background: rgba(17,26,46,.8); }
.topbar .search { flex: 1; max-width: 420px; }
.topbar .search .form-control { background: var(--tms-surface-3); border: 0; padding-left: 38px; }
.topbar .search { position: relative; }
.topbar .search i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--tms-muted); }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--tms-border); background: var(--tms-surface); display: grid; place-items: center; position: relative; color: var(--tms-text); font-size: 18px; }
.icon-btn .dot { position: absolute; top: 7px; right: 8px; min-width: 16px; height: 16px; font-size: 10px; border-radius: 99px; background: #EF4444; color: #fff; font-weight: 700; display: grid; place-items: center; padding: 0 4px; border: 2px solid var(--tms-surface); }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--tms-gradient); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 14px; flex-shrink: 0; }
.avatar.sm { width: 30px; height: 30px; font-size: 12px; }
.avatar.xs { width: 24px; height: 24px; font-size: 10px; }

.page-hero { background: var(--tms-gradient); color: #fff; padding: 26px 28px 70px; position: relative; overflow: hidden; }
.page-hero::after { content: ""; position: absolute; right: -60px; top: -80px; width: 320px; height: 320px; border-radius: 50%; background: rgba(255,255,255,.08); }
.page-hero::before { content: ""; position: absolute; right: 140px; bottom: -120px; width: 240px; height: 240px; border-radius: 50%; background: rgba(255,255,255,.06); }
.page-hero h1, .page-hero h2, .page-hero h3 { color: #fff; }
.page-hero .crumbs { font-size: 12.5px; opacity: .8; }
.page-body { padding: 24px 28px 40px; }
.page-hero + .page-body { margin-top: -50px; position: relative; z-index: 2; }
.page-title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.page-title-row h2 { margin: 0; font-size: 22px; }

/* ---------- 8. Banners ---------- */
.banner { border-radius: 14px; padding: 12px 16px; display: flex; align-items: center; gap: 12px; font-weight: 500; }
.banner-trial { background: linear-gradient(90deg, rgba(6,182,212,.14), rgba(var(--tms-primary-rgb),.10)); color: var(--tms-text); border: 1px solid rgba(6,182,212,.3); }
.banner-warn { background: rgba(245,158,11,.12); border: 1px solid rgba(245,158,11,.35); }
.banner-urgent { background: linear-gradient(90deg, #DC2626, #F97316); color: #fff; }
.banner-info { background: rgba(var(--tms-primary-rgb),.08); border: 1px solid rgba(var(--tms-primary-rgb),.2); }
.banner .banner-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 18px; flex-shrink: 0; }
.hero-banner-glass { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22); color: #fff; backdrop-filter: blur(6px); }

/* ---------- 9. Filters ---------- */
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filter-bar .search-box { position: relative; flex: 1 1 260px; max-width: 360px; }
.filter-bar .search-box i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--tms-muted); }
.filter-bar .search-box .form-control { padding-left: 36px; }
.filter-select { border: 1px solid var(--tms-border); background: var(--tms-surface); border-radius: 12px; padding: .5rem .8rem; font-weight: 600; font-size: 13px; color: var(--tms-text); display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.filter-select i.bi-chevron-down { font-size: 11px; opacity: .6; }
.filter-select.is-set { border-color: rgba(var(--tms-primary-rgb), .5); background: rgba(var(--tms-primary-rgb), .08); color: var(--tms-primary); }
.btn-filter { border: 1px solid var(--tms-border); background: var(--tms-surface); color: var(--tms-text); border-radius: 12px; padding: .5rem .9rem; font-weight: 700; font-size: 13px; display: inline-flex; align-items: center; gap: 7px; }
.btn-filter.active { background: var(--tms-primary); border-color: var(--tms-primary); color: #fff; box-shadow: 0 6px 16px -6px rgba(var(--tms-primary-rgb), .7); }
.count-badge { background: var(--tms-accent); color: #111; font-size: 11px; font-weight: 800; border-radius: 999px; min-width: 20px; height: 20px; display: inline-grid; place-items: center; padding: 0 6px; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 12px; border-radius: 14px; background: rgba(var(--tms-primary-rgb), .06); border: 1px dashed rgba(var(--tms-primary-rgb), .35); }
.filter-chips .label { font-size: 12px; font-weight: 700; color: var(--tms-primary); display: inline-flex; gap: 6px; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 6px 5px 11px; border-radius: 999px; background: var(--tms-primary); color: #fff; font-size: 12px; font-weight: 600; }
.chip b { font-weight: 800; }
.chip .x { width: 18px; height: 18px; border-radius: 50%; background: rgba(255,255,255,.25); display: grid; place-items: center; font-size: 11px; cursor: pointer; border: 0; color: #fff; }
.chip.soft { background: rgba(var(--tms-primary-rgb), .12); color: var(--tms-primary); }
.chip.soft .x { background: rgba(var(--tms-primary-rgb), .18); color: var(--tms-primary); }
.clear-all { font-size: 12.5px; font-weight: 700; color: #DC2626; text-decoration: none; margin-left: 4px; cursor: pointer; }
.result-count { font-size: 13px; color: var(--tms-muted); }
.result-count strong { color: var(--tms-primary); background: rgba(var(--tms-primary-rgb), .1); padding: 1px 8px; border-radius: 7px; font-size: 14px; }

/* select-chips (segmented / multi) */
.choice-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.choice-chip { border: 1px solid var(--tms-border); background: var(--tms-surface); color: var(--tms-text); border-radius: 999px; padding: 6px 13px; font-size: 12.5px; font-weight: 600; cursor: pointer; user-select: none; }
.choice-chip.on { background: var(--tms-primary); border-color: var(--tms-primary); color: #fff; }

/* ---------- 10. Tables ---------- */
.tms-table-wrap { background: var(--tms-surface); border: 1px solid var(--tms-border); border-radius: var(--tms-radius); overflow: hidden; box-shadow: var(--tms-shadow-sm); }
.tms-table-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--tms-border); flex-wrap: wrap; }
.tms-table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 0; }
.tms-table th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--tms-muted); font-weight: 700; padding: 11px 14px; background: var(--tms-surface-3); border-bottom: 1px solid var(--tms-border); white-space: nowrap; position: relative; }
.tms-table td { padding: 12px 14px; border-bottom: 1px solid var(--tms-border); vertical-align: middle; color: var(--tms-text); }
.tms-table tbody tr { transition: background .1s; }
.tms-table tbody tr:hover td { background: rgba(var(--tms-primary-rgb), .035); }
.tms-table tbody tr:last-child td { border-bottom: 0; }
.tms-table.dense td { padding: 7px 14px; }
.tms-table th.sortable { cursor: pointer; user-select: none; }
.tms-table th.sortable::after { content: "\F127"; font-family: "bootstrap-icons"; margin-left: 6px; opacity: .35; font-size: 11px; }
.tms-table th.sort-asc, .tms-table th.sort-desc { color: var(--tms-primary); background: rgba(var(--tms-primary-rgb), .08); }
.tms-table th.sort-asc::after { content: "\F57B"; opacity: 1; }   /* sort-up */
.tms-table th.sort-desc::after { content: "\F575"; opacity: 1; }  /* sort-down */
.tms-table th.filtered::before { content: ""; position: absolute; top: 8px; right: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--tms-accent); }
.tms-table .cell-main { font-weight: 600; }
.tms-table .cell-sub { font-size: 12px; color: var(--tms-muted); }
.tms-table .row-actions .btn { padding: .25rem .5rem; }
.table-footer { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-top: 1px solid var(--tms-border); font-size: 13px; color: var(--tms-muted); }
.pager { display: flex; gap: 4px; }
.pager span { min-width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; font-weight: 600; border: 1px solid var(--tms-border); background: var(--tms-surface); color: var(--tms-text); cursor: pointer; }
.pager span.on { background: var(--tms-primary); color: #fff; border-color: var(--tms-primary); }

/* ---------- 11. Misc components ---------- */
.meter { height: 9px; border-radius: 99px; background: var(--tms-surface-3); overflow: hidden; }
.meter > span { display: block; height: 100%; border-radius: 99px; background: var(--tms-gradient); }
.meter.warn > span { background: linear-gradient(90deg, #F59E0B, #EF4444); }
.pipeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.pipe-step { border-radius: 14px; padding: 14px; position: relative; border: 1px solid var(--tms-border); background: var(--tms-surface); cursor: pointer; }
.pipe-step .n { font-family: var(--font-head); font-weight: 800; font-size: 24px; }
.pipe-step:not(:last-child)::after { content: "\F285"; font-family: "bootstrap-icons"; position: absolute; right: -14px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; border-radius: 50%; background: var(--tms-surface); border: 1px solid var(--tms-border); display: grid; place-items: center; font-size: 10px; z-index: 2; color: var(--tms-muted); }

.list-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--tms-border); }
.list-row:last-child { border-bottom: 0; }
.list-icon { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-size: 17px; flex-shrink: 0; }

.empty-state { text-align: center; padding: 40px 20px; }
.empty-state .empty-art { width: 120px; height: 120px; margin: 0 auto 14px; border-radius: 50%; background: radial-gradient(circle at 30% 30%, rgba(var(--tms-primary-rgb), .18), rgba(var(--tms-primary-rgb), .04)); display: grid; place-items: center; font-size: 48px; color: var(--tms-primary); }

.tour-pop { background: #0F172A; color: #fff; border-radius: 14px; padding: 14px 16px; max-width: 280px; box-shadow: var(--tms-shadow-lg); position: relative; font-size: 13px; }
.tour-pop::after { content: ""; position: absolute; left: 24px; top: -7px; width: 14px; height: 14px; background: #0F172A; transform: rotate(45deg); }
.tour-pop .steps { font-size: 11px; opacity: .6; }
.tour-highlight { box-shadow: 0 0 0 4px rgba(var(--tms-accent-rgb), .55), 0 0 0 9999px rgba(15,23,42,.0); border-radius: 12px; }

.checklist-item { display: flex; gap: 10px; align-items: center; padding: 8px 0; font-weight: 500; }
.checklist-item .ck { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--tms-border); display: grid; place-items: center; font-size: 12px; flex-shrink: 0; }
.checklist-item.done .ck { background: #10B981; border-color: #10B981; color: #fff; }
.checklist-item.done span { color: var(--tms-muted); text-decoration: line-through; }
.progress-ring { --p: 57; width: 64px; height: 64px; border-radius: 50%; background: conic-gradient(var(--tms-primary) calc(var(--p) * 1%), var(--tms-surface-3) 0); display: grid; place-items: center; }
.progress-ring > span { width: 50px; height: 50px; border-radius: 50%; background: var(--tms-surface); display: grid; place-items: center; font-weight: 800; font-size: 13px; }

/* State tile map (approximate US grid) */
.tile-map { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; }
.tile { aspect-ratio: 1; border-radius: 6px; display: grid; place-items: center; font-size: 9.5px; font-weight: 700; color: var(--tms-muted); background: var(--tms-surface-3); }
.tile.l1 { background: rgba(var(--tms-primary-rgb), .18); color: var(--tms-primary); }
.tile.l2 { background: rgba(var(--tms-primary-rgb), .38); color: #fff; }
.tile.l3 { background: rgba(var(--tms-primary-rgb), .62); color: #fff; }
.tile.l4 { background: var(--tms-primary); color: #fff; }
.tile.blank { background: transparent; }

/* Plan cards */
.plan-card { background: var(--tms-surface); border: 1px solid var(--tms-border); border-radius: 20px; padding: 22px; position: relative; height: 100%; display: flex; flex-direction: column; }
.plan-card.popular { border: 2px solid var(--tms-primary); box-shadow: 0 20px 40px -18px rgba(var(--tms-primary-rgb), .55); }
.plan-card.custom { border: 2px dashed var(--tms-accent); background: linear-gradient(180deg, rgba(var(--tms-accent-rgb), .07), var(--tms-surface) 40%); }
.plan-card .ribbon { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--tms-gradient); color: #fff; font-size: 11px; font-weight: 800; padding: 4px 12px; border-radius: 999px; white-space: nowrap; }
.plan-card.custom .ribbon { background: var(--tms-accent); color: #111; }
.plan-card .price { font-family: var(--font-head); font-weight: 800; font-size: 34px; line-height: 1; }
.plan-card .price small { font-size: 13px; font-weight: 600; color: var(--tms-muted); }
.plan-limits { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0; }
.plan-limits div { background: var(--tms-surface-3); border-radius: 10px; padding: 8px 10px; font-size: 12px; color: var(--tms-muted); }
.plan-limits b { display: block; font-size: 16px; color: var(--tms-text); font-family: var(--font-head); }
.feature-list { list-style: none; padding: 0; margin: 0 0 16px; font-size: 13px; }
.feature-list li { padding: 5px 0; display: flex; gap: 8px; align-items: center; }
.feature-list li::before { font-family: "bootstrap-icons"; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; flex-shrink: 0; }
.feature-list li.yes::before { content: "\F26E"; background: rgba(16,185,129,.15); color: #059669; }
.feature-list li.no { color: var(--tms-muted); text-decoration: line-through; opacity: .7; }
.feature-list li.no::before { content: "\F62A"; background: var(--tms-surface-3); color: var(--tms-muted); }

.segmented { display: inline-flex; background: var(--tms-surface-3); border-radius: 12px; padding: 4px; gap: 2px; }
.segmented span { padding: 6px 14px; border-radius: 9px; font-weight: 700; font-size: 12.5px; color: var(--tms-muted); cursor: pointer; }
.segmented span.on { background: var(--tms-surface); color: var(--tms-text); box-shadow: var(--tms-shadow-sm); }

/* Chat */
.chat { display: flex; flex-direction: column; gap: 12px; }
.bubble { max-width: 78%; padding: 10px 14px; border-radius: 16px; font-size: 13px; line-height: 1.45; }
.bubble.me { align-self: flex-end; background: var(--tms-primary); color: #fff; border-bottom-right-radius: 5px; }
.bubble.them { align-self: flex-start; background: var(--tms-surface-3); color: var(--tms-text); border-bottom-left-radius: 5px; }
.bubble.note { align-self: stretch; max-width: 100%; background: rgba(245,158,11,.14); border: 1px dashed rgba(245,158,11,.6); color: var(--tms-text); }
.bubble .meta { font-size: 10.5px; opacity: .7; margin-top: 4px; }

/* Signature pad */
.sig-pad { border: 2px dashed var(--tms-border); border-radius: 14px; height: 130px; background: repeating-linear-gradient(0deg, transparent, transparent 31px, var(--tms-surface-3) 32px), var(--tms-surface); position: relative; display: grid; place-items: center; }
.sig-pad .sig { font-family: 'Brush Script MT', 'Segoe Script', cursive; font-size: 34px; color: var(--tms-primary-dark); transform: rotate(-4deg); }
[data-bs-theme="dark"] .sig-pad .sig { color: #93C5FD; }
.sig-pad .line { position: absolute; left: 20px; right: 20px; bottom: 28px; border-bottom: 1.5px solid var(--tms-muted); opacity: .4; }

/* State grid (trip sheet) */
.state-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 18px; }
.state-row { display: grid; grid-template-columns: 42px 1fr 1fr; gap: 6px; align-items: center; padding: 3px 0; }
.state-row .code { font-weight: 800; font-size: 12px; text-align: center; padding: 6px 0; border-radius: 8px; background: var(--tms-surface-3); color: var(--tms-muted); }
.state-row.used .code { background: var(--tms-primary); color: #fff; }
.state-row .form-control { padding: .32rem .5rem; font-size: 13px; text-align: right; border-radius: 9px; }
.state-row.used .form-control { border-color: rgba(var(--tms-primary-rgb), .45); background: rgba(var(--tms-primary-rgb), .04); font-weight: 600; }

.expense-row { display: grid; grid-template-columns: 1fr 150px 130px 40px; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px dashed var(--tms-border); }
.summary-stat { display: flex; justify-content: space-between; align-items: baseline; padding: 9px 0; border-bottom: 1px solid rgba(255,255,255,.14); }
.summary-stat:last-child { border-bottom: 0; }
.summary-stat b { font-family: var(--font-head); font-size: 20px; }

/* Paper replica (print view) */
.paper-sheet { background: #fff; color: #111; border-radius: 6px; box-shadow: var(--tms-shadow-lg); padding: 28px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; max-width: 1000px; margin: 0 auto; }
.paper-sheet table { width: 100%; border-collapse: collapse; }
.paper-sheet td, .paper-sheet th { border: 1px solid #222; padding: 4px 6px; height: 22px; }
.paper-sheet .lbl { font-weight: 700; font-size: 11px; text-transform: uppercase; }
.paper-sheet .val { font-family: 'Courier New', monospace; font-weight: 700; color: #1E3A8A; }
.paper-sheet .st { font-weight: 700; text-align: center; width: 34px; }
.paper-head { display: grid; grid-template-columns: 200px 1fr 160px; align-items: center; border: 1px solid #222; padding: 10px 14px; margin-bottom: 0; }

/* ---------- 12. Mobile phone frames ---------- */
.phone-gallery { display: flex; flex-wrap: wrap; gap: 36px 30px; justify-content: center; }
.phone-wrap { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.phone-caption { font-family: var(--font-head); font-weight: 700; font-size: 14px; text-align: center; }
.phone-caption small { display: block; font-family: var(--font-body); font-weight: 500; color: var(--tms-muted); font-size: 12px; }
.phone { width: 375px; height: 790px; border-radius: 48px; padding: 11px; background: #0B1020; box-shadow: 0 0 0 2px #2A3245, var(--tms-shadow-lg); position: relative; flex-shrink: 0; }
.phone-screen { width: 100%; height: 100%; border-radius: 38px; overflow: hidden; background: var(--tms-surface-2); position: relative; display: flex; flex-direction: column; }
.phone-notch { position: absolute; top: 9px; left: 50%; transform: translateX(-50%); width: 110px; height: 30px; background: #0B1020; border-radius: 20px; z-index: 50; }
.m-status { height: 46px; flex-shrink: 0; display: flex; align-items: flex-end; justify-content: space-between; padding: 0 26px 6px; font-size: 13px; font-weight: 700; color: var(--tms-text); }
.m-status.on-gradient { color: #fff; }
.m-status .icons { display: flex; gap: 5px; font-size: 13px; }
.m-header { padding: 6px 18px 12px; display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.m-header .title { font-family: var(--font-head); font-weight: 800; font-size: 20px; flex: 1; margin: 0; }
.m-header.glass { background: rgba(255,255,255,.72); backdrop-filter: blur(14px); border-bottom: 1px solid var(--tms-border); }
[data-bs-theme="dark"] .m-header.glass { background: rgba(17,26,46,.8); }
.m-hero { background: var(--tms-gradient); color: #fff; padding: 0 0 56px; flex-shrink: 0; position: relative; overflow: hidden; }
.m-hero::after { content: ""; position: absolute; right: -50px; top: -40px; width: 180px; height: 180px; border-radius: 50%; background: rgba(255,255,255,.09); }
.m-hero .m-header .title, .m-hero h5, .m-hero h4 { color: #fff; }
.m-content { flex: 1; overflow-y: auto; padding: 14px 16px 110px; scrollbar-width: none; }
.m-content::-webkit-scrollbar { display: none; }
.m-hero + .m-content { margin-top: -44px; position: relative; z-index: 2; padding-top: 0; }
.m-icon-btn { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-size: 18px; background: var(--tms-surface); border: 1px solid var(--tms-border); color: var(--tms-text); position: relative; flex-shrink: 0; }
.m-hero .m-icon-btn { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.22); color: #fff; }
.m-icon-btn .dot { position: absolute; top: 5px; right: 5px; width: 9px; height: 9px; border-radius: 50%; background: #EF4444; border: 2px solid var(--tms-surface); }
.m-card { background: var(--tms-surface); border: 1px solid var(--tms-border); border-radius: 18px; padding: 14px; box-shadow: var(--tms-shadow-sm); }
.m-card + .m-card { margin-top: 10px; }
.m-section-title { display: flex; justify-content: space-between; align-items: center; margin: 18px 2px 10px; font-family: var(--font-head); font-weight: 800; font-size: 15px; }
.m-section-title a { font-family: var(--font-body); font-size: 12.5px; font-weight: 600; text-decoration: none; }
.m-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.m-kpi { background: var(--tms-surface); border: 1px solid var(--tms-border); border-radius: 18px; padding: 12px; box-shadow: var(--tms-shadow-sm); }
.m-kpi .kpi-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 16px; }
.m-kpi .v { font-family: var(--font-head); font-weight: 800; font-size: 21px; margin-top: 8px; line-height: 1.1; }
.m-kpi .l { font-size: 11.5px; color: var(--tms-muted); font-weight: 600; }
.m-trip { display: block; text-decoration: none; color: inherit; }
.m-trip .route { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14.5px; margin: 6px 0; }
.m-trip .route .line { flex: 1; height: 2px; background: repeating-linear-gradient(90deg, var(--tms-border) 0 6px, transparent 6px 10px); position: relative; }
.m-trip .route .line::after { content: "\F5E0"; font-family: "bootstrap-icons"; position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); color: var(--tms-primary); background: var(--tms-surface); padding: 0 4px; font-size: 14px; }
.m-trip .meta { display: flex; gap: 12px; font-size: 12px; color: var(--tms-muted); flex-wrap: wrap; }
.m-trip .meta b { color: var(--tms-text); }
.m-chip-scroll { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.m-chip-scroll::-webkit-scrollbar { display: none; }
.m-chip-scroll .choice-chip, .m-chip-scroll .chip { flex-shrink: 0; }

.m-tabbar { position: absolute; left: 0; right: 0; bottom: 0; height: 84px; background: rgba(255,255,255,.88); backdrop-filter: blur(16px); border-top: 1px solid var(--tms-border); display: grid; grid-template-columns: repeat(5, 1fr); align-items: start; padding-top: 9px; z-index: 30; }
[data-bs-theme="dark"] .m-tabbar { background: rgba(17,26,46,.9); }
.m-tab { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 10.5px; font-weight: 600; color: var(--tms-muted); text-decoration: none; position: relative; }
.m-tab i { font-size: 21px; }
.m-tab.active { color: var(--tms-primary); }
.m-tab.active::before { content: ""; position: absolute; top: -9px; width: 28px; height: 3px; border-radius: 0 0 4px 4px; background: var(--tms-primary); }
.m-tab .tab-badge { position: absolute; top: -3px; left: 54%; background: #EF4444; color: #fff; font-size: 9.5px; font-weight: 800; min-width: 16px; height: 16px; border-radius: 99px; display: grid; place-items: center; padding: 0 4px; }
.m-fab { width: 58px; height: 58px; border-radius: 20px; background: var(--tms-accent); color: #111; display: grid; place-items: center; font-size: 28px; margin: -26px auto 0; box-shadow: 0 10px 22px -6px rgba(var(--tms-accent-rgb), .85), 0 0 0 5px var(--tms-surface-2); transform: rotate(0deg); }

.m-stepper { padding: 0 18px 12px; flex-shrink: 0; }
.m-steps { display: flex; gap: 5px; }
.m-steps span { flex: 1; height: 5px; border-radius: 99px; background: var(--tms-surface-3); }
.m-steps span.done { background: var(--tms-primary); }
.m-steps span.cur { background: linear-gradient(90deg, var(--tms-primary), var(--tms-accent)); }
.m-step-label { display: flex; justify-content: space-between; font-size: 12px; font-weight: 600; color: var(--tms-muted); margin-top: 7px; }
.m-step-label b { color: var(--tms-text); }
.m-actions { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 16px 26px; background: var(--tms-surface); border-top: 1px solid var(--tms-border); display: flex; gap: 10px; z-index: 30; }
.m-actions .btn { flex: 1; padding: .8rem; border-radius: 14px; font-size: 15px; }
.m-field { margin-bottom: 14px; }
.m-field .form-control, .m-field .form-select { padding: .75rem .9rem; font-size: 15px; border-radius: 14px; }
.m-select { display: flex; align-items: center; gap: 10px; border: 1px solid var(--tms-border); border-radius: 14px; padding: 10px 12px; background: var(--tms-surface); }
.m-select .sel-icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-size: 17px; flex-shrink: 0; }
.m-select .sel-main { font-weight: 700; font-size: 14.5px; }
.m-select .sel-sub { font-size: 11.5px; color: var(--tms-muted); }
.m-select .bi-chevron-right { margin-left: auto; color: var(--tms-muted); }
.m-state-card { border: 1px solid var(--tms-border); border-radius: 16px; background: var(--tms-surface); padding: 12px; }
.m-state-card + .m-state-card { margin-top: 8px; }
.m-state-card .st-code { width: 40px; height: 40px; border-radius: 12px; background: var(--tms-gradient); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 14px; }
.m-mini-input { display: flex; flex-direction: column; flex: 1; }
.m-mini-input label { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--tms-muted); margin-bottom: 3px; }
.m-mini-input .form-control { padding: .5rem .7rem; font-size: 15px; font-weight: 700; border-radius: 11px; }
.m-total-bar { background: var(--tms-gradient); color: #fff; border-radius: 16px; padding: 12px 14px; display: flex; justify-content: space-around; text-align: center; }
.m-total-bar b { display: block; font-family: var(--font-head); font-size: 19px; }
.m-total-bar span { font-size: 11px; opacity: .85; }
.m-exp-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--tms-border); }
.m-exp-row .ei { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; }
.m-exp-row .en { flex: 1; font-weight: 600; font-size: 13.5px; }
.m-exp-row .form-control { width: 105px; text-align: right; font-weight: 700; padding: .45rem .6rem; border-radius: 10px; }
.m-exp-row .cam { width: 34px; height: 34px; border-radius: 10px; border: 1px dashed var(--tms-border); display: grid; place-items: center; color: var(--tms-muted); flex-shrink: 0; }
.m-exp-row .cam.has { border: 0; background: rgba(16,185,129,.14); color: #059669; }
.m-seg-tabs { display: flex; gap: 4px; background: var(--tms-surface-3); padding: 4px; border-radius: 13px; overflow-x: auto; scrollbar-width: none; }
.m-seg-tabs span { flex: 1; text-align: center; font-size: 12px; font-weight: 700; padding: 7px 8px; border-radius: 10px; color: var(--tms-muted); white-space: nowrap; }
.m-seg-tabs span.on { background: var(--tms-surface); color: var(--tms-primary); box-shadow: var(--tms-shadow-sm); }

/* bottom sheet inside a phone */
.sheet-backdrop { position: absolute; inset: 0; background: rgba(15,23,42,.45); z-index: 40; }
.bottom-sheet { position: absolute; left: 0; right: 0; bottom: 0; background: var(--tms-surface); border-radius: 26px 26px 0 0; z-index: 45; padding: 10px 16px 22px; box-shadow: 0 -10px 40px rgba(0,0,0,.2); max-height: 86%; display: flex; flex-direction: column; }
.bottom-sheet .grab { width: 44px; height: 5px; border-radius: 99px; background: var(--tms-border); margin: 0 auto 12px; }
.bottom-sheet .sheet-body { overflow-y: auto; scrollbar-width: none; }
.state-chip { width: 100%; border: 1px solid var(--tms-border); border-radius: 11px; padding: 8px 0; text-align: center; font-weight: 800; font-size: 13px; background: var(--tms-surface); color: var(--tms-text); }
.state-chip.on { background: var(--tms-primary); color: #fff; border-color: var(--tms-primary); }
.state-chip.ext { border-style: dashed; }
.state-chips-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }

/* ---------- 13. Mockup gallery chrome (not part of the app) ---------- */
.gallery-nav { position: sticky; top: 0; z-index: 1000; background: #0B1020; color: #fff; display: flex; align-items: center; gap: 6px; padding: 10px 18px; flex-wrap: wrap; }
.gallery-nav .gn-brand { font-family: var(--font-head); font-weight: 800; margin-right: 12px; display: flex; align-items: center; gap: 8px; }
.gallery-nav a { color: #CBD5E1; text-decoration: none; font-weight: 600; font-size: 13px; padding: 6px 12px; border-radius: 9px; }
.gallery-nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.gallery-nav a.on { background: rgba(255,255,255,.14); color: #fff; }
.gallery-nav .gn-right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.theme-dot { width: 20px; height: 20px; border-radius: 50%; border: 2px solid rgba(255,255,255,.3); cursor: pointer; }
.theme-dot.on { border-color: #fff; box-shadow: 0 0 0 2px rgba(255,255,255,.35); }
.gn-toggle { background: rgba(255,255,255,.1); border: 0; color: #fff; border-radius: 9px; padding: 5px 10px; font-size: 13px; font-weight: 600; }
.screen-tabs { display: flex; gap: 6px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; white-space: nowrap; padding: 12px 18px; background: var(--tms-surface); border-bottom: 1px solid var(--tms-border); position: sticky; top: 52px; z-index: 900; }
.screen-tabs a { flex-shrink: 0; text-decoration: none; font-size: 12.5px; font-weight: 700; padding: 6px 12px; border-radius: 99px; color: var(--tms-muted); border: 1px solid var(--tms-border); background: var(--tms-surface); }
.screen-tabs a.on { background: var(--tms-primary); color: #fff; border-color: var(--tms-primary); }
.screen { display: none; }
.screen.on { display: block; }
.design-note { background: rgba(var(--tms-accent-rgb), .1); border: 1px dashed rgba(var(--tms-accent-rgb), .6); border-radius: 12px; padding: 10px 14px; font-size: 12.5px; color: var(--tms-text); }
.design-note b { color: #B45309; }
[data-bs-theme="dark"] .design-note b { color: #FBBF24; }

/* ---------- 14. Responsive ---------- */
@media (max-width: 991.98px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .page-body { padding: 16px; }
  .page-hero { padding: 20px 16px 64px; }
  .pipeline { grid-template-columns: repeat(2, 1fr); }
  .state-grid { grid-template-columns: 1fr; }
  .expense-row { grid-template-columns: 1fr 110px 40px; }
  .expense-row > :nth-child(3) { display: none; }
}
@media (max-width: 420px) {
  .phone { transform: scale(.88); transform-origin: top center; margin-bottom: -90px; }
}
@media print {
  .gallery-nav, .screen-tabs, .sidebar, .topbar, .no-print { display: none !important; }
  .app-shell { display: block; }
  .paper-sheet { box-shadow: none; }
}
