/* Aekant Control — tokens follow the Aekant browser palette. */
:root {
  --accent: #f97316;
  --accent-strong: #ea580c;
  --accent-soft: rgba(249, 115, 22, 0.12);
  --highlight: #f59e0b;
  --bg: #f3f4f7;
  --surface: #ffffff;
  --surface-2: #fbfbfb;
  --surface-3: #f1f3f6;
  --text: #1a2233;
  --muted: #6b7790;
  --border: #e3e7ee;
  --border-strong: #d5dae3;
  --ok: #16a34a;
  --ok-soft: rgba(22, 163, 74, 0.12);
  --warn: #d97706;
  --warn-soft: rgba(217, 119, 6, 0.14);
  --danger: #dc2626;
  --danger-soft: rgba(220, 38, 38, 0.12);
  --info: #2563eb;
  --info-soft: rgba(37, 99, 235, 0.12);
  --chart-1: #f97316;
  --chart-2: #4f9ce8;
  --chart-3: #4dbe8a;
  --chart-4: #c77dd0;
  --chart-5: #e9a23b;
  --chart-6: #66758c;
  --shadow: 0 1px 2px rgba(26, 34, 51, 0.04), 0 8px 24px rgba(26, 34, 51, 0.06);
  --shadow-lg: 0 24px 64px rgba(26, 34, 51, 0.22);
  --radius: 12px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12141a; --surface: #181b23; --surface-2: #1d2029; --surface-3: #222630;
    --text: #e8ecf4; --muted: #9aa7bd; --border: #2b303c; --border-strong: #363d4b;
    --accent-soft: rgba(249, 115, 22, 0.16);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.55);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #12141a; --surface: #181b23; --surface-2: #1d2029; --surface-3: #222630;
  --text: #e8ecf4; --muted: #9aa7bd; --border: #2b303c; --border-strong: #363d4b;
  --accent-soft: rgba(249, 115, 22, 0.16);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.55);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
a { color: var(--accent-strong); }
code, .mono { font-family: var(--mono); font-size: 12.5px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.sprite { display: none; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
:focus-visible { outline: 2px solid var(--highlight); outline-offset: 2px; }

/* Buttons and fields */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font: 600 13px var(--font); cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, transform .05s; }
.btn:hover { border-color: var(--muted); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.btn.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, var(--border)); }
.btn.danger.solid { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-3); }
.btn.sm { height: 30px; padding: 0 11px; font-size: 12px; }
.btn.block { width: 100%; }
.btn svg { width: 16px; height: 16px; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--muted); cursor: pointer; }
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.icon-btn.sm { width: 28px; height: 28px; border-radius: 8px; }
.icon-btn.sm svg { width: 15px; height: 15px; }
.field { display: grid; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.field > span { display: flex; justify-content: space-between; gap: 8px; }
input, select, textarea { width: 100%; min-height: 38px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text); font: 14px var(--font); }
textarea { resize: vertical; min-height: 90px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--highlight); box-shadow: 0 0 0 3px color-mix(in srgb, var(--highlight) 22%, transparent); }
input[type="checkbox"] { width: 16px; height: 16px; min-height: 0; accent-color: var(--accent); }
.check { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--text); cursor: pointer; }
.form-error { margin: 0; color: var(--danger); font-size: 13px; }
.form-error:empty { display: none; }
.hint { font-weight: 500; color: var(--muted); font-size: 12px; }

/* Login */
.login { min-height: 100%; display: grid; place-items: center; padding: 24px; background: radial-gradient(1200px 600px at 10% -10%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 60%), radial-gradient(900px 500px at 110% 110%, color-mix(in srgb, var(--highlight) 14%, transparent), transparent 60%), var(--bg); }
.login-card { width: min(400px, 100%); display: grid; gap: 14px; padding: 32px; border-radius: var(--radius-xl); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg); }
.login-card h1 { font-size: 22px; }
.login-card p { margin: 0; }
.login-logo { width: 56px; height: 56px; border-radius: 14px; }
.login-foot { text-align: center; }

