/* Health Broker Center — design system (matches the Arrival Point Software console visual language) */

:root {
  --brand-700:#3730a3; --brand-600:#4f46e5; --brand-500:#6366f1; --brand-300:#a5b4fc; --brand-100:#e0e7ff;

  --ink-900:#0b1120; --ink-800:#0f172a; --ink-700:#152033; --ink-600:#1e2a44; --ink-500:#2b3a5c;

  --ok-600:#059669; --ok-500:#10b981; --ok-bg:#ecfdf5;
  --warn-600:#d97706; --warn-500:#f59e0b; --warn-bg:#fffbeb;
  --bad-600:#dc2626; --bad-500:#ef4444; --bad-bg:#fef2f2;
  --info-600:#0284c7; --info-bg:#f0f9ff;

  --paper:#f6f7fb; --surface:#ffffff; --surface-2:#f4f6fb; --line:#e6e8f0; --line-strong:#d4d8e6;
  --text-900:#0f172a; --text-700:#334155; --text-600:#475569; --text-500:#64748b; --text-400:#94a3b8;

  --radius-sm:9px; --radius:16px; --radius-lg:22px;
  --shadow-xs:0 1px 1px rgba(15,23,42,.05);
  --shadow-sm:0 1px 2px rgba(15,23,42,.06), 0 2px 6px -1px rgba(15,23,42,.09);
  --shadow-md:0 4px 10px -3px rgba(15,23,42,.08), 0 8px 20px -8px rgba(15,23,42,.14);
  --shadow:0 6px 16px -4px rgba(15,23,42,.10), 0 14px 36px -14px rgba(15,23,42,.20);
  --shadow-lg:0 30px 70px -20px rgba(15,23,42,.34);

  --sidebar-w:264px; --topbar-h:68px;
  --fs-xs:12px; --fs-sm:13.5px; --fs-base:14.5px; --fs-md:16px; --fs-lg:20px; --fs-xl:26px;
}

