/* =============================================================================
   Sagi Console — sistema visual
   Estrutura do Play Console (barra lateral por app, faixas de versão)
   + acabamento da App Store (títulos grandes, pílulas, cantos generosos).
   Elemento de marca: o anel de acreção de Sagittarius A* (logo, progresso, rollout).
   ========================================================================== */

:root {
  --ink: #17152a;          /* horizonte de eventos: texto */
  --ink-2: #4a4763;        /* texto secundário */
  --ink-3: #7c7996;        /* texto terciário */
  --paper: #f5f6fa;        /* fundo frio */
  --surface: #ffffff;
  --surface-2: #f0f1f7;
  --line: #e3e4ee;
  --amber: #f2741b;        /* disco de acreção: ação principal */
  --amber-ink: #b8500a;
  --amber-tint: #fff1e6;
  --violet: #6d5bf6;       /* fóton: links e análise */
  --violet-tint: #efedff;
  --green: #148a50;
  --green-tint: #e5f6ec;
  --red: #c9302c;
  --red-tint: #fdebea;
  --gold: #a46c00;
  --gold-tint: #fff5d9;
  --focus: 0 0 0 3px rgba(109, 91, 246, .35);
  --r-xl: 24px;
  --r-lg: 18px;
  --r-md: 12px;
  --r-sm: 8px;
  --shadow: 0 1px 2px rgba(23, 21, 42, .05), 0 8px 24px -12px rgba(23, 21, 42, .12);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #ecebf6;
    --ink-2: #b6b3cc;
    --ink-3: #8a87a3;
    --paper: #0d0c16;
    --surface: #171526;
    --surface-2: #211e33;
    --line: #2c2942;
    --amber: #ff8a33;
    --amber-ink: #ffb071;
    --amber-tint: rgba(255, 138, 51, .14);
    --violet: #9d90ff;
    --violet-tint: rgba(157, 144, 255, .14);
    --green: #4fd18b;
    --green-tint: rgba(79, 209, 139, .13);
    --red: #ff7a72;
    --red-tint: rgba(255, 122, 114, .13);
    --gold: #f2c14e;
    --gold-tint: rgba(242, 193, 78, .13);
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 30px -14px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 15px/1.5 var(--font);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--violet); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; }
p { margin: 0 0 .75em; }
code, .mono { font-family: var(--mono); font-size: .88em; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--r-sm); }
.i { width: 20px; height: 20px; flex: none; }
.i-sm { width: 16px; height: 16px; flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
.break { word-break: break-all; }
.hidden { display: none !important; }

/* ----------------------------------------------------------------- Shell -- */
.shell { display: grid; grid-template-columns: 272px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: var(--surface); border-right: 1px solid var(--line);
  padding: 18px 14px 24px; display: flex; flex-direction: column; gap: 6px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 14px; color: var(--ink); font-weight: 700; letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.brand svg { width: 30px; height: 30px; }
.brand small { display: block; font-weight: 500; color: var(--ink-3); font-size: 12px; letter-spacing: 0; }

.app-switch {
  display: flex; align-items: center; gap: 12px; padding: 10px; margin-bottom: 8px;
  border-radius: var(--r-lg); background: var(--surface-2); color: var(--ink);
}
.app-switch:hover { text-decoration: none; background: var(--line); }
.app-switch .appicon { width: 40px; height: 40px; }
.app-switch strong { display: block; font-size: 14px; line-height: 1.25; }
.app-switch span { display: block; font-size: 12px; color: var(--ink-3); max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.nav-group { margin-top: 10px; }
.nav-group > span { display: block; padding: 4px 12px 6px; font-size: 12px; font-weight: 600; color: var(--ink-3); }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 999px;
  color: var(--ink-2); font-weight: 500; font-size: 14px;
}
.nav a:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.nav a.is-active { background: var(--amber-tint); color: var(--amber-ink); font-weight: 600; }
.nav a .count { margin-left: auto; min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--violet); color: #fff; font-size: 12px; text-align: center; }
.sidebar-foot { margin-top: auto; padding-top: 16px; }

.scrim { display: none; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px;
  padding: 12px 32px; min-height: 60px;
  background: color-mix(in srgb, var(--paper) 78%, transparent);
  backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.crumbs { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ink-3); min-width: 0; }
.crumbs a { color: var(--ink-2); }
.crumbs .i-sm { opacity: .6; }
.topbar .spacer { flex: 1; }
.btn.menu-btn { display: none; }
.account { position: relative; }
.account summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 4px 6px 4px 4px; border-radius: 999px; }
.account summary::-webkit-details-marker { display: none; }
.account summary:hover { background: var(--surface-2); }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: #fff; background: linear-gradient(135deg, var(--amber), var(--violet)); }
.account-menu {
  position: absolute; right: 0; top: calc(100% + 8px); width: 280px; padding: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow);
}
.account-menu .who { padding: 10px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.account-menu .who strong { display: block; }
.account-menu a, .account-menu button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border-radius: var(--r-md);
  color: var(--ink); font: inherit; font-size: 14px; background: none; border: 0; cursor: pointer; text-align: left;
}
.account-menu a:hover, .account-menu button:hover { background: var(--surface-2); text-decoration: none; }

