/* =========================================================
   Place Performance — clickable prototype
   Clean-light design system: neutral surfaces, hairline
   borders, one indigo accent, colour only where it means something.
   ========================================================= */
:root {
  --bg: #f7f7f8;
  --paper: #ffffff;
  --paper-2: #fafafa;
  --hover: #f4f4f5;
  --ink: #18181b;
  --ink-2: #52525b;
  --ink-3: #a1a1aa;
  --line: #ececef;
  --line-2: #e0e0e5;

  --accent: #4f46e5;
  --accent-2: #4338ca;
  --accent-soft: #eef0ff;
  --accent-ring: rgba(79,70,229,.18);

  --ok: #059669;   --ok-soft: #ecfdf5;
  --warn: #d97706; --warn-soft: #fffbeb;
  --bad: #dc2626;  --bad-soft: #fef2f2;

  --t1: #2563eb; --t1-soft: #eff6ff;
  --t2: #7c3aed; --t2-soft: #f5f3ff;
  --t3: #0d9488; --t3-soft: #f0fdfa;
  --t4: #db2777; --t4-soft: #fdf2f8;

  --r-admin: #b91c1c;
  --r-pm: #0e7490;
  --r-exec: #a16207;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow-xs: 0 1px 2px rgba(24,24,27,.04);
  --shadow: 0 1px 2px rgba(24,24,27,.04), 0 2px 8px rgba(24,24,27,.03);
  --shadow-pop: 0 12px 40px rgba(24,24,27,.14), 0 2px 6px rgba(24,24,27,.06);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(.2,.8,.2,1);
  --pbar-h: 0px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01";
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button { font-family: inherit; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -0.02em; font-weight: 600; }
svg { display: block; }
::selection { background: var(--accent-soft); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------------- Floating preview control ---------------- */
#preview-bar { position: fixed; right: 20px; bottom: 20px; z-index: 950; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.pv-pill {
  display: inline-flex; align-items: center; gap: 10px; border: 0; cursor: pointer;
  background: #18181b; color: #fafafa; border-radius: 999px; padding: 9px 16px 9px 12px;
  font-size: 12.5px; font-weight: 500; box-shadow: var(--shadow-pop); transition: transform .15s var(--ease);
}
.pv-pill:hover { transform: translateY(-1px); }
.pv-pill .pv-dot { width: 8px; height: 8px; border-radius: 50%; background: #facc15; box-shadow: 0 0 0 3px rgba(250,204,21,.25); }
.pv-pill b { font-weight: 600; }
.pv-pill .sep { opacity: .35; }
.pv-panel {
  width: 340px; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-pop);
  padding: 16px; display: none; animation: pop .18s var(--ease);
}
#preview-bar.open .pv-panel { display: block; }
.pv-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.pv-head b { font-size: 13.5px; font-weight: 600; }
.pv-head span { font-size: 11.5px; color: var(--ink-3); }
.pv-row { margin-bottom: 12px; }
.pv-label { font-size: 11.5px; font-weight: 500; color: var(--ink-2); margin-bottom: 6px; }
.pv-row .seg { display: flex; width: 100%; }
.pv-row .seg button { flex: 1; }
.pv-row .seg.seg-grid { display: grid; grid-template-columns: 1fr 1fr; }
.pv-toggles { display: flex; flex-direction: column; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); margin-top: 4px; }
.pv-foot { display: flex; gap: 8px; margin-top: 14px; }
.pv-foot .btn { flex: 1; }

/* ---------------- Segmented control ---------------- */
.seg { display: inline-flex; background: var(--hover); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button {
  border: 0; background: transparent; font-size: 12.5px; font-weight: 500; color: var(--ink-2);
  padding: 5px 11px; border-radius: 7px; cursor: pointer; white-space: nowrap; transition: background .15s, color .15s;
}
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--paper); color: var(--ink); box-shadow: 0 1px 2px rgba(24,24,27,.08), 0 0 0 1px rgba(24,24,27,.04); }

