/* ─────────────────────────────────────────────────────────────────
   MRG Quote Copilot — matches MRG CRM design system.
   Tokens mirror /assets/css/base.css + design-system.css + crm.css
   from MRG-sandbox so this app feels native to mrg-hub.
   ───────────────────────────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  /* MRG brand */
  --wt-theme-primary:        #004b7c;
  --wt-theme-primary-strong: #035a96;
  --wt-theme-primary-bright: #0b63a6;
  --wt-theme-primary-dark:   #033a60;
  --wt-theme-primary-deep:   #00324f;
  --wt-theme-primary-soft:   #cbd5f5;
  --wt-theme-primary-mist:   #e6f3ff;

  /* Status palette (matches crm.css) */
  --c-blue:   var(--wt-theme-primary);
  --c-blue-bg:   var(--wt-theme-primary-mist);
  --c-blue-soft: var(--wt-theme-primary-soft);
  --c-green:  #16a34a;
  --c-green-bg:  #defbe6;
  --c-green-soft:#a7f0ba;
  --c-yellow: #f59e0b;
  --c-yellow-bg: #fef3c7;
  --c-yellow-soft:#fde68a;
  --c-red:    #ef4444;
  --c-red-bg:    #fff1f1;
  --c-red-soft:  #fecdd3;
  --c-purple: #7c3aed;
  --c-purple-bg: #f5f3ff;
  --c-teal:   #0d9488;
  --c-teal-bg:   #f0fdfa;

  /* Surfaces */
  --surf:        #ffffff;
  --surf-2:      #f8fafc;
  --bg:          #f1f5f9;
  --border:      #e2e8f0;
  --border-s:    #f1f5f9;

  /* Ink */
  --ink:    #0f172a;
  --ink2:   #334155;
  --ink2-4: #475569;
  --ink3:   #64748b;
  --ink4:   #94a3b8;

  /* Geometry */
  --radius:    16px;
  --radius-sm: 10px;
  --radius-xs: 8px;

  /* Shadows (lifted from crm.css --shadow-*) */
  --shadow-sm: 0 1px 3px rgba(0,0,0,.04), 0 1px 2px rgba(0,0,0,.03);
  --shadow-md: 0 4px 14px rgba(0,0,0,.06), 0 1.5px 5px rgba(0,0,0,.03);
  --shadow-lg: 0 8px 28px rgba(0,0,0,.09), 0 2px 8px rgba(0,0,0,.04);

  --f: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(.22,1,.36,1);
  --t: 180ms var(--ease);

  --shell-max: 1620px;
  --shell-pad: 24px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100vh; }