/* Layout */
.app { display: grid; grid-template-columns: 252px 1fr; min-height: 100%; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 12px; padding: 18px 14px; background: var(--surface); border-right: 1px solid var(--border); overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 6px 6px; }
.brand img { border-radius: 9px; }
.brand strong { display: block; font-size: 15px; }
.env { display: inline-block; margin-top: 2px; padding: 0 7px; border-radius: 999px; font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; background: var(--info-soft); color: var(--info); }
.env.prod { background: var(--danger-soft); color: var(--danger); }
.search-trigger { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); color: var(--muted); font: 13px var(--font); cursor: pointer; }
.search-trigger span { flex: 1; text-align: left; }
kbd { font: 11px var(--mono); padding: 1px 6px; border-radius: 6px; border: 1px solid var(--border-strong); color: var(--muted); }
nav { display: grid; gap: 2px; }
.nav-group { margin: 12px 8px 4px; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.nav-item { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px; border-radius: 10px; color: var(--text); text-decoration: none; font-weight: 600; font-size: 13.5px; }
.nav-item svg { color: var(--muted); }
.nav-item:hover { background: var(--surface-3); }
.nav-item.active { background: var(--accent-soft); color: var(--accent-strong); }
.nav-item.active svg { color: var(--accent); }
.nav-item .count { margin-left: auto; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 800; text-align: center; }
.sidebar-foot { margin-top: auto; display: flex; align-items: center; gap: 8px; padding-top: 12px; border-top: 1px solid var(--border); }
.who { flex: 1; min-width: 0; font-size: 12.5px; }
.who strong { display: block; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px; padding: 14px 28px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.titles { flex: 1; min-width: 0; }
.titles h1 { font-size: 20px; }
.titles p { margin: 2px 0 0; font-size: 13px; }
.top-actions { display: flex; align-items: center; gap: 4px; }
.content { padding: 24px 28px 48px; display: grid; gap: 20px; align-content: start; outline: none; }
.mobile-only { display: none; }
.page { display: grid; gap: 20px; align-content: start; min-width: 0; }

/* Cards and grids */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px 0; flex-wrap: wrap; }
.card-head h2 { font-size: 15px; }
.card-head p { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); }
.card-body { padding: 16px 18px 18px; }
.grid { display: grid; gap: 16px; }
.grid.kpis { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid.wide-left { grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); }
.kpi { position: relative; padding: 16px 18px; overflow: hidden; }
.kpi .label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.kpi .label svg { width: 16px; height: 16px; color: var(--accent); }
.kpi .value { margin-top: 6px; font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.kpi .sub { font-size: 12px; color: var(--muted); }
.kpi .sub.path { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kpi.link { cursor: pointer; }
.kpi.link:hover { border-color: var(--border-strong); }
.kpi.alert .value { color: var(--warn); }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap; background: var(--surface-3); color: var(--muted); }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.accent { background: var(--accent-soft); color: var(--accent-strong); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); display: inline-block; }
.dot.ok { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.dot.danger { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.dot.warn { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-soft); }

/* Toolbar and tables */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.toolbar .search { position: relative; flex: 1 1 240px; max-width: 360px; }
.toolbar .search svg { position: absolute; left: 11px; top: 10px; width: 16px; height: 16px; color: var(--muted); }
.toolbar .search input { padding-left: 34px; height: 36px; min-height: 36px; }
.toolbar select, .toolbar input[type="date"] { width: auto; height: 36px; min-height: 36px; padding: 0 10px; font-size: 13px; }
.toolbar .spacer { flex: 1; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font: 600 12.5px var(--font); cursor: pointer; }
.chip.active { background: var(--accent-soft); border-color: transparent; color: var(--accent-strong); }
.chip .n { color: var(--muted); font-weight: 700; }
.table-wrap { overflow: auto; max-height: calc(100vh - 290px); }
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
th { position: sticky; top: 0; z-index: 1; background: var(--surface-2); text-align: left; font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: var(--text); }
th .arrow { color: var(--accent); }
td { padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: top; max-width: 380px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
tbody tr { cursor: pointer; }
tbody tr:hover td { background: var(--surface-3); }
tbody tr.selected td { background: var(--accent-soft); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.empty { padding: 48px 20px; text-align: center; color: var(--muted); }
.empty strong { display: block; color: var(--text); font-size: 15px; margin-bottom: 4px; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.pager .controls { display: flex; align-items: center; gap: 6px; }
.pager select { width: auto; height: 30px; min-height: 30px; padding: 0 8px; font-size: 12.5px; }
.id { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.trunc { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
.copy { display: inline-grid; place-items: center; width: 22px; height: 22px; margin-left: 4px; border: 0; background: transparent; color: var(--muted); border-radius: 6px; cursor: pointer; vertical-align: middle; }
.copy:hover { background: var(--surface-3); color: var(--text); }
.copy svg { width: 13px; height: 13px; }

/* Charts */
.chart { width: 100%; height: 220px; display: block; stroke: none; }
.chart .bar, .chart .hit { stroke: none; }
.chart .grid-line { stroke: var(--border); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 10.5px; stroke: none; font-family: var(--font); }
.chart .line { fill: none; stroke-width: 2.2; }
.chart .area { stroke: none; }
.chart .s0 { stroke: var(--chart-1); } .chart .a0 { fill: var(--chart-1); opacity: .14; }
.chart .s1 { stroke: var(--chart-2); } .chart .a1 { fill: var(--chart-2); opacity: .12; }
.chart .b0 { fill: var(--chart-1); } .chart .b1 { fill: var(--chart-2); }
.chart .bar { rx: 3; }
.chart .hover-line { stroke: var(--muted); stroke-dasharray: 3 3; }
.chart .hover-dot { stroke: var(--surface); stroke-width: 2; }
.chart .hover-dot.d0 { fill: var(--chart-1); } .chart .hover-dot.d1 { fill: var(--chart-2); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.legend .l0 { background: var(--chart-1); } .legend .l1 { background: var(--chart-2); }
.bars { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; font-size: 13px; }
.bar-row .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row .val { font-weight: 700; font-variant-numeric: tabular-nums; }
.bar-track { grid-column: 1 / -1; height: 7px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.bar-fill { height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--highlight)); transition: width .5s ease; }
.donut-wrap { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.donut { width: 140px; height: 140px; transform: rotate(-90deg); }
.donut circle { fill: none; stroke-width: 16; }
.donut .track { stroke: var(--surface-3); }
.donut .c0 { stroke: var(--chart-1); } .donut .c1 { stroke: var(--chart-2); } .donut .c2 { stroke: var(--chart-3); } .donut .c3 { stroke: var(--chart-4); } .donut .c4 { stroke: var(--chart-5); } .donut .c5 { stroke: var(--chart-6); }
.donut-legend { display: grid; gap: 6px; font-size: 13px; flex: 1; min-width: 160px; }
.donut-legend div { display: flex; align-items: center; gap: 8px; }
.donut-legend i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.donut-legend i.c0 { background: var(--chart-1); } .donut-legend i.c1 { background: var(--chart-2); } .donut-legend i.c2 { background: var(--chart-3); } .donut-legend i.c3 { background: var(--chart-4); } .donut-legend i.c4 { background: var(--chart-5); } .donut-legend i.c5 { background: var(--chart-6); }
.donut-legend span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tooltip { position: fixed; z-index: 100; pointer-events: none; padding: 8px 10px; border-radius: 10px; background: var(--text); color: var(--surface); font-size: 12px; box-shadow: var(--shadow-lg); white-space: nowrap; }
.tooltip b { display: block; margin-bottom: 2px; }

/* Lists */
.list { display: grid; grid-template-columns: minmax(0, 1fr); }
.list-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.list-row:last-child { border-bottom: 0; }
.list-row .grow { flex: 1; min-width: 0; }
.list-row .grow > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kv { display: grid; grid-template-columns: minmax(130px, 34%) 1fr; gap: 0; font-size: 13px; }
.kv dt { padding: 8px 0; color: var(--muted); border-bottom: 1px solid var(--border); }
.kv dd { margin: 0; padding: 8px 0; border-bottom: 1px solid var(--border); word-break: break-word; }
pre.json { margin: 0; padding: 14px; border-radius: 10px; background: var(--surface-3); overflow: auto; font: 12px/1.55 var(--mono); max-height: 420px; }

/* Releases */
.release { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.release:last-child { border-bottom: 0; }
.release .ver { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-strong); font-weight: 800; font-size: 12px; text-align: center; line-height: 1.1; }
.release .ver.off { background: var(--surface-3); color: var(--muted); }
.release h3 { font-size: 14.5px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.release .meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 4px; font-size: 12.5px; color: var(--muted); }
.release .actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.switch { position: relative; width: 38px; height: 22px; border-radius: 999px; border: 0; background: var(--border-strong); cursor: pointer; transition: background .15s; flex: none; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch.on { background: var(--ok); }
.switch.on::after { transform: translateX(16px); }

/* Upload wizard */
.drop { display: grid; place-items: center; gap: 6px; padding: 26px; border: 2px dashed var(--border-strong); border-radius: var(--radius-lg); background: var(--surface-2); text-align: center; color: var(--muted); cursor: pointer; transition: border-color .15s, background .15s; }
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.drop svg { width: 28px; height: 28px; color: var(--accent); }
.drop strong { color: var(--text); }
.drop input { display: none; }
.files { display: grid; gap: 8px; }
.file-pill { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--surface-3); font-size: 13px; }
.file-pill .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.form-grid .full { grid-column: 1 / -1; }
.progress { position: relative; height: 12px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.progress > div { height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--highlight)); transition: width .25s ease; }
.progress.active > div { background-image: linear-gradient(45deg, rgba(255,255,255,.22) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.22) 50%, rgba(255,255,255,.22) 75%, transparent 75%), linear-gradient(90deg, var(--accent), var(--highlight)); background-size: 22px 22px, auto; animation: stripes 1s linear infinite; }
.progress.indeterminate > div { width: 40% !important; animation: slide 1.2s ease-in-out infinite; }
@keyframes stripes { to { background-position: 22px 0, 0 0; } }
@keyframes slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(250%); } }
.upload-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.upload-stats div { padding: 10px 12px; border-radius: 10px; background: var(--surface-3); }
.upload-stats small { display: block; color: var(--muted); font-size: 11.5px; font-weight: 600; }
.upload-stats strong { font-size: 15px; font-variant-numeric: tabular-nums; }
.percent { font-size: 34px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.steps { display: flex; gap: 8px; flex-wrap: wrap; }
.step { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--surface-3); color: var(--muted); font-size: 12px; font-weight: 700; }
.step.done { background: var(--ok-soft); color: var(--ok); }
.step.now { background: var(--accent-soft); color: var(--accent-strong); }
.checks { display: grid; gap: 8px; }
.check-row { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; }
.check-row svg { width: 16px; height: 16px; margin-top: 2px; }
.check-row.ok svg { color: var(--ok); } .check-row.warn svg { color: var(--warn); } .check-row.danger svg { color: var(--danger); }
.notice { display: flex; gap: 10px; padding: 12px 14px; border-radius: 12px; font-size: 13px; background: var(--warn-soft); color: var(--text); }
.notice svg { color: var(--warn); margin-top: 1px; }
.notice.danger { background: var(--danger-soft); } .notice.danger svg { color: var(--danger); }
.notice.info { background: var(--info-soft); } .notice.info svg { color: var(--info); }
.notice.ok { background: var(--ok-soft); } .notice.ok svg { color: var(--ok); }

/* Modal, drawer, palette */
#layer > .backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(10, 14, 22, .48); backdrop-filter: blur(2px); animation: fade .15s ease; }
.modal { position: fixed; z-index: 41; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(640px, calc(100vw - 32px)); max-height: calc(100vh - 48px); display: flex; flex-direction: column; border-radius: var(--radius-xl); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg); animation: pop .16s ease; }
.modal.wide { width: min(820px, calc(100vw - 32px)); }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 18px 20px 12px; }
.modal-head h2 { flex: 1; font-size: 17px; }
.modal-body { padding: 4px 20px 16px; overflow-y: auto; display: grid; gap: 14px; grid-auto-rows: max-content; align-content: start; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px 18px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.drawer { position: fixed; z-index: 41; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); display: flex; flex-direction: column; background: var(--surface); border-left: 1px solid var(--border); box-shadow: var(--shadow-lg); animation: slidein .18s ease; }
.drawer .modal-body { flex: 1; padding-top: 8px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); padding: 0 20px; overflow-x: auto; }
.tab { padding: 10px 12px; border: 0; background: transparent; color: var(--muted); font: 600 13px var(--font); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.tab.active { color: var(--accent-strong); border-bottom-color: var(--accent); }
.palette { position: fixed; z-index: 41; left: 50%; top: 14vh; transform: translateX(-50%); width: min(560px, calc(100vw - 32px)); border-radius: var(--radius-xl); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg); overflow: hidden; animation: pop .14s ease; }
.palette input { border: 0; border-bottom: 1px solid var(--border); border-radius: 0; height: 52px; padding: 0 18px; font-size: 15px; background: var(--surface); box-shadow: none !important; }
.palette ul { list-style: none; margin: 0; padding: 6px; max-height: 50vh; overflow-y: auto; }
.palette li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; cursor: pointer; font-weight: 600; }
.palette li.active, .palette li:hover { background: var(--accent-soft); color: var(--accent-strong); }
.palette li small { margin-left: auto; color: var(--muted); font-weight: 500; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translate(-50%, -48%) scale(.98); } }
.palette { animation-name: fade; }
@keyframes slidein { from { transform: translateX(30px); opacity: 0; } }

