@font-face { font-family: "Geist"; src: url("/static/vendor/geist.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Bricolage"; src: url("/static/vendor/bricolage.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }

:root {
  --bg: #fafafc;
  --surface: #ffffff;
  --surface-2: #f1f1f6;
  --border: #e9e9f0;
  --border-strong: #d6d6e1;
  --text: #16161d;
  --muted: #6c6c7e;
  --accent: #5a31f4;
  --accent-soft: #eeeafe;
  --ok: #0e8a5f;
  --ok-soft: #dff5ec;
  --warn: #b25e09;
  --warn-soft: #fdefd9;
  --err: #d92d4b;
  --err-soft: #fde7eb;
  --info: #5a31f4;
  --info-soft: #eeeafe;
  --idle: #9a9aab;
  --idle-soft: #efeff4;
  --dock-danger: #ff8fa3;
  --shadow: 0 18px 50px -12px rgba(22, 22, 29, .28), 0 2px 6px rgba(22, 22, 29, .06);
  --shadow-sm: 0 1px 2px rgba(22, 22, 29, .1), 0 0 0 1px rgba(22, 22, 29, .04);
  --radius: 18px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --font: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: "Bricolage", "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0e13; --surface: #17171e; --surface-2: #1f1f29; --border: #262631; --border-strong: #373746;
    --text: #ededf3; --muted: #9696a8; --accent: #a18bff; --accent-soft: #272050;
    --ok: #45d6a0; --ok-soft: #0f2e24; --warn: #f2b45a; --warn-soft: #33260e; --err: #ff7389; --err-soft: #3a1520;
    --info: #a18bff; --info-soft: #272050; --idle: #6f6f82; --idle-soft: #22222c;
    --dock-danger: #c4203f;
    --shadow: 0 18px 50px -12px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .06);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 255, 255, .06);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 13.5px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code, .mono { font-family: var(--mono); font-size: 12px; }
code { background: var(--surface-2); padding: 1px 5px; border-radius: 5px; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -.01em; }
h3 { font-size: 15px; font-weight: 600; margin-bottom: 8px; }
h4 { font-size: 13px; font-weight: 600; margin: 20px 0 8px; }
p { margin: 0 0 10px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ic { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.topbar { display: flex; align-items: center; gap: 22px; padding: 0 24px; height: 60px; position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--bg) 84%, transparent); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); }
.wordmark { font: 700 21px/1 var(--display); letter-spacing: -.045em; }
.nav { display: flex; align-items: center; gap: 6px; }
.seg { position: relative; display: inline-flex; padding: 3px; border-radius: 999px; background: var(--surface-2); }
.seg button, .nav-more { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 14px; border: 0;
  border-radius: 999px; background: none; font: 500 13.5px var(--font); color: var(--muted); cursor: pointer; white-space: nowrap; transition: color .15s; }
.seg button:hover, .nav-more:hover { color: var(--text); }
.seg button.active { color: var(--text); }
.seg-ind { position: absolute; top: 3px; left: 0; height: 30px; width: 0; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow-sm);
  opacity: 0; transition: transform .32s var(--ease), width .32s var(--ease), opacity .15s; }
.nav-more.active { color: var(--text); background: var(--surface-2); }
.nav-more .ic { width: 14px; height: 14px; }
.tab-count { min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; line-height: 18px; text-align: center; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.cmd-btn { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 10px; border: 0; border-radius: 999px; background: var(--surface-2);
  color: var(--muted); font: inherit; cursor: pointer; }
.cmd-btn:hover { color: var(--text); }
kbd { font: 500 11.5px var(--font); color: inherit; }
.avatar { width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--accent-soft); color: var(--accent); font: 600 13px var(--font);
  cursor: pointer; text-transform: uppercase; }

.menu { position: relative; }
.pop { position: absolute; top: calc(100% + 8px); left: 0; z-index: 70; min-width: 210px; padding: 6px; display: flex; flex-direction: column; gap: 2px;
  background: var(--surface); border-radius: 16px; box-shadow: var(--shadow); transform-origin: top left; animation: pop .16s var(--ease); }