.content { padding: 28px 32px 64px; max-width: 1180px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-title { font-size: 32px; font-weight: 700; letter-spacing: -.025em; }
.page-sub { color: var(--ink-2); margin-top: 6px; max-width: 64ch; }
.section-title { font-size: 20px; font-weight: 700; letter-spacing: -.015em; margin: 32px 0 12px; }
.section-title:first-child { margin-top: 0; }

/* ----------------------------------------------------------------- Panels -- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 24px; }
.panel + .panel { margin-top: 16px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.panel-head h2, .panel-head h3 { font-size: 17px; font-weight: 650; letter-spacing: -.01em; }
.panel-flush { padding: 0; overflow: hidden; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

.stat { padding: 20px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.stat .label { font-size: 13px; color: var(--ink-3); }
.stat .value { font-size: 28px; font-weight: 700; letter-spacing: -.02em; margin-top: 4px; font-variant-numeric: tabular-nums; }

/* -------------------------------------------------------------- App icons -- */
.appicon {
  width: 56px; height: 56px; border-radius: 22.5%; flex: none; object-fit: cover;
  background: var(--surface-2); border: 1px solid var(--line);
  display: grid; place-items: center; color: var(--ink-3); font-weight: 700; overflow: hidden;
}
.appicon-lg { width: 96px; height: 96px; font-size: 32px; }
.appicon-sm { width: 36px; height: 36px; font-size: 13px; }

/* ----------------------------------------------------------------- Buttons -- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 18px; border-radius: 999px; border: 1px solid transparent;
  font: 600 14px/1 var(--font); cursor: pointer; white-space: nowrap;
  background: var(--surface-2); color: var(--ink); transition: background .15s, transform .05s;
}
.btn:hover { text-decoration: none; background: var(--line); }
.btn:active { transform: scale(.98); }
.btn[disabled], .btn.is-disabled { opacity: .5; pointer-events: none; }
.btn-primary { background: var(--amber); color: #fff; }
.btn-primary:hover { background: color-mix(in srgb, var(--amber) 88%, #000); }
.btn-violet { background: var(--violet); color: #fff; }
.btn-violet:hover { background: color-mix(in srgb, var(--violet) 88%, #000); }
.btn-outline { background: transparent; border-color: var(--line); }
.btn-outline:hover { background: var(--surface-2); }
.btn-ghost { background: transparent; color: var(--violet); padding: 0 10px; }
.btn-ghost:hover { background: var(--violet-tint); }
.btn-danger { background: var(--red-tint); color: var(--red); }
.btn-danger:hover { background: var(--red); color: #fff; }
.btn-sm { height: 32px; padding: 0 14px; font-size: 13px; }
.btn-lg { height: 48px; padding: 0 26px; font-size: 16px; }
.btn-block { width: 100%; }
.icon-btn { width: 40px; padding: 0; }
form.inline { display: inline; }

/* ------------------------------------------------------------------ Forms -- */
.field { display: block; margin-bottom: 18px; }
.field > label, .field > .label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.field .hint { font-size: 13px; color: var(--ink-3); margin-top: 6px; }
.field .error-text { font-size: 13px; color: var(--red); margin-top: 6px; }
.field-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.counter { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.counter.is-over { color: var(--red); font-weight: 600; }
.input, .select, .textarea {
  width: 100%; font: inherit; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 10px 14px; min-height: 44px; transition: border-color .15s, box-shadow .15s;
}
.textarea { min-height: 120px; resize: vertical; line-height: 1.55; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--violet); box-shadow: var(--focus); }
.has-error .input, .has-error .textarea, .has-error .select { border-color: var(--red); }
.input-code { font-family: var(--mono); font-size: 22px; letter-spacing: .3em; text-align: center; }
.check { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--amber); flex: none; }
.check small { display: block; color: var(--ink-3); font-size: 13px; }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 16px; }
.radio-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.radio-card { position: relative; display: block; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-lg); cursor: pointer; background: var(--surface); }
.radio-card input { position: absolute; opacity: 0; }
.radio-card strong { display: block; font-size: 15px; }
.radio-card span { font-size: 13px; color: var(--ink-3); }
.radio-card:has(input:checked) { border-color: var(--amber); box-shadow: 0 0 0 1px var(--amber) inset; background: var(--amber-tint); }
.radio-card:has(input:focus-visible) { box-shadow: var(--focus); }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; align-items: center; padding-top: 8px; flex-wrap: wrap; }
.form-sticky { position: sticky; bottom: 0; margin: 24px -24px -24px; padding: 14px 24px; background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: blur(10px); border-top: 1px solid var(--line); border-radius: 0 0 var(--r-xl) var(--r-xl); }
fieldset { border: 0; margin: 0; padding: 0; }
legend { font-weight: 600; margin-bottom: 8px; padding: 0; }