/* ---------- Accent themes (7 selectable palettes, persisted per-user) ---------- */
:root.theme-indigo { --brand-700:#3730a3; --brand-600:#4f46e5; --brand-500:#6366f1; --brand-300:#a5b4fc; --brand-100:#e0e7ff; }
:root.theme-emerald{ --brand-700:#047857; --brand-600:#059669; --brand-500:#10b981; --brand-300:#6ee7b7; --brand-100:#d1fae5; }
:root.theme-rose   { --brand-700:#be123c; --brand-600:#e11d48; --brand-500:#f43f5e; --brand-300:#fda4af; --brand-100:#ffe4e6; }
:root.theme-amber  { --brand-700:#b45309; --brand-600:#d97706; --brand-500:#f59e0b; --brand-300:#fcd34d; --brand-100:#fef3c7; }
:root.theme-blue   { --brand-700:#1d4ed8; --brand-600:#2563eb; --brand-500:#3b82f6; --brand-300:#93c5fd; --brand-100:#dbeafe; }
:root.theme-orange { --brand-700:#c2410c; --brand-600:#ea580c; --brand-500:#f97316; --brand-300:#fdba74; --brand-100:#ffedd5; }
:root.theme-slate  { --brand-700:#334155; --brand-600:#475569; --brand-500:#64748b; --brand-300:#cbd5e1; --brand-100:#f1f5f9; }

.accent-picker { display:flex; align-items:center; gap:6px; padding:0 4px; }
.accent-swatch {
  width:18px; height:18px; border-radius:50%; border:2px solid transparent; cursor:pointer; padding:0;
  box-shadow:0 0 0 1px rgba(0,0,0,.08);
}
.accent-swatch.active { border-color:var(--text-900); }
.accent-swatch.sw-indigo { background:linear-gradient(135deg,#6366f1,#3730a3); }
.accent-swatch.sw-emerald { background:linear-gradient(135deg,#10b981,#047857); }
.accent-swatch.sw-rose { background:linear-gradient(135deg,#f43f5e,#be123c); }
.accent-swatch.sw-amber { background:linear-gradient(135deg,#f59e0b,#b45309); }
.accent-swatch.sw-blue { background:linear-gradient(135deg,#3b82f6,#1d4ed8); }
.accent-swatch.sw-orange { background:linear-gradient(135deg,#f97316,#c2410c); }
.accent-swatch.sw-slate { background:linear-gradient(135deg,#64748b,#334155); }

:root.dark {
  --paper:#0b1120; --surface:#0f172a; --surface-2:#1b2740; --line:#1e293b; --line-strong:#2b3a5c;
  --text-900:#f8fafc; --text-700:#cbd5e1; --text-600:#94a3b8; --text-500:#7e8db0; --text-400:#5c6c8c;
  --ok-bg:rgba(16,185,129,.12); --warn-bg:rgba(245,158,11,.12); --bad-bg:rgba(239,68,68,.12); --info-bg:rgba(2,132,199,.14);
}

* { box-sizing:border-box; }
html,body { margin:0; padding:0; }
body {
  background:var(--paper); color:var(--text-900);
  font-family:'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size:var(--fs-base); line-height:1.5;
  -webkit-font-smoothing:antialiased;
}
h1,h2,h3,h4,.num { font-family:'Sora', sans-serif; letter-spacing:-.01em; }
.num { font-variant-numeric:tabular-nums; }
a { color:var(--brand-600); text-decoration:none; }
a:hover { text-decoration:underline; }

/* ---------- Layout shell ---------- */
.app-shell { display:flex; min-height:100vh; }

.sidebar {
  position:fixed; top:0; left:0; bottom:0; width:var(--sidebar-w);
  background:linear-gradient(185deg,var(--ink-800),var(--ink-900));
  color:#e2e8f0; display:flex; flex-direction:column; z-index:40;
  box-shadow:var(--shadow-lg);
}
.sidebar::before {
  content:""; position:absolute; top:-80px; left:-80px; width:280px; height:280px; border-radius:50%;
  background:radial-gradient(circle, rgba(99,102,241,.35), transparent 70%); pointer-events:none;
}
.brand { padding:22px 20px 18px; display:flex; align-items:center; gap:12px; position:relative; z-index:1; }
.brand-mark {
  width:40px; height:40px; border-radius:12px; flex:none;
  background:linear-gradient(135deg,var(--brand-500),var(--brand-700));
  display:flex; align-items:center; justify-content:center; box-shadow:var(--shadow-sm);
  font-family:'Sora',sans-serif; font-weight:800; color:#fff; font-size:16px;
}
.brand-text { display:flex; flex-direction:column; line-height:1.2; }
.brand-text strong { font-family:'Sora',sans-serif; font-size:15px; color:#fff; }
.brand-text span { font-size:11px; color:#94a3b8; }
.brand-logo-img { background:none; box-shadow:none; object-fit:contain; padding:0; }
.report-logo { width:38px; height:38px; object-fit:contain; flex:none; }

.nav { flex:1; overflow-y:auto; padding:6px 12px 20px; position:relative; z-index:1; }
.nav-label {
  width:100%; text-align:left; background:none; border:none; color:#7d8bb0; font-size:11px; font-weight:700;
  letter-spacing:.08em; text-transform:uppercase; padding:16px 10px 6px; cursor:default;
}
.nav a {
  display:flex; align-items:center; gap:11px; padding:9px 12px; border-radius:10px; color:#cbd5e1;
  font-size:13.5px; font-weight:600; margin:1px 0; position:relative; text-decoration:none;
}
.nav a svg { width:18px; height:18px; flex:none; opacity:.85; }
.nav a:hover { background:rgba(255,255,255,.06); color:#fff; }
.nav a.active { background:rgba(99,102,241,.18); color:#fff; }
.nav a.active::before {
  content:""; position:absolute; left:-12px; top:6px; bottom:6px; width:3px; border-radius:3px;
  background:linear-gradient(var(--brand-500),var(--brand-700));
}
.nav-badge { margin-left:auto; background:var(--brand-500); color:#fff; font-size:10.5px; font-weight:700;
  padding:1px 7px; border-radius:999px; }

.main { margin-left:var(--sidebar-w); flex:1; min-width:0; display:flex; flex-direction:column; }

.topbar {
  height:var(--topbar-h); position:sticky; top:0; z-index:30; display:flex; align-items:center; gap:16px;
  padding:0 24px; background:rgba(255,255,255,.85); backdrop-filter:blur(12px); border-bottom:1px solid var(--line);
}
:root.dark .topbar { background:rgba(15,23,42,.85); }
.topbar .spacer { flex:1; }
.topbar-agency { font-size:15.5px; color:var(--text-900); font-weight:800; font-family:'Sora',sans-serif; min-width:180px; }
.user-chip { display:flex; align-items:center; gap:10px; padding:6px 16px 6px 6px; border-radius:999px; border:1px solid var(--line); min-width:190px; }
.avatar {
  width:32px; height:32px; border-radius:50%; background:linear-gradient(135deg,var(--brand-500),var(--brand-700));
  color:#fff; display:flex; align-items:center; justify-content:center; font-weight:700; font-size:12.5px; font-family:'Sora',sans-serif;
}
.user-chip .meta { line-height:1.2; }
.user-chip .name { font-size:13px; font-weight:700; white-space:nowrap; }
.user-chip .role { font-size:11px; color:var(--text-500); white-space:nowrap; }
#langSelect { min-width:0; width:58px; padding:6px 4px; text-align:center; }
#btnSignOut { min-width:100px; justify-content:center; }

.content { padding:26px 28px 60px; }

/* ---------- KPI cards ---------- */
.kpi-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:18px; margin-bottom:22px; }
@media (max-width:1100px) { .kpi-grid { grid-template-columns:repeat(2,1fr); } }
@media (max-width:560px) { .kpi-grid { grid-template-columns:1fr; } }
.kpi {
  background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); box-shadow:var(--shadow-sm);
  padding:18px 20px; position:relative; overflow:hidden;
}
.kpi .icn { width:46px; height:46px; border-radius:13px; display:flex; align-items:center; justify-content:center; margin-bottom:14px; }
.kpi .icn svg { width:22px; height:22px; color:#fff; }
.icn.b{background:linear-gradient(135deg,#5b86f0,#3b5bdb);}
.icn.g{background:linear-gradient(135deg,#2bcf95,#0a9d5a);}
.icn.a{background:linear-gradient(135deg,#fbb24a,#e07d09);}
.icn.r{background:linear-gradient(135deg,#f4665f,#dc2626);}
.icn.p{background:linear-gradient(135deg,#a878f6,#7c3aed);}
.icn.t{background:linear-gradient(135deg,#2ad6c1,#0d9488);}
.kpi .label { font-size:12.5px; color:var(--text-500); font-weight:600; text-transform:uppercase; letter-spacing:.04em; }
.kpi .value { font-family:'Sora',sans-serif; font-weight:800; font-size:32px; margin-top:2px; }
.kpi-zero { color:var(--text-400); }

/* ---------- Panels ---------- */
.panel { background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); box-shadow:var(--shadow-sm); margin-bottom:20px; }
.panel-head {
  display:flex; align-items:center; justify-content:space-between; padding:16px 20px; border-bottom:1px solid var(--line);
}
.panel-head h3 { margin:0; font-size:15.5px; display:flex; align-items:center; gap:10px; }
.panel-head h3::before { content:""; width:4px; height:16px; border-radius:3px; background:linear-gradient(var(--brand-500),var(--brand-700)); }
.panel-body { padding:20px; }

/* ---------- Buttons ---------- */
.btn {
  display:inline-flex; align-items:center; gap:7px; border-radius:10px; padding:9px 16px; font-weight:600;
  font-size:13.5px; border:1px solid transparent; cursor:pointer; background:var(--surface); color:var(--text-700);
  transition:filter .12s;
}
.btn:hover { filter:brightness(.97); text-decoration:none; }
.btn-primary { background:linear-gradient(135deg,var(--brand-500),var(--brand-700)); color:#fff; }
.btn-ghost { background:var(--surface); border-color:var(--line-strong); color:var(--text-700); }
.btn-danger { background:var(--bad-bg); color:var(--bad-600); border-color:rgba(220,38,38,.25); }
.btn-sm { padding:6px 11px; font-size:12.5px; border-radius:8px; }

/* ---------- Badges ---------- */
.badge {
  display:inline-flex; align-items:center; gap:6px; padding:3px 10px; border-radius:999px; font-size:11.5px;
  font-family:'Sora',sans-serif; font-weight:700;
}
.badge::before { content:""; width:6px; height:6px; border-radius:50%; background:currentColor; }
.badge.ok { color:#047857; background:var(--ok-bg); border:1px solid rgba(4,120,87,.22); }
.badge.warn { color:#b45309; background:var(--warn-bg); border:1px solid rgba(180,83,9,.22); }
.badge.bad { color:var(--bad-600); background:var(--bad-bg); border:1px solid rgba(220,38,38,.22); }
.badge.info { color:#0369a1; background:var(--info-bg); border:1px solid rgba(3,105,161,.22); }
.badge.neutral { color:var(--text-500); background:#f1f5f9; border:1px solid rgba(100,116,139,.2); }

/* ---------- Forms ---------- */
label { display:block; font-size:12.5px; font-weight:700; color:var(--text-600); margin-bottom:5px; text-transform:uppercase; letter-spacing:.03em; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=tel], select, textarea {
  width:100%; padding:10px 12px; border:1px solid var(--line-strong); border-radius:10px; background:var(--surface);
  color:var(--text-900); font-size:13.5px; font-family:inherit;
}
input:focus, select:focus, textarea:focus { outline:2px solid var(--brand-300); outline-offset:0; border-color:var(--brand-500); }
input:user-invalid, select:user-invalid, textarea:user-invalid { border-color:var(--bad-500); background:var(--bad-bg); }
.field { margin-bottom:14px; }
.field-row { display:grid; grid-template-columns:repeat(2,1fr); gap:14px; }
.field-row.cols-3 { grid-template-columns:repeat(3,1fr); }
.hint { font-size:12px; color:var(--text-500); margin-top:4px; }
@media (max-width:640px) {
  .field-row, .field-row.cols-3 { grid-template-columns:1fr; }
}

/* ---------- Responsive shell (sidebar collapses to an off-canvas drawer) ---------- */
.nav-toggle {
  display:none; align-items:center; justify-content:center; width:34px; height:34px; border-radius:9px;
  border:1px solid var(--line-strong); background:var(--surface); color:var(--text-700); cursor:pointer; flex:none;
}
.nav-toggle svg { width:18px; height:18px; }
.nav-scrim { display:none; }

@media (max-width:900px) {
  .sidebar { transform:translateX(-100%); transition:transform .2s ease; }
  body.nav-open .sidebar { transform:translateX(0); }
  .main { margin-left:0; }
  .nav-toggle { display:inline-flex; }
  .topbar-agency { min-width:0; }
  body.nav-open .nav-scrim {
    display:block; position:fixed; inset:0; background:rgba(15,23,42,.45); z-index:35;
  }
  .content { padding:18px 16px 40px; }
  .user-chip .meta { display:none; }
  .user-chip { min-width:0; padding:6px; }
}

@media (max-width:640px) {
  .list-toolbar { flex-direction:column; align-items:stretch; }
  .list-toolbar form { max-width:none; }
  .panel-body { padding:14px; }
  .panel-head { padding:14px; flex-wrap:wrap; gap:8px; }
}

/* ---------- Help page layout ---------- */
.help-grid { display:grid; grid-template-columns:220px 1fr; gap:24px; align-items:start; }
.help-nav-panel { position:sticky; top:80px; }

/* Reusable replacement for the inline "display:grid;grid-template-columns:1.x fr 1fr" pattern
   repeated across edit pages -- lets the tablet tier below collapse it to one column. */
.edit-grid { display:grid; grid-template-columns:1.3fr 1fr; gap:20px; align-items:start; }
.edit-grid.single-col { grid-template-columns:1fr; }

/* ---------- Tablet tier: intermediate breakpoint between desktop and phone ---------- */
@media (max-width:1024px) {
  .help-grid { grid-template-columns:1fr; }
  .help-nav-panel { position:static; }
  .help-nav-links { flex-direction:row !important; flex-wrap:wrap; gap:10px !important; }
  #leadsKanban { scroll-snap-type:x proximity; }
  #leadsKanban > .panel { scroll-snap-align:start; }
  .edit-grid { grid-template-columns:1fr; }
}

/* Tables scroll horizontally within their own panel instead of blowing out the page width */
.panel-body:has(> .gv), .panel-body:has(> table) { overflow-x:auto; }
@media (max-width:900px) {
  .gv { min-width:640px; }
}

/* ---------- Tables ---------- */
.gv { width:100%; border-collapse:collapse; }
.gv th { text-align:left; font-family:'Sora',sans-serif; font-size:11px; text-transform:uppercase; letter-spacing:.05em;
  color:var(--text-500); padding:10px 14px; border-bottom:1px solid var(--line); }
.gv td { padding:12px 14px; border-bottom:1px solid var(--line); font-size:13.5px; }
.gv tr:hover td { background:var(--surface-2); }
.gv tr:last-child td { border-bottom:none; }
.gv th a { color:inherit; text-decoration:none; display:inline-flex; align-items:center; gap:3px; }
.gv th a:hover { color:var(--text-900); }
.gv th a .sort-arrow { font-size:9px; opacity:.7; }

/* Panel body with a table/list that should sit flush against the panel edges (no padding) */
.panel-body--flush { padding:0; }

/* Inline checkbox+label rows (checkbox shouldn't stretch full-width like a text field) */
.checkbox-inline { width:auto; display:inline; }

/* ---------- Alerts ---------- */
.alert { padding:12px 16px; border-radius:10px; font-size:13.5px; margin-bottom:16px; }
.alert-ok { background:var(--ok-bg); color:#047857; border:1px solid rgba(4,120,87,.2); }
.alert-bad { background:var(--bad-bg); color:var(--bad-600); border:1px solid rgba(220,38,38,.2); }

.page-head { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; row-gap:12px; gap:18px; margin-bottom:20px; }
.page-head h1 { font-size:var(--fs-xl); margin:0; }
.page-head .sub { color:var(--text-500); font-size:13px; margin-top:2px; }
.page-head > div:first-child { flex:none; white-space:nowrap; }
.page-head .dash-widgets { flex:0 1 auto; min-width:0; justify-content:flex-end; }
.page-head .news-pill-stretch { flex-basis:200px; }
.breadcrumb { font-size:12.5px; color:var(--text-500); margin-bottom:6px; }
.breadcrumb a { color:var(--text-500); }

.tabs { display:flex; gap:4px; border-bottom:1px solid var(--line); margin-bottom:18px; overflow-x:auto; }
.tab-btn {
  display:flex; align-items:center; gap:6px; padding:10px 14px; border:none; background:none; cursor:pointer;
  font-size:13px; font-weight:700; color:var(--text-500); white-space:nowrap; border-bottom:2px solid transparent;
  border-radius:var(--radius-sm) var(--radius-sm) 0 0;
}
.tab-btn:hover { color:var(--text-900); background:var(--surface-2); }
.tab-btn.active { color:var(--brand-600); border-bottom-color:var(--brand-500); }
.tab-panel { display:none; }

.wizard-steps { display:flex; align-items:center; gap:10px; margin-bottom:22px; flex-wrap:wrap; }
.wizard-step {
  display:flex; align-items:center; gap:8px; font-size:13px; font-weight:700; color:var(--text-400);
  padding:8px 14px; border-radius:999px; background:var(--surface-2); border:1px solid var(--line);
}
.wizard-step-num {
  display:inline-flex; align-items:center; justify-content:center; width:20px; height:20px; border-radius:50%;
  background:var(--line-strong); color:var(--surface); font-size:11px;
}
.wizard-step.active { color:var(--brand-700); background:var(--brand-100); border-color:var(--brand-300); }
.wizard-step.active .wizard-step-num { background:var(--brand-600); color:#fff; }
.wizard-step.complete { color:var(--ok-600); }
.wizard-step.complete .wizard-step-num { background:var(--ok-500); color:#fff; }

.gap-bar { width:100%; height:28px; border-radius:999px; background:var(--surface-2); border:1px solid var(--line); overflow:hidden; }
.gap-bar-fill { height:100%; background:linear-gradient(90deg,var(--brand-500),var(--brand-600)); border-radius:999px 0 0 999px; transition:width .3s ease; }

/* ---------- Login page ---------- */
.login-shell { display:flex; min-height:100vh; }
.login-brand {
  flex:1.1; background:linear-gradient(160deg,var(--ink-800),var(--ink-900)); color:#fff; padding:60px;
  display:flex; flex-direction:column; justify-content:space-between; position:relative; overflow:hidden;
}
.login-brand::before { content:""; position:absolute; top:-140px; right:-140px; width:420px; height:420px; border-radius:50%;
  background:radial-gradient(circle, rgba(99,102,241,.4), transparent 70%); }
.login-brand::after { content:""; position:absolute; bottom:-160px; left:-100px; width:380px; height:380px; border-radius:50%;
  background:radial-gradient(circle, rgba(16,185,129,.18), transparent 70%); }
.login-banner-card {
  background:#fff; border-radius:var(--radius-lg); box-shadow:var(--shadow-lg); padding:20px 28px;
  display:inline-block; margin-bottom:32px; position:relative; z-index:1;
}
.login-banner-card img { display:block; height:120px; width:auto; }
.login-brand h1 { font-size:32px; margin:0 0 12px; position:relative; z-index:1; }
.login-brand p { color:#94a3b8; font-size:15px; max-width:420px; position:relative; z-index:1; }
.login-form-pane { flex:1; display:flex; align-items:center; justify-content:center; background:var(--paper); padding:40px; }
.login-card { width:100%; max-width:380px; }
.login-card h2 { font-size:22px; margin:0 0 6px; }
.login-card .lede { color:var(--text-500); font-size:13.5px; margin-bottom:26px; }
.login-card .btn-primary { width:100%; justify-content:center; padding:11px; font-size:14px; }

/* ---------- Misc ---------- */
.text-muted { color:var(--text-500); }
.mt-0 { margin-top:0; }
.stack { display:flex; flex-direction:column; gap:10px; }
.row-flex { display:flex; align-items:center; gap:10px; }
.pill-count { background:var(--brand-100); color:var(--brand-700); font-size:11px; font-weight:700; padding:2px 8px; border-radius:999px; }
:root.dark .pill-count { background:rgba(99,102,241,.2); color:var(--brand-300); }

/* ---------- Dashboard header widgets: clock, weather, news ---------- */
.dash-widgets { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.dash-clock { font-family:'Sora',sans-serif; font-size:20px; font-weight:700; white-space:nowrap; font-variant-numeric:tabular-nums; color:var(--text-900); }

.weather-dd { position:relative; display:inline-flex; flex-shrink:0; }
.weather-pill { display:inline-flex; align-items:center; gap:6px; font-size:var(--fs-xs); font-weight:600; color:var(--text-500);
  background:var(--surface-2); border:1px solid var(--line); border-radius:99px; padding:3px 11px 3px 9px;
  cursor:pointer; font-family:inherit; }
.weather-pill:hover { border-color:var(--brand-500); }
.weather-dd.open .weather-pill { border-color:var(--brand-500); }
.weather-pill svg { width:15px; height:15px; color:#f59e0b; flex-shrink:0; }
.weather-pill b { color:var(--text-900); font-size:13px; font-variant-numeric:tabular-nums; }
.weather-precip { color:#3b82f6; font-weight:700; margin-left:2px; }
.weather-menu { display:none; position:absolute; top:calc(100% + 8px); right:0; z-index:60;
  min-width:330px; background:var(--surface); border:1px solid var(--line);
  border-radius:12px; box-shadow:var(--shadow-lg); padding:10px; text-align:left; }
.weather-dd.open .weather-menu { display:block; }
.weather-menu-h { font-size:11.5px; font-weight:700; color:var(--text-500); text-transform:uppercase;
  letter-spacing:.04em; padding:4px 6px 8px; border-bottom:1px solid var(--line); margin-bottom:6px; }
.weather-day { display:grid; grid-template-columns:40px 22px 1fr 46px 60px; align-items:center; gap:8px;
  padding:6px; border-radius:8px; font-size:13px; }
.weather-day:hover { background:var(--surface-2); }
.weather-day-name { font-weight:700; color:var(--text-900); }
.weather-day-icon svg { width:17px; height:17px; color:#f59e0b; }
.weather-day-desc { color:var(--text-500); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.weather-day-precip { color:#3b82f6; font-weight:600; text-align:right; }
.weather-day-temps { text-align:right; color:var(--text-500); font-variant-numeric:tabular-nums; }
.weather-day-temps b { color:var(--text-900); }

.news-pill { display:inline-flex; align-items:center; gap:7px; font-size:var(--fs-xs); font-weight:600; color:var(--text-500);
  background:var(--surface-2); border:1px solid var(--line); border-radius:99px; padding:3px 12px 3px 9px;
  text-decoration:none; max-width:320px; }
.news-pill:hover { border-color:var(--brand-500); text-decoration:none; }
.news-pill svg { width:15px; height:15px; color:var(--brand-600); flex-shrink:0; }
.news-pill span { color:var(--text-900); font-weight:500; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
  transition:opacity .25s ease; min-width:0; display:block; }
.news-pill span.fading { opacity:0; }
.news-pill-stretch { flex:1 1 auto; min-width:0; max-width:none; }

/* ---------- List-page toolbar: search + pager + export ---------- */
.list-toolbar { display:flex; align-items:center; justify-content:space-between; gap:14px; margin-bottom:16px; flex-wrap:wrap; }
.list-toolbar form { display:flex; gap:8px; flex:1; min-width:220px; max-width:360px; }
.list-toolbar input[type=text] { flex:1; }
.pager { display:flex; align-items:center; gap:10px; }
.pager .pager-info { font-size:12.5px; color:var(--text-500); white-space:nowrap; }
.pager a.disabled { pointer-events:none; opacity:.4; }

.saved-view-chip {
  display:flex; align-items:center; gap:4px; background:var(--surface-2); border:1px solid var(--line);
  border-radius:999px; padding:4px 6px 4px 12px; font-size:12px;
}
.saved-view-chip a { color:var(--text-700); text-decoration:none; }
.saved-view-chip form { display:inline; }
.saved-view-chip button {
  background:none; border:none; color:var(--text-500); cursor:pointer; font-size:14px; padding:2px 6px; border-radius:50%;
}
.saved-view-chip button:hover { background:var(--line); color:var(--bad-600); }

.cmdk-scrim {
  position:fixed; inset:0; background:rgba(15,23,42,.5); z-index:100; display:flex; align-items:flex-start;
  justify-content:center; padding-top:12vh;
}
.cmdk-box {
  width:560px; max-width:92vw; background:var(--surface); border-radius:14px; box-shadow:var(--shadow-lg);
  border:1px solid var(--line); overflow:hidden;
}
.cmdk-box input {
  width:100%; border:none; border-bottom:1px solid var(--line); border-radius:0; padding:16px 18px; font-size:15px;
}
.cmdk-box input:focus { outline:none; }
.cmdk-results { max-height:50vh; overflow-y:auto; }
.cmdk-item {
  display:flex; align-items:center; gap:10px; padding:10px 18px; font-size:13px; color:var(--text-900);
  border-bottom:1px solid var(--line); text-decoration:none;
}
.cmdk-item:hover { background:var(--surface-2); text-decoration:none; }
.cmdk-item-title { font-weight:600; flex:1; }
.cmdk-hint { padding:8px 18px; font-size:11px; color:var(--text-500); border-top:1px solid var(--line); }

.notif-dropdown {
  position:absolute; top:calc(100% + 8px); right:0; width:320px; max-width:80vw; background:var(--surface);
  border:1px solid var(--line); border-radius:12px; box-shadow:var(--shadow-lg); z-index:50; overflow:hidden;
}
.kanban-card {
  background:var(--surface-2); border:1px solid var(--line); border-radius:10px; padding:10px 12px;
}
.kanban-card a { text-decoration:none; }
.kanban-card a:hover { text-decoration:underline; }

/* ---------- Toasts ---------- */
.toast-container { position:fixed; bottom:24px; right:24px; z-index:200; display:flex; flex-direction:column; gap:8px; }
.toast {
  background:var(--ink-800); color:#fff; padding:12px 18px; border-radius:10px; box-shadow:var(--shadow-lg);
  font-size:13px; font-weight:600; opacity:1; transform:translateY(0); transition:opacity .3s, transform .3s;
}
.toast-out { opacity:0; transform:translateY(8px); }
.toast-bad { background:#b91c1c; }

/* ---------- Nav progress bar ---------- */
.nav-progress {
  position:fixed; top:0; left:0; height:3px; width:0; background:linear-gradient(90deg,var(--brand-500),var(--brand-700));
  z-index:300; opacity:0; transition:width .4s ease, opacity .2s;
}
.nav-progress-active { width:70%; opacity:1; }

/* ---------- Floating quick-add button ---------- */
.fab-wrap { position:fixed; bottom:24px; right:24px; z-index:60; display:flex; flex-direction:column; align-items:flex-end; gap:10px; }
.fab-btn {
  width:52px; height:52px; border-radius:50%; border:none; background:linear-gradient(135deg,var(--brand-500),var(--brand-700));
  color:#fff; font-size:28px; line-height:1; cursor:pointer; box-shadow:var(--shadow-lg);
}
.fab-btn:hover { filter:brightness(1.05); }
.fab-menu { display:flex; flex-direction:column; gap:6px; background:var(--surface); border:1px solid var(--line); border-radius:12px; padding:8px; box-shadow:var(--shadow-lg); }
.fab-menu-item { padding:8px 14px; font-size:13px; font-weight:600; color:var(--text-700); border-radius:8px; text-decoration:none; white-space:nowrap; }
.fab-menu-item:hover { background:var(--surface-2); text-decoration:none; }

/* ---------- Empty states ---------- */
.empty-state { text-align:center; padding:48px 20px; color:var(--text-500); }
.empty-state svg { width:40px; height:40px; margin-bottom:12px; opacity:.5; }
.empty-state p { font-size:13.5px; margin-bottom:14px; }

@media print {
  .fab-wrap, .toast-container, .nav-progress { display:none !important; }
  .sidebar, .topbar, .nav-scrim, .no-print, .pager, .list-toolbar { display:none !important; }
  .main { margin-left:0 !important; }
  .content { padding:0 !important; }
  .panel { box-shadow:none !important; border:1px solid #ccc !important; break-inside:avoid; }
  body { background:#fff !important; color:#000 !important; }
}

@media (prefers-reduced-motion:reduce) {
  *, *::before, *::after { animation-duration:0.01ms !important; animation-iteration-count:1 !important; transition-duration:0.01ms !important; scroll-behavior:auto !important; }
  .sidebar { transition:none; }
}