.pop.right { left: auto; right: 0; transform-origin: top right; }
.pop > button:not(.btn), .pop > a { display: block; width: 100%; text-align: left; padding: 8px 12px; border: 0; border-radius: 10px; background: none;
  font: inherit; color: var(--text); cursor: pointer; text-decoration: none; }
.pop > button:not(.btn):hover, .pop > a:hover { background: var(--surface-2); text-decoration: none; }
.pop > button.active { font-weight: 600; }
.pop-head { padding: 8px 12px 6px; color: var(--muted); font-size: 12.5px; word-break: break-all; }
.pop.form { width: 290px; padding: 16px; gap: 0; }
.pop.form .btn { width: 100%; margin-top: 6px; }
.pop-title { font-size: 12.5px; color: var(--muted); margin: 6px 0 8px; }
.col-list { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; margin-bottom: 10px; }
@keyframes pop { from { opacity: 0; transform: scale(.96) translateY(-4px); } }

input, select, textarea { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: 10px; padding: 7px 10px; }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input[type=checkbox] { width: 15px; height: 15px; padding: 0; accent-color: var(--accent); cursor: pointer; }
input[type=file] { padding: 5px; font-size: 12.5px; }
input::placeholder, textarea::placeholder { color: var(--idle); }
select { appearance: none; -webkit-appearance: none; padding-right: 30px; cursor: pointer; background-repeat: no-repeat; background-position: right 10px center; background-size: 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%238a8a9b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E"); }
select.pill { height: 34px; padding: 0 32px 0 14px; border: 0; border-radius: 999px; background-color: var(--surface-2); font-weight: 500; }
textarea { width: 100%; font-family: var(--mono); font-size: 12px; resize: vertical; }
label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--muted); margin-bottom: 12px; }
label > input, label > select { color: var(--text); width: 100%; min-width: 0; }
label.check { flex-direction: row; align-items: center; gap: 8px; color: var(--text); margin: 0; cursor: pointer; }
label.check > input { width: 15px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); font: 500 13.5px var(--font); cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: transform .12s var(--ease), background .12s, border-color .12s; }
.btn:hover:not(:disabled) { background: var(--surface-2); text-decoration: none; }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn:disabled { opacity: .4; cursor: default; }
.btn.primary { background: var(--text); border-color: var(--text); color: var(--bg); }
.btn.primary:hover:not(:disabled) { background: color-mix(in srgb, var(--text) 86%, var(--accent)); border-color: transparent; }
.btn.primary.active { box-shadow: 0 0 0 3px var(--accent-soft); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.small { height: 28px; padding: 0 12px; font-size: 12.5px; }
.btn.danger { color: var(--err); }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 50%; background: none; color: var(--muted); cursor: pointer; }
.icon-btn:hover, .icon-btn[aria-expanded=true] { background: var(--surface-2); color: var(--text); }

.alerts { display: flex; gap: 8px; padding: 4px 24px 0; flex-wrap: wrap; }
.alerts:empty { display: none; }
.alert { display: inline-flex; gap: 8px; align-items: center; height: 30px; padding: 0 12px; border-radius: 999px; font-size: 12.5px; font-weight: 500; cursor: pointer; }
.alert::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--idle); }
.alert { background: var(--surface-2); color: var(--text); }
.alert.warn::before { background: var(--warn); }
.alert.err::before { background: var(--err); }
.alert:hover { background: var(--border); }

main { padding: 8px 24px 24px; }
.view { display: flex; flex-direction: column; gap: 14px; }
.view-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: 10px 0 4px; }
.view-head h1 { font: 650 30px/1.1 var(--display); letter-spacing: -.03em; }
.head-tools { display: flex; align-items: center; gap: 10px; margin-left: auto; flex-wrap: wrap; }

.sum { margin: 14px 0 2px; font: 400 25px/1.25 var(--display); letter-spacing: -.02em; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 32px; }
.sum b { color: var(--text); font-weight: 650; }

.bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.search { flex-direction: row; align-items: center; gap: 8px; height: 34px; width: 280px; padding: 0 14px; margin: 0; border-radius: 999px;
  background: var(--surface-2); color: var(--muted); cursor: text; transition: box-shadow .15s, background .15s; }