/* ---------------------------------------------------------------- Notices -- */
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r-lg); margin-bottom: 18px; font-size: 14px; }
.notice .i { margin-top: 1px; }
.notice p:last-child { margin-bottom: 0; }
.notice-success { background: var(--green-tint); color: var(--green); }
.notice-error { background: var(--red-tint); color: var(--red); }
.notice-info { background: var(--violet-tint); color: var(--violet); }
.notice-warn { background: var(--gold-tint); color: var(--gold); }
.notice strong { color: inherit; }
.notice-body { color: var(--ink); }

/* ------------------------------------------------------------------ Chips -- */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .8; }
.chip-plain::before { display: none; }
.chip-live, .chip-published, .chip-ready, .chip-clean, .chip-verified, .chip-approved { background: var(--green-tint); color: var(--green); }
.chip-in_review, .chip-processing, .chip-queued, .chip-pending { background: var(--violet-tint); color: var(--violet); }
.chip-rejected, .chip-invalid, .chip-malicious, .chip-suspended, .chip-removed { background: var(--red-tint); color: var(--red); }
.chip-halted, .chip-suspicious, .chip-unpublished, .chip-sensitive { background: var(--gold-tint); color: var(--gold); }
.chip-high { background: var(--red-tint); color: var(--red); }

/* ------------------------------------------------------------------ Tables -- */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-weight: 600; color: var(--ink-3); font-size: 13px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }
.cell-app { display: flex; align-items: center; gap: 12px; min-width: 220px; }
.cell-app strong { display: block; color: var(--ink); }
.cell-app span { font-size: 13px; color: var(--ink-3); }
a.cell-app:hover { text-decoration: none; }
a.cell-app:hover strong { color: var(--violet); }