/* Toasts */
.toasts { position: fixed; z-index: 60; right: 20px; bottom: 20px; display: grid; gap: 8px; width: min(380px, calc(100vw - 40px)); }
.toast { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg); font-size: 13px; animation: slidein .18s ease; }
.toast svg { margin-top: 1px; }
.toast.ok svg { color: var(--ok); } .toast.error svg { color: var(--danger); } .toast.info svg { color: var(--info); }

/* Services */
.service { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.service .grow { flex: 1; min-width: 0; }
.service strong { display: block; }

/* SQL */
.sql-editor { font: 13px/1.6 var(--mono); min-height: 160px; tab-size: 2; }
.live { display: inline-flex; align-items: center; gap: 8px; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); animation: pulse 1.6s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 60%, transparent); } 100% { box-shadow: 0 0 0 10px transparent; } }
.skeleton { height: 120px; border-radius: var(--radius-lg); background: linear-gradient(90deg, var(--surface-3), var(--surface-2), var(--surface-3)); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.stars { color: var(--highlight); letter-spacing: 1px; }
.section-title { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 4px 0 -4px; }

@media (max-width: 1100px) { .grid.wide-left { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 50; left: 0; width: 272px; transform: translateX(-100%); transition: transform .2s ease; }
  .sidebar.open { transform: none; box-shadow: var(--shadow-lg); }
  .mobile-only { display: inline-grid; }
  .topbar { padding: 12px 16px; }
  .content { padding: 16px; }
  .form-grid { grid-template-columns: 1fr; }
  .upload-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .release { grid-template-columns: auto 1fr; }
  .release .actions { grid-column: 1 / -1; justify-content: flex-start; }
  #last-updated { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