.search:focus-within { background: var(--surface); box-shadow: 0 0 0 1px var(--accent), 0 0 0 4px var(--accent-soft); }
.search > input { flex: 1; border: 0; padding: 0; background: none; box-shadow: none; font-size: 13.5px; }
.search > input:focus { box-shadow: none; }
.range { display: inline-flex; gap: 8px; align-items: center; }
.dates { display: inline-flex; gap: 6px; }
.dates input { height: 34px; padding: 0 10px; border-radius: 999px; }
.chip { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--surface-2);
  color: var(--text); font: 500 13.5px var(--font); cursor: pointer; white-space: nowrap; }
.chip:hover, .chip[aria-expanded=true] { background: var(--border); }
.chip .ic { color: var(--muted); }
.count { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; line-height: 18px; text-align: center; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip.on { background: var(--accent-soft); color: var(--accent); padding-right: 10px; animation: pop .16s var(--ease); }
.chip.on:hover { background: color-mix(in srgb, var(--accent-soft) 80%, var(--accent)); }
.chip.on .ic { width: 12px; height: 12px; color: inherit; opacity: .7; }
.spacer { flex: 1; }
.stamp { border: 0; background: none; padding: 0 4px; font: inherit; font-size: 12.5px; color: var(--muted); cursor: pointer; white-space: nowrap;
  max-width: 44vw; overflow: hidden; text-overflow: ellipsis; }
.stamp:hover { color: var(--text); }

.badge { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font); font-size: 13px; font-weight: 500; white-space: nowrap; color: var(--text); }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--idle); flex: none; }
.badge.ok::before { background: var(--ok); }
.badge.warn::before { background: var(--warn); }
.badge.err::before { background: var(--err); }
.badge.info::before, .badge.accent::before { background: var(--accent); }
.badge.idle { color: var(--muted); }
.badge.err { color: var(--err); }
.topbar-right > .badge { font-size: 12.5px; color: var(--warn); }

.steps { display: inline-flex; gap: 3px; align-items: center; vertical-align: middle; }
.step { width: 12px; height: 5px; border-radius: 3px; background: var(--border-strong); }
.step.done { background: var(--ok); }
.step.fail { background: var(--err); }
.step.part { background: var(--warn); }