.kv { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 10px 16px; font-size: 14px; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

/* ------------------------------------------------------------- Checklist -- */
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li + li { border-top: 1px solid var(--line); }
.checklist a { display: flex; align-items: center; gap: 14px; padding: 13px 4px; color: var(--ink); }
.checklist a:hover { text-decoration: none; color: var(--violet); }
.tick { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--line); flex: none; color: transparent; }
.tick .i-sm { width: 14px; height: 14px; }
.is-done .tick { background: var(--green); border-color: var(--green); color: #fff; }
.checklist .go { margin-left: auto; color: var(--ink-3); }

/* ------------------------------------------------- Anel de acreção (marca) -- */
.ring {
  --p: 0; --size: 64px; --stroke: 6px;
  width: var(--size); height: var(--size); border-radius: 50%; flex: none; position: relative;
  background: conic-gradient(from -90deg, #ffb15c, var(--amber) calc(var(--p) * .5%), var(--violet) calc(var(--p) * 1%), var(--surface-2) 0);
  display: grid; place-items: center;
}
.ring::before { content: ""; position: absolute; inset: var(--stroke); border-radius: 50%; background: var(--surface); }
.ring > span { position: relative; font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; }
.ring-lg { --size: 96px; --stroke: 8px; }
.ring-lg > span { font-size: 20px; }

/* --------------------------------------------------------------- Tracks -- */
.track-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 20px 24px; }
.track-card + .track-card { border-top: 1px solid var(--line); }
.track-dot { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-2); }
.track-production .track-dot { background: var(--amber-tint); color: var(--amber-ink); }
.track-card h3 { font-size: 16px; font-weight: 650; }
.track-card p { margin: 2px 0 0; font-size: 13.5px; color: var(--ink-3); }

.release-line { display: flex; align-items: center; gap: 16px; padding: 16px 0; }
.release-line + .release-line { border-top: 1px solid var(--line); }
.release-line .meta { flex: 1; min-width: 0; }
.release-line .meta strong { display: block; }

/* ------------------------------------------------------------- Dropzone -- */
.dropzone {
  border: 2px dashed var(--line); border-radius: var(--r-xl); padding: 32px; text-align: center;
  background: var(--surface-2); transition: border-color .15s, background .15s; cursor: pointer;
}
.dropzone:hover, .dropzone.is-over { border-color: var(--amber); background: var(--amber-tint); }
.dropzone .i { width: 32px; height: 32px; margin: 0 auto 10px; color: var(--amber); }
.dropzone strong { display: block; font-size: 16px; }
.upload-progress { display: flex; align-items: center; gap: 16px; margin-top: 16px; text-align: left; }

/* -------------------------------------------------------------- Media grid -- */
.media-grid { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-start; }
.media-item { position: relative; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); }
.media-item img { height: 180px; width: auto; }
.media-item.is-icon img { height: 96px; width: 96px; }
.media-item.is-feature img { height: 120px; }
.media-item form { position: absolute; top: 6px; right: 6px; }
.media-item .icon-btn { width: 30px; height: 30px; background: rgba(0, 0, 0, .55); color: #fff; }
.media-add { display: grid; place-items: center; min-width: 120px; height: 180px; border: 2px dashed var(--line); border-radius: var(--r-md); color: var(--ink-3); cursor: pointer; text-align: center; padding: 12px; font-size: 13px; }
.media-add:hover { border-color: var(--amber); color: var(--amber-ink); }
.media-add input { display: none; }

/* -------------------------------------------------------------- Reviews -- */
.stars { display: inline-flex; gap: 1px; color: var(--amber); }
.stars .i-sm { width: 15px; height: 15px; }
.stars .off { color: var(--line); }
.bars { display: grid; gap: 6px; }
.bar { display: grid; grid-template-columns: 14px minmax(0, 1fr) 48px; gap: 10px; align-items: center; font-size: 13px; color: var(--ink-3); }
.bar-track { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.bar-fill { height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--amber), var(--violet)); }
.review { padding: 18px 0; }
.review + .review { border-top: 1px solid var(--line); }
.review .reply { margin-top: 12px; padding: 12px 14px; border-radius: var(--r-md); background: var(--surface-2); font-size: 14px; }

/* ------------------------------------------------------------------ Chart -- */
.chart { display: flex; align-items: flex-end; gap: 3px; height: 180px; padding-top: 8px; }
.chart .col { flex: 1; min-width: 4px; height: 0; border-radius: 4px 4px 0 0; background: var(--amber); position: relative; }
.chart .col:hover { background: var(--violet); }
.chart-axis { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-3); margin-top: 6px; }

/* ---------------------------------------------------------------- Empty -- */
.empty { text-align: center; padding: 48px 24px; }
.empty .ring { margin: 0 auto 18px; }
.empty h2 { font-size: 22px; margin-bottom: 6px; letter-spacing: -.015em; }
.empty p { color: var(--ink-2); max-width: 46ch; margin: 0 auto 18px; }

