/* Overview — Shopify order-detail white panel restyle.
   Scoped to this page only (loaded by overview.html on top of
   base.css + sidebar.css). Keeps every JS hook / class name intact
   (card-search-*, og-*, eg-*, metrics-*, audit-*, aiv-*, teaser-*)
   and only changes layout + visuals. Logic lives in app.py. */

.sp-panel{
  --sp-ink:#303030;
  --sp-muted:#616161;
  --sp-faint:#8A8A8A;
  --sp-line:#E3E3E3;
  --sp-card:#EBEBEB;
  --sp-yellow:#FFEA8A;
  --sp-highlight:#FFF5B8;
  --sp-green:#29B561;
  --sp-black:#1A1A1A;
  --sp-hover:#F5F5F5;
  --sp-beige:#F6F1E7;
  --sp-graychip:#F1F1F1;
  background:transparent;
  border:none;
  border-radius:0;
  padding:8px 4px 110px;
  margin-bottom:0;
  box-shadow:none;
  color:var(--sp-ink);
  font-family:"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;
  font-size:14px;
  line-height:1.5;
  position:relative;
}

/* Hide shared hero on this page — panel owns its own title. */
.topbar{ display:none; }
.content{ padding-top:0 !important; }
.page-subtitle{ display:none; }

/* ---------- top bar ---------- */
.sp-topbar{
  display:flex; align-items:center; justify-content:flex-start;
  gap:12px; padding:4px 0 18px; margin:0;
}
.sp-topbar-left{
  display:flex; align-items:center; gap:10px; min-width:0;
  margin:0 auto 0 0; padding:0; flex:none;
  position:sticky; left:0;
}
.sp-back{
  width:32px; height:32px; border-radius:50%;
  border:1px solid var(--sp-line); background:#fff; color:var(--sp-ink);
  display:inline-flex; align-items:center; justify-content:center;
  cursor:pointer; transition:background 150ms ease;
}
.sp-back:hover{ background:var(--sp-hover); }
.sp-back svg{ width:16px; height:16px; }
.sp-crumb{
  display:flex; align-items:center; gap:8px;
  color:var(--sp-ink); font-size:14px; font-weight:600;
  line-height:1.4; letter-spacing:0;
  white-space:nowrap;
}
.sp-crumb svg{ width:16px; height:16px; color:var(--sp-ink); }
.sp-topbar-right{ display:flex; align-items:center; gap:10px; margin-left:auto; }
.sp-pillgroup{
  display:flex; align-items:center;
  background:#fff; border:1px solid var(--sp-card); border-radius:999px;
  box-shadow:0 1px 2px rgba(0,0,0,0.06);
  padding:3px; gap:2px;
}
.sp-iconbtn{
  width:28px; height:28px; border-radius:50%;
  border:none; background:transparent; color:var(--sp-muted);
  display:inline-flex; align-items:center; justify-content:center;
  cursor:pointer; transition:background 150ms ease;
}
.sp-iconbtn:hover{ background:var(--sp-hover); }
.sp-iconbtn svg{ width:16px; height:16px; }
/* Top-right buttons read as black pills, matching Export report. */
.sp-topbar-right .sp-iconbtn{ background:var(--sp-black); color:#fff; }
.sp-topbar-right .sp-iconbtn:hover{ background:#000; }
/* Merged single dark bar: the bar itself is black, buttons inside go
   transparent with white icons. */
.sp-pillgroup--dark{ background:var(--sp-black); border-color:var(--sp-black); box-shadow:none; }
.sp-pillgroup--dark .sp-iconbtn{ background:transparent; color:#fff; }
.sp-pillgroup--dark .sp-iconbtn:hover{ background:rgba(255,255,255,.14); }
/* Labeled Export button: word first, icon on the right. */
.sp-pillgroup--dark .sp-exportbtn{
  width:auto; height:28px; padding:0 12px; gap:6px;
  font-size:13px; font-weight:600;
}
.sp-iconbtn:focus-visible, .sp-back:focus-visible, .sp-btn:focus-visible,
.sp-chipbtn:focus-visible, a:focus-visible, input:focus-visible:not(.sp-comment):not(.card-search-input){
  outline:2px solid var(--sp-black); outline-offset:2px;
}

/* ---------- search (kept functional, Shopify pill) ---------- */
.card-search-block{ margin:0 0 18px; padding:0 0 18px; border-bottom:1px solid var(--sp-card); }
.card-search-row{ display:flex; align-items:center; gap:12px; }
.card-search-form{ display:flex; gap:8px; flex:1; }
.card-search-input{
  flex:1; height:36px; background:#fff; border:1px solid var(--sp-line);
  border-radius:999px; padding:0 16px; color:var(--sp-ink); font-size:14px; outline:none;
  transition:border-color 150ms ease;
}
.card-search-input:focus{ border-color:var(--sp-line); outline:none; box-shadow:none; }
.card-search-input:focus-visible{ outline:none; }
.card-search-input::placeholder{ color:var(--sp-faint); }
.card-search-btn{
  border-radius:999px; padding:0 18px; height:36px;
  display:inline-flex; align-items:center; justify-content:center;
  font-size:13px; font-weight:600; cursor:pointer; white-space:nowrap;
  transition:background 150ms ease; box-sizing:border-box; line-height:1;
  flex:none; margin:0;
  background:var(--sp-black); color:#fff; border:1px solid var(--sp-black);
}
.card-search-btn:hover{ background:#000; }
.print-only{ display:none; }
.export-stamp{ font-size:12px; color:var(--sp-muted); margin:10px 0 0; }
.card-search-error{ font-size:13px; color:#c0392b; margin:8px 0 0; }
.hidden{ display:none !important; }
.search-start-hint{ display:flex; align-items:center; flex:none; }
.ssh-text{ font-size:16px; font-weight:600; color:var(--sp-ink); text-transform:none; letter-spacing:0; line-height:1.4; margin:2px 0 4px; }
.ssh-arrow{ display:none; }

/* ---------- grid ---------- */
.sp-grid{
  display:grid;
  grid-template-columns:minmax(0,68%) minmax(0,30%);
  gap:32px; justify-content:space-between; align-items:start;
}
.sp-main{ min-width:0; }
.sp-side{ min-width:0; }
/* Floating right rail: pins under the page top while the main column
   scrolls. Capped with its own slim scroll so long rails (Target,
   health, Summary, Tags, Timeline) stay fully reachable instead of
   trapping content below the fold. */
.sp-side{
  position:sticky; top:16px; z-index:1;
  max-height:calc(100vh - 32px); max-height:calc(100dvh - 32px);
  overflow-y:auto; scrollbar-width:thin;
}

/* ---------- header ---------- */
.sp-title-row{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.sp-title{
  font-size:28px; font-weight:600; letter-spacing:-0.02em;
  margin:0; color:var(--sp-ink); line-height:1.2; word-break:break-all;
}
.sp-badges{ display:flex; align-items:center; gap:8px; }
.sp-badge{
  display:inline-flex; align-items:center; gap:6px;
  height:32px; padding:0 14px; border-radius:999px;
  font-size:13px; font-weight:500; white-space:nowrap;
}
.sp-badge svg{ width:14px; height:14px; }
.sp-badge--gray{ background:var(--sp-graychip); color:var(--sp-ink); }
.sp-badge--yellow{ background:var(--sp-yellow); color:#1A1A1A; }
.sp-meta{ color:var(--sp-muted); font-size:13px; margin:6px 0 0; }

/* ---------- insight highlight ---------- */
.sp-note-label{ color:var(--sp-faint); font-size:13px; margin:20px 0 6px; }
.sp-note-highlight{
  font-size:14px; line-height:1.9; color:var(--sp-ink); margin:0; max-width:640px;
}
.sp-note-highlight mark{
  background:var(--sp-highlight);
  -webkit-box-decoration-break:clone; box-decoration-break:clone;
  padding:2px 6px; border-radius:4px; color:inherit;
}

/* ---------- sections ---------- */
.sp-section{ margin-top:28px; }
.sp-section-head{
  display:flex; align-items:center; justify-content:space-between;
  gap:12px; margin-bottom:12px; flex-wrap:wrap;
}
.sp-section-titlewrap{ display:flex; align-items:center; gap:10px; }
.sp-yellowicon{
  width:28px; height:28px; border-radius:8px; background:var(--sp-yellow);
  display:inline-flex; align-items:center; justify-content:center; color:#1A1A1A; flex:none;
}
.sp-yellowicon svg{ width:16px; height:16px; }
.sp-h{ font-size:18px; font-weight:600; margin:0; color:var(--sp-ink); }
.sp-count{
  font-size:13px; color:var(--sp-muted); background:var(--sp-graychip);
  border-radius:999px; padding:2px 10px; font-weight:500;
}
.sp-actions{ display:flex; align-items:center; gap:8px; }
.sp-btn{
  height:32px; border-radius:999px; padding:0 16px;
  font-size:13px; font-weight:600; cursor:pointer;
  display:inline-flex; align-items:center; gap:6px; text-decoration:none;
  border:1px solid transparent; transition:background 150ms ease;
}
.sp-btn svg{ width:14px; height:14px; }
.sp-btn--light{ background:var(--sp-graychip); color:var(--sp-ink); }
.sp-btn--light:hover{ background:#E7E7E7; }
.sp-btn--dark{ background:var(--sp-black); color:#fff; }
.sp-btn--dark:hover{ background:#000; }

/* ---------- cards ---------- */
.sp-card{
  background:#fff; border:1px solid var(--sp-card); border-radius:16px;
  box-shadow:0 1px 2px rgba(0,0,0,0.05), 0 4px 16px rgba(0,0,0,0.04);
  overflow:hidden;
}
.sp-variant{
  display:inline-flex; margin-top:4px;
  background:var(--sp-graychip); color:var(--sp-ink);
  font-size:13px; border-radius:999px; padding:2px 10px; font-weight:500;
  max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
/* Row-level View button -- same pill shape + bg as the header's
   "View all" (.sp-btn--light): 999px radius on graychip. */
.sp-view{
  display:inline-flex; align-items:center; justify-content:center;
  height:32px; padding:0 16px; border-radius:999px;
  background:var(--sp-graychip); color:var(--sp-ink);
  font-size:13px; font-weight:600; text-decoration:none; white-space:nowrap;
  transition:background 150ms ease;
}
.sp-view:hover{ background:#E7E7E7; color:var(--sp-ink); }

/* ---------- results panels (trend + health blocks) ----------
   Layout references only -- every value, label and link is our own
   data. Card chrome/typography stay on the sp system; gauge blue,
   health green and status colors follow the audit-tool reference. */
.sp-panel{ padding:20px; margin-top:16px; }
.sp-panel-head{
  display:flex; align-items:center; justify-content:space-between;
  gap:12px; margin-bottom:14px;
}
.sp-panel-titlewrap{ display:flex; align-items:center; gap:10px; min-width:0; }
.sp-panel-title{ font-size:16px; font-weight:700; margin:0; color:var(--sp-ink); }
/* Variant beside the title renders as a yellow marker highlight,
   not a pill box. */
.sp-panel-titlewrap .sp-variant{
  background:var(--sp-highlight); padding:2px 6px; border-radius:4px;
  font-size:13px; font-weight:600; margin-top:0;
}
/* Backlinks trend chart + tiles */
.bl-chart-wrap{ position:relative; height:260px; }
.bl-chart-wrap canvas{ width:100% !important; height:100% !important; }
.bl-footnote{ color:var(--sp-muted); font-size:13px; font-style:italic; margin:8px 0 0; }
.bl-tiles{ display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:12px; margin-top:12px; }
.bl-tile{ border:1px solid transparent; border-radius:12px; padding:14px 16px; }
/* One tint per metric, in bl_metrics order (Domain Rank, URL Rank,
   Referring Domains, Total Backlinks) -- pastel set echoing the
   reference stat tiles. Values stay ink. */
.bl-tile.t1{ background:rgba(17,85,204,.08); }
.bl-tile.t2{ background:rgba(41,181,97,.12); }
.bl-tile.t3{ background:rgba(240,173,78,.2); }
.bl-tile.t4{ background:rgba(229,115,115,.13); }
.bl-tile-v{ font-size:22px; font-weight:700; color:var(--sp-ink); font-variant-numeric:tabular-nums; }
.bl-tile-l{ font-size:13px; color:var(--sp-muted); margin-top:2px; }
/* Semicircle gauges (SEO blue, AI green) + side content */
.sem-row{ display:grid; grid-template-columns:240px minmax(0,1fr); gap:32px; align-items:start; }
.sem-gauge{ text-align:center; }
.sem-gauge-svg{ width:100%; max-width:200px; height:auto; display:block; margin:0 auto; }
.sem-legend{ list-style:none; margin:10px auto 0; padding:0; max-width:200px; }
.sem-legend li{ display:flex; align-items:center; gap:8px; font-size:13px; color:var(--sp-ink); }
.sem-legend li i{ width:10px; height:10px; border-radius:50%; flex:none; }
.sem-legend li span{ margin-left:auto; font-weight:600; font-variant-numeric:tabular-nums; }
/* Status breakdown (audit-check composition) beside the gauge */
.crawled{ min-width:0; }
.crawled-top{ display:flex; align-items:baseline; gap:8px; }
.crawled-n{ font-size:26px; font-weight:700; color:#42A5F5; font-variant-numeric:tabular-nums; }
.crawled-cap{ font-size:13px; color:var(--sp-muted); }
.crawled-bar{ display:flex; height:10px; border-radius:999px; overflow:hidden; background:#E7EBEF; margin:10px 0 6px; }
.crawled-bar i{ display:block; height:100%; }
.crawled-rows{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; }
.crawled-rows li{ display:flex; align-items:center; gap:10px; padding:7px 0; font-size:14px; color:var(--sp-ink); }
.crawled-rows li i{ width:10px; height:10px; border-radius:50%; flex:none; }
.crawled-rows li span{ margin-left:auto; color:var(--sp-ink); font-weight:600; font-variant-numeric:tabular-nums; }
/* Lowest-group attention list */
.sem-attn{ list-style:none; margin:14px 0 0; padding:12px 0 0; border-top:1px solid var(--sp-card); display:flex; flex-direction:column; }
.sem-attn li{
  display:grid; grid-template-columns:22px minmax(0,1fr) auto auto; gap:12px;
  align-items:center; padding:10px 4px; font-size:14px;
}
.sem-warn{ color:#F0A22E; display:inline-flex; }
.sem-warn svg{ width:18px; height:18px; display:block; }
.sem-attn-l{ color:var(--sp-ink); font-weight:500; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sem-attn-v{ color:var(--sp-muted); font-variant-numeric:tabular-nums; }
.sem-attn-link{ color:var(--sp-muted); font-size:13px; text-decoration:none; white-space:nowrap; }
.sem-attn-link:hover{ color:var(--sp-ink); text-decoration:underline; }
/* Per-category legend rows (group color + score), above the attention list. */
.grp-legend{ list-style:none; margin:14px 0 0; padding:14px 0 0; border-top:1px solid var(--sp-card); display:flex; flex-direction:column; gap:10px; }
.grp-legend li{ display:flex; align-items:center; gap:10px; font-size:14px; }
.grp-legend .sw{ width:10px; height:10px; border-radius:3px; flex:none; }
.grp-legend .lt{ flex:1; color:var(--sp-ink); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.grp-legend .lp{ font-weight:600; font-variant-numeric:tabular-nums; }
/* AI engine checklist */
.aiv-engines{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; min-width:0; }
.aiv-engines li{
  display:flex; align-items:center; gap:10px;
  padding:10px 4px; border-bottom:1px solid var(--sp-card); font-size:14px;
}
.aiv-engines li:last-child{ border-bottom:none; }
.aiv-eng-dot{ width:10px; height:10px; border-radius:50%; flex:none; }
.aiv-eng-dot.eng-strong{ background:#4CAF50; }
.aiv-eng-dot.eng-mod{ background:#F0A22E; }
.aiv-eng-dot.eng-low{ background:#E53935; }
.aiv-eng-l{ flex:1; min-width:0; color:var(--sp-ink); font-weight:500; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.aiv-eng-v{ color:var(--sp-muted); font-variant-numeric:tabular-nums; }
.aiv-eng-pill{ font-size:12px; font-weight:700; border-radius:999px; padding:3px 12px; white-space:nowrap; }
.aiv-eng-pill.eng-strong{ color:#2E7D32; background:rgba(76,175,80,.14); }
.aiv-eng-pill.eng-mod{ color:#9A6B0F; background:rgba(240,162,46,.16); }
.aiv-eng-pill.eng-low{ color:#C62828; background:rgba(229,57,53,.12); }
@media (max-width:700px){
  .sem-row{ grid-template-columns:minmax(0,1fr); }
  .sem-gauge{ max-width:220px; }
  .bl-tiles{ grid-template-columns:repeat(2, minmax(0,1fr)); }
}

/* ---------- payment / summary ---------- */
.sp-payrows{ padding:8px 20px 4px; }
.sp-payrow{
  display:grid; grid-template-columns:1fr 1fr auto; gap:12px; align-items:center;
  padding:10px 0; font-size:14px;
}
.sp-payrow .sp-pl{ color:var(--sp-ink); }
.sp-payrow .sp-pd{ color:var(--sp-muted); text-align:center; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sp-payrow .sp-pa{ text-align:right; font-variant-numeric:tabular-nums; }
.sp-paydiv{ border-top:1px solid var(--sp-card); margin:6px 0; }
.sp-paytotal{
  display:flex; align-items:center; justify-content:space-between;
  padding:12px 0 14px; font-weight:700; font-size:14px;
}
.sp-paytotal span:last-child{ font-variant-numeric:tabular-nums; }
.sp-payfoot{ background:#F7F7F7; border-top:1px solid var(--sp-card); padding:10px 20px; display:flex; flex-direction:column; gap:8px; }
.sp-payfoot-row{ display:flex; align-items:center; justify-content:space-between; font-size:13px; }
.sp-purple{
  display:inline-flex; align-items:center; gap:6px;
  background:#EDE7FF; color:#5C2DCE; font-weight:700;
  border-radius:6px; padding:3px 8px; font-size:12px;
}
.sp-payfoot-amt{ font-weight:600; font-variant-numeric:tabular-nums; }
.sp-payfoot-sub{ color:var(--sp-muted); display:inline-flex; align-items:center; gap:8px; }
.sp-dot{ width:8px; height:8px; border-radius:50%; display:inline-block; }
.sp-mono{ font-variant-numeric:tabular-nums; }

/* ---------- detail blocks (existing data, Shopify skin) ---------- */
.tool-block{
  padding:20px; margin:0;
  border:1px solid var(--sp-card); border-radius:16px; background:#fff;
  box-shadow:0 1px 2px rgba(0,0,0,0.05), 0 4px 16px rgba(0,0,0,0.04);
}
.cta-btn{
  display:inline-flex; align-items:center; justify-content:center;
  height:32px; padding:0 16px; border-radius:999px;
  background:var(--sp-graychip); color:var(--sp-ink);
  border:1px solid transparent; font-weight:600; font-size:13px;
  text-decoration:none; white-space:nowrap; min-width:0;
  transition:background 150ms ease;
}
.cta-btn:hover{ background:#E7E7E7; }
.app-empty{ color:var(--sp-muted); font-size:14px; padding:6px 0; }
.search-hint{ font-size:14px; color:var(--sp-muted); margin:8px 0 0; }
.aiv-donut-row{ border-top:1px dashed var(--sp-card); padding:14px 4px 4px; display:flex; gap:8px; }
.aiv-donut{ display:flex; flex-direction:column; align-items:center; gap:6px; flex:1; }
.aiv-donut svg{ width:64px; height:64px; }
.aiv-donut-label{ font-size:12px; font-weight:500; color:var(--sp-muted); text-align:center; }
.teaser-heading{ margin:0 0 12px; font-size:16px; font-weight:600; }
.teaser-grid{ display:grid; grid-template-columns:1fr; gap:12px; }
.teaser-card{ background:#fff; border:1px solid var(--sp-card); border-radius:12px; padding:16px; }
.teaser-card-head{ display:flex; align-items:center; gap:12px; }
.teaser-icon{ width:32px; height:32px; border-radius:8px; background:var(--sp-graychip); display:flex; align-items:center; justify-content:center; }
.teaser-title-block{ flex:1; } .teaser-name{ margin:0; font-size:14px; font-weight:600; }
.teaser-desc{ color:var(--sp-muted); font-size:14px; }

/* ---------- empty state ---------- */
.eg-layout{ display:flex; align-items:flex-start; gap:32px; flex-wrap:wrap; margin-top:8px; }
.eg-guide{ flex:1 1 280px; }
.eg-step{ display:flex; gap:14px; position:relative; }
.eg-num{ flex:none; width:30px; height:30px; border-radius:50%; background:var(--sp-graychip); color:var(--sp-ink); display:flex; align-items:center; justify-content:center; font-weight:600; font-size:14px; }
.eg-step:first-child .eg-num{ background:var(--sp-black); color:#fff; }
.eg-step .eg-line{ position:absolute; left:14px; top:30px; bottom:-20px; width:2px; background:repeating-linear-gradient(to bottom, var(--sp-card) 0 4px, transparent 4px 8px); }
.eg-body{ flex:1; padding-bottom:22px; }
.eg-title{ font-size:16px; font-weight:600; margin:2px 0 4px; }
.eg-desc{ font-size:14px; color:var(--sp-muted); margin:0; }
.eg-tool-list{ list-style:none; margin:10px 0 0; padding:0; display:flex; flex-direction:column; gap:10px; }
.eg-tool-list li{ display:grid; grid-template-columns:24px 1fr; column-gap:8px; row-gap:2px; align-items:start; font-size:14px; }
.eg-tool-icon{ width:24px; height:24px; border-radius:7px; background:var(--sp-graychip); display:flex; align-items:center; justify-content:center; grid-column:1; grid-row:1; align-self:center; margin-top:0; color:var(--sp-muted); }
.eg-tool-icon svg{ width:14px; height:14px; display:block; }
.eg-tool-label{ font-weight:600; grid-column:2; grid-row:1; align-self:center; line-height:24px; list-style:none; }
.eg-tool-desc{ color:var(--sp-ink); grid-column:2; grid-row:2; display:flex; gap:8px; align-items:baseline; }
.eg-tool-desc::before{ content:"•"; flex:none; color:var(--sp-muted); line-height:inherit; }
.eg-preview{ flex:1.2 1 380px; min-width:280px; }
.eg-preview-img{ width:100%; border:1px solid var(--sp-card); border-radius:12px; box-shadow:0 4px 16px rgba(0,0,0,0.06); }
.eg-preview-caption{ font-size:12px; color:var(--sp-muted); text-align:center; }

/* ---------- sidebar ---------- */
.sp-side{ padding-top:36px; }
.sp-side::before{
  content:""; position:absolute; top:0; right:0; width:220px; height:160px;
  background:
    radial-gradient(circle at 78% 42%, rgba(47,109,246,0.9) 0 6px, rgba(47,109,246,0.25) 7px 16px, transparent 17px),
    linear-gradient(180deg, rgba(47,109,246,0.06), transparent 70%),
    repeating-linear-gradient(0deg, transparent 0 22px, rgba(0,0,0,0.04) 22px 23px),
    repeating-linear-gradient(90deg, transparent 0 22px, rgba(0,0,0,0.04) 22px 23px),
    linear-gradient(135deg, #EEF3E6 0%, #F7F7F2 55%, #EAF1FF 100%);
  border-radius:12px; opacity:0.55; pointer-events:none;
  mask-image:linear-gradient(180deg, black 30%, transparent 95%);
}
.sp-side-head{ position:relative; padding-bottom:20px; border-bottom:1px solid var(--sp-card); }
.sp-side-name{ font-size:18px; font-weight:600; margin:0 0 10px; position:relative; }
.sp-side-row{ display:flex; align-items:center; gap:8px; font-size:14px; color:var(--sp-ink); margin:6px 0; position:relative; }
.sp-side-row svg{ width:16px; height:16px; color:var(--sp-muted); flex:none; }
.sp-side-row span{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sp-side-sec{ padding:20px 0; border-bottom:1px solid var(--sp-card); }
.sp-side-sec:last-child{ border-bottom:none; }
.sp-label{ color:var(--sp-muted); font-size:13px; font-weight:500; margin:0 0 10px; display:flex; align-items:center; justify-content:space-between; }
.sp-label button{ border:none; background:none; cursor:pointer; color:var(--sp-muted); border-radius:50%; width:24px; height:24px; display:inline-flex; align-items:center; justify-content:center; }
.sp-label button:hover{ background:var(--sp-hover); }
.sp-addr{ margin:0; color:var(--sp-ink); font-size:14px; line-height:1.6; word-break:break-word; }
.sp-risktext{ font-size:14px; margin:0 0 12px; }
.sp-riskbar{ display:flex; gap:6px; }
.sp-riskbar i{ flex:1; height:6px; border-radius:999px; background:#EAEAEA; display:block; }
.sp-riskbar i.on-green{ background:var(--sp-green); }
.sp-riskbar i.on-amber{ background:#E8A100; }
.sp-riskbar i.on-red{ background:#D33D3D; }
.sp-risklabels{ display:flex; gap:6px; margin-top:6px; }
.sp-risklabels span{ flex:1; font-size:13px; color:var(--sp-faint); text-align:center; }
.sp-risklabels span.on{ color:var(--sp-ink); font-weight:700; }
.sp-conv{ display:flex; flex-direction:column; gap:10px; }
.sp-conv-row{ display:flex; align-items:center; gap:10px; font-size:14px; min-width:0; }
.sp-conv-row svg{ width:16px; height:16px; color:var(--sp-muted); flex:none; }
.sp-conv-row span{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sp-tags{ display:flex; gap:8px; flex-wrap:wrap; }
.sp-tag{ background:var(--sp-graychip); border-radius:999px; padding:4px 12px; font-size:13px; font-weight:500; }
.sp-comment{
  width:100%; height:36px; border:1px solid var(--sp-line); border-radius:12px;
  padding:0 14px; font-size:14px; color:var(--sp-ink); outline:none; box-sizing:border-box;
}
.sp-comment::placeholder{ color:var(--sp-faint); }
.sp-comment:focus{ outline:none; border-color:var(--sp-line); box-shadow:none; }
.sp-comment:focus-visible{ outline:none; }
.sp-timeline{ list-style:none; margin:14px 0 0; padding:0; display:flex; flex-direction:column; gap:14px; }
.sp-tl{ display:grid; grid-template-columns:12px 1fr auto; gap:10px; align-items:start; }
.sp-tl-dot{ width:8px; height:8px; border-radius:50%; background:#D9D9D9; margin-top:6px; }
.sp-tl-dot.green{ background:var(--sp-green); }
.sp-tl-text{ font-size:13px; color:#4A4A4A; line-height:1.5; }
.sp-tl-text strong{ color:var(--sp-ink); font-weight:600; }
.sp-tl-time{ font-size:12px; color:var(--sp-faint); white-space:nowrap; }

/* ---------- generating overlay ---------- */
.og-overlay{ display:none; padding:32px 0 8px; margin:8px 0 4px; }
.og-overlay.open{ display:flex; justify-content:center; }
.og-card{ width:100%; max-width:620px; text-align:center; }
.og-eyebrow{ display:inline-block; background:var(--sp-graychip); color:var(--sp-ink); border-radius:999px; padding:4px 14px; font-size:12px; font-weight:600; margin-bottom:12px; }
.og-title{ font-size:20px; font-weight:600; margin:0 0 8px; }
.og-status{ display:flex; align-items:center; justify-content:center; gap:8px; font-size:14px; font-weight:500; color:var(--sp-muted); margin:0 0 20px; }
.og-status-spinner{ width:14px; height:14px; border-radius:50%; border:2px solid rgba(0,0,0,0.15); border-top-color:var(--sp-black); animation:og-spin .7s linear infinite; }
.og-progress-track{ width:100%; max-width:420px; height:6px; border-radius:999px; background:#EFEFEF; margin:-12px auto 20px; overflow:hidden; display:none; }
.og-progress-track.visible{ display:block; }
.og-progress-fill{ height:100%; border-radius:999px; background:var(--sp-black); width:0%; transition:width .35s ease; }
.og-steps-bar{ display:flex; align-items:center; gap:16px; background:#fff; border:1px solid var(--sp-card); border-radius:16px; padding:18px; box-shadow:0 1px 2px rgba(0,0,0,0.05); }
.og-steps{ display:flex; align-items:flex-start; flex:1; }
.og-step{ display:flex; flex-direction:column; align-items:center; gap:6px; flex-shrink:0; }
.og-step-label{ font-size:12px; color:var(--sp-muted); font-weight:500; white-space:nowrap; }
.og-step-circle{ width:30px; height:30px; border-radius:50%; border:2px solid var(--sp-card); display:flex; align-items:center; justify-content:center; background:#fff; }
.og-step-check{ display:none; color:#fff; font-size:12px; font-weight:700; }
.og-step--active .og-step-circle{ border-color:var(--sp-black); box-shadow:0 0 0 4px rgba(0,0,0,0.06); }
.og-step--active .og-step-label{ color:var(--sp-ink); }
.og-step--done .og-step-circle{ border-color:var(--sp-green); background:var(--sp-green); }
.og-step--done .og-step-check{ display:block; }
.og-step--error .og-step-circle{ border-color:#c0392b; background:#c0392b; }
.og-step--error .og-step-check{ display:block; }
.og-line{ flex:1; min-width:12px; height:2px; background:var(--sp-card); margin:14px 6px 0; }
.og-line--done{ background:var(--sp-black); }
@keyframes og-spin{ to{ transform:rotate(360deg); } }
@keyframes og-pulse{ 0%,100%{ box-shadow:0 0 0 4px rgba(0,0,0,0.06);} 50%{ box-shadow:0 0 0 7px rgba(0,0,0,0.03);} }
.og-continue-btn{ flex-shrink:0; background:var(--sp-black); color:#fff; border:none; border-radius:999px; padding:0 20px; height:32px; font-weight:600; font-size:13px; cursor:pointer; }
.og-continue-btn:disabled{ opacity:.4; cursor:not-allowed; }

/* ---------- responsive ---------- */
@media (max-width:960px){
  .sp-panel{ padding:16px 16px 100px; }
  .sp-grid{ grid-template-columns:minmax(0,1fr); }
  .sp-side{ padding-top:0; position:static; max-height:none; overflow:visible; }
  .sp-side::before{ display:none; }
  .sp-topbar-right .sp-pillgroup:last-child{ display:none; }
  .sp-topbar-right .sp-pillgroup--dark:last-child{ display:flex; }
  .sp-payrow{ grid-template-columns:1fr auto; }
  .sp-payrow .sp-pd{ display:none; }
  .card-search-row{ flex-wrap:wrap; }
  .og-step-label{ display:none; }
}
@media print{
  *{ -webkit-print-color-adjust:exact !important; print-color-adjust:exact !important; }
  .jsp-sidebar, .no-print, .cta-btn, .search-hint, .sp-topbar-right, .card-search-block{ display:none !important; }
  .jsp-main{ margin-left:0 !important; }
  body{ background:#fff !important; padding:0 !important; }
  .content{ width:100%; max-width:none; padding:0; }
  .sp-panel{ box-shadow:none; border:none; padding:0; }
  .print-only{ display:block; }
  .sp-side{ position:static; max-height:none; overflow:visible; }
  .tool-block{ break-inside:avoid; }
}
