/* SDR Radar: tokens e componentes. Um tema por página, claro por padrão com modo escuro automático. */
@font-face { font-family: "Geist"; src: url("/static/fonts/geist-latin.woff2") format("woff2"); font-weight: 300 800; font-display: swap; }

:root {
  --bg: #f7f7f8; --surface: #ffffff; --surface-2: #f0f0f2; --line: #e4e4e7; --line-strong: #d4d4d8;
  --text: #17171a; --muted: #5b5b64; --faint: #8a8a94;
  --accent: #e4213d; --accent-ink: #ffffff; --accent-soft: #fdecef; --accent-deep: #c4172f;
  --ok: #1f8a4c; --ok-soft: #e6f5ec; --warn: #a15c00; --warn-soft: #fff3df; --err: #b3261e; --err-soft: #fbe9e7;
  --radius: 14px; --radius-sm: 10px; --pill: 999px;
  --shadow: 0 1px 2px rgb(23 23 26 / .04), 0 12px 32px -18px rgb(23 23 26 / .18);
  --ease: cubic-bezier(.16,1,.3,1);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #101013; --surface: #17171b; --surface-2: #1f1f24; --line: #27272d; --line-strong: #34343b;
    --text: #f2f2f4; --muted: #a8a8b3; --faint: #74747f;
    --accent: #ff3b57; --accent-ink: #ffffff; --accent-soft: #3a1219; --accent-deep: #ff5c73;
    --ok: #4cc274; --ok-soft: #12301c; --warn: #f0b35a; --warn-soft: #33260e; --err: #ff7b72; --err-soft: #3a1512;
    --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 12px 32px -18px rgb(0 0 0 / .6);
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }

/* Logo lockup */
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.logo svg { height: 28px; width: auto; }
.logo b { font-weight: 800; letter-spacing: .18em; font-size: 15px; line-height: 1; }
.logo b small { display: block; font-weight: 500; letter-spacing: .34em; font-size: 8.5px; margin-top: 3px; color: var(--muted); }

/* Botões */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: var(--pill);
  border: 1px solid transparent; font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .18s var(--ease), background .18s, border-color .18s, color .18s; background: var(--surface-2); color: var(--text); }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-deep); }
.btn-ghost { background: transparent; border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-sm { padding: 7px 13px; font-size: 13.5px; }
.btn-xs { padding: 4px 10px; font-size: 12.5px; }
.btn-danger { background: var(--err-soft); color: var(--err); }
.btn[disabled], .btn.disabled { opacity: .45; pointer-events: none; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* Formulários */
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label { font-size: 13.5px; font-weight: 600; color: var(--text); }
.field .help { font-size: 12.5px; color: var(--muted); }
.field input, .field select, .field textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); outline: none; transition: border-color .15s, box-shadow .15s; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field input::placeholder, .field textarea::placeholder { color: var(--faint); }
.field textarea { min-height: 120px; resize: vertical; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); }

/* Utilidades */
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: 13px; } .mono { font-variant-numeric: tabular-nums; }
.stack { display: grid; gap: 12px; } .row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; } .right { margin-left: auto; }
.tag { display: inline-block; padding: 2px 9px; border-radius: var(--pill); font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--muted); }
.tag-ok { background: var(--ok-soft); color: var(--ok); } .tag-warn { background: var(--warn-soft); color: var(--warn); }
.tag-err { background: var(--err-soft); color: var(--err); } .tag-accent { background: var(--accent-soft); color: var(--accent); }
.flash { padding: 12px 16px; border-radius: var(--radius-sm); background: var(--ok-soft); color: var(--ok); font-weight: 500; margin-bottom: 18px; }
.flash.erro { background: var(--err-soft); color: var(--err); }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }

/* ---------- Página pública (link personalizado) ---------- */
.pub { max-width: 1120px; margin: 0 auto; padding: 0 20px 80px; }
.pub-top { height: 68px; display: flex; align-items: center; justify-content: space-between; }
.pub-top .kicker { font-size: 13px; color: var(--muted); font-weight: 500; }
.hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 48px; align-items: center; padding: 28px 0 56px; }
.hero h1 { font-size: clamp(38px, 6vw, 68px); font-weight: 700; letter-spacing: -0.035em; line-height: .98; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .sub { margin-top: 20px; font-size: 18px; color: var(--muted); max-width: 46ch; line-height: 1.5; }
.hero .sub strong { color: var(--text); font-weight: 600; }
.hero .ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.hero-art { position: relative; aspect-ratio: 4 / 5; border-radius: 22px; overflow: hidden; background: var(--surface-2); box-shadow: var(--shadow); }
.hero-art img { width: 100%; height: 100%; object-fit: cover; }
.hero-art.vazia { display: grid; place-items: center; color: var(--faint); font-size: 14px; }
.hero-art .nome { position: absolute; left: 18px; bottom: 16px; color: #fff; font-weight: 700; font-size: 22px; letter-spacing: -0.02em; text-shadow: 0 2px 18px rgb(0 0 0 / .55); }

.player { display: grid; grid-template-columns: 56px 1fr; gap: 16px; align-items: center; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.player .play { width: 56px; height: 56px; border-radius: 50%; background: var(--accent); color: #fff; border: 0; cursor: pointer; display: grid; place-items: center; transition: transform .18s var(--ease), background .18s; }
.player .play:hover { transform: scale(1.04); background: var(--accent-deep); }
.player .play svg { width: 22px; height: 22px; }
.player .play svg[hidden] { display: none; }
.player .meta b { display: block; font-size: 15px; }
.player .meta span { font-size: 13px; color: var(--muted); }
.player .bar { grid-column: 1 / -1; height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; cursor: pointer; }
.player .bar i { display: block; height: 100%; width: 0; background: var(--accent); }
.player .tempo { grid-column: 1 / -1; display: flex; justify-content: space-between; font-size: 12px; color: var(--faint); margin-top: -8px; }

.secao { padding: 40px 0 0; }
.secao h2 { font-size: 24px; margin-bottom: 18px; }
.release { max-width: 66ch; font-size: 17px; line-height: 1.65; color: var(--text); }
.release p + p { margin-top: 16px; }
.links { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.links a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); text-decoration: none; font-weight: 600; transition: border-color .18s, transform .18s var(--ease); }
.links a:hover { border-color: var(--accent); transform: translateY(-2px); }
.links a span { color: var(--faint); font-weight: 400; font-size: 13px; }
.contato-box { margin-top: 48px; padding: 32px; border-radius: 22px; background: var(--text); color: var(--bg); display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; }
.contato-box h2 { color: inherit; font-size: 26px; margin: 0 0 8px; }
.contato-box p { opacity: .75; max-width: 48ch; }
.pub-foot { margin-top: 56px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; gap: 18px; flex-wrap: wrap; align-items: center; font-size: 13px; color: var(--faint); }
.pub-foot a { color: var(--muted); }

@media (prefers-reduced-motion: no-preference) {
  .rise { opacity: 0; transform: translateY(18px); animation: rise .8s var(--ease) forwards; }
  .rise.d1 { animation-delay: .08s } .rise.d2 { animation-delay: .18s } .rise.d3 { animation-delay: .3s }
  @keyframes rise { to { opacity: 1; transform: none; } }
}
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; gap: 26px; padding-top: 10px; }
  .hero-art { order: -1; aspect-ratio: 4 / 3; }
  .contato-box { grid-template-columns: 1fr; padding: 24px; }
  .pub { padding-inline: 16px; }
}

/* ---------- Painel ---------- */
.adm { display: grid; grid-template-columns: 232px 1fr; min-height: 100dvh; }
.side { border-right: 1px solid var(--line); padding: 22px 18px; background: var(--surface); position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; gap: 22px; }
.side nav { display: grid; gap: 2px; }
.side nav a { padding: 9px 12px; border-radius: var(--radius-sm); text-decoration: none; color: var(--muted); font-weight: 500; font-size: 14.5px; display: flex; gap: 10px; align-items: center; }
.side nav a svg { width: 18px; height: 18px; }
.side nav a:hover { background: var(--surface-2); color: var(--text); }
.side nav a.ativo { background: var(--accent-soft); color: var(--accent); }
.side .fim { margin-top: auto; font-size: 12.5px; color: var(--faint); }
.main { padding: 30px 36px 60px; max-width: 1340px; width: 100%; }
.main > header { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 26px; flex-wrap: wrap; }
.main > header h1 { font-size: 26px; }
.main > header p { color: var(--muted); margin-top: 4px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.card h3 { font-size: 15px; margin-bottom: 14px; }
.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)); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.kpi { padding: 16px 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.kpi b { display: block; font-size: 28px; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.kpi span { font-size: 13px; color: var(--muted); }
table.tb { width: 100%; border-collapse: collapse; font-size: 14px; }
.tb th { text-align: left; font-weight: 600; font-size: 12.5px; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tb td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tb tr:last-child td { border-bottom: 0; }
.tb tr:hover td { background: var(--surface-2); }
.tb a.nome { font-weight: 600; text-decoration: none; }
.tb .sub { display: block; font-size: 12.5px; color: var(--muted); }
.filtros { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; margin-bottom: 18px; }
.filtros .field { margin: 0; min-width: 140px; }
.filtros input, .filtros select { padding: 8px 10px; }
.pagin { display: flex; gap: 6px; align-items: center; margin-top: 16px; font-size: 14px; }
.pagin a { padding: 6px 10px; border-radius: 8px; text-decoration: none; border: 1px solid var(--line); }
.prog { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.prog i { display: block; height: 100%; background: var(--accent); transition: width .4s; }
pre.log { background: var(--surface-2); border-radius: var(--radius-sm); padding: 12px; font-size: 12px; max-height: 240px; overflow: auto; white-space: pre-wrap; margin: 0; }
.login-wrap { min-height: 100dvh; display: grid; place-items: center; padding: 20px; }
.login { width: 100%; max-width: 380px; }
.login .logo { margin-bottom: 28px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; flex-wrap: wrap; }
.tabs a { padding: 9px 12px; text-decoration: none; color: var(--muted); font-weight: 500; font-size: 14px; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.ativo { color: var(--accent); border-color: var(--accent); }
.lancar { border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); padding: 22px; display: grid; gap: 14px; }
.lancar h3 { font-size: 17px; margin: 0; }
details.mais summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--muted); }
@media (max-width: 900px) {
  .adm { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; align-items: center; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid var(--line); }
  .side nav { display: flex; flex-wrap: wrap; }
  .side .fim { display: none; }
  .main { padding: 20px 16px 50px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .tb-wrap { overflow-x: auto; }
}