body {
  font-family: var(--f);
  font-size: 14px; line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
.sr { position: absolute; left: -9999px; }
.hidden { display: none !important; }
.muted { color: var(--ink3); }
.tabular { font-variant-numeric: tabular-nums; }
a { color: var(--c-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── topbar ────────────────────────────────────────────────────── */
.topbar {
  display: flex; align-items: center; gap: 16px;
  padding: 12px 24px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 30;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-icon { display: block; border-radius: 8px; box-shadow: var(--shadow-sm); }
.brand-title {
  font-size: 15px; font-weight: 700; letter-spacing: 0.01em; color: var(--ink);
}
/* Small "Live" status pill in the header — replaces the old full-width banner. */
.live-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px 3px 8px; border-radius: 999px;
  background: var(--c-green-bg, #e7f6ec); color: var(--c-green, #15803d);
  font-size: 11px; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase;
  white-space: nowrap; cursor: default; flex: none;
}
.live-pill::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%;
  background: var(--c-green, #15803d); box-shadow: 0 0 0 0 currentColor;
  animation: livePulse 2.4s ease-out infinite;
}
@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--c-green, #15803d) 55%, transparent); }
  70% { box-shadow: 0 0 0 6px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
/* Tabs sit inline in the header (CRM pattern) — keep them from growing too tall. */
.topbar .ph-nav { padding: 4px 8px; }
/* Sign-in / identity in the header right. */
.user-strip { display: flex; align-items: center; gap: 10px; }
.user-strip .user-email { font-size: 12px; color: var(--ink2); font-weight: 600; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-strip .user-signout { font-size: 11px; color: var(--ink3); }
.user-strip .signin-btn {
  display: inline-flex; align-items: center; padding: 7px 14px; border-radius: 9px;
  background: var(--c-blue); color: #fff; font-size: 12.5px; font-weight: 600;
  box-shadow: 0 2px 6px color-mix(in srgb, var(--c-blue) 28%, transparent); white-space: nowrap;
}
.user-strip .signin-btn:hover { filter: brightness(1.07); }

.quote-picker { display: flex; gap: 8px; flex: 1 1 auto; max-width: 560px; }
.quote-picker input {
  flex: 1; padding: 9px 14px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--surf); color: var(--ink); font-size: 13.5px; font-family: var(--f);
  transition: border-color var(--t), box-shadow var(--t);
}
.quote-picker input::placeholder { color: var(--ink4); }
.quote-picker input:focus {
  outline: 0; border-color: var(--c-blue);
  box-shadow: 0 0 0 3px var(--c-blue-bg);
}
.user-strip { font-size: 12px; color: var(--ink3); min-width: 160px; text-align: right; }
.user-strip a { color: var(--c-blue); font-weight: 500; }

/* ── buttons (matches .wt-btn pattern) ─────────────────────────── */
button, .btn {
  cursor: pointer; font-family: var(--f); font-size: 13px; font-weight: 600;
  padding: 7px 14px; border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surf); color: var(--ink2);
  letter-spacing: 0.005em;
  transition: background var(--t), border-color var(--t), color var(--t), transform 120ms var(--ease), box-shadow var(--t);
  box-shadow: var(--shadow-sm);
}
button:hover, .btn:hover { background: var(--surf-2); transform: translateY(-1px); box-shadow: var(--shadow-md); }
button:active, .btn:active { transform: translateY(0); }
button.primary, .btn.primary {
  background: var(--c-blue); color: #fff; border-color: var(--c-blue);
  box-shadow: 0 2px 8px color-mix(in srgb, var(--c-blue) 30%, transparent);
}
button.primary:hover, .btn.primary:hover { background: var(--wt-theme-primary-strong); border-color: var(--wt-theme-primary-strong); }
button.accent, .btn.accent {
  background: var(--c-blue); color: #fff; border-color: var(--c-blue);
}
button.subtle, .btn.subtle { background: var(--surf-2); border-color: var(--border); color: var(--ink2); box-shadow: none; }
button.ghost, .btn.ghost { background: transparent; color: var(--ink2); border-color: var(--border); box-shadow: none; }
button:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ── ph-nav (matches MRG CRM/Work pill-tab pattern exactly) ────── */
.ph-nav-wrap {
  width: 100%; max-width: calc(var(--shell-max) - var(--shell-pad) * 2);
  margin: 16px auto; padding: 0;
  position: sticky; top: 12px; z-index: 20;
  background: linear-gradient(180deg, rgba(255,255,255,0.97), rgba(248,250,252,0.95));
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  overflow: visible;
  display: flex; flex-wrap: wrap; align-items: center; gap: 0;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.ph-nav {
  display: flex; flex-wrap: nowrap; gap: 4px; align-items: center; justify-content: flex-start;
  background: transparent; border: none; padding: 8px 16px;
  flex: 1 1 auto; min-width: 0; overflow-x: auto;
  scrollbar-width: none;
}
.ph-nav::-webkit-scrollbar { display: none; }
.ph-nav-btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.01em;
  color: var(--ink3);
  cursor: pointer;
  background: none; border: none; box-shadow: none;
  white-space: nowrap;
  transition: color var(--t), background var(--t), box-shadow var(--t), transform 120ms var(--ease);
  font-family: var(--f);
  line-height: 1;
}
.ph-nav-btn + .ph-nav-btn::before {
  content: '';
  position: absolute; left: -3px; top: 50%;
  width: 1px; height: 14px;
  transform: translateY(-50%);
  background: #cbd5e1; opacity: .45;
}
.ph-nav-btn:hover { color: var(--ink); background: rgba(15,23,42,.045); transform: translateY(-0.5px); }
.ph-nav-btn:active { transform: scale(.97); }
.ph-nav-btn.is-active {
  color: #fff !important;
  background: var(--c-blue) !important;
  box-shadow: 0 2px 8px color-mix(in srgb, var(--c-blue) 35%, transparent) !important;
  font-weight: 700;
}
.ph-nav-btn.is-active:hover { background: var(--c-blue) !important; filter: brightness(1.1); }
.ph-nav-btn.is-active::before { display: none; }
.ph-nav-btn.is-active + .ph-nav-btn::before { display: none; }
.ph-nav-badge {
  display: inline-block; min-width: 18px; padding: 1px 6px;
  border-radius: 999px; background: var(--c-red); color: #fff;
  font-size: 10px; font-weight: 700; margin-left: 6px; line-height: 1.4;
}
.ph-nav-btn.is-active .ph-nav-badge { background: rgba(255,255,255,0.25); }

/* Tab view sections — fade-up cross-fade on activation */
.ch-shell { display: block; position: relative; }
.ch-view { display: none; }
.ch-view.ch-view--active {
  display: block;
  /* Snappy, opacity-only — the tab is THERE the instant you click. No slide,
     no stagger. Just a 100ms fade so it isn't jarring. */
  animation: chViewIn 100ms linear both;
}
@keyframes chViewIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Quote workflow relocated into the right rail — compact for the narrow column:
   the action button drops full-width under its row text instead of crowding it. */
.quote-side-right .qc-wf-card { margin-bottom: 14px; }
.quote-side-right .qc-wf-head { padding: 12px 14px 9px; }
.quote-side-right .qc-wf-stage { padding: 9px 14px; }
.quote-side-right .qc-wf-row { flex-wrap: wrap; }
.quote-side-right .qc-wf-row-action { flex-basis: 100%; margin-top: 6px; }

/* Search results dropdown (matches Work .wk-gs-results pattern) */
.wk-search-results {
  position: absolute; top: calc(100% + 6px); left: 14px; right: 14px;
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow-lg);
  max-height: 60vh; overflow-y: auto; z-index: 50;
}
.wk-search-results[hidden] { display: none; }
.wk-search-group-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: var(--ink4); padding: 10px 14px 4px;
  background: var(--surf-2); border-bottom: 1px solid var(--border-s);
}
.wk-search-row {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px;
  cursor: pointer; border-bottom: 1px solid var(--border-s);
  transition: background var(--t);
}
.wk-search-row:hover { background: var(--c-blue-bg); }
.wk-search-row:last-child { border-bottom: 0; }
.wk-search-row .pn {
  font-family: 'Inter', monospace; font-weight: 700; font-size: 13px; color: var(--ink);
  min-width: 110px;
}
.wk-search-row .desc { flex: 1; font-size: 12.5px; color: var(--ink2); }
.wk-search-row .meta { font-size: 11px; color: var(--ink3); text-align: right; }
.wk-search-empty {
  padding: 14px; font-size: 12.5px; color: var(--ink3); text-align: center;
}
.wk-search-empty a { color: var(--c-blue); font-weight: 600; }

/* Global search bar inside ph-nav-wrap (matches Work .wk-gs) */
.wk-gs {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  padding: 8px 14px;
  border-right: 1px solid #eef2f6;
  background: rgba(248,250,252,0.55);
  flex: 0 0 320px;
}
.wk-gs-icon { width: 16px; height: 16px; color: var(--ink3); flex-shrink: 0; }
.wk-gs input[type="text"] {
  flex: 1; min-width: 0;
  border: 1px solid transparent; border-radius: 10px;
  padding: 8px 12px; font-size: 13px; font-family: var(--f);
  background: #fff; color: var(--ink); outline: none;
  box-shadow: 0 0 0 1px rgba(15,23,42,.06);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.wk-gs input[type="text"]:focus {
  border-color: var(--c-blue);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-blue) 18%, transparent);
}
.wk-gs input[type="text"]::placeholder { color: var(--ink4); }

@media (max-width: 900px) {
  .wk-gs { flex: 1 1 100%; border-right: 0; border-bottom: 1px solid #eef2f6; }
}

/* ── badges & pills ────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 600;
  letter-spacing: 0.01em;
}
.badge-ok   { background: var(--c-green-bg);  color: #15803d; }
.badge-warn { background: var(--c-yellow-bg); color: #92400e; }
.badge-bad  { background: var(--c-red-bg);    color: #b91c1c; }
.badge-info { background: var(--c-blue-bg);   color: var(--c-blue); }
.badge-soft { background: var(--surf-2);      color: var(--ink2); border: 1px solid var(--border); }
.badge-mock { background: var(--c-purple-bg); color: var(--c-purple); }

/* ── concept banner ────────────────────────────────────────────── */
.concept-banner {
  background: linear-gradient(90deg, var(--c-purple-bg), var(--c-blue-bg) 60%, #fff);
  color: var(--ink2); padding: 10px 24px; font-size: 12.5px;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
}
.concept-banner .pill {
  display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px;
  background: var(--c-purple); color: #fff; font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.04em;
}
.concept-banner b { font-weight: 700; color: var(--ink); }

/* ── welcome ───────────────────────────────────────────────────── */
.welcome {
  max-width: 780px; margin: 56px auto; padding: 36px 40px;
  background: var(--surf); border-radius: var(--radius);
  border: 1px solid var(--border); box-shadow: var(--shadow-md);
}
.welcome h1 {
  margin: 0 0 8px; font-size: 28px; font-weight: 700; letter-spacing: -0.01em;
  color: var(--ink);
}
.welcome p { color: var(--ink2); font-size: 14px; margin: 0; }
.welcome-steps {
  margin: 24px 0 0; padding: 0; list-style: none; display: grid; gap: 10px;
}
.welcome-steps li {
  padding: 14px 16px; background: var(--surf-2); border: 1px solid var(--border);
  border-left: 4px solid var(--c-blue);
  border-radius: 0 12px 12px 0;
  font-size: 13.5px; color: var(--ink2);
}
.welcome-steps li b { color: var(--ink); font-weight: 700; }

/* ── shell + quote layout ──────────────────────────────────────── */
.shell {
  max-width: var(--shell-max); margin: 0 auto;
  padding: 20px var(--shell-pad);
}
.quote {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 20px;
}
.quote-3col { grid-template-columns: 260px minmax(0, 1fr) 320px; }
.quote-side, .quote-side-right {
  display: flex; flex-direction: column; gap: 12px;
  position: sticky; top: 80px; align-self: start;
  /* Was 100vh-100px. Bumped to 100vh-60px so panel content rarely
     gets clipped — internal scroll still kicks in beyond that. */
  max-height: calc(100vh - 60px); overflow-y: auto;
  padding-right: 4px;
}
.quote-side::-webkit-scrollbar, .quote-side-right::-webkit-scrollbar { width: 6px; }
.quote-side::-webkit-scrollbar-thumb, .quote-side-right::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

@media (max-width: 1280px) {
  .quote-3col { grid-template-columns: 260px minmax(0, 1fr); }
  .quote-side-right { position: static; max-height: none; margin-top: 16px; }
}

.quote-body { min-width: 0; display: flex; flex-direction: column; gap: 16px; }

/* ── card primitive ────────────────────────────────────────────── */
.card {
  background: var(--surf); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 14px 18px;
  border-bottom: 1px solid var(--border-s);
}
.card-title {
  font-size: 13.5px; font-weight: 700; color: var(--ink);
  display: flex; align-items: center; gap: 8px;
}
.card-title .ico {
  width: 28px; height: 28px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--c-blue-bg); color: var(--c-blue); font-size: 14px;
}
.card-sub { font-size: 11.5px; color: var(--ink3); font-weight: 500; }
.card-body { padding: 14px 18px; }

/* ── quote snapshot ─────────────────────────────────────────────── */
.snapshot {
  background: var(--surf);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.snapshot-top {
  background: linear-gradient(135deg, var(--c-blue-bg) 0%, #f0f9ff 100%);
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.snapshot-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
.snapshot-q {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.snapshot-q .num {
  background: var(--c-blue); color: #fff; padding: 4px 12px; border-radius: 8px;
  font-family: 'Inter', monospace; font-weight: 700; font-size: 14px;
  letter-spacing: 0.02em;
}
.snapshot-q .cust {
  font-size: 22px; font-weight: 700; color: var(--ink); letter-spacing: -0.01em;
}
.snapshot-meta {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0; padding: 0;
  border-top: 1px solid var(--border);
}
.snapshot-cell {
  padding: 14px 18px;
  border-right: 1px solid var(--border-s);
  position: relative;
  transition: background var(--t), transform 140ms var(--ease), box-shadow var(--t);
}
.snapshot-cell:last-child { border-right: 0; }
.snapshot-cell .label {
  display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--ink3); font-weight: 600; margin-bottom: 4px;
}
.snapshot-cell .value {
  font-size: 16px; font-weight: 700; color: var(--ink); display: flex;
  align-items: center; gap: 4px;
  font-variant-numeric: tabular-nums;
}
.snapshot-cell .sub { font-size: 11px; color: var(--ink3); margin-top: 2px; }

/* Interactive snapshot cell: hover lift + chevron reveal */
.snapshot-cell.is-interactive {
  cursor: pointer;
  border-radius: 8px;
}
.snapshot-cell.is-interactive .cell-chev {
  font-size: 16px; color: var(--ink4);
  margin-left: auto; opacity: 0;
  transform: translateX(-4px);
  transition: opacity 160ms var(--ease), transform 160ms var(--ease), color 160ms var(--ease);
  font-weight: 800;
}
.snapshot-cell.is-interactive:hover {
  background: var(--c-blue-bg, rgba(0,75,124,0.06));
  transform: translateY(-1px);
}
.snapshot-cell.is-interactive:hover .cell-chev {
  opacity: 1;
  transform: translateX(0);
  color: var(--c-blue, #004b7c);
}
.snapshot-cell.is-interactive:hover .value { color: var(--c-blue, #004b7c); }
.snapshot-cell.is-interactive:focus {
  outline: 0;
  background: var(--c-blue-bg, rgba(0,75,124,0.08));
  box-shadow: inset 0 0 0 2px var(--c-blue, #004b7c);
}
.snapshot-cell.is-interactive:active { transform: translateY(0); }
.snapshot-cell:not(.is-interactive) .cell-chev { display: none; }

.risk-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 999px; font-size: 11px; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase;
}
.risk-low  { background: var(--c-green-bg);  color: #15803d; }
.risk-med  { background: var(--c-yellow-bg); color: #92400e; }
.risk-high { background: var(--c-red-bg);    color: #b91c1c; }

/* ── next best action ──────────────────────────────────────────── */
.nba {
  background: linear-gradient(135deg, var(--c-blue) 0%, var(--wt-theme-primary-bright) 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 18px 22px;
  box-shadow: 0 8px 24px color-mix(in srgb, var(--c-blue) 30%, transparent);
}
.nba .label {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.08em;
  opacity: 0.85; font-weight: 600;
}
.nba h3 { margin: 4px 0 8px; font-size: 17px; font-weight: 700; line-height: 1.35; }
.nba .why { font-size: 12.5px; opacity: 0.92; margin-bottom: 14px; line-height: 1.45; }
.nba .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.nba .actions button {
  background: rgba(255,255,255,0.16); color: #fff; border-color: transparent;
  font-weight: 600; box-shadow: none; backdrop-filter: blur(8px);
}
.nba .actions button:hover { background: rgba(255,255,255,0.26); transform: translateY(-1px); }

/* ── intel grid ────────────────────────────────────────────────── */
.intel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 14px;
}
.intel-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0; border-bottom: 1px solid var(--border-s);
  font-size: 13px;
}
.intel-row:last-child { border-bottom: 0; }
.intel-row .k { color: var(--ink3); }
.intel-row .v { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }

/* ── why-line ──────────────────────────────────────────────────── */
.why-line {
  display: block; padding: 8px 12px; margin-top: 10px;
  background: var(--c-blue-bg);
  border-left: 3px solid var(--c-blue);
  border-radius: 0 8px 8px 0;
  font-size: 12px; color: var(--ink2); line-height: 1.5;
}
.why-line strong { color: var(--c-blue); font-weight: 700; }

/* ── line item card ────────────────────────────────────────────── */
.line-item { padding: 0; overflow: hidden; }
.line-item-head {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 14px 18px;
  background: linear-gradient(180deg, var(--surf-2), var(--surf));
  border-bottom: 1px solid var(--border-s);
  cursor: pointer;
  user-select: none;
  transition: background var(--t);
}
.line-item-head:hover { background: var(--c-blue-bg); }
.line-item-head:focus { outline: 0; box-shadow: inset 3px 0 0 var(--c-blue); }
.line-item:not(:has(.line-tabs)) .line-item-head { border-bottom: 0; }
.li-chev {
  display: inline-block; font-size: 12px; color: var(--ink3);
  transition: transform 180ms var(--ease);
  width: 12px; line-height: 1;
}
.li-chev.is-open { transform: rotate(90deg); }
.line-item-head .part-number {
  font-family: 'Inter', monospace; font-weight: 700;
  font-size: 15px; color: var(--ink);
}
.line-item-head .rev {
  background: var(--surf); padding: 2px 8px; border-radius: 6px;
  font-size: 11px; font-weight: 700; border: 1px solid var(--border);
  color: var(--ink2);
}
.line-item-head .qty { color: var(--ink3); font-size: 12.5px; font-weight: 600; }
.line-item-head .desc {
  flex: 1; color: var(--ink2); font-size: 12.5px; min-width: 200px; line-height: 1.4;
}
.line-item-head .badges { display: flex; gap: 6px; flex-wrap: wrap; }

.line-tabs {
  display: flex; gap: 0; padding: 8px 12px;
  border-bottom: 1px solid var(--border-s); background: var(--surf-2);
  overflow-x: auto;
}
.line-tab {
  background: none; border: 0; box-shadow: none;
  padding: 7px 14px; font-size: 12px; font-weight: 600; color: var(--ink3);
  border-radius: 8px; cursor: pointer; white-space: nowrap;
  transition: color var(--t), background var(--t);
}
.line-tab:hover { color: var(--ink); background: rgba(15,23,42,0.04); }
.line-tab.active {
  color: #fff; background: var(--c-blue);
  box-shadow: 0 2px 6px color-mix(in srgb, var(--c-blue) 28%, transparent);
}
.line-tab .count {
  display: inline-block; padding: 1px 6px; border-radius: 999px;
  background: var(--c-blue-bg); color: var(--c-blue); font-size: 10.5px; margin-left: 4px;
}
.line-tab.active .count { background: rgba(255,255,255,0.22); color: #fff; }
.line-tab.has-issue .count { background: var(--c-red-bg); color: var(--c-red); }

.line-panel { padding: 18px; }
.line-panel.hidden { display: none; }

.history-block {
  font-family: 'Inter', 'SF Mono', Consolas, monospace; font-size: 11.5px;
  white-space: pre; overflow-x: auto;
  background: #0f172a; color: #cbd5e1;
  padding: 14px 16px; border-radius: 10px; line-height: 1.65;
}

.proc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.proc-chip {
  padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 600;
  background: var(--surf-2); color: var(--ink2); border: 1px solid var(--border);
}
.proc-chip.outside { background: var(--c-yellow-bg); color: #92400e; border-color: var(--c-yellow-soft); }
.proc-chip.internal { background: var(--c-blue-bg); color: var(--c-blue); border-color: var(--c-blue-soft); }

/* requirements list */
.req-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.req-item {
  display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px;
  border-radius: 10px; border: 1px solid var(--border);
  background: var(--surf-2); font-size: 12.5px;
}
.req-item.ok   { border-left: 3px solid var(--c-green); }
.req-item.warn { border-left: 3px solid var(--c-yellow); }
.req-item.bad  { border-left: 3px solid var(--c-red); background: var(--c-red-bg); }
.req-item .ico {
  width: 22px; height: 22px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; flex-shrink: 0;
}
.req-item.ok .ico   { background: var(--c-green); color: #fff; }
.req-item.warn .ico { background: var(--c-yellow); color: #fff; }
.req-item.bad .ico  { background: var(--c-red); color: #fff; }
.req-item .label { font-weight: 600; color: var(--ink); }
.req-item .detail { color: var(--ink3); font-size: 11.5px; }

/* vendor rows */
.vendor-row {
  display: grid; grid-template-columns: 1fr auto auto auto;
  gap: 14px; align-items: center; padding: 12px 0;
  border-bottom: 1px solid var(--border-s); font-size: 13px;
}
.vendor-row:last-child { border-bottom: 0; }
.vendor-row .name { font-weight: 700; color: var(--ink); }
.vendor-row .stats { font-size: 11.5px; color: var(--ink3); margin-top: 2px; }
.vendor-row .why { font-size: 11px; color: var(--ink2); margin-top: 4px; line-height: 1.4; }
.vendor-row .stat-cell { font-size: 10.5px; text-align: right; color: var(--ink3); }
.vendor-row .stat-cell .v {
  font-weight: 700; font-size: 14px; color: var(--ink); display: block; font-variant-numeric: tabular-nums;
}

/* similar quotes */
.similar-quote-row {
  display: grid; grid-template-columns: 100px 1fr 70px 90px auto auto;
  gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border-s);
  font-size: 12.5px; align-items: center;
}
.similar-quote-row:last-child { border-bottom: 0; }
.similar-quote-row .pn {
  font-family: 'Inter', monospace; font-weight: 700; font-size: 12.5px; color: var(--ink);
}
.similar-quote-row .meta { color: var(--ink3); font-size: 11px; line-height: 1.4; }
.similar-quote-row .price { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--ink); text-align: right; }

/* Vendor RFQ tracker (intel-panels vendorRfqTrackerCard) */
.vrfq-table { display: flex; flex-direction: column; }
.vrfq-head, .vrfq-row {
  display: grid; grid-template-columns: 1.4fr 1fr 100px 90px 80px 60px auto;
  gap: 10px; align-items: center; font-size: 12.5px;
  padding: 8px 0; border-bottom: 1px solid var(--border-s);
}
.vrfq-head {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--ink3); font-weight: 700;
}
.vrfq-row:last-child { border-bottom: 0; }
.vrfq-vendor { font-weight: 600; color: var(--ink); }
.vrfq-svc    { color: var(--ink2); }
.vrfq-actions { display: flex; justify-content: flex-end; }

/* margin bar */
.margin-bar {
  position: relative; height: 8px; background: var(--border); border-radius: 999px;
  margin: 10px 0; overflow: hidden;
}
.margin-bar .fill {
  position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px;
  background: var(--c-green); transition: width var(--t);
}
.margin-bar.warn .fill { background: var(--c-yellow); }
.margin-bar.bad .fill  { background: var(--c-red); }

/* automation status */
.auto-row {
  display: flex; align-items: center; gap: 12px; padding: 10px 0;
  border-bottom: 1px solid var(--border-s); font-size: 12.5px;
}
.auto-row:last-child { border-bottom: 0; }
.auto-row .dot {
  width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0;
  box-shadow: 0 0 0 3px var(--surf);
}
.auto-row .dot.pending  { background: var(--ink4); }
.auto-row .dot.in-flight{ background: var(--c-blue); animation: pulse 1.5s ease-in-out infinite; }
.auto-row .dot.done     { background: var(--c-green); }
.auto-row .dot.blocked  { background: var(--c-red); }
.auto-row .label { flex: 1; color: var(--ink2); }
.auto-row .when { font-size: 10.5px; color: var(--ink3); }

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.2); }
}

/* checklist */
.checklist h3 {
  margin: 0 0 12px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--ink3); font-weight: 700;
}
.checklist ol { margin: 0; padding: 0; list-style: none; counter-reset: step; }
.checklist li {
  padding: 9px 0 9px 30px; position: relative; font-size: 12.5px;
  counter-increment: step; border-bottom: 1px solid var(--border-s);
  color: var(--ink2);
}
.checklist li:last-child { border: 0; }
.checklist li::before {
  content: counter(step); position: absolute; left: 0; top: 9px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--surf-2); color: var(--ink3); border: 1px solid var(--border);
  font-size: 11px; font-weight: 700; line-height: 20px; text-align: center;
}
.checklist li.done::before { content: "✓"; background: var(--c-green); color: #fff; border-color: var(--c-green); }
.checklist li.active { font-weight: 700; color: var(--ink); }
.checklist li.active::before { background: var(--c-blue); color: #fff; border-color: var(--c-blue); }

/* sidebar line index */
.sidebar-lines h3 {
  margin: 0 0 8px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--ink3); font-weight: 700;
}
.sidebar-line {
  display: block; padding: 10px 12px; border-radius: 10px; text-decoration: none;
  color: var(--ink2); font-size: 12.5px;
  border: 1px solid transparent; margin-bottom: 4px;
  transition: background var(--t), border-color var(--t);
}
.sidebar-line:hover { background: var(--surf-2); border-color: var(--border); text-decoration: none; }
.sidebar-line .pn { font-family: 'Inter', monospace; font-weight: 700; color: var(--ink); }
.sidebar-line .sub { display: block; color: var(--ink3); font-size: 11px; margin-top: 2px; }
.sidebar-line .ind {
  float: right; width: 8px; height: 8px; border-radius: 50%;
  background: var(--c-green); margin-top: 4px;
}
.sidebar-line .ind.issue { background: var(--c-red); }

/* toast */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 11px 20px; border-radius: 10px;
  box-shadow: var(--shadow-lg);
  font-size: 13px; font-weight: 500; max-width: 80vw; z-index: 100;
}
.toast.err { background: var(--c-red); }
.toast.ok  { background: var(--c-green); }
.toast.toast-undo-host { display: inline-flex; gap: 14px; align-items: center; padding-right: 6px; }
.toast .toast-msg { display: inline-block; }
.toast .toast-undo {
  background: rgba(255,255,255,0.22); color: #fff; border: 0; box-shadow: none;
  padding: 5px 12px; border-radius: 6px; font-weight: 700; font-size: 12px; cursor: pointer;
}
.toast .toast-undo:hover { background: rgba(255,255,255,0.32); }

@media (max-width: 1100px) {
  .quote { grid-template-columns: 1fr; }
  .quote-side { position: static; max-height: none; }
}

/* ════════ Customer 360 + Quote Notes + Part History panels ════════ */
.c360-card, .ph-card {
  background: var(--surf); border: 1px solid var(--border); border-radius: 14px;
  padding: 18px 20px; margin: 12px 0; box-shadow: var(--shadow);
}
.c360-head, .ph-card-head { margin-bottom: 14px; }
.c360-head h2, .ph-card-head h2 {
  font-size: 15px; margin: 0 0 4px; color: var(--ink); font-weight: 700; letter-spacing: -0.01em;
}
.c360-kpis {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  margin-bottom: 16px;
}
.c360-kpi {
  background: var(--surf-2); border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 12px; display: flex; flex-direction: column;
}
.c360-kpi .label {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--ink3); font-weight: 700;
}
.c360-kpi .value {
  font-size: 22px; font-weight: 700; color: var(--ink);
  font-variant-numeric: tabular-nums; margin-top: 4px;
}
.c360-kpi .sub { font-size: 11px; color: var(--ink3); margin-top: 2px; }
.c360-section { margin-top: 14px; }
.c360-section h3 {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--ink3); font-weight: 700; margin: 0 0 6px;
}
.c360-table {
  width: 100%; border-collapse: collapse; font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}
.c360-table th, .c360-table td {
  padding: 6px 8px; text-align: left; border-bottom: 1px solid var(--border-s);
}
.c360-table th {
  font-weight: 700; color: var(--ink3); font-size: 10.5px;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.c360-table td.num, .c360-table th.num { text-align: right; }
.c360-table tbody tr:hover { background: var(--surf-2); }
.c360-orders-sub { font-size: 12px; margin-bottom: 4px; }
.c360-activity { margin: 0; padding-left: 18px; font-size: 13px; }
.c360-activity li { margin-bottom: 4px; }

.ph-block { margin-top: 12px; }
.ph-block .ph-head { font-size: 13px; margin-bottom: 6px; color: var(--ink2); }
.ph-stats { font-size: 12px; color: var(--ink3); margin-bottom: 4px; }

/* ════════ Quote notes ════════ */
.qn-card {
  background: var(--surf); border: 1px solid var(--border); border-radius: 14px;
  padding: 14px 18px; margin: 12px 0; box-shadow: var(--shadow);
}
.qn-block + .qn-block { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border-s); }
.qn-head { font-size: 12px; color: var(--ink3); margin-bottom: 8px; display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.qn-head b { color: var(--ink); }
.qn-section {
  border-left: 3px solid var(--border); padding: 8px 12px; margin: 8px 0;
  background: var(--surf-2); border-radius: 0 8px 8px 0;
}
.qn-section.qn-warn { border-left-color: var(--c-orange, #d97706); background: rgba(217,119,6,0.05); }
.qn-section.qn-soft { border-left-color: var(--border); }
.qn-label { font-size: 12px; color: var(--ink2); margin-bottom: 4px; }
.qn-label .ico { margin-right: 6px; }
.qn-body {
  font-family: 'Inter', monospace; font-size: 12.5px; color: var(--ink);
  white-space: pre-wrap; margin: 0; line-height: 1.5;
}

/* ════════ Line item thumbnail ════════ */
.li-thumb {
  width: 32px; height: 32px; border-radius: 6px; background: var(--surf-2);
  border: 1px solid var(--border); object-fit: cover; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  margin-right: 6px;
}
.li-thumb-empty { color: var(--ink4); font-size: 12px; }

@media (max-width: 900px) {
  .c360-kpis { grid-template-columns: repeat(2, 1fr); }
}

/* ════════════════════════════════════════════════════════════════════
   MOTION LAYER
   tab cross-fade above; below: one-shot stagger via [data-fresh-mount],
   shimmer skeletons, drawer/modal scale-in, queue press feedback.
   ════════════════════════════════════════════════════════════════════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes shimmer {
  0%   { background-position: -480px 0; }
  100% { background-position:  480px 0; }
}

[data-fresh-mount] .c360-kpi,
[data-fresh-mount] .c360-section,
[data-fresh-mount] .ph-block,
[data-fresh-mount] .qn-block,
[data-fresh-mount] .c360-table tbody tr,
[data-fresh-mount] .snapshot-cell {
  animation: fadeUp 320ms var(--ease) both;
}
[data-fresh-mount] .c360-kpi:nth-child(1) { animation-delay: 0ms;   }
[data-fresh-mount] .c360-kpi:nth-child(2) { animation-delay: 40ms;  }
[data-fresh-mount] .c360-kpi:nth-child(3) { animation-delay: 80ms;  }
[data-fresh-mount] .c360-kpi:nth-child(4) { animation-delay: 120ms; }
[data-fresh-mount] .c360-section:nth-of-type(1) { animation-delay: 80ms;  }
[data-fresh-mount] .c360-section:nth-of-type(2) { animation-delay: 140ms; }
[data-fresh-mount] .c360-section:nth-of-type(3) { animation-delay: 200ms; }
[data-fresh-mount] .c360-section:nth-of-type(4) { animation-delay: 260ms; }
[data-fresh-mount] .c360-table tbody tr:nth-child(1) { animation-delay: 60ms;  }
[data-fresh-mount] .c360-table tbody tr:nth-child(2) { animation-delay: 100ms; }
[data-fresh-mount] .c360-table tbody tr:nth-child(3) { animation-delay: 140ms; }
[data-fresh-mount] .c360-table tbody tr:nth-child(4) { animation-delay: 180ms; }
[data-fresh-mount] .c360-table tbody tr:nth-child(5) { animation-delay: 220ms; }
[data-fresh-mount] .c360-table tbody tr:nth-child(6) { animation-delay: 260ms; }
[data-fresh-mount] .c360-table tbody tr:nth-child(7) { animation-delay: 300ms; }
[data-fresh-mount] .c360-table tbody tr:nth-child(8) { animation-delay: 340ms; }
[data-fresh-mount] .snapshot-meta .snapshot-cell:nth-child(1) { animation-delay: 0ms;   }
[data-fresh-mount] .snapshot-meta .snapshot-cell:nth-child(2) { animation-delay: 30ms;  }
[data-fresh-mount] .snapshot-meta .snapshot-cell:nth-child(3) { animation-delay: 60ms;  }
[data-fresh-mount] .snapshot-meta .snapshot-cell:nth-child(4) { animation-delay: 90ms;  }
[data-fresh-mount] .snapshot-meta .snapshot-cell:nth-child(5) { animation-delay: 120ms; }
[data-fresh-mount] .snapshot-meta .snapshot-cell:nth-child(6) { animation-delay: 150ms; }
[data-fresh-mount] .snapshot-meta .snapshot-cell:nth-child(7) { animation-delay: 180ms; }
[data-fresh-mount] .snapshot-meta .snapshot-cell:nth-child(8) { animation-delay: 210ms; }
[data-fresh-mount] .snapshot-meta .snapshot-cell:nth-child(9) { animation-delay: 240ms; }

/* Skeleton placeholders for async loading panels */
.skel {
  display: inline-block; height: 12px; border-radius: 6px;
  background: linear-gradient(90deg,
    var(--surf-2) 0%, rgba(0,0,0,0.04) 40%, var(--surf-2) 80%);
  background-size: 480px 100%;
  animation: shimmer 1.2s linear infinite;
  vertical-align: middle;
}
.skel-row    { display: flex; gap: 10px; align-items: center; margin: 8px 0; }
.skel-w-30   { width: 30%;  }
.skel-w-40   { width: 40%;  }
.skel-w-50   { width: 50%;  }
.skel-w-60   { width: 60%;  }
.skel-w-70   { width: 70%;  }
.skel-w-80   { width: 80%;  }
.skel-w-100  { width: 100%; }
.skel-h-22   { height: 22px; }
.skel-h-32   { height: 32px; }
.skel-circle { width: 32px; height: 32px; border-radius: 50%; }

/* Queue row: press feedback + loading shimmer when selected */
.qq-row { transform: translateZ(0); will-change: background, transform; }
.qq-row:active { transform: scale(0.997); }
.qq-row.is-loading-quote {
  background: linear-gradient(90deg,
    var(--c-blue-bg) 0%, rgba(0,75,124,0.18) 50%, var(--c-blue-bg) 100%);
  background-size: 600px 100%;
  animation: shimmer 1.0s linear infinite;
  pointer-events: none;
}

/* Button hover lift + click settle */
button.primary, button.subtle, button.ghost, button.danger {
  transition: background var(--t), border-color var(--t), color var(--t),
              transform 140ms var(--ease), box-shadow var(--t);
}
button.primary:hover, button.subtle:hover, button.ghost:hover { transform: translateY(-1px); }
button.primary:active, button.subtle:active, button.ghost:active { transform: translateY(0); }

.badge { transition: background var(--t), color var(--t), border-color var(--t); }

/* Drawer body section stagger on first open */
.qc-dr-card[data-open="1"] .qc-dr-section { animation: fadeUp 320ms var(--ease) both; }
.qc-dr-card[data-open="1"] .qc-dr-section:nth-of-type(1) { animation-delay: 80ms;  }
.qc-dr-card[data-open="1"] .qc-dr-section:nth-of-type(2) { animation-delay: 130ms; }
.qc-dr-card[data-open="1"] .qc-dr-section:nth-of-type(3) { animation-delay: 180ms; }
.qc-dr-card[data-open="1"] .qc-dr-section:nth-of-type(4) { animation-delay: 230ms; }
.qc-dr-card[data-open="1"] .qc-dr-section:nth-of-type(5) { animation-delay: 280ms; }
.qc-dr-card[data-open="1"] .qc-dr-section:nth-of-type(6) { animation-delay: 330ms; }

/* Modals scale-in */
.qc-modal-backdrop,
.qc-confirm-backdrop,
.qc-presend-backdrop,
.qc-compare-backdrop { animation: fadeIn 180ms var(--ease) both; }
.qc-modal, .qc-confirm, .qc-presend, .qc-compare {
  animation: scaleIn 220ms var(--ease) both;
  transform-origin: center center;
}

.toast:not(.hidden) { animation: fadeUp 220ms var(--ease) both; }

[data-fresh-mount] .sc-chip { animation: fadeUp 280ms var(--ease) both; }
[data-fresh-mount] .sc-chip:nth-child(1) { animation-delay: 0ms;  }
[data-fresh-mount] .sc-chip:nth-child(2) { animation-delay: 40ms; }
[data-fresh-mount] .sc-chip:nth-child(3) { animation-delay: 80ms; }
[data-fresh-mount] .sc-chip:nth-child(4) { animation-delay: 120ms; }
[data-fresh-mount] .sc-chip:nth-child(5) { animation-delay: 160ms; }

[data-fresh-mount] .intel-card { animation: fadeUp 320ms var(--ease) both; }
[data-fresh-mount] .intel-card:nth-child(1) { animation-delay: 40ms;  }
[data-fresh-mount] .intel-card:nth-child(2) { animation-delay: 100ms; }
[data-fresh-mount] .intel-card:nth-child(3) { animation-delay: 160ms; }
[data-fresh-mount] .intel-card:nth-child(4) { animation-delay: 220ms; }

[data-fresh-mount] .line-item { animation: fadeUp 320ms var(--ease) both; }
[data-fresh-mount] .line-item:nth-child(1) { animation-delay: 0ms;   }
[data-fresh-mount] .line-item:nth-child(2) { animation-delay: 60ms;  }
[data-fresh-mount] .line-item:nth-child(3) { animation-delay: 120ms; }
[data-fresh-mount] .line-item:nth-child(4) { animation-delay: 180ms; }
[data-fresh-mount] .line-item:nth-child(5) { animation-delay: 240ms; }

.line-tabs, .line-panel { animation: fadeIn 180ms var(--ease) both; }

/* ════════════════════════════════════════════════════════════════════
   QUOTE DASHBOARD LOADING SKELETON — modeled on the Work app's wkSkeleton.
   Full-screen overlay that mirrors the dashboard layout while state.loadQuote
   fetches Paperless. Anchored by the actual quote number ("Entering Q-####")
   so the user feels they're going INTO that quote's workspace.
   ════════════════════════════════════════════════════════════════════ */
.qc-dash-loading {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--surf-2, #f8fafc);
  display: flex; flex-direction: column;
  animation: fadeIn 200ms var(--ease) both;
}
.qc-dash-loading.is-dismissed {
  animation: qcDashOut 320ms var(--ease) forwards;
  pointer-events: none;
}
@keyframes qcDashOut {
  to { opacity: 0; transform: translateY(-6px); }
}

.qc-dash-loading .qc-dl-topbar {
  height: 56px; background: #fff; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 24px; gap: 16px;
}
.qc-dash-loading .qc-dl-nav {
  display: flex; gap: 6px; padding: 12px 24px; background: #fff;
  border-bottom: 1px solid var(--border);
}
.qc-dash-loading .qc-dl-pill { height: 32px; border-radius: 16px; }
.qc-dash-loading .qc-dl-content {
  flex: 1; padding: 22px 24px; display: flex; flex-direction: column; gap: 16px;
  overflow: hidden;
}

/* Hero: the "Entering Q-####" header */
.qc-dash-loading .qc-dl-hero {
  background: #fff; border: 1px solid var(--border); border-radius: 14px;
  padding: 22px 24px; display: flex; align-items: center; gap: 18px;
  box-shadow: var(--shadow);
}
.qc-dash-loading .qc-dl-hero-num {
  font-size: 28px; font-weight: 800; color: var(--c-blue, #004b7c);
  letter-spacing: -0.02em; font-variant-numeric: tabular-nums;
}
.qc-dash-loading .qc-dl-hero-status {
  font-size: 12.5px; color: var(--ink3); margin-top: 2px;
}
.qc-dash-loading .qc-dl-hero-spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(0,75,124,0.18); border-top-color: var(--c-blue, #004b7c);
  animation: qcSpin 0.8s linear infinite; margin-left: auto;
}
@keyframes qcSpin { to { transform: rotate(360deg); } }

/* KPI strip */
.qc-dash-loading .qc-dl-kpis {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
}
.qc-dash-loading .qc-dl-kpi {
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  height: 76px;
}

/* Intel grid */
.qc-dash-loading .qc-dl-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
.qc-dash-loading .qc-dl-card {
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  height: 220px;
}

/* Shimmer surface */
.qc-dl-pill, .qc-dl-kpi, .qc-dl-card,
.qc-dl-bar, .qc-dl-bar-sm {
  position: relative; overflow: hidden;
  background: linear-gradient(90deg, #f1f5f9 25%, #e8edf3 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}
.qc-dl-kpi, .qc-dl-card { background: #fff; }
.qc-dl-kpi::after, .qc-dl-card::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 25%, rgba(0,0,0,0.03) 50%, transparent 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}
.qc-dl-bar { height: 14px; border-radius: 6px; }
.qc-dl-bar-sm { height: 10px; border-radius: 5px; }

@media (max-width: 900px) {
  .qc-dash-loading .qc-dl-kpis { grid-template-columns: repeat(2, 1fr); }
  .qc-dash-loading .qc-dl-grid { grid-template-columns: 1fr; }
}

/* ════════════════════════════════════════════════════════════════════
   LOCKED TABS — when no quote is loaded, every tab except Queue is
   visually disabled. Click attempts wiggle + nudge the user to the queue.
   ════════════════════════════════════════════════════════════════════ */
.ph-nav-btn.is-locked {
  opacity: 0.32;
  cursor: not-allowed;
  pointer-events: auto; /* still receive clicks so we can intercept */
  position: relative;
}
.ph-nav-btn.is-locked::after {
  content: '🔒';
  position: absolute;
  top: -3px; right: -3px;
  font-size: 9px;
  opacity: 0.7;
}
.ph-nav-btn.is-locked:hover {
  background: transparent;
  color: inherit;
}
.ph-nav-btn.is-wiggle { animation: qcWiggle 380ms var(--ease) both; }
@keyframes qcWiggle {
  0%   { transform: translateX(0); }
  20%  { transform: translateX(-4px); }
  40%  { transform: translateX(4px); }
  60%  { transform: translateX(-3px); }
  80%  { transform: translateX(3px); }
  100% { transform: translateX(0); }
}

/* Hint arrow that points to the active Queue tab when locked */
.qc-queue-hint {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--c-blue, #004b7c); font-weight: 600;
  padding: 4px 10px; border-radius: 999px;
  background: var(--c-blue-bg, rgba(0,75,124,0.08));
  animation: fadeIn 360ms var(--ease) both;
}
.qc-queue-hint .arr { animation: qcArrowBounce 1.2s var(--ease) infinite; }
@keyframes qcArrowBounce {
  0%, 100% { transform: translateX(0); }
  50%      { transform: translateX(-4px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Mark-status button group in snapshot header */
.snap-status-group {
  display: inline-flex; gap: 0;
  border: 1px solid var(--border); border-radius: 8px;
  overflow: hidden; background: var(--surf);
}
.snap-status-group button {
  border: 0; border-right: 1px solid var(--border);
  border-radius: 0; box-shadow: none;
  padding: 6px 10px; font-size: 12.5px;
}
.snap-status-group button:last-child { border-right: 0; }
.snap-status-group button:hover { background: var(--c-red-bg, rgba(220,38,38,0.08)); color: #b91c1c; transform: none; }

/* Live Paperless events panel */
.pl-events-card { margin-top: 14px; }
.pl-ev-row {
  display: grid; grid-template-columns: 22px 1fr auto;
  gap: 10px; align-items: center;
  padding: 8px 4px;
  border-bottom: 1px solid var(--border-s);
  font-size: 12.5px;
}
.pl-ev-row:last-child { border-bottom: 0; }
.pl-ev-ico { font-size: 16px; text-align: center; }
.pl-ev-type { font-family: ui-monospace, monospace; font-size: 12px; color: var(--ink); }
.pl-ev-time { font-size: 11px; font-variant-numeric: tabular-nums; }

/* Tier pill (snapshot header + tier card head) */
.tier-pill {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.02em;
  border: 1px solid; cursor: pointer;
  transition: filter var(--t), transform 120ms var(--ease);
}
.tier-pill:hover { transform: translateY(-1px); filter: brightness(1.05); }
.tier-pill.tier-1 { background: var(--c-green-bg); color: #15803d; border-color: var(--c-green-soft); }
.tier-pill.tier-2 { background: var(--c-yellow-bg); color: #92400e; border-color: var(--c-yellow-soft); }
.tier-pill.tier-3 { background: var(--c-red-bg);    color: #b91c1c; border-color: var(--c-red-soft); }

/* Tier intel card */
.tier-card .tier-reasons { display: flex; flex-direction: column; gap: 6px; }
.tier-reason { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; }
.tier-reason-tag {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 22px; flex-shrink: 0;
  border: 1px solid; border-radius: 6px;
  font-size: 10.5px; font-weight: 800; letter-spacing: 0.02em;
  background: var(--surf);
}
.tier-reason-text { color: var(--ink2); line-height: 1.5; }

/* Tier-1 Auto-quote panel */
.tq-card {
  border: 1px solid var(--c-green-soft);
  background: linear-gradient(180deg, var(--c-green-bg) 0%, var(--surf) 28%);
}
.tq-section-h {
  margin: 0 0 8px;
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--ink3); font-weight: 700;
}
.tq-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.6fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-s);
  font-size: 13px;
}
.tq-row:last-child { border-bottom: 0; }
.tq-row-empty { opacity: 0.7; }
.tq-row-label b { color: var(--ink); }
.tq-row-current, .tq-row-suggested { line-height: 1.4; }
.tq-row-action button { white-space: nowrap; }

.tq-notes-preview {
  background: var(--surf);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
}
.tq-notes-section + .tq-notes-section { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border-s); }
.tq-notes-label { font-weight: 700; color: var(--ink); font-size: 12.5px; }
.tq-notes-body {
  margin: 4px 0 0;
  font-family: 'Inter', monospace; font-size: 12px;
  color: var(--ink2); white-space: pre-wrap; line-height: 1.45;
}

@media (max-width: 900px) {
  .tq-row { grid-template-columns: 1fr 1fr; }
  .tq-row-action { grid-column: span 2; }
}

/* Quote Intelligence Summary — top-of-Overview hub */
.qis-card {
  background: linear-gradient(180deg, var(--c-blue-bg) 0%, var(--surf) 22%);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 18px 22px;
  margin: 12px 0;
}
.qis-head { margin-bottom: 14px; }
.qis-head-title { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.qis-head-title h2 {
  margin: 0; font-size: 16px; font-weight: 800;
  color: var(--ink); letter-spacing: -0.01em;
}
.qis-rollup {
  font-size: 12px; color: var(--ink3);
  font-variant-numeric: tabular-nums;
}
.qis-head-sub { font-size: 12.5px; color: var(--ink3); margin-top: 4px; line-height: 1.45; }

.qis-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 900px) { .qis-grid { grid-template-columns: 1fr; } }

.qis-block {
  background: var(--surf);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  transition: border-color var(--t), box-shadow var(--t), transform 140ms var(--ease);
}
.qis-block-clickable { cursor: pointer; }
.qis-block-clickable:hover {
  border-color: var(--c-blue);
  box-shadow: 0 2px 8px color-mix(in srgb, var(--c-blue) 14%, transparent);
  transform: translateY(-1px);
}
.qis-block-clickable:focus {
  outline: 0; border-color: var(--c-blue);
  box-shadow: 0 0 0 2px var(--c-blue-bg);
}
.qis-block-head {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 6px;
}
.qis-block-ico {
  width: 22px; height: 22px; display: inline-flex;
  align-items: center; justify-content: center;
  font-weight: 800; color: var(--c-blue);
  background: var(--c-blue-bg); border-radius: 6px; font-size: 12px;
}
.qis-block-title {
  font-size: 12px; font-weight: 700; color: var(--ink);
  text-transform: uppercase; letter-spacing: 0.04em;
}
.qis-block-dot {
  width: 8px; height: 8px; border-radius: 50%;
  margin-left: auto;
}
.qis-block-conf {
  font-size: 10.5px; color: var(--ink3); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.qis-block-chev {
  color: var(--ink4); font-size: 18px; line-height: 1;
}
.qis-block-summary {
  font-size: 13.5px; color: var(--ink); line-height: 1.5;
  margin-bottom: 6px;
}
.qis-sources { font-size: 11px; color: var(--ink3); margin-bottom: 4px; }
.qis-source {
  display: inline-block; margin-right: 6px;
  background: var(--surf-2); border: 1px solid var(--border);
  padding: 1px 6px; border-radius: 4px; font-size: 10.5px;
}
.qis-gaps {
  margin-top: 6px; font-size: 11.5px;
}
.qis-gaps summary {
  cursor: pointer; color: var(--c-red); font-weight: 600;
  list-style: none; padding: 2px 0;
}
.qis-gaps summary::-webkit-details-marker { display: none; }
.qis-gaps summary::before {
  content: '⓿'; margin-right: 4px;
  display: inline-block;
}
.qis-gaps[open] summary::before { content: '⏷'; }
.qis-gaps ul {
  margin: 4px 0 0; padding-left: 18px; color: var(--ink2);
}
.qis-gaps li { margin-bottom: 2px; }

/* Quotely audit log panel */
.qal-card { margin-top: 14px; }
.qal-list { display: flex; flex-direction: column; gap: 0; }
.qal-row {
  display: grid; grid-template-columns: 28px 1fr;
  gap: 10px; padding: 10px 4px;
  border-bottom: 1px solid var(--border-s);
}
.qal-row:last-child { border-bottom: 0; }
.qal-ico {
  display: flex; align-items: center; justify-content: center;
  width: 24px; height: 24px;
  background: var(--c-blue-bg); color: var(--c-blue);
  border-radius: 6px; font-weight: 700; font-size: 13px;
}
.qal-body { min-width: 0; }
.qal-headline { font-size: 13px; color: var(--ink); }
.qal-detail   { font-size: 11.5px; margin-top: 2px; word-break: break-word; }
.qal-meta     { font-size: 11px; margin-top: 3px; }
.qal-synced   { color: var(--c-green); font-weight: 600; }
.qal-pending  { color: var(--c-yellow); font-weight: 600; }

/* ════════════════════════════════════════════════════════════════════
   Collapsible sections (Overview tab uses these for heavy panels so
   the page lands clean and the user expands on demand)
   ════════════════════════════════════════════════════════════════════ */
.qc-coll {
  background: var(--surf);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  margin: 12px 0;
  overflow: hidden;
  transition: box-shadow var(--t), border-color var(--t);
}
.qc-coll[open] {
  box-shadow: var(--shadow-md);
}
.qc-coll-head {
  list-style: none;
  cursor: pointer;
  padding: 14px 18px;
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; font-weight: 700; color: var(--ink);
  letter-spacing: -0.005em;
  user-select: none;
  transition: background var(--t);
}
.qc-coll-head::-webkit-details-marker { display: none; }
.qc-coll-head::marker { content: ''; }
.qc-coll-head:hover { background: var(--surf-2); }
.qc-coll-ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px;
  color: var(--ink3);
  transition: transform 200ms var(--ease), color 160ms var(--ease);
  font-size: 14px; font-weight: 700;
}
.qc-coll[open] .qc-coll-ico { transform: rotate(90deg); color: var(--c-blue); }
.qc-coll-body {
  padding: 0 18px 16px;
  animation: qc-coll-in 240ms var(--ease) both;
}
@keyframes qc-coll-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ════════════════════════════════════════════════════════════════════
   Section navigator (left-sidebar nav for in-tab sections)
   ════════════════════════════════════════════════════════════════════ */
/* Work.html ph-sidebar pattern — adopted for the Overview tab sidebar */
.qc-overview-sidebar {
  background: var(--surf-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px;
  position: sticky; top: 84px;
  align-self: start;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  scrollbar-width: none;
}
.qc-overview-sidebar::-webkit-scrollbar { display: none; }
.ph-sb-label {
  display: block;
  font-size: 10px; font-weight: 700; color: #94a3b8;
  text-transform: uppercase; letter-spacing: 0.04em;
  padding: 8px 6px 4px;
}
.ph-sb-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 8px 10px;
  margin-top: 2px;
  border-radius: var(--radius-sm);
  font-size: 12.5px; font-weight: 600;
  color: var(--ink); cursor: pointer;
  border: none; background: none; text-align: left;
  font-family: var(--f);
  transition: background .15s ease, box-shadow .15s ease, color .15s ease, transform .15s ease;
}
.ph-sb-item:hover { background: rgba(255,255,255,0.6); transform: translateY(-1px); }
.ph-sb-item.is-active {
  background: var(--surf);
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  color: var(--c-blue);
}
.ph-sb-item.is-active .ph-sb-icon { color: var(--c-blue); }
.ph-sb-icon {
  display: flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; flex-shrink: 0;
  color: var(--ink3);
}
.ph-sb-icon svg { width: 16px; height: 16px; }
.ph-sb-text { flex: 1; }

/* Sub-tab view-swap on Overview: only .is-visible renders */
.qc-section { display: none; }
.qc-section.is-visible {
  display: block;
  animation: qc-section-in 240ms var(--ease) both;
}
@keyframes qc-section-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Legacy section-nav (kept for any orphan nodes; pruned in a future pass) */
.qc-section-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--ink3);
  font-size: 12.5px; font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background var(--t), color var(--t), border-color var(--t), transform 120ms var(--ease);
}
.qc-section-nav-item:hover {
  background: var(--surf-2); color: var(--ink); text-decoration: none;
  transform: translateX(2px);
}
.qc-section-nav-item.is-active {
  background: var(--c-blue-bg); color: var(--c-blue);
  border-color: color-mix(in srgb, var(--c-blue) 25%, transparent);
}
.qc-section-nav-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ink4);
  transition: background 160ms var(--ease), transform 160ms var(--ease);
}
.qc-section-nav-item.is-active .qc-section-nav-dot {
  background: var(--c-blue);
  transform: scale(1.4);
}
.qc-section-nav-label { flex: 1; }

/* Snapshot + Intelligence Summary aren't wrapped in <details> — give them
   the same outer card geometry as the collapsibles so the column reads
   as one consistent stack. */
#snapshotBlock, #quoteIntelligenceBlock { margin: 12px 0; }

/* Customer modal — contacts list (click-to-expand contact card) */
.qc-dr-contacts { display: flex; flex-direction: column; gap: 2px; }
.qc-dr-contact {
  border-radius: 8px;
  transition: background var(--t);
}
.qc-dr-contact:hover { background: var(--surf-2); }
.qc-dr-contact[open] { background: var(--c-blue-bg); }
.qc-dr-contact-head {
  list-style: none; cursor: pointer; user-select: none;
  display: grid; grid-template-columns: 1fr 1fr 14px;
  gap: 12px; align-items: center;
  padding: 8px 10px;
  font-size: 13px;
}
.qc-dr-contact-head::-webkit-details-marker { display: none; }
.qc-dr-contact-head::marker { content: ''; }
.qc-dr-contact-name { font-weight: 600; color: var(--ink); }
.qc-dr-contact-email { color: var(--ink3); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qc-dr-contact-chev {
  color: var(--ink4); font-size: 12px;
  transition: transform 200ms var(--ease);
  text-align: center;
}
.qc-dr-contact[open] .qc-dr-contact-chev { transform: rotate(90deg); color: var(--c-blue); }
.qc-dr-contact-body {
  padding: 6px 12px 12px;
  animation: qc-coll-in 200ms var(--ease) both;
}

/* Live data indicator (next to Q-#### badge) */
.qc-live-dot {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px 3px 7px;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-green);
  background: var(--c-green-bg);
  border: 1px solid var(--c-green-soft);
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}
.qc-live-pulse {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--c-green);
  animation: qc-live-pulse 1.6s ease-in-out infinite;
  box-shadow: 0 0 0 0 var(--c-green);
}
@keyframes qc-live-pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--c-green) 50%, transparent); }
  70%  { box-shadow: 0 0 0 8px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

/* Quote notes — polished empty state */
.qn-empty {
  text-align: center;
  padding: 28px 20px;
  background: var(--surf-2);
  border: 1px dashed var(--border);
  border-radius: 12px;
  color: var(--ink3);
}
.qn-empty-icon { font-size: 28px; line-height: 1; margin-bottom: 6px; }
.qn-empty-title { font-size: 14px; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.qn-empty-sub { font-size: 12.5px; line-height: 1.5; max-width: 420px; margin: 0 auto; }

/* Customer-360 empty / error state */
.c360-empty {
  text-align: center;
  padding: 24px 20px;
  background: var(--surf-2);
  border: 1px dashed var(--border);
  border-radius: 10px;
  font-size: 13px;
  color: var(--ink2);
  line-height: 1.5;
}
.c360-empty b { color: var(--ink); display: inline-block; margin-bottom: 4px; }

/* ════════════════════════════════════════════════════════════════════
   Loading progress bar (subtle CSS-only fill over expected duration)
   Use: <div class="qc-load-bar" style="--eta:17s">
          <div class="qc-load-bar-fill"></div>
          <span class="qc-load-bar-eta" data-eta-start="...">~17s</span>
        </div>
   The fill animates 0% → 95% over the duration set by --eta. Stays at
   95% if the load takes longer than expected; replaced when data lands.
   ════════════════════════════════════════════════════════════════════ */
.qc-load-bar {
  position: relative;
  height: 2px;
  background: var(--surf-2);
  border-radius: 2px;
  overflow: hidden;
  margin: 0 0 12px;
}
.qc-load-bar-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg,
    var(--c-blue-soft), var(--c-blue), var(--c-blue-soft));
  background-size: 200% 100%;
  border-radius: 2px;
  animation:
    qc-load-fill var(--eta, 15s) cubic-bezier(.22,1,.36,1) forwards,
    qc-load-shimmer 1.6s linear infinite;
}
@keyframes qc-load-fill {
  0%   { width: 0; }
  60%  { width: 70%; }
  90%  { width: 92%; }
  100% { width: 95%; }
}
@keyframes qc-load-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.qc-load-bar-eta {
  position: absolute;
  right: 0; top: 6px;
  font-size: 10.5px;
  color: var(--ink4);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  letter-spacing: 0.02em;
}
@media (prefers-reduced-motion: reduce) {
  .qc-load-bar-fill { animation: qc-load-fill var(--eta, 15s) linear forwards; }
}

/* ════════════════════════════════════════════════════════════════════
   Automation Opportunities — the "remote controller" panel at top of
   Overview. One row per automation Quotely can fire right now.
   ════════════════════════════════════════════════════════════════════ */
.ao-card {
  background: linear-gradient(180deg, var(--c-blue-bg) 0%, var(--surf) 30%);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 18px 22px;
  margin: 12px 0;
}
.ao-card-empty {
  background: var(--surf-2);
  border-style: dashed;
}
.ao-head { margin-bottom: 14px; }
.ao-head-title {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.ao-head-title h2 {
  margin: 0; font-size: 17px; font-weight: 800;
  color: var(--ink); letter-spacing: -0.01em;
}
.ao-pulse {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--c-blue);
  box-shadow: 0 0 0 0 var(--c-blue);
  animation: ao-pulse 1.8s ease-out infinite;
}
@keyframes ao-pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--c-blue) 60%, transparent); }
  70%  { box-shadow: 0 0 0 10px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
.ao-saved {
  font-size: 12px; color: var(--ink3); font-weight: 600;
  padding: 2px 10px; border-radius: 999px;
  background: var(--c-green-bg); color: #15803d;
}
.ao-head-sub { font-size: 12.5px; color: var(--ink3); margin-top: 4px; line-height: 1.45; }

.ao-list { display: flex; flex-direction: column; gap: 8px; }
.ao-row {
  display: grid; grid-template-columns: 36px 1fr auto;
  gap: 14px; align-items: center;
  padding: 12px 14px;
  background: var(--surf);
  border: 1px solid var(--border);
  border-radius: 10px;
  border-left: 3px solid var(--ao-accent, var(--c-blue));
  transition: transform 140ms var(--ease), box-shadow var(--t), border-color var(--t);
}
.ao-row:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  border-color: var(--ao-accent, var(--c-blue));
}
.ao-row-ico {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  border-radius: 8px;
  font-size: 16px; font-weight: 700;
}
.ao-row-body { min-width: 0; }
.ao-row-title {
  font-size: 14px; font-weight: 700; color: var(--ink);
  letter-spacing: -0.005em; margin-bottom: 3px;
}
.ao-row-saves {
  display: inline-block; margin-left: 6px;
  font-size: 10.5px; font-weight: 700;
  color: #15803d; background: var(--c-green-bg);
  padding: 1px 6px; border-radius: 4px;
  vertical-align: middle;
}
.ao-row-why { font-size: 12.5px; color: var(--ink3); line-height: 1.45; }
.ao-row-action { white-space: nowrap; }

.ao-empty {
  display: flex; align-items: center; gap: 14px;
  padding: 4px 0;
}
.ao-empty-ico {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--c-green-bg); color: #15803d;
  font-size: 22px; font-weight: 800;
  flex-shrink: 0;
}
.ao-empty-title { font-size: 14px; font-weight: 700; color: var(--ink); margin-bottom: 3px; }
.ao-empty-sub { font-size: 12.5px; color: var(--ink3); line-height: 1.45; }
