/* Cockpit AI by VEROXA: one dark navy system at the product level (ink #050914, panels #0c1626, cyan and
   blue accents). A workspace's own primary and accent colours land on --red / --red-2 / --gold at run time,
   fitted for contrast, so WINGEATS stays red inside its workspace and nothing of it shows anywhere else. */
:root {
  --red: #2467e6; --red-2: #7fb3ff; --gold: #39d5ff; --ok: #1f7f47; --ok-2: #79d39f; --warn: #c9762b; --bad: #ff6b6b; --info: #6ea8ff;
  --ink: #050914; --bg: #08111f; --panel: #0c1626; --panel-2: #13213a; --line: #1c2a42; --line-2: #26385a;
  --text: #eff7ff; --muted: #a7b6c9; --dim: #94a3b8;
  --fb: #4c8dff; --ig: #d63c8c; --yt: #b8821f; --tt: #22a39f; --gb: #4ade80;
  --side: 236px; --tap: 44px; --radius: 12px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, system-ui, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--ink); color: var(--text); font: 15px/1.45 var(--font); }
a { color: var(--gold); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button[disabled] { opacity: .5; pointer-events: none; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 16px; } h3 { font-size: 14px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.app { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; }
/* sidebar */
.side { background: var(--bg); border-right: 1px solid var(--line); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 12px; }
.brand img { height: 26px; }
.brand-sub { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.brand-name { font-weight: 800; font-size: 18px; letter-spacing: -.01em; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 140px; }
.nav { display: flex; flex-direction: column; padding: 6px 10px; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px; }
.nav a .ico { width: 20px; text-align: center; font-size: 16px; }
.nav a:hover { background: var(--panel); color: var(--text); }
.nav a.on { background: var(--red); color: #fff; }
.nav a .badge { margin-left: auto; background: var(--gold); color: #1a1208; font-size: 11.5px; font-weight: 800; border-radius: 999px; padding: 1px 7px; }
.nav a.on .badge { background: #fff; color: var(--red); }
.side-foot { margin-top: auto; padding: 12px 14px 18px; display: flex; flex-direction: column; gap: 8px; }
.pill { display: inline-block; font-size: 12px; padding: 4px 9px; border-radius: 999px; background: var(--panel-2); color: var(--muted); white-space: nowrap; }
.pill.ok { background: #123a24; color: var(--ok-2); } .pill.bad { background: #4a1a1a; color: #ff9b9b; } .pill.warn { background: #3a2d0c; color: #f0c05a; }
/* main */
.main { display: flex; flex-direction: column; min-width: 0; }
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 12px 22px; background: rgba(15,13,12,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top h1 { font-size: 18px; }
.top-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-left: 6px; }
.clock { margin-left: auto; color: var(--muted); font-size: 13px; white-space: nowrap; }
.iconbtn { display: none; background: none; border: 1px solid var(--line); border-radius: 10px; min-width: 40px; min-height: 40px; }
.view { padding: 18px 22px 90px; max-width: 1480px; width: 100%; }
.bottom { display: none; }
/* building blocks */
.grid { display: grid; gap: 14px; align-items: start; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; min-width: 0; }
.card h2 { margin-bottom: 8px; }
.card .sub { color: var(--muted); font-size: 13px; }
.kpi { display: flex; flex-direction: column; gap: 4px; }
.kpi .label { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.kpi .value { font-size: 28px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.kpi .delta { font-size: 12.5px; color: var(--muted); }
.kpi .delta.up { color: var(--ok-2); } .kpi .delta.down { color: var(--bad); }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.spacer { flex: 1; }
.btn { min-height: 38px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text); font-weight: 600; font-size: 13.5px; white-space: nowrap; }
.btn:hover { border-color: var(--dim); }
.btn.primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.danger { color: #ff8b8b; border-color: #5a2a2a; }
.btn.small, .ghost.small { min-height: 30px; padding: 0 10px; font-size: 12.5px; }
.ghost { background: none; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { min-height: 30px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--panel); color: var(--muted); font-size: 12.5px; font-weight: 600; }
.chip.on { background: var(--text); color: var(--ink); border-color: var(--text); }
.chip.fb.on { background: var(--fb); border-color: var(--fb); color: #fff; } .chip.ig.on { background: var(--ig); border-color: var(--ig); color: #fff; } .chip.yt.on { background: var(--yt); border-color: var(--yt); color: #fff; }
input[type=text], input:not([type]), input[type=search], input[type=email], input[type=password], input[type=url], input[type=tel], input[type=date], input[type=time], input[type=datetime-local], input[type=number], select, textarea {
  min-height: 38px; padding: 6px 10px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text); }
textarea { width: 100%; min-height: 120px; resize: vertical; }
input::placeholder { color: var(--dim); }
.tag { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 3px 7px; border-radius: 6px; background: var(--line); color: var(--muted); white-space: nowrap; }
.tag.DRAFT { background: #4a3a12; color: var(--gold); } .tag.QUEUE { background: #123a24; color: var(--ok-2); } .tag.PUBLISHED { background: #1f2f4a; color: #9cc3ff; } .tag.ERROR { background: #4a1a1a; color: #ff9b9b; }
.tag.video { background: #1f2f4a; color: #9cc3ff; } .tag.story { background: #3a2a4a; color: #d7b3ff; } .tag.carousel { background: #2b3a1f; color: #bde79c; } .tag.image { background: #2a2f33; color: #cfd8dc; } .tag.cut { background: #1f2f4a; color: #9cc3ff; }
.tag.facebook { background: #1c2b4a; color: #8fb6ff; } .tag.instagram { background: #4a1f3a; color: #ff9bd0; } .tag.youtube { background: #4a1a1a; color: #ff9b9b; } .tag.tiktok { background: #163a3a; color: #7ff3ee; } .tag.google { background: #163a24; color: #86efac; }
.tag.owner, .tag.negative { background: #4a1a1a; color: #ff9b9b; } .tag.question { background: #4a3a12; color: var(--gold); } .tag.positive { background: #123a24; color: var(--ok-2); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--dim); }
.dot.facebook { background: var(--fb); } .dot.instagram { background: var(--ig); } .dot.youtube { background: var(--yt); } .dot.tiktok { background: var(--tt); }
.tw { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .k { color: var(--muted); }
.table.tight td { padding: 6px 8px; }
.table td.hide-sm, .table th.hide-sm { }
/* A thumbnail column in a stacked row keeps its image at a sane size. */
.table td img.cover { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; display: block; }
.msg, .empty { text-align: center; color: var(--muted); padding: 40px 16px; font-size: 15px; }
.msg.err { color: #ff8b8b; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: max(18px, env(safe-area-inset-bottom)); z-index: 60; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 12px; padding: 12px 16px; font-size: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.5); max-width: min(560px, 92vw); }
.toast.err { border-color: #7a2d2d; color: #ff9b9b; }
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; }
.overlay[hidden] { display: none; }
.modal { background: var(--panel); border: 1px solid var(--line-2); border-radius: 16px; width: min(720px, 100%); max-height: 92vh; overflow: auto; padding: 18px; }
.modal h2 { margin-bottom: 10px; }
.modal .actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; margin: 10px 0; }
.field label { font-size: 12px; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.field input, .field select, .field textarea { width: 100%; }
.alerts { display: flex; flex-direction: column; gap: 6px; }
.alert { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line-2); font-size: 13.5px; }
.alert.error { border-color: #5a2a2a; } .alert.warn { border-color: #5a4a20; }
.alert .lvl { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.alert.error .lvl { color: var(--bad); } .alert.warn .lvl { color: var(--gold); } .alert.ok .lvl { color: var(--ok-2); }
/* sign in */
.signin { background: var(--panel); border: 1px solid var(--line-2); border-radius: 16px; padding: 26px; width: min(420px, 100%); }
.signin img { height: 30px; margin-bottom: 14px; }
.signin p { color: var(--muted); font-size: 13.5px; margin: 6px 0 14px; }
/* posts */
.toolbar { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.toolbar .line { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; }
.seg button { min-height: 36px; padding: 0 12px; background: var(--panel); border: 0; color: var(--muted); font-weight: 600; font-size: 13px; white-space: nowrap; }
.seg button.on { background: var(--text); color: var(--ink); }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal .dow { font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); text-align: center; padding: 4px 0; }
.cal .cell { min-height: 96px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; }
.cal .cell.out { opacity: .45; } .cal .cell.today { border-color: var(--gold); } .cal .cell.sel { outline: 2px solid var(--red); }
.cal .cell .d { font-size: 12.5px; font-weight: 700; color: var(--muted); display: flex; justify-content: space-between; }
.cal .cell .d .n { color: var(--text); font-weight: 600; }
.cal .cell .ln { font-size: 11.5px; display: flex; align-items: center; gap: 5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal .cell .ln b { color: var(--text); font-weight: 600; }
.cal .cell .ln .t { color: var(--dim); }
.dayhead { display: flex; align-items: center; gap: 10px; margin: 18px 0 8px; }
.dayhead h2 { font-size: 15px; }
.dayhead .n { color: var(--muted); font-size: 13px; }
.post { display: grid; grid-template-columns: 24px 96px 1fr auto; gap: 12px; align-items: start; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; margin-bottom: 8px; }
.post.sel { border-color: var(--red); }
.post > * { min-width: 0; }
.post .perf { flex-wrap: wrap; }
.post.older { opacity: .55; }
.post .thumb { width: 96px; height: 96px; border-radius: 8px; background: var(--panel-2); object-fit: cover; display: block; }
.post .thumb.none { display: flex; align-items: center; justify-content: center; color: var(--dim); font-size: 11px; }
.post .meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 4px; font-size: 13px; }
.post .meta .chan { font-weight: 700; }
.post .meta .when { color: var(--muted); }
.post .cap { font-size: 14px; white-space: pre-wrap; color: var(--text); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; }
.post .cap.open { display: block; }
.post .item { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.post .perf { display: flex; gap: 12px; font-size: 12.5px; color: var(--muted); margin-top: 6px; font-variant-numeric: tabular-nums; }
.post .perf b { color: var(--text); }
.post .acts { display: flex; flex-direction: column; gap: 6px; }
.post input[type=checkbox] { width: 18px; height: 18px; margin-top: 4px; accent-color: var(--red); }
.bulk { position: sticky; bottom: 12px; z-index: 15; display: flex; gap: 8px; align-items: center; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 12px; box-shadow: 0 10px 30px rgba(0,0,0,.5); margin-top: 12px; }
.picker { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0; }
.picker img, .picker video { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; border: 2px solid transparent; flex: none; background: #000; cursor: pointer; }
.picker .sel { border-color: var(--gold); }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 64px; }
.bars i { flex: 1; background: var(--red); border-radius: 3px 3px 0 0; min-height: 2px; opacity: .85; }
.bars i.alt { background: var(--gold); }
.list-kv { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; font-size: 13.5px; }
.list-kv .k { color: var(--muted); }
.reply .q { font-size: 14.5px; white-space: pre-wrap; padding: 10px 12px; border-left: 3px solid var(--line-2); background: var(--panel-2); border-radius: 0 10px 10px 0; margin: 6px 0; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
/* TikTok pack: the clip beside its caption; stacked on a phone. */
.clip { display: grid; grid-template-columns: 150px 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.clip video { width: 150px; aspect-ratio: 9 / 16; border-radius: 10px; background: #000; display: block; }
.clip .cap { font-size: 13.5px; white-space: pre-wrap; background: var(--panel-2); border-radius: 10px; padding: 8px 10px; margin: 6px 0 8px; }
.clip-body { min-width: 0; }
@media (max-width: 600px) { .clip { grid-template-columns: 1fr; } .clip video { width: min(100%, 300px); margin: 0 auto; } }
.link { color: var(--gold); text-decoration: none; }
.hint { color: var(--muted); font-size: 13px; }
@media (max-width: 1100px) { .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 84vw; max-width: 320px; z-index: 40; transform: translateX(-105%); transition: transform .2s; }
  .side.open { transform: none; box-shadow: 0 0 60px rgba(0,0,0,.6); }
  .iconbtn { display: inline-flex; align-items: center; justify-content: center; }
  .top { padding: 10px 14px; }
  .top h1 { font-size: 16px; }
  .clock { display: none; }
  .view { padding: 12px 14px 96px; overflow-x: hidden; }
  .main { overflow-x: hidden; }
  .cols-2, .cols-3, .cols-4 { grid-template-columns: 1fr 1fr; }
  .kpi .value { font-size: 22px; }
  .bottom { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: rgba(15,13,12,.96); border-top: 1px solid var(--line); padding: 6px 4px max(6px, env(safe-area-inset-bottom)); }
  .bottom a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; color: var(--muted); text-decoration: none; font-size: 11.5px; font-weight: 600; min-height: var(--tap); }
  .bottom a .ico { font-size: 18px; }
  .bottom a.on { color: var(--red-2); }
  .cal .cell { min-height: 64px; padding: 4px 5px; }
  .cal .cell .ln { display: none; } .cal .cell .ln.first { display: flex; }
  .post { grid-template-columns: 22px 64px 1fr; }
  .post .thumb { width: 64px; height: 64px; }
  .post .acts { grid-column: 1 / -1; flex-direction: row; }
  .post .acts .btn { flex: 1; }
  .table { font-size: 13px; }
  .card { overflow: hidden; }
  .bulk { bottom: 70px; }
  /* Stacked tables: one block per row, label on the left, value on the right. */
  .table.stack thead { display: none; }
  .table.stack, .table.stack tbody, .table.stack tr, .table.stack td { display: block; }
  .table.stack tr { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; margin: 0 0 8px; background: var(--panel-2); }
  .table.stack td { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border: 0; text-align: left; }
  .table.stack td.num { text-align: right; }
  .table.stack td::before { content: attr(data-label); color: var(--muted); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; flex: none; min-width: 72px; padding-top: 2px; }
  .table.stack td[data-label=""]::before { display: none; }
  .table.stack td.empty { display: block; }
  .table.stack td:empty { display: none; }
  .table.stack td .row { justify-content: flex-end; }
  .hide-sm { display: none !important; }
  /* Page actions move under the title on a phone. */
  .top { flex-wrap: wrap; }
  .top-actions { order: 3; width: 100%; margin: 6px 0 0; }
  .top-actions:empty { display: none; }
  .dayhead { flex-wrap: wrap; }
  .cal .cell { min-height: 58px; }
  .cal .cell .d { flex-direction: column; gap: 0; }
  .cal .cell .d span:last-child { font-size: 10px; font-weight: 500; }
}
@media (max-width: 600px) { .cols-2, .cols-3 { grid-template-columns: 1fr; } .cols-4 { grid-template-columns: 1fr 1fr; } .kpi .value { font-size: 20px; } .card { padding: 12px; } }

/* ── workspaces and the Business editor ───────────────────────────────── */
.wsholder { padding: 0 14px 10px; }
.wsel { width: 100%; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 8px 10px; font-weight: 600; }
.savebar { position: sticky; top: 0; z-index: 4; display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin-bottom: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.chips { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 10px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; font-size: 12.5px; padding: 6px 11px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); text-decoration: none; white-space: nowrap; }
.chip:hover { color: var(--text); border-color: var(--dim); }
.chip.on { background: var(--text); color: var(--ink); border-color: var(--text); }
.chip .dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); margin-left: 6px; vertical-align: middle; }
.sections { display: grid; gap: 14px; }
.sections section { scroll-margin-top: 70px; }
.group { display: grid; gap: 4px; }
.field.group > label, .field.list > label { font-size: 13px; color: var(--text); text-transform: none; letter-spacing: 0; font-weight: 600; margin-top: 6px; }
.field .group { padding-left: 12px; border-left: 2px solid var(--line); }
.field.has-err input, .field.has-err textarea, .field.has-err select { border-color: var(--bad); }
.field .err { color: #ff9b9b; font-size: 12.5px; }
.field .hint { color: var(--muted); font-size: 12px; }
.rows { display: grid; gap: 8px; margin-bottom: 8px; }
.rowcard { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.rowhead { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.kv { display: grid; gap: 6px; margin-bottom: 8px; }
.kvrow { display: grid; grid-template-columns: minmax(90px, 1fr) 2fr auto; gap: 6px; align-items: center; }
.kvrow .k { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.hours { display: grid; gap: 4px; }
.hours .field { margin: 2px 0; }
.hours .field label { text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--text); }
.hours-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hours-row input[type=time] { width: auto; }
.switch { width: 42px; height: 24px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line-2); position: relative; padding: 0; cursor: pointer; flex: 0 0 auto; }
.switch .knob { position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--muted); transition: left .15s, background .15s; }
.switch.on { background: var(--red); border-color: var(--red); }
.switch.on .knob { left: 20px; background: #fff; }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
@media (max-width: 600px) { .kvrow { grid-template-columns: 1fr; } .savebar { flex-wrap: wrap; } }

/* ── Plays ───────────────────────────────────────────────────────────── */
.plays { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); align-items: start; }
.play .play-head { display: flex; align-items: flex-start; gap: 12px; }
.play .play-title { flex: 1; min-width: 0; }
.play .play-title h2 { margin-bottom: 4px; }
.play .play-when { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 13.5px; }
.play .play-when .ico { color: var(--muted); }
.play .play-last { margin-top: 6px; font-size: 13px; color: var(--muted); }
.play .play-last.bad { color: #ff9b9b; }
.play .gate { margin-top: 8px; font-size: 12.5px; color: var(--gold); }
.play.gated { border-style: dashed; }
.play-body { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.play-body h3 { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 10px 0 6px; }
.steps { padding-left: 20px; display: grid; gap: 6px; font-size: 13.5px; }
.checks { padding-left: 18px; display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.log { display: grid; gap: 6px; font-size: 13px; }
.logrow { display: grid; grid-template-columns: auto auto 1fr; gap: 8px; align-items: center; }
@media (max-width: 600px) { .plays { grid-template-columns: 1fr; } .logrow { grid-template-columns: auto 1fr; } .logrow span:last-child { grid-column: 1 / -1; } }

.rowhead { cursor: pointer; user-select: none; }
.rowhead .caret { color: var(--muted); width: 12px; }
.rowhead .rowsum { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.rowcard.open { border-color: var(--dim); }
.field textarea.short { min-height: 56px; }
.field textarea.lines { min-height: 64px; font-family: inherit; }
.field input[readonly] { color: var(--muted); }

/* ── Studio ─────────────────────────────────────────────────────────── */
.studio { display: grid; gap: 14px; }
.itemgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-top: 10px; max-height: 420px; overflow: auto; padding-right: 2px; }
.itemcard { background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 0 0 8px; text-align: left; color: inherit; cursor: pointer; overflow: hidden; }
.itemcard img, .itemcard .nophoto { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; background: #23201d; }
.itemcard .nophoto { display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 12px; }
.itemcard .iname { font-size: 13px; font-weight: 600; padding: 8px 10px 0; line-height: 1.25; }
.itemcard .iprice { font-size: 12px; color: var(--muted); padding: 2px 10px 0; }
.itemcard.on { border-color: var(--red); box-shadow: 0 0 0 2px rgba(232, 32, 42, .35); }
.seg { display: inline-flex; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; color: var(--muted); padding: 8px 12px; font-size: 13px; cursor: pointer; }
.seg button.on { background: var(--red); color: #fff; }
.preview img, .preview video { width: 100%; max-width: 480px; border-radius: 12px; border: 1px solid var(--line); display: block; }
.step h2 { margin: 0; }

/* ── Canvas: a Play as large nodes on a grid ─────────────────────────── */
.canvasbar .canvas-title { background: none; border: 0; color: var(--text); font: inherit; font-size: 15px; padding: 0; text-align: left; cursor: pointer; }
.canvasbar .canvas-title:hover b { text-decoration: underline; }
.canvas { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 14px; align-items: start; }
.board { position: relative; overflow: auto; min-height: 420px; max-height: calc(100vh - 190px); border: 1px solid var(--line); border-radius: var(--radius); background-color: var(--bg); background-image: radial-gradient(var(--line-2) 1px, transparent 1.2px); background-size: 22px 22px; }
/* The Play winds down the board: one node per row, alternating columns, so every step is readable and the path is one glance. */
.flow { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 38px 44px; padding: 26px 28px 30px; box-sizing: border-box; }
.node { grid-column: var(--col, 1); }
.flow .wires { position: absolute; left: 0; top: 0; pointer-events: none; overflow: visible; }
.wire { fill: none; stroke: var(--gold); stroke-width: 3; stroke-linecap: round; opacity: .85; }
.node { position: relative; z-index: 1; min-width: 0; background: var(--panel); border: 1px solid var(--line-2); border-radius: 14px; padding: 14px 16px 14px; box-shadow: 0 8px 28px rgba(0,0,0,.35); cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.node:hover { border-color: var(--dim); transform: translateY(-1px); }
.node.on { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(216,161,58,.25), 0 10px 30px rgba(0,0,0,.4); }
.node .kind { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.node .idx { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: var(--red); color: #fff; font-size: 12px; }
.node.when { border-left: 4px solid var(--gold); } .node.check { border-left: 4px solid var(--ok); } .node.report { border-left: 4px solid var(--info); }
.node .big { font-size: 19px; font-weight: 800; line-height: 1.2; }
.node h3 { font-size: 15px; color: var(--text); text-transform: none; letter-spacing: 0; margin: 0 0 4px; font-weight: 700; }
.node p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.4; }
.node .sub { margin-top: 6px; font-size: 12.5px; color: var(--muted); } .node .sub.bad { color: #ff9b9b; }
.node ul { margin: 0; padding-left: 18px; font-size: 13px; color: var(--muted); } .node li { margin: 3px 0; }
.node .uses { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 10px; align-items: center; }
.node .uses .ul { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); margin-right: 2px; }
.node .u { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--panel-2); color: var(--muted); border: 1px solid var(--line); }
.node .u.in { border-color: rgba(110,168,255,.4); color: #9cc0ff; } .node .u.mind { border-color: rgba(216,161,58,.45); color: var(--gold); } .node .u.out { border-color: rgba(121,211,159,.4); color: var(--ok-2); }
.inspector { position: sticky; top: 64px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); max-height: calc(100vh - 210px); overflow: auto; }
.inspector .ihead { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--panel); z-index: 1; }
.inspector .ihead h2 { margin: 0; }
.inspector .ibody { padding: 12px 14px 16px; display: grid; gap: 12px; }
.inspector .f { display: grid; gap: 5px; } .inspector .fl { font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); } .inspector .fh { font-size: 12px; color: var(--dim); }
.inspector input, .inspector textarea, .inspector select { width: 100%; box-sizing: border-box; }
.inspector .days { display: flex; flex-wrap: wrap; gap: 6px; }
.inspector .seg { flex-wrap: wrap; }
@media (max-width: 900px) {
  .canvas { grid-template-columns: 1fr; }
  .board { max-height: none; overflow: visible; }
  .flow { grid-template-columns: 1fr; gap: 30px; padding: 22px 14px; }
  .node { grid-column: 1; }
  .canvasbar { flex-wrap: wrap; } .canvasbar .canvas-title { width: 100%; }
  .inspector { position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 35; max-height: 66vh; border-radius: 16px 16px 0 0; transform: translateY(110%); transition: transform .2s; box-shadow: 0 -20px 60px rgba(0,0,0,.6); padding-bottom: max(64px, calc(env(safe-area-inset-bottom) + 58px)); }
  .inspector.open { transform: none; }
}

/* ── God's View: the wall ────────────────────────────────────────────── */
.whoami { font-size: 12px; color: var(--muted); padding: 0 2px; }
.wall { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.wcol { display: grid; gap: 14px; min-width: 0; }
.kind { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.wclock b { font-size: 26px; font-weight: 800; letter-spacing: -.01em; }
.wclock { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.wstag { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 2px 7px; border-radius: 6px; background: var(--line-2); color: #fff; white-space: nowrap; flex: none; }
.wlist, .wline { display: grid; gap: 6px; }
.wrow { display: flex; align-items: center; gap: 8px; font-size: 13.5px; min-width: 0; padding: 6px 0; border-top: 1px solid var(--line); }
.wrow:first-child { border-top: 0; padding-top: 0; }
.wrow .wt { color: var(--muted); font-variant-numeric: tabular-nums; min-width: 66px; }
.wrow .ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wrow .row { flex-wrap: nowrap; min-width: 0; flex: 1; }
.wbizcard { --acc: var(--red); border-top: 3px solid var(--acc); }
.wbizcard .wacc { width: 10px; height: 10px; border-radius: 50%; background: var(--acc); flex: none; }
.wkpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.wkpi { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; min-width: 0; }
.wkpi .label { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wkpi .value { font-size: 22px; font-weight: 800; letter-spacing: -.01em; margin: 2px 0; }
.wkpi .delta { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wstrip { display: flex; flex-wrap: wrap; gap: 6px; }
.wpost { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; padding: 4px 9px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line-2); color: var(--muted); }
.wpost.ok { color: var(--ok-2); border-color: #1f5a37; } .wpost.bad { color: #ff9b9b; border-color: #5a2a2a; } .wpost.warn { color: var(--gold); }
.wplays { display: flex; flex-wrap: wrap; gap: 6px; }
.wplay { font-size: 12px; font-weight: 600; padding: 4px 9px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); background: var(--panel-2); position: relative; padding-left: 20px; }
.wplay::before { content: ''; position: absolute; left: 8px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; background: var(--dim); }
.wplay.ok::before { background: var(--ok-2); } .wplay.bad::before { background: var(--bad); box-shadow: 0 0 0 3px rgba(255,107,107,.25); } .wplay.off { opacity: .55; }
@media (max-width: 1400px) { .wall { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .wall .wbiz { grid-column: 1 / -1; order: -1; } }
@media (max-width: 900px) { .wall { grid-template-columns: 1fr; } .wkpis { grid-template-columns: 1fr 1fr; } .wclock b { font-size: 22px; } }
/* Wall mode: the chrome goes, the type grows, the three columns stay. */
body.wallmode .side, body.wallmode .bottom, body.wallmode .clock { display: none !important; }
body.wallmode .app { grid-template-columns: 1fr; }
body.wallmode .top { padding: 8px 18px; }
body.wallmode .view { padding: 14px 18px 24px; font-size: 16px; }
body.wallmode .wkpi .value { font-size: 30px; } body.wallmode .wclock b { font-size: 36px; } body.wallmode .wrow { font-size: 15px; } body.wallmode .kind { font-size: 12px; }

/* ── set-up checklist for a fresh workspace ──────────────────────────── */
.setup .bar { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; margin: 8px 0 4px; }
.setup .bar span { display: block; height: 100%; background: var(--gold); border-radius: 999px; transition: width .3s; }
.setup .steps { display: grid; gap: 4px; margin-top: 8px; }
.setup .step { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 10px; color: var(--text); text-decoration: none; border: 1px solid transparent; }
.setup .step:hover { background: var(--panel-2); border-color: var(--line); }
.setup .step .mark { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--dim); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; margin-top: 1px; }
.setup .step.done .mark { background: var(--ok); border-color: var(--ok); color: #fff; }
.setup .step.done .lbl b { color: var(--muted); text-decoration: line-through; }
.setup .step .lbl { font-size: 13.5px; line-height: 1.35; }
.setup .step .hint { color: var(--muted); }
@media (min-width: 900px) { .setup .steps { grid-template-columns: 1fr 1fr; } }

/* ── account page and the auth pages ─────────────────────────────────── */
.usage { display: grid; gap: 10px; margin-top: 12px; }
.urow { font-size: 13.5px; }
.urow .bar { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; margin-top: 5px; }
.urow .bar span { display: block; height: 100%; background: var(--ok-2); border-radius: 999px; }
.urow .bar.hot span { background: var(--gold); }
.list { display: grid; gap: 6px; margin-top: 8px; }
.lrow { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); min-width: 0; flex-wrap: wrap; }
.lrow .mono { font-size: 12px; }
.ghost.danger { color: #ff9b9b; border-color: #5a2a2a; }
.plans { display: grid; gap: 8px; }
.planrow { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.planrow.on { border-color: var(--gold); }
.planrow .price { margin-left: auto; text-align: right; white-space: nowrap; }
.authpage { max-width: 440px; margin: 24px auto; }
.authpage .card h2 { margin-bottom: 6px; }
.authpage form { display: grid; gap: 10px; margin-top: 12px; }
.signin p { color: var(--muted); font-size: 13.5px; margin: 0 0 8px; }

/* Product mark (Cockpit AI by VEROXA): the sign-in screen and the sidebar foot. A workspace's wordmark stays at the top of its own sidebar. */
.product-mark { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.product-mark img { height: 40px; width: 40px; margin: 0; }
.pm-name { font-weight: 800; font-size: 20px; letter-spacing: -.01em; line-height: 1.1; }
.pm-by { font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }
.product-foot { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--dim); text-decoration: none; padding: 6px 2px 0; border-top: 1px solid var(--line); margin-top: 4px; }
.product-foot img { width: 18px; height: 18px; } .product-foot em { font-style: normal; color: var(--dim); letter-spacing: .08em; text-transform: uppercase; font-size: 11px; margin-left: 4px; }
/* One focus ring everywhere: the product cyan, never the browser's default colour. */
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; border-color: var(--gold); }