#grid, #xGrid { height: calc(100vh - 220px); }
.tabulator { --tb: var(--bg); background: transparent; border: 0; font-size: 13px; }
.card .tabulator { --tb: var(--surface); }
.tabulator .tabulator-cell[tabulator-field="_sel"], .tabulator .tabulator-col[tabulator-field="_sel"] .tabulator-col-content { padding-left: 0; padding-right: 0; text-overflow: clip; }
.tabulator .tabulator-col[tabulator-field="_sel"] .tabulator-col-title { padding-right: 0 !important; text-align: center; }
.tabulator .tabulator-header { background: var(--tb); border-bottom: 1px solid var(--border); color: var(--muted); font-weight: 500; }
.tabulator .tabulator-header .tabulator-col { background: var(--tb); border-right: 0; }
.tabulator .tabulator-header .tabulator-col .tabulator-col-content { padding: 9px 8px; }
.tabulator .tabulator-header .tabulator-col .tabulator-col-title { font-weight: 500; font-size: 12.5px; }
.tabulator .tabulator-header .tabulator-col.tabulator-sortable.tabulator-col-sorter-element:hover { background: var(--tb); color: var(--text); }
.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-sorter .tabulator-arrow { border-left-width: 4px; border-right-width: 4px; border-bottom-width: 5px; }
.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="none"] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow { border-bottom-color: transparent; }
.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="ascending"] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow { border-bottom-color: var(--text); }
.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="descending"] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow { border-top-color: var(--text); border-top-width: 5px; }
.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left, .tabulator-row .tabulator-cell.tabulator-frozen.tabulator-frozen-left { border-right: 1px solid var(--border); }
.tabulator-row { background: var(--tb); border-bottom: 1px solid var(--border); min-height: 42px; color: var(--text); transition: background .1s; }
.tabulator-row.tabulator-row-even { background: var(--tb); }
.tabulator-row.tabulator-selectable:hover { background: var(--surface-2); cursor: pointer; }
.tabulator-row.sel, .tabulator-row.sel.tabulator-selectable:hover, .tabulator-row.tabulator-selected, .tabulator-row.tabulator-selected:hover { background: var(--accent-soft); }
.tabulator-row .tabulator-cell { border-right: 0; padding: 12px 8px; }
.tabulator-row .tabulator-cell.tabulator-frozen { background: inherit; }
.tabulator-row .tabulator-cell b { font-weight: 600; }
.tabulator .tabulator-footer { background: var(--tb); border-top: 1px solid var(--border-strong); color: var(--text); }
.tabulator .tabulator-footer .tabulator-calcs-holder { background: var(--tb); border: 0; }
.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row { background: var(--tb); font-weight: 600; border: 0; }
.tabulator .tabulator-tableholder .tabulator-table { background: transparent; color: var(--text); }
.tabulator-row.tabulator-calcs, .tabulator-row.tabulator-calcs .tabulator-cell { background: var(--tb) !important; color: var(--text); font-weight: 600; }
.tabulator-row.tabulator-group { background: var(--surface-2); border: 0; border-radius: 10px; padding: 9px 12px; font-weight: 600; margin-top: 6px; }
.tabulator-row.tabulator-group:hover { background: var(--border); }
.tabulator-row.tabulator-group span { color: var(--muted); font-weight: 400; margin-left: 8px; }
.tabulator .tabulator-header .tabulator-header-filter input { padding: 4px 8px; font-size: 12px; border-radius: 8px; }
.tabulator-placeholder span { color: var(--muted) !important; font-size: 13.5px; font-weight: 400 !important; }
.num { font-variant-numeric: tabular-nums; }
.cell-sub { color: var(--muted); font-size: 11.5px; }
.ending { color: var(--err); font-weight: 600; }
.li-name { display: block; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tabulator-row.not-tracked .tabulator-cell { color: var(--muted); }
.tabulator-row.not-tracked .tabulator-cell b { color: var(--text); }
.empty { padding: 40px; text-align: center; color: var(--muted); line-height: 1.7; }
.empty b:first-child { display: block; font: 600 20px var(--display); color: var(--text); letter-spacing: -.02em; }

.dock { position: fixed; left: 50%; bottom: 26px; z-index: 35; display: flex; align-items: center; gap: 4px; padding: 6px 6px 6px 18px; border-radius: 999px;
  background: var(--text); color: var(--bg); box-shadow: var(--shadow); transform: translateX(-50%); animation: dock .26s var(--ease); max-width: calc(100vw - 24px); }
.dock-n { font-weight: 600; margin-right: 10px; white-space: nowrap; }
.dock .btn { background: transparent; border-color: transparent; color: inherit; }
.dock .btn:hover:not(:disabled) { background: color-mix(in srgb, var(--bg) 16%, transparent); }
.dock .btn:disabled { display: none; }
.dock .btn.primary, .dock .btn.primary:hover:not(:disabled) { background: var(--bg); color: var(--text); }
.dock .btn.danger { color: var(--dock-danger); }
.dock-x { display: inline-grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 50%; background: none; color: inherit; opacity: .6; cursor: pointer; }
.dock-x:hover { opacity: 1; }
@keyframes dock { from { opacity: 0; transform: translate(-50%, 18px) scale(.96); } }

.drawer { position: fixed; top: 0; right: 0; width: 560px; max-width: 100vw; height: 100vh; background: var(--surface); box-shadow: var(--shadow);
  z-index: 40; display: flex; flex-direction: column; animation: drawer .26s var(--ease); }
@keyframes drawer { from { transform: translateX(40px); opacity: 0; } }
.drawer-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 22px 24px 14px; }
.drawer-title { font: 650 24px/1.15 var(--display); letter-spacing: -.03em; word-break: break-word; }
.drawer-head .badge { font-size: 12.5px; }
.drawer-body { overflow: auto; padding: 4px 24px 48px; display: flex; flex-direction: column; gap: 24px; }
.drawer-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px 12px; }
.kpi .v { font: 600 20px/1.2 var(--display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi .l { font-size: 12.5px; color: var(--muted); }
.section-title { font-size: 12.5px; font-weight: 500; color: var(--muted); margin-bottom: 10px; }
.section-title .btn { float: right; margin-top: -6px; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 7px 12px; font-size: 13px; }
.kv > div:nth-child(odd) { color: var(--muted); }
.kv .mono { word-break: break-all; }
.timeline { list-style: none; padding: 0; margin: 0; font-size: 12.5px; }
.timeline li { display: grid; grid-template-columns: 16px 96px 1fr; gap: 6px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.timeline li.no-grid { display: block; }
.timeline .ok { color: var(--ok); }
.timeline .bad { color: var(--err); }
.err-box { background: var(--err-soft); color: var(--err); padding: 12px 14px; border-radius: 12px; font-size: 12.5px; word-break: break-word; }
.imported-note { background: var(--accent-soft); color: var(--accent); padding: 12px 14px; border-radius: 12px; font-size: 12.5px; }
.chart { width: 100%; height: 150px; }
.chart text { fill: var(--muted); font-size: 10px; }
.chart rect { rx: 2; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.sizes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 12px; font-size: 13px; }
.edit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.cr-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.cr-table td { padding: 8px 6px; border-top: 1px solid var(--border); vertical-align: middle; }
.cr-table tr:first-child td { border-top: 0; }
.cr-table td:last-child { text-align: right; white-space: nowrap; }
.cr-table tr.rej td { background: var(--err-soft); }
.campaign-fix { background: var(--warn-soft); border-radius: 12px; padding: 12px 14px 2px; margin-top: 8px; }

dialog { border: 0; border-radius: 22px; padding: 0; background: var(--surface); color: var(--text); box-shadow: var(--shadow); width: 520px; max-width: 94vw; }
dialog[open] { animation: pop .2s var(--ease); }
dialog::backdrop { background: color-mix(in srgb, var(--text) 30%, transparent); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); }
@media (prefers-color-scheme: dark) { dialog::backdrop { background: rgba(0, 0, 0, .6); } }
.dlg { padding: 26px; }
.dlg h3 { font: 650 20px/1.2 var(--display); letter-spacing: -.02em; margin-bottom: 10px; }
#askBody { white-space: pre-line; }
#askBody:empty { display: none; }
dialog:has(.dlg.wide) { width: 980px; }
.apply-list { max-height: 50vh; overflow: auto; border: 1px solid var(--border); border-radius: 12px; padding: 8px 12px; }
.apply-list label { margin: 5px 0; }
.ad-table-wrap { max-height: 46vh; overflow: auto; border: 1px solid var(--border); border-radius: 12px; margin-top: 10px; }
.ad-table { border-collapse: collapse; width: 100%; font-size: 12.5px; }
.ad-table th { position: sticky; top: 0; background: var(--surface); text-align: left; font-weight: 500; color: var(--muted); padding: 8px; }
.ad-table td { border-top: 1px solid var(--border); padding: 5px 6px; vertical-align: top; }
.ad-table td.li { font-size: 11.5px; max-width: 240px; }
.ad-table input { width: 100%; padding: 5px 8px; font-size: 12.5px; border-radius: 8px; }
.ad-table td.w-geo { width: 150px; }
.ad-table td.w-file { width: 80px; }
.ad-table td.w-dom { width: 190px; }
.ad-table tr.bad td { background: var(--err-soft); }
.ad-paste { margin-top: 8px; }
.adv-list { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.adv-row { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.adv-row .err-text { color: var(--err); font-size: 12px; word-break: break-word; }

.cmdk { width: 580px; margin-top: 16vh; overflow: hidden; }
.cmd-in { flex-direction: row; align-items: center; gap: 12px; margin: 0; padding: 18px 22px; color: var(--muted); border-bottom: 1px solid var(--border); }
.cmd-in > input { flex: 1; border: 0; padding: 0; background: none; font-size: 16px; box-shadow: none; }
.cmd-in > input:focus { box-shadow: none; }
.cmd-list { max-height: 48vh; overflow: auto; padding: 8px; }
.cmd-item { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; width: 100%; padding: 10px 14px; border: 0; border-radius: 12px; background: none;
  font: inherit; color: var(--text); text-align: left; cursor: pointer; }
.cmd-item.on { background: var(--surface-2); }
.cmd-item span { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.cmd-empty { padding: 18px; color: var(--muted); text-align: center; }

.toast { position: fixed; top: 70px; left: 50%; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 999px;
  font-size: 13.5px; font-weight: 500; z-index: 90; box-shadow: var(--shadow); max-width: 80vw; animation: toast .24s var(--ease); }
@keyframes toast { from { opacity: 0; transform: translate(-50%, -12px); } }

.card { background: var(--surface); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.card-head h3 { margin: 0; }
.two-col { display: flex; gap: 14px; align-items: flex-start; }
.split { display: grid; grid-template-columns: 1.5fr 1fr; gap: 14px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.grow { flex: 1; min-width: 0; }
.two-col > .card, .split > .card { min-width: 0; }
.side-form { width: 430px; flex-shrink: 0; position: sticky; top: 72px; max-height: calc(100vh - 92px); overflow: auto; }
.side-form.left { width: 380px; }
.row { display: flex; gap: 10px; align-items: flex-end; }
.row > label { flex: 1; min-width: 0; }
.row > input, .row > select { margin-bottom: 0; }
.row-actions { display: flex; gap: 8px; margin-top: 16px; }
.row-actions.tight { margin-top: 0; }
.row-actions.wrap { flex-wrap: wrap; }
.row-actions.end { justify-content: flex-end; }
.result { margin-top: 12px; font-size: 12.5px; }
.result ul { margin: 4px 0; padding-left: 18px; }
.pill-stats { display: flex; gap: 14px; }
.warn-text { color: var(--warn); }
.field-help { margin-top: -6px; }
details summary { cursor: pointer; color: var(--muted); margin: 6px 0 10px; }
details.fold > summary { color: var(--text); font-size: 15px; font-weight: 600; margin: 0; list-style: none; display: flex; justify-content: space-between; align-items: center; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::after { content: ""; width: 7px; height: 7px; border-right: 1.6px solid var(--muted); border-bottom: 1.6px solid var(--muted); transform: rotate(45deg); transition: transform .2s var(--ease); }
details.fold[open] > summary::after { transform: rotate(-135deg); }
details.fold[open] > summary { margin-bottom: 12px; }
.inset { background: var(--surface-2); border-radius: 14px; padding: 16px; margin-top: 8px; }
.inset h3 { margin-top: 0; }
table.mini { border-collapse: collapse; width: 100%; font-size: 13px; }
table.mini th { text-align: left; color: var(--muted); font-weight: 500; font-size: 12.5px; padding: 8px; border-bottom: 1px solid var(--border); }
table.mini td { padding: 8px; border-bottom: 1px solid var(--border); }
table.mini tr.bad td { color: var(--muted); }
.form-table input, .form-table select { width: 100%; }
.geo-block { background: var(--surface-2); border-radius: 14px; padding: 14px 14px 4px; margin-bottom: 10px; }
.new-set { padding-bottom: 10px; }
.url-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.country-field { display: flex; flex-direction: column; gap: 2px; }
.country-field .geo-id { min-height: 16px; font-weight: 400; }
.map-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; margin-top: 8px; }
.preview { overflow: auto; max-height: 180px; border: 1px solid var(--border); border-radius: 12px; margin: 6px 0 12px; }
.preview table { border-collapse: collapse; font-size: 12px; width: 100%; }
.preview th, .preview td { border-bottom: 1px solid var(--border); padding: 5px 8px; text-align: left; white-space: nowrap; }
.preview th { background: var(--surface-2); font-weight: 500; }
.brand-list { display: flex; flex-direction: column; font-size: 12.5px; }
.kv-row { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid var(--border); }
.conn-box { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; font-size: 13px; }
.conn-box .conn { display: grid; grid-template-columns: 16px 1fr; gap: 8px; }
.conn-box .ok { color: var(--ok); }
.conn-box .bad { color: var(--err); }

.wizard { display: grid; grid-template-columns: 250px 1fr; gap: 18px; align-items: start; max-width: 1180px; }
.stepper { list-style: none; margin: 0; padding: 0; position: sticky; top: 76px; display: flex; flex-direction: column; gap: 2px; }
.stepper li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: start; padding: 10px 12px; border-radius: 14px; cursor: pointer; line-height: 1.35; transition: background .15s; }
.stepper li:hover:not(.locked) { background: var(--surface-2); }
.stepper li.current { background: var(--surface); box-shadow: var(--shadow-sm); }
.stepper li.locked { cursor: default; opacity: .45; }
.stepper .num { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: 12px; background: var(--surface-2); color: var(--muted); }
.stepper li.done .num { background: var(--ok-soft); color: var(--ok); }
.stepper li.current .num { background: var(--text); color: var(--bg); }
.wz-panel { padding: 28px 30px; min-height: 420px; }
.wz-panel h2 { font: 650 24px/1.15 var(--display); letter-spacing: -.03em; margin-bottom: 8px; }
.intro { background: var(--accent-soft); padding: 14px 16px; border-radius: 14px; }
.wz-nav { display: flex; justify-content: space-between; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--border); }
.wz-check { margin-top: 12px; }
.proj-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin: 14px 0; }
.proj-card { text-align: left; display: flex; flex-direction: column; gap: 3px; padding: 16px; border-radius: 16px; cursor: pointer; background: var(--surface-2);
  border: 1.5px solid transparent; color: var(--text); font: inherit; transition: transform .14s var(--ease), border-color .14s; }
.proj-card:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.proj-card.sel { border-color: var(--accent); background: var(--accent-soft); }
.proj-card.new { background: none; border: 1.5px dashed var(--border-strong); justify-content: center; }
.pc-brand { font-size: 12.5px; font-weight: 500; color: var(--accent); }
.pc-name { font: 600 16px/1.2 var(--display); letter-spacing: -.02em; }
.tracker-meter { display: flex; gap: 32px; align-items: center; padding: 16px 20px; border-radius: 16px; margin: 6px 0 12px; }
.tracker-meter.ok { background: var(--ok-soft); }
.tracker-meter.short { background: var(--warn-soft); }
.tracker-meter .big { font: 650 28px/1.1 var(--display); font-variant-numeric: tabular-nums; }

.launch-card { background: var(--surface-2); border-radius: 14px; padding: 14px 16px; margin-bottom: 8px; }
.launch-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.launch-head .grow { flex: 1; }
.pipeline { display: flex; gap: 4px; margin: 12px 0 6px; }
.pipeline .ps { flex: 1; padding: 8px 10px; border-radius: 10px; background: var(--idle-soft); color: var(--muted); font-size: 12px; font-weight: 500; }
.launch-card .pipeline .ps { background: var(--surface); }
.pipeline .ps.done { background: var(--ok-soft); color: var(--ok); }
.pipeline .ps.now { background: var(--accent-soft); color: var(--accent); animation: pulse 1.2s ease-in-out infinite; }
.pipeline .ps.fail { background: var(--err-soft); color: var(--err); }
.pipeline .ps small { display: block; font-weight: 400; opacity: .85; }
@keyframes pulse { 50% { opacity: .55; } }
.log-row { border-bottom: 1px solid var(--border); }
.log-row summary { display: grid; grid-template-columns: 120px 1fr 190px 90px 70px; gap: 10px; align-items: center; padding: 12px 6px; cursor: pointer; list-style: none;
  color: var(--text); margin: 0; border-radius: 10px; }
.log-row summary::-webkit-details-marker { display: none; }
.log-row summary:hover { background: var(--surface-2); }
.log-body { padding: 4px 6px 14px 136px; }
.log-err { color: var(--err); font-size: 12.5px; grid-column: 2 / -1; }

.x-note { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 10px 14px; margin-top: 8px; border-radius: 12px; background: var(--warn-soft); color: var(--warn); font-size: 13px; }
.x-note.info { background: var(--accent-soft); color: var(--accent); }

.dvjob { position: relative; }
.dvjob-btn { display: inline-flex; align-items: center; gap: 8px; height: 32px; border: 0; background: none; color: var(--muted); border-radius: 999px; padding: 0 6px;
  font: inherit; font-size: 12.5px; cursor: pointer; white-space: nowrap; }
.dvjob-btn:hover { color: var(--text); }
.dvjob-btn::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.dvjob-btn.running { color: var(--accent); }
.dvjob-btn.running::before { display: none; }
.dvjob-btn.err { color: var(--err); }
.dvjob-btn.err::before { background: var(--err); }
.dvjob-btn .spin { width: 10px; height: 10px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.dvjob-pop { position: absolute; right: 0; top: calc(100% + 8px); width: 400px; max-width: 90vw; max-height: 70vh; overflow: auto; background: var(--surface); border-radius: 16px;
  box-shadow: var(--shadow); padding: 18px; z-index: 70; transform-origin: top right; animation: pop .16s var(--ease); }
.dvjob-pop h4 { margin: 0 0 6px; font-size: 13.5px; }
.dvjob-pop ul { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.dvjob-pop li { display: grid; grid-template-columns: 74px 1fr; gap: 2px 8px; font-size: 12.5px; border-top: 1px solid var(--border); padding-top: 8px; }
.dvjob-pop li .msg { grid-column: 2; color: var(--muted); word-break: break-word; }

.login-body { display: grid; place-items: center; min-height: 100vh; padding: 24px; }
.login { width: 340px; max-width: 100%; display: flex; flex-direction: column; }
.login .wordmark { font-size: 54px; letter-spacing: -.055em; margin-bottom: 6px; }
.login > p { margin-bottom: 28px; font-size: 15px; }
.login input { height: 44px; padding: 0 14px; border-radius: 14px; font-size: 15px; }
.login .btn { height: 46px; margin-top: 10px; font-size: 15px; }
.login-error { color: var(--err); font-size: 13px; margin: 0 0 4px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

@media (min-width: 1200px) {
  body.drawer-open .dock { left: calc((100vw - 560px) / 2); }
}
@media (max-width: 900px) {
  .topbar { flex-wrap: wrap; height: auto; padding: 10px 16px; gap: 10px; }
  .nav { order: 3; width: 100%; overflow-x: auto; }
  .topbar-right { gap: 8px; }
  .cmd-btn, .dvjob, .topbar-right > .badge { display: none; }
  main { padding: 6px 16px 20px; }
  .alerts { padding: 4px 16px 0; }
  .sum { font-size: 20px; white-space: normal; }
  .search { width: 100%; }
  .stamp { max-width: 100%; }
  .drawer { width: 100vw; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .two-col, .split { display: flex; flex-direction: column; }
  .wizard { grid-template-columns: 1fr; }
  .stepper { position: static; flex-direction: row; overflow-x: auto; }
  .stepper li { min-width: 160px; }
  .url-grid, .map-grid, .edit-grid { grid-template-columns: 1fr; }
  .log-row summary { grid-template-columns: 1fr 1fr; }
  .log-body { padding-left: 6px; }
  .pipeline { flex-wrap: wrap; }
  .side-form, .side-form.left { width: 100%; position: static; max-height: none; }
  .dock { bottom: 14px; overflow-x: auto; }
  .pop.form { width: min(290px, calc(100vw - 32px)); }
}

body.lite #btnWizard, body.lite #selDock, body.lite #xDock, body.lite #dvJobBtn, body.lite #xSync, body.lite #xAdvBtn, body.lite #xAdoptPaste,
body.lite .drawer-actions, body.lite [data-remake], body.lite [data-act="sync"], body.lite .full-only,
body.lite #syncInfo, body.lite #xSyncInfo { display: none !important; }

.btn.primary.danger-fill, .btn.primary.danger-fill:hover:not(:disabled) { background: var(--err); border-color: var(--err); color: #fff; }
.tabulator-row .tabulator-cell.tabulator-row-header, .tabulator .tabulator-header .tabulator-col.tabulator-row-header { background: inherit; border: 0; text-overflow: clip; padding-left: 0; padding-right: 0; }
.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title { padding-right: 16px; }