/* ---------------- Shell ---------------- */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.side {
  background: var(--paper-2); border-right: 1px solid var(--line); color: var(--ink);
  position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 14px 10px 24px;
  display: flex; flex-direction: column;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 10px 14px; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px; flex-shrink: 0;
  background: linear-gradient(135deg, #6366f1, #8b5cf6 55%, #14b8a6);
  display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 12px; letter-spacing: -.02em;
}
.brand { border-bottom: 1px solid var(--line); margin: 0 4px 6px; padding: 6px 6px 14px; }
.brand .cust-logo { width: 32px; height: 32px; border-radius: 9px; font-size: 12px; }
.brand-name { font-weight: 600; font-size: 13.5px; line-height: 1.25; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-sub { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-foot .powered { display: flex; align-items: center; gap: 7px; color: var(--ink-2); margin-bottom: 4px; }
.side-foot .powered b { font-weight: 600; }
.side-foot .brand-mark { width: 18px; height: 18px; border-radius: 5px; font-size: 8px; }
.cust-chip {
  margin: 0 4px 8px; padding: 9px 10px; border-radius: 11px; background: var(--paper); border: 1px solid var(--line);
  display: flex; align-items: center; gap: 10px;
}
.cust-logo { width: 28px; height: 28px; border-radius: 8px; background: #18181b; color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 11px; flex-shrink: 0; }
.cust-name { font-size: 12.5px; font-weight: 600; line-height: 1.25; }
.cust-tier { font-size: 11px; color: var(--ink-3); }
.nav-sec { font-size: 11px; font-weight: 500; color: var(--ink-3); padding: 16px 12px 6px; }
.nav-sec.admin { color: var(--r-admin); }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px;
  color: var(--ink-2); font-size: 13.2px; font-weight: 500; cursor: pointer; transition: background .12s, color .12s;
}
.nav-item:hover { background: var(--hover); color: var(--ink); }
.nav-item.on { background: var(--paper); color: var(--ink); box-shadow: 0 1px 2px rgba(24,24,27,.06), 0 0 0 1px var(--line); }
.nav-item.on .ico { color: var(--accent); }
.nav-item .ico { width: 16px; height: 16px; color: var(--ink-3); flex-shrink: 0; }
.nav-item .nav-num { margin-left: auto; font-size: 10.5px; font-weight: 500; color: var(--ink-3); }
.nav-item.nav-locked { color: var(--ink-3); }
.nav-item.nav-locked .lock { margin-left: auto; width: 12px; height: 12px; color: var(--ink-3); }
.side-foot { margin-top: auto; padding: 18px 12px 0; font-size: 11.5px; color: var(--ink-3); line-height: 1.5; }

.main { min-width: 0; display: flex; flex-direction: column; }
.top {
  position: sticky; top: 0; z-index: 50;
  height: 56px; background: rgba(247,247,248,.82); backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 14px; padding: 0 28px;
}
.top-burger { display: none; border: 0; background: none; cursor: pointer; padding: 4px; color: var(--ink-2); }
.top-crumbs { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-3); min-width: 0; overflow: hidden; white-space: nowrap; }
.top-crumbs a { color: var(--ink-2); font-weight: 500; }
.top-crumbs a:hover { color: var(--ink); text-decoration: none; }
.top-crumbs .sep { color: var(--line-2); }
.top-crumbs .cur { color: var(--ink); font-weight: 600; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.live-pill { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 500; color: var(--ink-2); padding: 5px 10px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: #10b981; box-shadow: 0 0 0 0 rgba(16,185,129,.6); animation: pulse 2s infinite; flex-shrink: 0; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(16,185,129,.5); } 70% { box-shadow: 0 0 0 7px rgba(16,185,129,0); } 100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); } }
.icon-btn { position: relative; border: 1px solid var(--line); background: var(--paper); width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; cursor: pointer; color: var(--ink-2); transition: all .12s; }
.icon-btn:hover { color: var(--ink); border-color: var(--line-2); background: var(--hover); }
.icon-btn .ico { width: 16px; height: 16px; }
.icon-btn .dot { position: absolute; top: 7px; right: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--bad); border: 2px solid #fff; box-sizing: content-box; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: 12px; color: #fff; background: #3f3f46; cursor: pointer; border: 0; flex-shrink: 0; }
.menu { position: relative; }
.menu-pop {
  display: none; position: absolute; right: 0; top: calc(100% + 8px); min-width: 240px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-pop); padding: 6px; z-index: 80;
  animation: pop .15s var(--ease);
}
.menu.open .menu-pop { display: block; }
.menu-head { padding: 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.menu-head b { display: block; font-size: 13.5px; font-weight: 600; }
.menu-head span { font-size: 12px; color: var(--ink-2); }
.menu-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 8px; font-size: 13px; color: var(--ink); cursor: pointer; }
.menu-item .ico { width: 16px; height: 16px; color: var(--ink-3); }
.menu-item:hover { background: var(--hover); }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: none; } }

.content { padding: 28px 32px 96px; max-width: 1440px; width: 100%; margin: 0 auto; animation: page .35s var(--ease); }
@keyframes page { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------------- Page header ---------------- */
.ph { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 24px; flex-wrap: wrap; }
.ph-back { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 500; color: var(--ink-3); margin-bottom: 10px; cursor: pointer; transition: color .12s; }
.ph-back .ico { width: 15px; height: 15px; }
.ph-back:hover { color: var(--ink); }
.ph-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ph h1 { font-size: 26px; font-weight: 600; letter-spacing: -0.025em; line-height: 1.2; }
.ph-sub { color: var(--ink-2); font-size: 14px; margin-top: 6px; max-width: 760px; }
.ph-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---------------- Chips / badges ---------------- */
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 500; letter-spacing: 0;
  padding: 2px 8px; border-radius: 999px; white-space: nowrap; line-height: 1.5;
  background: var(--hover); color: var(--ink-2);
}
.chip-l1 { color: var(--t1); background: var(--t1-soft); }
.chip-l2 { color: var(--t2); background: var(--t2-soft); }
.chip-l3 { color: var(--t3); background: var(--t3-soft); }
.chip-l4 { color: var(--t4); background: var(--t4-soft); }
.chip-drill { color: #6d28d9; background: #f5f3ff; }
.chip-overlay { color: #1d4ed8; background: #eff6ff; }
.chip-iface { color: var(--ink-2); background: var(--hover); }
.chip-admin { color: var(--r-admin); background: #fef2f2; }
.chip-pm { color: var(--r-pm); background: #ecfeff; }
.chip-exec { color: var(--r-exec); background: #fefce8; }
.chip-src { color: var(--ink-3); background: transparent; }
.annot-off .annot { display: none !important; }

.st { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; padding: 2px 9px 2px 8px; border-radius: 999px; white-space: nowrap; }
.st::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.st-ok { color: var(--ok); background: var(--ok-soft); }
.st-warn { color: var(--warn); background: var(--warn-soft); }
.st-bad { color: var(--bad); background: var(--bad-soft); }
.st-idle { color: var(--ink-2); background: var(--hover); }
.st-info { color: var(--accent); background: var(--accent-soft); }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; gap: 7px; justify-content: center;
  border: 1px solid var(--line-2); background: var(--paper); color: var(--ink);
  font-size: 13px; font-weight: 500; padding: 7px 13px; border-radius: 9px; cursor: pointer; white-space: nowrap;
  box-shadow: var(--shadow-xs); transition: background .12s, border-color .12s, color .12s, transform .12s;
}
.btn:hover { background: var(--hover); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 1px 2px rgba(79,70,229,.3), inset 0 1px 0 rgba(255,255,255,.12); }
.btn-primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn-danger { color: var(--bad); }
.btn-danger:hover { background: var(--bad-soft); border-color: #fecaca; }
.btn-sm { font-size: 12.5px; padding: 5px 10px; border-radius: 8px; }
.btn-ghost { border-color: transparent; background: transparent; box-shadow: none; color: var(--ink-2); }
.btn-ghost:hover { background: var(--hover); color: var(--ink); }
.btn .ico { width: 15px; height: 15px; color: currentColor; opacity: .8; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.open-tag { font-size: 10px; font-weight: 500; padding: 1px 6px; border-radius: 5px; margin-left: 2px; }
.open-tag.drill { background: #f5f3ff; color: #6d28d9; }
.open-tag.overlay { background: #eff6ff; color: #1d4ed8; }
.btn-primary .open-tag { background: rgba(255,255,255,.18); color: #fff; }

/* ---------------- Grid ---------------- */
.grid { display: grid; gap: 16px; }
.g-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.g-5 { grid-template-columns: repeat(5, minmax(0,1fr)); }
.g-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.g-side { grid-template-columns: 310px minmax(0, 1fr); }
.g-fp { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
.g-dev { grid-template-columns: minmax(250px, 1fr) minmax(0, 1.7fr); align-items: start; }
.g-dev .kv { grid-template-columns: 105px 1fr; }
.span-2 { grid-column: span 2; }
.span-all { grid-column: 1 / -1; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.mt { margin-top: 16px; }
.mt-s { margin-top: 10px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.muted { color: var(--ink-2); }
.small { font-size: 12.5px; }
.tiny { font-size: 11.5px; }
.strong { font-weight: 600; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }

/* ---------------- Cards ---------------- */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; display: flex; flex-direction: column; }
.card-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 20px 4px; }
.card-t { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; letter-spacing: -0.01em; }
.card-t > .ico { width: 16px; height: 16px; color: var(--ink-3); }
.card-s { font-size: 12.5px; color: var(--ink-3); margin-top: 3px; }
.card-a { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.card-b { padding: 14px 20px 20px; flex: 1; }
.card-b.flush { padding: 8px 0 0; }
.card-f { padding: 12px 20px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; background: var(--paper-2); border-radius: 0 0 var(--radius) var(--radius); }
.card.clickable { cursor: pointer; transition: border-color .15s, box-shadow .2s var(--ease), transform .2s var(--ease); }
.card.clickable:hover { border-color: var(--line-2); box-shadow: 0 8px 24px rgba(24,24,27,.07); transform: translateY(-2px); }
.card.hero { background: radial-gradient(120% 140% at 0% 0%, #eef0ff 0%, #ffffff 55%); border-color: #e3e4fb; }

.locked { background: var(--paper-2); border: 1px dashed var(--line-2); box-shadow: none; }
.locked-b { padding: 20px; display: flex; gap: 14px; align-items: flex-start; }
.locked-ico { width: 36px; height: 36px; border-radius: 10px; background: var(--paper); border: 1px solid var(--line); display: grid; place-items: center; color: var(--ink-3); flex-shrink: 0; }
.locked-ico .ico { width: 16px; height: 16px; }
.locked h4 { font-size: 14px; color: var(--ink); font-weight: 600; }
.locked p { margin: 3px 0 12px; color: var(--ink-3); font-size: 12.5px; }

/* ---------------- KPIs ---------------- */
.kpi { padding: 18px 20px; }
.kpi-l { font-size: 12.5px; font-weight: 500; color: var(--ink-2); display: flex; align-items: center; gap: 7px; }
.kpi-l .ico { width: 15px; height: 15px; color: var(--ink-3); }
.kpi-v { font-size: 30px; font-weight: 600; letter-spacing: -0.03em; margin-top: 6px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi-v small { font-size: 14px; font-weight: 500; color: var(--ink-3); margin-left: 4px; letter-spacing: 0; }
.kpi-d { font-size: 12px; font-weight: 500; margin-top: 6px; }
.up { color: var(--ok); }
.down { color: var(--bad); }
.flat { color: var(--ink-2); }
.kpi-d.up::before, .kpi-d.down::before { display: none; }
.kpi-spark { margin-top: 12px; }
.score-ring { position: relative; width: 140px; height: 140px; flex-shrink: 0; }
.score-ring .v { position: absolute; inset: 0; display: grid; place-items: center; font-size: 36px; font-weight: 600; letter-spacing: -0.03em; }
.score-ring .v small { display: block; font-size: 11px; font-weight: 500; color: var(--ink-3); text-align: center; margin-top: -2px; letter-spacing: 0; }
.tick { animation: tick .9s var(--ease); }
@keyframes tick { 0% { color: var(--accent); } 100% { color: inherit; } }
tspan.tick { animation: tickfill .9s var(--ease); }
@keyframes tickfill { 0% { fill: #4f46e5; } 100% { fill: #18181b; } }
.c-hit:hover { fill: rgba(79,70,229,.045); }

/* ---------------- Charts ---------------- */
.chart { width: 100%; height: auto; overflow: visible; }
.c-grid { stroke: #f0f0f2; stroke-width: 1; }
.c-base { stroke: var(--line-2); stroke-width: 1; }
.c-ax { font-size: 10.5px; fill: #a1a1aa; font-family: var(--font); }
.c-hit { fill: transparent; }
.c-guide { stroke: #d4d4d8; stroke-width: 1; opacity: 0; transition: opacity .1s; }
.c-dot { opacity: 0; transition: opacity .1s; }
.c-col:hover .c-guide, .c-col:hover .c-dot { opacity: 1; }
.c-line { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.1s var(--ease) forwards; }
.c-area { opacity: 0; animation: fadein .9s .25s var(--ease) forwards; }
.c-bar { transform-box: fill-box; transform-origin: 50% 100%; animation: grow .7s var(--ease) both; transition: opacity .12s; }
.c-bar:hover { opacity: .78; }
.c-cell { transition: opacity .12s; }
.c-cell:hover { opacity: .7; }
.c-arc { transition: opacity .12s; }
.c-arc:hover { opacity: .8; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fadein { to { opacity: 1; } }
@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.c-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--ink-2); margin-top: 10px; }
.c-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 7px; vertical-align: 1px; }
.c-legend i.dash { width: 14px; height: 2px; border-radius: 0; vertical-align: 3px; background: repeating-linear-gradient(90deg, currentColor 0 4px, transparent 4px 7px) !important; }
.tip {
  position: fixed; z-index: 2000; pointer-events: none; background: #18181b; color: #fafafa; font-size: 12px; line-height: 1.5;
  padding: 8px 10px; border-radius: 9px; box-shadow: var(--shadow-pop); max-width: 260px; opacity: 0; transform: translateY(4px); transition: opacity .1s, transform .1s;
}
.tip.on { opacity: 1; transform: none; }
.tip b { font-weight: 600; display: block; margin-bottom: 2px; }
.tip .tr { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.tip .tr i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; margin-right: 6px; }
.tip .tr span:last-child { font-variant-numeric: tabular-nums; font-weight: 600; }
.hb { display: flex; flex-direction: column; gap: 10px; }
.hb-row { display: grid; grid-template-columns: minmax(110px, 1.5fr) 2fr 64px; align-items: center; gap: 12px; font-size: 12.5px; }
.hb-row.click { cursor: pointer; border-radius: 8px; padding: 4px 6px; margin: -4px -6px; transition: background .12s; }
.hb-row.click:hover { background: var(--hover); }
.hb-lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.hb-track { height: 8px; background: #f2f2f4; border-radius: 99px; overflow: hidden; }
.hb-fill { height: 100%; border-radius: 99px; animation: fill .9s var(--ease) both; transform-origin: left; }
@keyframes fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.hb-val { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.donut-wrap { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.donut-legend { display: flex; flex-direction: column; gap: 8px; font-size: 12.5px; color: var(--ink-2); min-width: 140px; }
.donut-legend div { display: flex; align-items: center; gap: 8px; }
.donut-legend i { width: 8px; height: 8px; border-radius: 50%; }
.donut-legend b { margin-left: auto; padding-left: 14px; color: var(--ink); font-weight: 600; }
.meter { height: 6px; background: #f0f0f2; border-radius: 99px; overflow: hidden; }
.meter > span { display: block; height: 100%; border-radius: 99px; transition: width .6s var(--ease); }

/* ---------------- Tables ---------------- */
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-size: 12px; font-weight: 500; color: var(--ink-3); padding: 10px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl th.sortable { cursor: pointer; user-select: none; }
.tbl th.sortable:hover { color: var(--ink); }
.tbl td { padding: 12px 16px; border-bottom: 1px solid #f4f4f5; vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.click { cursor: pointer; transition: background .1s; }
.tbl tr.click:hover td { background: var(--paper-2); }
.tbl tr.flagged td:first-child { box-shadow: inset 2px 0 0 var(--warn); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .name { font-weight: 500; }
.tbl .sub { font-size: 12px; color: var(--ink-3); }
.pager { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; font-size: 12.5px; color: var(--ink-2); border-top: 1px solid var(--line); }

/* ---------------- Forms ---------------- */
.form { display: grid; gap: 16px; }
.form.g-2 { grid-template-columns: 1fr 1fr; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 12.5px; font-weight: 500; color: var(--ink); }
.field small { font-size: 12px; color: var(--ink-3); }
.input, .select, textarea.input {
  font-family: inherit; font-size: 13.5px; border: 1px solid var(--line-2); border-radius: 9px;
  padding: 8px 11px; background: var(--paper); color: var(--ink); width: 100%; box-shadow: var(--shadow-xs); transition: border-color .12s, box-shadow .12s;
}
.input:focus, .select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.input:disabled { background: var(--paper-2); color: var(--ink-3); }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2.2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 30px; cursor: pointer; }
.select-sm { font-size: 12.5px; padding: 5px 28px 5px 10px; width: auto; border-radius: 8px; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13px; user-select: none; color: var(--ink); }
.switch input { display: none; }
.switch .track { width: 34px; height: 20px; border-radius: 20px; background: #e4e4e7; position: relative; transition: background .2s; flex-shrink: 0; }
.switch .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .2s var(--ease); box-shadow: 0 1px 3px rgba(0,0,0,.18); }
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { left: 16px; }
.range { width: 100%; accent-color: var(--accent); }
.slider-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; }
.slider-row .v { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--accent); }
.dropzone { border: 1.5px dashed var(--line-2); border-radius: 12px; padding: 26px; text-align: center; color: var(--ink-2); background: var(--paper-2); cursor: pointer; transition: all .15s; }
.dropzone .ico { margin: 0 auto; width: 22px; height: 22px; color: var(--ink-3); }
.dropzone:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { font-size: 12px; font-weight: 500; padding: 3px 10px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line-2); color: var(--ink-2); }
.pill.on { background: var(--accent-soft); border-color: #dcdcfb; color: var(--accent); }
.pill.click { cursor: pointer; }
.pill.click:hover { border-color: var(--accent); }

/* ---------------- Overlay ---------------- */
.ov-backdrop {
  position: fixed; inset: 0; z-index: 1000; background: rgba(24,24,27,.32); backdrop-filter: blur(3px);
  display: flex; align-items: flex-start; justify-content: center; padding: 56px 20px 30px; overflow-y: auto;
  animation: fade .18s ease;
}
.ov-backdrop.side { justify-content: flex-end; padding: 0; align-items: stretch; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { transform: translateY(12px) scale(.985); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes slide { from { transform: translateX(32px); opacity: 0; } to { transform: none; opacity: 1; } }
.ov { background: var(--paper); border-radius: 18px; box-shadow: var(--shadow-pop); width: 100%; max-width: 720px; animation: rise .22s var(--ease); display: flex; flex-direction: column; border: 1px solid var(--line); }
.ov.lg { max-width: 1040px; }
.ov.sm { max-width: 460px; }
.side .ov { border-radius: 0; max-width: 560px; height: 100vh; animation: slide .25s var(--ease); border-width: 0 0 0 1px; }
.ov-h { display: flex; align-items: flex-start; gap: 12px; padding: 20px 24px 16px; border-bottom: 1px solid var(--line); }
.ov-h h3 { font-size: 17px; font-weight: 600; }
.ov-h .sub { font-size: 13px; color: var(--ink-3); margin-top: 3px; }
.ov-close { margin-left: auto; border: 0; background: transparent; width: 32px; height: 32px; border-radius: 9px; cursor: pointer; display: grid; place-items: center; color: var(--ink-3); flex-shrink: 0; transition: all .12s; }
.ov-close .ico { width: 17px; height: 17px; }
.ov-close:hover { background: var(--hover); color: var(--ink); }
.ov-b { padding: 20px 24px 24px; overflow-y: auto; flex: 1; }
.ov-f { padding: 14px 24px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; background: var(--paper-2); border-radius: 0 0 18px 18px; }
.side .ov-f { border-radius: 0; }

/* ---------------- Toast ---------------- */
#toast-root { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 1100; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: #18181b; color: #fafafa; padding: 10px 16px; border-radius: 11px; font-size: 13px; font-weight: 500; box-shadow: var(--shadow-pop); animation: rise .22s var(--ease); display: flex; gap: 9px; align-items: center; }
.toast .ico { width: 16px; height: 16px; color: #34d399; }

/* ---------------- Tabs ---------------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: 24px 0 20px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; font-size: 13.5px; font-weight: 500; color: var(--ink-3);
  border: 0; background: none; cursor: pointer; position: relative; white-space: nowrap; transition: color .12s;
}
.tab .ico { width: 15px; height: 15px; }
.tab:hover { color: var(--ink); }
.tab.on { color: var(--ink); }
.tab.on::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; background: var(--ink); border-radius: 2px; }
.tab .cnt { font-size: 11px; color: var(--ink-3); background: var(--hover); padding: 0 6px; border-radius: 99px; }
.tab-panel { animation: page .3s var(--ease); }

/* ---------------- Place detail ---------------- */
.place-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 18px; }
.place-live { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 10px; font-size: 13.5px; color: var(--ink-2); }
.place-live b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.hier { display: inline-flex; align-items: center; gap: 2px; background: var(--paper); border: 1px solid var(--line); border-radius: 11px; padding: 3px; box-shadow: var(--shadow-xs); max-width: 100%; overflow-x: auto; }
.hier-step { padding: 6px 12px; display: flex; align-items: center; gap: 8px; border-radius: 8px; cursor: pointer; white-space: nowrap; transition: background .12s; }
.hier-step:hover { background: var(--hover); }
.hier-step .k { font-size: 11px; font-weight: 500; color: var(--ink-3); }
.hier-step .n { font-size: 13px; font-weight: 500; color: var(--ink); }
.hier-step + .hier-step::before { content: "›"; color: var(--line-2); margin: 0 4px 0 -8px; font-size: 16px; }
.hier-step.on { background: var(--accent-soft); }
.hier-step.on .n { color: var(--accent); font-weight: 600; }
.hier-step.hs-empty { cursor: default; }
.hier-step.hs-empty:hover { background: none; }
.hier-step.hs-empty .n { color: var(--ink-3); font-weight: 400; }
.level-banner { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-2); margin: 14px 0 0; }
.level-banner .ico { width: 15px; height: 15px; color: var(--ink-3); flex-shrink: 0; }
.level-banner b { color: var(--ink); font-weight: 600; }
.sec-title { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; color: var(--ink); margin: 28px 0 12px; }
.sec-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.drill-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.drill-chip { display: inline-flex; align-items: center; gap: 8px; padding: 5px 6px 5px 11px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); cursor: pointer; font-size: 12.5px; font-weight: 500; transition: all .12s; }
.drill-chip:hover { border-color: var(--line-2); background: var(--hover); }
.drill-chip .occ { font-size: 11px; padding: 0 7px; }
.drill-label { font-size: 12px; color: var(--ink-3); margin: 16px 0 8px; }

/* floorplan */
.fp { position: relative; background: #fbfbfc; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.fp svg { width: 100%; height: auto; }
.fp-floor { fill: #ffffff; stroke: #d4d4d8; stroke-width: 3; }
.fp-struct { fill: #f4f4f5; stroke: #e4e4e7; stroke-width: 1.5; }
.fp-struct-l { font-size: 12.5px; fill: #a1a1aa; font-weight: 500; font-family: var(--font); }
.fp-zone { stroke-width: 2; stroke-linejoin: round; cursor: pointer; transition: fill-opacity .2s, fill .8s, stroke .8s, stroke-width .15s; }
.fp-zone:hover { fill-opacity: .32 !important; stroke-width: 3.5; }
.fp-zone.dim { fill-opacity: .04 !important; stroke-opacity: .3; }
.fp-zone.hl { stroke-width: 4; fill-opacity: .3 !important; }
.fp-name { font-size: 14px; font-weight: 500; fill: #3f3f46; font-family: var(--font); pointer-events: none; }
.fp-count { font-size: 24px; font-weight: 600; fill: #18181b; font-family: var(--font); pointer-events: none; letter-spacing: -.02em; }
.fp-cap { font-size: 12.5px; font-weight: 500; fill: #a1a1aa; font-family: var(--font); pointer-events: none; }
.fp-door { fill: var(--accent); }
.fp-door-ring { fill: var(--accent); opacity: .15; }
.fp-door-l { font-size: 12px; font-weight: 500; fill: var(--accent); font-family: var(--font); }
.fp-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--ink-2); align-items: center; }
.fp-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.fp-pin { cursor: pointer; }
.fp-pin:hover { filter: drop-shadow(0 0 6px rgba(79,70,229,.7)); }
.fp-draw-pt { fill: #fff; stroke: var(--accent); stroke-width: 3; }
.fp.drawing { cursor: crosshair; }
.fp-new { fill: rgba(79,70,229,.12); stroke: var(--accent); stroke-width: 3; stroke-dasharray: 8 6; }
.fp-badge { position: absolute; top: 10px; left: 10px; background: rgba(255,255,255,.9); backdrop-filter: blur(6px); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; font-size: 11.5px; font-weight: 500; color: var(--ink-2); display: flex; align-items: center; gap: 7px; }
.fp-badge .ico { width: 13px; height: 13px; }
.fp-flow { stroke-dasharray: 10 8; animation: flow 1.6s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -18; } }

/* building stack */
.bstack .floor { cursor: pointer; }
.bstack .slab { fill: #fafafa; stroke: #e4e4e7; stroke-width: 1.5; transition: fill .15s, stroke .15s; }
.bstack .floor:hover .slab { fill: var(--accent-soft); stroke: #c7c8f7; }
.bstack .fill { transition: width .6s var(--ease); }
.bstack text { font-family: var(--font); }

/* maps */
.map { height: 360px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #f2f2f4; z-index: 0; }
.map.tall { height: 460px; }
.map.short { height: 240px; }
.map-fallback { height: 100%; display: grid; place-items: center; color: var(--ink-2); font-size: 13px; text-align: center; padding: 20px; }
.leaflet-container { font-family: var(--font); }
.leaflet-bar { border: 1px solid var(--line) !important; box-shadow: var(--shadow) !important; border-radius: 9px !important; overflow: hidden; }
.leaflet-bar a { color: var(--ink-2) !important; }
.leaflet-popup-content-wrapper { border-radius: 12px; box-shadow: var(--shadow-pop); }
.leaflet-popup-content { margin: 12px 14px; }
.map-pop b { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 2px; }
.map-pop .muted { font-size: 12px; }
.map-pop .btn { margin-top: 8px; }
/* quiet basemap: lift land to near-white, soften water to a cool grey */
.pp-map { background: #eef0f3; }
.pp-map .pp-base { filter: grayscale(1) brightness(1.1) contrast(.82); }
.pp-map.is-sat { background: #1f2937; }
.pp-map.is-sat .mk-dot { border-color: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,.35), 0 2px 10px rgba(0,0,0,.5); }
.map-seg { display: flex; gap: 2px; padding: 3px; background: rgba(255,255,255,.9); backdrop-filter: blur(8px); border-radius: 10px; box-shadow: 0 2px 10px rgba(24,24,27,.12), 0 0 0 1px rgba(24,24,27,.05); margin: 10px 10px 0 0 !important; }
.map-seg button { border: 0; background: transparent; font: 500 12px var(--font); color: var(--ink-2); padding: 5px 10px; border-radius: 7px; cursor: pointer; }
.map-seg button.on { background: #18181b; color: #fff; }
.map-home { display: inline-flex; align-items: center; gap: 4px; border: 0; font: 500 12px var(--font); color: var(--ink); background: rgba(255,255,255,.92); backdrop-filter: blur(8px); padding: 6px 11px 6px 8px; border-radius: 10px; cursor: pointer; box-shadow: 0 2px 10px rgba(24,24,27,.12), 0 0 0 1px rgba(24,24,27,.05); margin: 8px 10px 0 0 !important; clear: both; }
.map-home .ico { width: 14px; height: 14px; }
.map-home:hover { background: #fff; }
.pp-map .leaflet-control-attribution { background: rgba(255,255,255,.7); font-size: 10px; color: var(--ink-3); border-radius: 6px 0 0 0; padding: 1px 6px; }
.pp-map .leaflet-control-attribution a { color: var(--ink-3); }
.pp-map .leaflet-bottom.leaflet-right .leaflet-control-zoom { margin: 0 10px 22px 0; }
.pp-map .leaflet-bar a { width: 30px; height: 30px; line-height: 30px; font-size: 16px; border-bottom-color: var(--line) !important; }

/* markers */
.mk-icon { background: none; border: 0; }
.mk { position: relative; width: var(--s); height: var(--s); cursor: pointer; }
.mk-dot { position: absolute; inset: 0; border-radius: 50%; background: var(--c); border: 2.5px solid #fff; box-shadow: 0 1px 4px rgba(24,24,27,.28), 0 0 0 1px rgba(24,24,27,.06); transition: transform .18s var(--ease); }
.mk-halo::before { content: ""; position: absolute; inset: -7px; border-radius: 50%; background: var(--c); opacity: .18; animation: halo 2.4s ease-out infinite; }
@keyframes halo { 0% { transform: scale(.7); opacity: .3; } 100% { transform: scale(1.5); opacity: 0; } }
.mk-lbl {
  position: absolute; left: calc(100% + 8px); top: 50%; transform: translate(-4px, -50%); white-space: nowrap;
  background: #fff; border-radius: 9px; padding: 5px 10px; box-shadow: 0 4px 16px rgba(24,24,27,.14), 0 0 0 1px rgba(24,24,27,.05);
  font-size: 12px; line-height: 1.3; opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s var(--ease);
}
.mk-lbl b { display: block; font-weight: 600; color: var(--ink); }
.mk-lbl em { font-style: normal; color: var(--ink-2); }
.mk:hover .mk-dot, .mk.mk-on .mk-dot { transform: scale(1.18); }
.mk:hover .mk-lbl, .mk.mk-on .mk-lbl { opacity: 1; transform: translate(0, -50%); }

/* in-map site list */
.map-panel {
  position: absolute; top: 12px; left: 12px; max-height: calc(100% - 24px); z-index: 500; width: 230px; overflow-y: auto;
  background: rgba(255,255,255,.88); backdrop-filter: blur(10px) saturate(160%); border: 1px solid rgba(24,24,27,.06);
  border-radius: 12px; box-shadow: 0 6px 24px rgba(24,24,27,.08); padding: 6px; font-family: var(--font);
}
.map-panel-h { display: flex; justify-content: space-between; align-items: center; font-size: 12px; font-weight: 600; color: var(--ink-2); padding: 6px 8px 8px; }
.map-panel-h span { font-weight: 500; color: var(--ink-3); }
.map-row { display: flex; align-items: center; gap: 9px; padding: 7px 8px; border-radius: 8px; cursor: pointer; transition: background .12s; }
.map-row:hover, .map-row.on { background: rgba(79,70,229,.07); }
.map-row i { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; box-shadow: 0 0 0 2px #fff, 0 0 0 3px rgba(24,24,27,.08); }
.map-row-m { flex: 1; min-width: 0; line-height: 1.25; }
.map-row-m b { display: block; font-size: 12.5px; font-weight: 500; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.map-row-m span { font-size: 11px; color: var(--ink-3); }
.map-row em { font-style: normal; font-size: 12.5px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.leaflet-popup-tip-container { display: none; }

/* feed */
.feed { display: flex; flex-direction: column; gap: 10px; }
.feed-card { border: 1px solid var(--line); border-radius: 12px; padding: 16px; background: var(--paper); display: flex; gap: 14px; cursor: pointer; transition: border-color .15s, box-shadow .2s, transform .2s var(--ease); }
.feed-card:hover { border-color: var(--line-2); box-shadow: 0 8px 24px rgba(24,24,27,.06); transform: translateY(-1px); }
.feed-ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; }
.feed-ico .ico { width: 17px; height: 17px; }
.feed-t { font-weight: 600; font-size: 14px; letter-spacing: -0.01em; }
.feed-p { color: var(--ink-2); font-size: 13px; margin-top: 4px; }
.feed-m { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; align-items: center; font-size: 12px; color: var(--ink-3); }

/* list items */
.list { display: flex; flex-direction: column; }
.li { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-top: 1px solid #f4f4f5; transition: background .1s; }
.li:first-child { border-top: 0; }
.li.click { cursor: pointer; }
.li.click:hover { background: var(--paper-2); }
.li-ico { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; }
.li-ico .ico { width: 16px; height: 16px; }
.li-main { flex: 1; min-width: 0; }
.li-t { font-weight: 500; font-size: 13.5px; }
.li-s { font-size: 12.5px; color: var(--ink-3); }
.li-s .ico { display: inline; width: 12px; height: 12px; vertical-align: -2px; }
.li-r { text-align: right; font-size: 12px; color: var(--ink-3); flex-shrink: 0; }
.tint-blue { background: var(--accent-soft); color: var(--accent); }
.tint-green { background: var(--ok-soft); color: var(--ok); }
.tint-amber { background: var(--warn-soft); color: var(--warn); }
.tint-red { background: var(--bad-soft); color: var(--bad); }
.tint-purple { background: var(--t2-soft); color: var(--t2); }
.tint-teal { background: var(--t3-soft); color: var(--t3); }
.tint-pink { background: var(--t4-soft); color: var(--t4); }

/* quick links */
.qlinks { display: flex; gap: 8px; flex-wrap: wrap; }
.qlink { display: inline-flex; align-items: center; gap: 8px; padding: 7px 13px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); font-weight: 500; font-size: 13px; cursor: pointer; color: var(--ink); box-shadow: var(--shadow-xs); transition: all .12s; }
.qlink:hover { border-color: var(--line-2); background: var(--hover); }
.qlink .ico { width: 15px; height: 15px; color: var(--ink-3); }
.qlink .badge { background: var(--bad); color: #fff; font-size: 10.5px; padding: 0 6px; border-radius: 10px; font-weight: 600; }

/* report & slides */
.report { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 44px 52px; max-width: 1040px; margin: 0 auto; }
.report-head { display: flex; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); padding-bottom: 22px; margin-bottom: 26px; }
.report h2 { font-size: 28px; font-weight: 600; letter-spacing: -0.03em; }
.report h3 { font-size: 15px; font-weight: 600; margin: 34px 0 12px; color: var(--ink); }
.report p { color: var(--ink-2); }
.slides { display: grid; gap: 22px; }
.slide { aspect-ratio: 16/9; background: var(--paper); border-radius: 14px; box-shadow: var(--shadow); border: 1px solid var(--line); padding: 40px 48px; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.slide.dark { background: radial-gradient(120% 140% at 0% 0%, #312e81 0%, #18181b 60%); color: #fff; border: 0; }
.slide h2 { font-size: 30px; font-weight: 600; letter-spacing: -0.03em; }
.slide .eyebrow { font-size: 12px; font-weight: 500; color: #a5b4fc; margin-bottom: 10px; }
.slide .pg { position: absolute; bottom: 16px; right: 22px; font-size: 11px; color: var(--ink-3); }
.slide-nav { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 16px; }
.slide-thumbs { display: flex; gap: 6px; justify-content: center; }
.slide-thumbs button { width: 8px; height: 8px; border-radius: 99px; border: 0; background: var(--line-2); cursor: pointer; padding: 0; transition: all .2s var(--ease); }
.slide-thumbs button.on { background: var(--ink); width: 24px; }

/* steps / wizard */
.steps { display: flex; gap: 6px; margin-bottom: 22px; }
.step { flex: 1; padding: 10px 0 0; display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 500; color: var(--ink-3); border-top: 2px solid var(--line); }
.step .n { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--hover); font-size: 11px; flex-shrink: 0; }
.step.on { color: var(--ink); border-top-color: var(--accent); }
.step.on .n { background: var(--accent); color: #fff; }
.step.done { color: var(--ink-2); border-top-color: var(--ok); }
.step.done .n { background: var(--ok); color: #fff; }

/* tree */
.tree { font-size: 13px; }
.tree-node { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; cursor: pointer; }
.tree-node .ico { width: 14px; height: 14px; }
.tree-node:hover { background: var(--hover); }
.tree-node.on { background: var(--accent-soft); color: var(--accent); font-weight: 500; }
.tree-node .cap { margin-left: auto; font-size: 11.5px; color: var(--ink-3); }
.tree-children { margin-left: 14px; border-left: 1px solid var(--line); padding-left: 6px; }
.tree-kind { font-size: 10px; font-weight: 500; padding: 0 6px; border-radius: 5px; }
.tk-site { background: var(--t1-soft); color: var(--t1); }
.tk-space { background: var(--t2-soft); color: var(--t2); }
.tk-zone { background: var(--t4-soft); color: var(--t4); }

/* plan matrix */
.plan-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.plan { border: 1px solid var(--line); border-radius: 12px; padding: 16px; background: var(--paper); }
.plan.cur { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.plan h4 { font-size: 14px; }
.plan ul { margin: 10px 0 0; padding-left: 16px; font-size: 12.5px; color: var(--ink-2); line-height: 1.7; }

/* empty / denied */
.empty { text-align: center; padding: 80px 20px; color: var(--ink-2); }
.empty .ico-xl { width: 52px; height: 52px; margin: 0 auto 16px; border-radius: 14px; display: grid; place-items: center; background: var(--paper); border: 1px solid var(--line); color: var(--ink-3); box-shadow: var(--shadow); }
.empty h2 { color: var(--ink); font-size: 20px; margin-bottom: 6px; }

/* login */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; background: var(--paper); }
.login-art { margin: 14px; border-radius: 22px; background: radial-gradient(120% 120% at 0% 0%, #4f46e5 0%, #27235f 42%, #18181b 100%); color: #fff; padding: 44px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.login-art svg.bg { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .18; }
.login-art .cust { display: flex; align-items: center; gap: 12px; font-weight: 600; font-size: 18px; position: relative; }
.login-art .cust .cust-logo { width: 40px; height: 40px; font-size: 15px; background: #fff; color: #18181b; border-radius: 11px; }
.login-art h1 { font-size: 44px; font-weight: 600; line-height: 1.08; max-width: 480px; position: relative; letter-spacing: -0.035em; }
.login-art p { color: #c7d2fe; max-width: 420px; position: relative; font-size: 15px; }
.login-art .powered { font-size: 12px; color: #a5b4fc; position: relative; }
.login-form { display: grid; place-items: center; padding: 40px; }
.login-card { width: 100%; max-width: 360px; }
.login-card h2 { font-size: 26px; font-weight: 600; letter-spacing: -0.03em; }
.login-card .btn { width: 100%; padding: 10px; font-size: 14px; }
.btn-brand { background: #18181b; border-color: #18181b; color: #fff; }
.btn-brand:hover { background: #27272a; color: #fff; border-color: #27272a; }
.divider { display: flex; align-items: center; gap: 10px; color: var(--ink-3); font-size: 12px; margin: 18px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* screen map overlay */
.smap-sec { font-size: 12px; font-weight: 600; color: var(--ink-2); margin: 6px 0 10px; }
.smap-sec.admin { color: var(--r-admin); }
.smap { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; margin-bottom: 22px; }
.smap-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--paper); }
.smap-card.off { opacity: .45; }
.smap-h { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13.5px; cursor: pointer; }
.smap-h .ico { width: 13px; height: 13px; color: var(--ink-3); }
.smap-h:hover { color: var(--accent); }
.smap-n { width: 22px; height: 22px; border-radius: 6px; background: var(--hover); color: var(--ink-2); display: grid; place-items: center; font-size: 11px; flex-shrink: 0; }
.smap-opens { margin-top: 8px; display: flex; flex-direction: column; gap: 5px; padding-left: 30px; }
.smap-open { font-size: 12px; display: flex; align-items: center; gap: 6px; color: var(--ink-2); }
.smap-open .lock { width: 11px; height: 11px; }

.ico { width: 18px; height: 18px; }
.note { font-size: 12.5px; background: var(--warn-soft); border: 1px solid #fde68a; color: #92400e; padding: 10px 12px; border-radius: 10px; }
.note .ico { display: inline; width: 14px; height: 14px; vertical-align: -2px; }
.note.info { background: var(--accent-soft); border-color: #e0e0fc; color: #3730a3; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 10px 14px; font-size: 13px; margin: 0; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; font-weight: 500; }
.divide { height: 1px; background: var(--line); margin: 18px 0; }
code, .mono { font-family: ui-monospace, "SF Mono", SFMono-Regular, Consolas, monospace; font-size: 12px; }

/* ---------------- Responsive ---------------- */
@media (max-width: 1200px) {
  .g-5 { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .g-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .plan-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 980px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; z-index: 800; width: 260px; height: 100vh; transform: translateX(-100%); transition: transform .25s var(--ease); }
  .side.open { transform: none; box-shadow: var(--shadow-pop); }
  .top-burger { display: block; }
  .g-main, .g-3, .g-2, .g-side, .g-fp, .g-dev { grid-template-columns: minmax(0,1fr); }
  .span-2 { grid-column: auto; }
  .login-wrap { grid-template-columns: 1fr; }
  .login-art { min-height: 280px; }
}
@media (max-width: 640px) {
  #preview-bar { right: 12px; bottom: 12px; left: 12px; }
  .pv-panel { width: 100%; }
  .ph-actions .seg { flex-wrap: wrap; }
  .card-h { flex-wrap: wrap; }
  .card-a { justify-content: flex-start; }
  .card-a .input { width: 100% !important; }
  .report .tbl { display: block; overflow-x: auto; }
  .steps { overflow-x: auto; }
  .step { min-width: 140px; }
  .content { padding: 18px 16px 90px; }
  .g-4, .g-5 { grid-template-columns: minmax(0,1fr); }
  .top { padding: 0 16px; }
  .form.g-2 { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; }
  .report { padding: 22px; }
  .plan-grid { grid-template-columns: 1fr; }
  .login-art h1 { font-size: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .c-line { stroke-dashoffset: 0; }
  .c-area { opacity: 1; }
}

/* ---------------- Place Assistant (Ask AI) ---------------- */
.ai-btn {
  display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 13px 0 11px; border-radius: 999px; cursor: pointer;
  border: 1px solid transparent; font: 500 13px var(--font); color: #fff;
  background: #18181b; box-shadow: 0 1px 2px rgba(24,24,27,.2), inset 0 1px 0 rgba(255,255,255,.08);
  transition: transform .15s var(--ease), box-shadow .15s;
}
.ai-btn .ico { width: 15px; height: 15px; }
.ai-btn:hover { transform: translateY(-1px); background: #27272a; }
.ai-btn .ico { color: #a5b4fc; }
.ai-btn.locked-btn { background: var(--paper); color: var(--ink-2); border-color: var(--line-2); box-shadow: var(--shadow-xs); }
.ai-btn .lk { width: 12px; height: 12px; opacity: .7; }

.ai-panel {
  position: fixed; top: 0; right: 0; bottom: 0; width: 420px; max-width: 100vw; z-index: 960;
  background: var(--paper); border-left: 1px solid var(--line); box-shadow: -12px 0 40px rgba(24,24,27,.08);
  display: flex; flex-direction: column; transform: translateX(100%); visibility: hidden;
  transition: transform .28s var(--ease), visibility 0s linear .28s;
}
.ai-panel.open { transform: none; visibility: visible; transition: transform .28s var(--ease); }
@media (min-width: 1280px) { body.ai-open .main { margin-right: 420px; } }
body.ai-open #preview-bar { right: 440px; }
.ai-head { display: flex; align-items: center; gap: 6px; padding: 14px 14px 12px 18px; border-bottom: 1px solid var(--line); }
.ai-title { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14.5px; margin-right: auto; letter-spacing: -.01em; }
.ai-title .ico { width: 17px; height: 17px; color: var(--accent); }
.ai-src { font-size: 11px; font-weight: 500; padding: 2px 8px; border-radius: 999px; background: var(--hover); color: var(--ink-2); }
.ai-src.live { background: #f5f3ff; color: #6d28d9; }
.ai-icon { border: 0; background: transparent; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; cursor: pointer; color: var(--ink-3); }
.ai-icon .ico { width: 16px; height: 16px; }
.ai-icon:hover { background: var(--hover); color: var(--ink); }
.ai-ctx { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: 12px; color: var(--ink-3); padding: 8px 18px; border-bottom: 1px solid var(--line); background: var(--paper-2); }
.ai-ctx .ico { width: 13px; height: 13px; }
.ai-ctx b { color: var(--ink); font-weight: 500; }
.ai-thread { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 16px; }
.ai-hello { text-align: center; padding: 28px 10px 6px; }
.ai-hello h3 { font-size: 17px; margin-top: 12px; }
.ai-hello p { color: var(--ink-2); font-size: 13px; margin: 6px 0 0; }
.ai-orb { width: 48px; height: 48px; border-radius: 16px; margin: 0 auto; display: grid; place-items: center; color: #fff; background: #4f46e5; box-shadow: 0 8px 24px rgba(79,70,229,.25); }
.ai-orb .ico { width: 22px; height: 22px; }
.ai-msg { display: flex; gap: 10px; animation: rise .25s var(--ease); }
.ai-msg.me { justify-content: flex-end; }
.ai-bubble { background: var(--ink); color: #fafafa; padding: 9px 13px; border-radius: 14px 14px 4px 14px; font-size: 13.5px; max-width: 85%; white-space: pre-wrap; }
.ai-av { width: 26px; height: 26px; border-radius: 8px; flex-shrink: 0; display: grid; place-items: center; color: #fff; background: #4f46e5; margin-top: 1px; }
.ai-av .ico { width: 14px; height: 14px; }
.ai-ans { flex: 1; min-width: 0; font-size: 13.5px; line-height: 1.6; color: var(--ink); }
.ai-ans p { margin: 0 0 8px; }
.ai-ans p:last-child { margin-bottom: 0; }
.ai-ans ul, .ai-ans ol { margin: 4px 0 10px; padding-left: 18px; }
.ai-ans li { margin: 3px 0; }
.ai-ans h4 { font-size: 13.5px; margin: 10px 0 4px; }
.ai-ans b { font-weight: 600; }
.ai-ans code { background: var(--hover); padding: 1px 5px; border-radius: 5px; }
.ai-ans .ai-tbl { font-size: 12.5px; margin: 6px 0 10px; border: 1px solid var(--line); border-radius: 10px; }
.ai-ans .ai-tbl td, .ai-ans .ai-tbl th { padding: 6px 10px; }
.ai-link { font-weight: 500; text-decoration: none; border-bottom: 1px solid rgba(79,70,229,.3); }
.ai-link:hover { text-decoration: none; border-bottom-color: var(--accent); }
.ai-note { margin-top: 8px; font-size: 11.5px; color: var(--warn); }
.ai-typing { display: inline-flex; gap: 4px; padding: 8px 0; }
.ai-typing i { width: 6px; height: 6px; border-radius: 50%; background: #a78bfa; animation: dot 1.2s infinite ease-in-out; }
.ai-typing i:nth-child(2) { animation-delay: .15s; }
.ai-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 80%, 100% { transform: scale(.6); opacity: .4; } 40% { transform: scale(1); opacity: 1; } }
.ai-suggest { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 18px 10px; }
.ai-chip { border: 1px solid var(--line-2); background: var(--paper); border-radius: 999px; padding: 5px 11px; font: 500 12px var(--font); color: var(--ink-2); cursor: pointer; text-align: left; transition: all .12s; }
.ai-chip:hover { border-color: #c4b5fd; color: #6d28d9; background: #faf5ff; }
.ai-input { display: flex; align-items: flex-end; gap: 8px; margin: 0 14px 14px; padding: 8px 8px 8px 14px; border: 1px solid var(--line-2); border-radius: 14px; background: var(--paper); box-shadow: var(--shadow); transition: border-color .12s, box-shadow .12s; }
.ai-input:focus-within { border-color: #a78bfa; box-shadow: 0 0 0 3px rgba(139,92,246,.15); }
.ai-input textarea { flex: 1; border: 0; outline: 0; resize: none; font: 14px/1.45 var(--font); color: var(--ink); background: transparent; padding: 5px 0; max-height: 140px; }
.ai-send { width: 32px; height: 32px; border: 0; border-radius: 10px; background: var(--ink); color: #fff; cursor: pointer; display: grid; place-items: center; flex-shrink: 0; }
.ai-send .ico { width: 15px; height: 15px; transform: rotate(-45deg); }
.ai-send[disabled] { opacity: .35; cursor: default; }
.ai-empty, .ai-settings { padding: 30px 22px; }
.ai-empty { text-align: center; color: var(--ink-2); }
.ai-empty b { display: block; color: var(--ink); font-size: 15px; margin-top: 14px; }
.ai-empty p { font-size: 13px; margin: 6px 0 16px; }
.ai-settings b { font-size: 14.5px; }
.ai-settings .field { margin-top: 14px; }
@media (max-width: 640px) { .ai-panel { width: 100vw; } body.ai-open #preview-bar { display: none; } }

/* ---------------- Clickable affordances ---------------- */
.feed-cta { margin-left: auto; display: inline-flex; align-items: center; gap: 2px; font-size: 12.5px; font-weight: 500; color: var(--accent); white-space: nowrap; }
.feed-cta .ico { width: 14px; height: 14px; transition: transform .15s var(--ease); }
.feed-card:hover .feed-cta .ico { transform: translateX(3px); }
.feed-card:hover .feed-t { color: var(--accent); }
/* every clickable list row gets a chevron so it reads as a link */
.li.click { position: relative; padding-right: 36px; }
.li.click::after {
  content: ""; position: absolute; right: 16px; top: 50%; width: 7px; height: 7px; margin-top: -4px;
  border-right: 1.75px solid var(--ink-3); border-top: 1.75px solid var(--ink-3); transform: rotate(45deg); transition: transform .15s var(--ease), border-color .15s;
}
.li.click:hover::after { border-color: var(--accent); transform: translateX(3px) rotate(45deg); }
.li.click:hover .li-t { color: var(--accent); }
.tbl tr.click:hover td .name { color: var(--accent); }

/* login error (demo password gate) */
.login-err { background: #fef2f2; color: #b91c1c; border-radius: 8px; padding: 8px 12px; font-size: 13px; font-weight: 500; }
.input.input-err { border-color: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,.15); animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

/* login panel aligned with the marketing website: pastel gradient, navy type */
.login-art { background: radial-gradient(90% 80% at 0% 0%, #f7c6e3 0%, rgba(247,198,227,0) 60%), radial-gradient(80% 80% at 100% 10%, #c9c4ff 0%, rgba(201,196,255,0) 60%), radial-gradient(90% 90% at 20% 100%, #fde3c2 0%, rgba(253,227,194,0) 55%), linear-gradient(135deg, #f3e8ff, #e0e7ff); color: #0a2540; }
.login-art svg.bg { opacity: .35; }
.login-art svg.bg g[stroke] { stroke: #8b8fd8; }
.login-art svg.bg g[fill="#fff"] { fill: #a5a8e6; }
.login-art .cust { color: #0a2540; }
.login-art .cust .pp-mark { background: linear-gradient(135deg, #635bff, #a960ee 55%, #00d4ff); color: #fff; box-shadow: 0 4px 12px rgba(99,91,255,.35); font-weight: 700; }
.login-art h1 { color: #0a2540; font-weight: 700; letter-spacing: -0.04em; }
.login-art p { color: #33475b; font-size: 16px; line-height: 1.6; max-width: 460px; }
.login-eyebrow { display: inline-flex !important; align-items: center; gap: 8px; background: rgba(255,255,255,.75); padding: 6px 12px; border-radius: 999px; font-size: 13px !important; font-weight: 600; color: #0a2540 !important; margin-bottom: 18px; }
.login-pitch h1 { margin-bottom: 14px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #10b981; box-shadow: 0 0 0 0 rgba(16,185,129,.55); animation: livePing 2s infinite; flex-shrink: 0; }
@keyframes livePing { 75% { box-shadow: 0 0 0 8px rgba(16,185,129,0); } }
.login-stat { display: inline-flex; align-items: center; gap: 12px; margin-top: 22px; background: #fff; border-radius: 12px; padding: 11px 16px; box-shadow: 0 13px 27px -5px rgba(50,50,93,.25), 0 8px 16px -8px rgba(0,0,0,.2); }
.login-stat small { display: block; font-size: 12px; color: #6b7c93; }
.login-stat b { font-size: 15px; color: #0a2540; }
.login-art .powered { color: #425466; }
.login-card .btn-brand { background: #0a2540; border-color: #0a2540; }
.login-card .btn-brand:hover { background: #1a3a5f; }
.login-card a.small { color: #635bff; }