/* --------------------------------------------------------------- App list -- */
.app-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.app-card { display: flex; gap: 16px; padding: 20px; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--line); color: var(--ink); }
.app-card:hover { text-decoration: none; box-shadow: var(--shadow); }
.app-card h3 { font-size: 17px; font-weight: 650; letter-spacing: -.01em; }
.app-card .pkg { font-size: 12.5px; color: var(--ink-3); overflow-wrap: anywhere; }
.app-card .chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }

/* ---------------------------------------------------------------- Inbox -- */
.inbox-item { display: flex; gap: 14px; padding: 16px 20px; color: var(--ink); align-items: flex-start; }
.inbox-item + .inbox-item { border-top: 1px solid var(--line); }
.inbox-item:hover { background: var(--surface-2); text-decoration: none; }
.inbox-item.is-unread strong { font-weight: 700; }
.inbox-item .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--violet); margin-top: 8px; flex: none; }
.inbox-item:not(.is-unread) .dot { background: transparent; }

/* ------------------------------------------------------------ Auth layout -- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.auth-visual {
  position: relative; overflow: hidden; padding: 48px; color: #ecebf6;
  background: radial-gradient(120% 90% at 30% 40%, #221d44 0%, #0d0c16 60%);
  display: flex; flex-direction: column; justify-content: space-between;
}
.auth-visual .brand { color: #fff; padding: 0; }
.auth-visual .brand small { color: #a9a6c4; }
.horizon { position: absolute; left: 50%; top: 50%; width: min(76vh, 620px); aspect-ratio: 1; transform: translate(-50%, -52%); pointer-events: none; }
.horizon .disk {
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 200deg, transparent 0 8%, #ffb15c 18%, #f2741b 30%, #6d5bf6 52%, transparent 66%, #ff8a33 82%, transparent 92%);
  -webkit-mask: radial-gradient(closest-side, transparent 47%, #000 49%, #000 60%, transparent 72%);
          mask: radial-gradient(closest-side, transparent 47%, #000 49%, #000 60%, transparent 72%);
  transform: rotateX(68deg) rotateZ(-18deg); filter: blur(1.5px) saturate(1.2);
  animation: spin 60s linear infinite;
}
.horizon .core { position: absolute; inset: 31%; border-radius: 50%; background: #05040a; box-shadow: 0 0 0 2px rgba(255, 177, 92, .35), 0 0 80px 10px rgba(242, 116, 27, .25); }
@keyframes spin { to { transform: rotateX(68deg) rotateZ(342deg); } }
@media (prefers-reduced-motion: reduce) { .horizon .disk { animation: none; } }
.auth-visual .claim { position: relative; max-width: 30ch; }
.auth-visual .claim h2 { font-size: 34px; letter-spacing: -.03em; line-height: 1.1; margin-bottom: 12px; }
.auth-visual .claim p { color: #b6b3cc; }
.auth-form { display: grid; place-items: center; padding: 40px 24px; background: var(--surface); }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h1 { font-size: 30px; letter-spacing: -.025em; margin-bottom: 6px; }
.auth-card .lead { color: var(--ink-2); margin-bottom: 24px; }
.auth-links { margin-top: 18px; font-size: 14px; color: var(--ink-3); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

.qr { width: 196px; height: 196px; padding: 10px; background: #fff; border-radius: var(--r-md); border: 1px solid var(--line); }
.qr img, .qr canvas, .qr svg { width: 100%; height: 100%; image-rendering: pixelated; }
.codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 18px; font-family: var(--mono); font-size: 15px; padding: 16px; border-radius: var(--r-md); background: var(--surface-2); }

dialog { border: 0; border-radius: var(--r-xl); padding: 24px; max-width: 460px; width: calc(100% - 32px); background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(13, 12, 22, .5); backdrop-filter: blur(3px); }
dialog h3 { font-size: 19px; margin-bottom: 8px; }

/* ------------------------------------------------------------ Responsivo -- */
@media (max-width: 1080px) {
  .split { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 40; left: 0; top: 0; width: 290px; transform: translateX(-100%); transition: transform .2s ease; box-shadow: var(--shadow); }
  .shell.nav-open .sidebar { transform: none; }
  .shell.nav-open .scrim { display: block; position: fixed; inset: 0; z-index: 30; background: rgba(13, 12, 22, .45); }
  .btn.menu-btn { display: inline-flex; }
  .topbar { padding: 10px 16px; }
  .content { padding: 20px 16px 48px; }
  .auth { grid-template-columns: 1fr; }
  .auth-visual { min-height: 220px; padding: 28px; }
  .auth-visual .claim { display: none; }
  .horizon { width: 300px; }
}
@media (max-width: 640px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat { padding: 14px; }
  .stat .value { font-size: 22px; }
  .panel.panel-flush { padding: 0; }
  .track-card { padding: 16px 18px; }
  .page-title { font-size: 26px; }
  .panel { padding: 18px; border-radius: var(--r-lg); }
  .form-sticky { margin: 18px -18px -18px; padding: 12px 18px; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .kv dd { margin-bottom: 10px; }
  .track-card { grid-template-columns: auto minmax(0, 1fr); }
  .track-card > :last-child { grid-column: 1 / -1; }
  .crumbs .crumb-mid { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

.grow { flex: 1; min-width: 0; }
.prewrap { white-space: pre-wrap; }
.section-gap { margin-top: 20px; }
.panel-head.pad { padding: 20px 24px 4px; margin: 0; }
a.link-row { color: var(--ink); }
a.link-row:hover { text-decoration: none; background: var(--surface-2); }
.lang-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.lang-tabs a { padding: 7px 14px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); font-size: 14px; font-weight: 500; }
.lang-tabs a.is-active { background: var(--ink); color: var(--surface); }
.lang-tabs a:hover { text-decoration: none; }
.preview { position: sticky; top: 84px; }
.phone { border-radius: 36px; padding: 14px; background: var(--ink); box-shadow: var(--shadow); }
.phone-screen { border-radius: 26px; background: var(--surface); padding: 22px 18px; min-height: 420px; color: var(--ink); }
.pv-head { display: flex; gap: 14px; align-items: center; }
.pv-head h3 { font-size: 19px; letter-spacing: -.015em; }
.pv-head p { margin: 2px 0 8px; font-size: 13px; color: var(--ink-3); }
.pill-get { display: inline-flex; align-items: center; height: 30px; padding: 0 18px; border-radius: 999px; background: var(--amber); color: #fff; font-weight: 700; font-size: 13px; }
.pv-shots { display: flex; gap: 8px; overflow: hidden; margin: 16px 0; }
.pv-shots img { height: 150px; width: auto; border-radius: 12px; border: 1px solid var(--line); }
.pv-desc { font-size: 13px; color: var(--ink-2); white-space: pre-wrap; max-height: 120px; overflow: hidden; }
.is-sending { opacity: .6; pointer-events: none; }
.section-gap-sm { margin-bottom: 8px; }
.bar.bar-wide { grid-template-columns: 64px minmax(0, 1fr) 56px; }
.pad-sm { padding: 8px 12px 10px; }
.track-card h3 a { color: inherit; }

/* =============================================================================
   Administração (revisão, denúncias, editorial)
   ========================================================================== */
.mt { margin-top: 20px; }
.mt-sm { margin-top: 10px; }
.pad { padding: 20px 24px; }
.pad-x { padding-left: 24px; padding-right: 24px; }
.pad-b { padding-bottom: 20px; }
.panel-flush > .panel-head.pad { margin-bottom: 0; border-bottom: 1px solid var(--line); }
.gap-sm { gap: 6px; }
.grow { flex: 1 1 260px; }
.pre { white-space: pre-line; overflow-wrap: anywhere; }
.sep { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
.sub-title { font-size: 15px; font-weight: 650; margin: 20px 0 10px; }
.sub-title:first-child { margin-top: 0; }
ul.tight { margin: 6px 0 0; padding-left: 18px; }
.stat-link { display: block; color: var(--ink); }
.stat-link:hover { text-decoration: none; box-shadow: var(--shadow); }
.kv-tight { grid-template-columns: 130px minmax(0, 1fr); gap: 8px 12px; }
.kv .kv-sub { padding-left: 14px; font-size: 13px; }
.sticky-aside { position: sticky; top: 76px; }
.table-compact td, .table-compact th { padding: 10px 12px; }
.mini-item { padding: 10px 0; }
.mini-item + .mini-item { border-top: 1px solid var(--line); }
.mini-item p { margin: 6px 0 0; }
.check-line { display: flex; align-items: center; gap: 14px; padding: 11px 4px; }

.filters { display: flex; flex-wrap: wrap; gap: 0 14px; align-items: flex-end; margin-bottom: 16px; padding: 18px 20px 0; }
.filters .field { margin-bottom: 18px; }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tab { padding: 8px 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); font-weight: 600; font-size: 14px; }
.tab:hover { text-decoration: none; background: var(--surface-2); }
.tab.is-active { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* Rascunho × publicado */
.compare { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.compare-head, .compare-row { display: grid; grid-template-columns: 170px minmax(0, 1fr) minmax(0, 1fr); }
.compare-head { background: var(--surface-2); font-size: 13px; }
.compare-head > * { padding: 10px 14px; }
.compare-row { border-top: 1px solid var(--line); }
.compare-row.is-changed { background: color-mix(in srgb, var(--violet-tint) 55%, transparent); }
.compare-label { padding: 12px 14px; font-size: 13px; color: var(--ink-3); font-weight: 600; }
.compare-cell { padding: 12px 14px; font-size: 14px; min-width: 0; overflow-wrap: anywhere; border-left: 1px solid var(--line); }
.prose-box { max-height: 280px; overflow: auto; font-size: 13.5px; line-height: 1.55; padding-right: 6px; }
.media-item.is-thumb img { height: 120px; }
.media-item.is-thumb.is-icon img { height: 64px; width: 64px; }
.media-item.is-thumb.is-feature img { height: 72px; }

/* Permissões */
.perm-list { list-style: none; margin: 0; padding: 0; }
.perm { padding: 12px 0; }
.perm + .perm { border-top: 1px solid var(--line); }
.perm-high { padding-left: 12px; border-left: 3px solid var(--red); }
.perm-high + .perm-high { border-top-color: transparent; }
.justify { margin-top: 8px; padding: 10px 12px; border-radius: var(--r-md); background: var(--surface-2); font-size: 14px; }
.justify p { margin: 4px 0 0; }
.justify.is-missing { background: var(--red-tint); color: var(--red); }

/* Denúncias */
.report-body { margin-top: 12px; }
.decide { margin-top: 8px; }
.decide > summary { list-style: none; cursor: pointer; }
.decide > summary::-webkit-details-marker { display: none; }
.decide[open] > summary { margin-bottom: 14px; }
.decide-form { padding-top: 6px; }

/* Editorial */
.story-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.story-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); overflow: hidden; display: flex; flex-direction: column; }
.story-cover { display: block; aspect-ratio: 16 / 10; background: radial-gradient(120% 90% at 30% 40%, #221d44 0%, #0d0c16 60%); }
.story-cover img { width: 100%; height: 100%; object-fit: cover; }
.story-cover-empty { display: grid; place-items: center; height: 100%; color: #ffb15c; }
.story-cover-empty .i { width: 36px; height: 36px; }
.story-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; }
.story-body h3 { font-size: 18px; letter-spacing: -.015em; }
.story-body h3 a { color: var(--ink); }
.cover-preview { max-width: 420px; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); margin-bottom: 8px; }
.textarea-lg { min-height: 220px; }

@media (max-width: 1080px) { .sticky-aside { position: static; } }
@media (max-width: 640px) {
  .compare-head { display: none; }
  .compare-row { grid-template-columns: 1fr; }
  .compare-cell { border-left: 0; padding-top: 4px; }
  .compare-cell::before { content: attr(data-side); display: block; font-size: 12px; color: var(--ink-3); margin-bottom: 2px; }
  .kv-tight { grid-template-columns: 1fr; }
  .filters .field { flex: 1 1 100%; }
  .pad { padding: 16px 18px; }
  .pad-x { padding-left: 18px; padding-right: 18px; }
}
.media-grid:has(.is-icon) .media-add { height: 96px; min-width: 96px; }
.media-grid:has(.is-feature) .media-add { height: 120px; }
