/* ============================================================ command center (loaded after style.css) */
button { font: inherit; color: var(--text); background: var(--card2); border: 1px solid var(--line); border-radius: 10px; padding: 7px 13px; cursor: pointer; transition: background .15s, border-color .15s, transform .05s; }
button:hover { background: rgba(255,255,255,.13); border-color: rgba(255,255,255,.18); }
button:active { transform: translateY(1px); }
button:disabled { opacity: .5; cursor: default; }
:focus-visible { outline: 2px solid var(--green2); outline-offset: 2px; }
.btn { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none !important; color: var(--text); }
.btn.primary { background: linear-gradient(180deg, #14c18a, #0f9f72); border-color: #0f9f72; color: #04110b; }
.btn.primary:hover { background: linear-gradient(180deg, #1bd69b, #12b182); }
.btn.sm { padding: 5px 11px; font-size: 13px; border-radius: 9px; }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: var(--card2); }
.kbd { font: 600 10.5px/1 ui-monospace, Menlo, Consolas, monospace; padding: 3px 6px; border-radius: 6px; background: rgba(255,255,255,.08); border: 1px solid var(--line); color: var(--muted); }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; padding: 8px 10px; }
td { padding: 9px 10px; border-top: 1px solid var(--line); }
.pill.warn { background: rgba(245,158,11,.18); color: var(--amber); }
.ok { color: var(--green2); }

/* top bar */
.top { position: sticky; top: 0; z-index: 20; margin: -22px calc(-1 * clamp(14px, 3vw, 36px)) 22px; padding: 14px clamp(14px, 3vw, 36px); background: rgba(11,15,26,.78); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.top h1 { font-size: 20px; }
.top-right { display: flex; align-items: center; gap: 10px; }
.needs-pill { font-size: 12.5px; font-weight: 800; padding: 5px 12px; border-radius: 99px; background: var(--amber); color: #111; text-decoration: none !important; }
.needs-pill.clear { background: rgba(16,185,129,.16); color: var(--green2); }

/* sidebar: home and inbox on top, each business a collapsible group */
.side { gap: 14px; padding: 18px 12px; }
nav { gap: 2px; }
nav a { padding: 8px 11px; border-radius: 10px; font-weight: 600; font-size: 14px; }
nav a .ic { width: 18px; display: inline-block; opacity: .8; margin-right: 8px; }
nav a.top-link { justify-content: flex-start; font-size: 14.5px; }
nav a.top-link .pill { margin-left: auto; }
.grp { margin-top: 2px; }
.grp-h { all: unset; box-sizing: border-box; display: flex; width: 100%; align-items: center; gap: 9px; padding: 8px 11px; border-radius: 10px; cursor: pointer; font-weight: 700; font-size: 13.5px; color: var(--text); }
.grp-h:hover { background: var(--card); }
.grp-h .chev { margin-left: auto; color: var(--muted); transition: transform .15s; font-size: 16px; line-height: 1; }
.grp.open .chev { transform: rotate(90deg); }
.grp-h .pill { margin-left: auto; margin-right: 4px; }
.grp-h .pill + .chev { margin-left: 0; }
.vdot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.vdot.none { background: transparent; border: 1.5px solid var(--muted); opacity: .5; }
.grp-b { display: none; padding: 2px 0 6px 12px; border-left: 1px solid var(--line); margin-left: 15px; }
.grp.open .grp-b { display: block; }
.grp-b a { font-size: 13.5px; font-weight: 500; padding: 6px 10px; }
.side-foot { line-height: 2; }

/* home */
.hello h2 { margin: 0 0 2px; font-size: 24px; letter-spacing: -.02em; }
.hello { margin-bottom: 18px; }
.kpis4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); margin-bottom: 18px; }
.kpis4 .kpi { padding-bottom: 14px; }
.kpis4 .kpi .spark { position: absolute; right: 14px; bottom: 12px; opacity: .9; }
.cc { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr); gap: 16px; align-items: start; }
.cc2 { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr); gap: 16px; margin-top: 16px; }
.pad0 { padding: 0; }
.card-h { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px 8px; }
.card-h h3 { margin: 0; }
.card-h.flush { padding: 0 0 10px; }
.sub-h { margin: 14px 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 800; }
.needs { display: flex; flex-direction: column; }
.need { display: flex; gap: 14px; align-items: center; padding: 12px 18px; border-top: 1px solid var(--line); }
.need:hover { background: rgba(255,255,255,.025); }
.kind { flex: none; width: 66px; text-align: center; font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 4px 0; border-radius: 8px; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); }
.nb { flex: 1; min-width: 0; }
.nt { font-weight: 600; line-height: 1.35; }
.ns { font-size: 12.5px; color: var(--muted); margin-top: 2px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.na { display: flex; gap: 6px; flex: none; }
.sys { padding: 4px 0 8px; max-height: 420px; overflow: auto; }
.sysrow { display: grid; grid-template-columns: 14px 1fr; column-gap: 10px; padding: 7px 18px; align-items: baseline; }
.sn { font-weight: 600; font-size: 13.5px; }
.sd { grid-column: 2; font-size: 12px; color: var(--muted); margin-top: -1px; }
.hd { width: 9px; height: 9px; border-radius: 50%; display: inline-block; align-self: center; }
.hd.ok { background: var(--green); box-shadow: 0 0 8px rgba(16,185,129,.6); }
.hd.warn { background: var(--amber); }
.hd.bad { background: var(--red); box-shadow: 0 0 8px rgba(244,63,94,.6); }
.bizgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.biz { display: block; text-decoration: none !important; color: inherit; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; border-top: 3px solid var(--bc); transition: transform .12s, background .15s, border-color .15s; }
.biz:hover { transform: translateY(-2px); background: var(--card2); border-color: rgba(255,255,255,.16); }
.bz-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.bz-m { display: flex; justify-content: space-between; align-items: end; margin: 12px 0 10px; }
.bz-v { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.bz-f { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 22px; }
.fold { margin-top: 16px; }
.fold summary { cursor: pointer; font-weight: 700; color: var(--muted); }
.fold[open] summary { margin-bottom: 10px; }
.tabs { display: flex; gap: 6px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.tab { border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none; padding: 10px 14px; font-weight: 700; color: var(--muted); display: inline-flex; gap: 8px; align-items: center; }
.tab:hover { background: none; color: var(--text); }
.tab.on { color: var(--text); border-bottom-color: var(--green); }
.empty { text-align: center; color: var(--muted); padding: 28px 12px; }
.empty .big { font-size: 34px; margin-bottom: 6px; }

/* jump anywhere */
.pal { position: fixed; inset: 0; z-index: 100; background: rgba(3,6,14,.6); backdrop-filter: blur(4px); display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 0; }
.pal-card { width: min(620px, 100%); background: #121a30; border: 1px solid rgba(255,255,255,.14); border-radius: 18px; box-shadow: 0 30px 80px rgba(0,0,0,.6); overflow: hidden; }
.pal-card input { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 16px 18px; font-size: 16px; background: transparent; }
.pal-list { max-height: 50vh; overflow: auto; padding: 6px; }
.pal-i { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: var(--text); text-decoration: none !important; }
.pal-i.on, .pal-i:hover { background: rgba(255,255,255,.08); }
.pal-i .muted { margin-left: auto; }

@media (max-width: 980px) { .cc, .cc2 { grid-template-columns: 1fr; } .need { flex-wrap: wrap; } .na { width: 100%; padding-left: 80px; } }
@media (max-width: 760px) { .top h1 { font-size: 17px; } .top-right .kbd, .top-right #stamp { display: none; } }

/* polish */
.pill { white-space: nowrap; }
.bz-f > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.kpis4 .kpi .spark { top: 14px; bottom: auto; right: 14px; }
.kpis4 .kpi .value { font-size: 28px; }
.bz-h b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* business header */
.vhead { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; background: linear-gradient(120deg, color-mix(in srgb, var(--bc) 16%, transparent), var(--card) 55%); border: 1px solid var(--line); border-left: 4px solid var(--bc); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 18px; }
.vh-t { font-size: 24px; font-weight: 800; letter-spacing: -.02em; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.vh-links { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; font-size: 13.5px; }
.vh-r { text-align: right; } .vh-n { font-size: 30px; font-weight: 800; letter-spacing: -.03em; }

/* phone */
@media (max-width: 760px) {
  .top { gap: 8px; padding: 10px 14px; margin-left: -14px; margin-right: -14px; }
  .top h1 { font-size: 16px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .top-right { gap: 6px; flex: none; }
  .needs-pill { font-size: 11.5px; padding: 4px 9px; white-space: nowrap; }
  .top-right .btn.ghost { padding: 5px 9px; }
  .kpis4 { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpis4 .kpi { padding: 12px 14px; }
  .kpis4 .kpi .value { font-size: 22px; margin-top: 2px; }
  .kpis4 .kpi .spark { display: none; }
  .kpis4 .kpi .delta { font-size: 11px; }
  .hello h2 { font-size: 20px; }
  .need { padding: 12px 14px; gap: 8px; }
  .kind { width: auto; padding: 3px 9px; }
  .na { width: 100%; padding-left: 0; }
  .bizgrid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .biz { padding: 12px; }
  .bz-v { font-size: 19px; }
  .bz-m .spark { display: none; }
  .bz-h .status { display: none; }
  .vhead { padding: 16px; }
  .vh-r { text-align: left; }
  .vh-t { font-size: 20px; }
}

/* operations pages */
.sysrow.wide { grid-template-columns: 14px 1fr auto; } .sysrow.wide .sd { grid-column: 2; } .sysrow.wide .upbar { grid-column: 3; grid-row: 1 / span 2; align-self: center; }
.upbar { display: inline-flex; gap: 2px; height: 22px; align-items: stretch; } .upbar i { width: 4px; border-radius: 2px; background: var(--green); } .upbar i.d { background: var(--red); }
.bar { height: 8px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; } .bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--green), var(--green2)); } .bar.sm { height: 5px; }
.pipe { display: flex; height: 18px; border-radius: 99px; overflow: hidden; gap: 2px; background: rgba(255,255,255,.04); } .pipe-s { min-width: 6px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); } .legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 6px; }
