/* =========================================================
   Sorteios · Prodigium Labs
   Direção: console de segurança / placar de CTF.
   Cantos chanfrados ecoam o escudo da marca; pixels vêm da logo.
   ========================================================= */
@font-face { font-family: "Chakra Petch"; font-weight: 500; font-display: swap; src: url("../fonts/chakra-petch-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Chakra Petch"; font-weight: 600; font-display: swap; src: url("../fonts/chakra-petch-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Chakra Petch"; font-weight: 700; font-display: swap; src: url("../fonts/chakra-petch-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url("../fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-display: swap; src: url("../fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); }

:root {
  /* paleta (derivada da logo) */
  --abyss: #060a13;
  --hull: #0d1524;
  --hull-2: #121d31;
  --circuit: #1f2c47;
  --circuit-2: #2c3d61;
  --frost: #e6eef8;
  --steel: #8592ad;
  --emerald: #1ed47f;
  --cyan: #19c6d6;
  --ember: #ff6a13;
  --ember-2: #ff8c3f;
  --alert: #ff4f6d;
  --amber: #f5b13d;

  /* legado (usado em alguns trechos) */
  --text: var(--frost); --muted: var(--steel); --teal: var(--cyan); --green: var(--emerald);
  --orange: var(--ember); --orange-2: var(--ember-2); --danger: var(--alert); --warning: var(--amber);
  --line: var(--circuit); --line-strong: var(--circuit-2);

  --display: "Chakra Petch", "Rajdhani", system-ui, sans-serif;
  --body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --cut: 16px;
  --chamfer: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--body); font-size: 16px; line-height: 1.55;
  background: var(--abyss); color: var(--frost);
  -webkit-font-smoothing: antialiased; min-height: 100vh;
}
a { color: var(--cyan); text-decoration: none; }
a:hover { color: #7ce9f2; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.15; margin: 0 0 .4em; letter-spacing: .005em; }
p { margin: 0 0 1em; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
::selection { background: rgba(25, 198, 214, .35); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.bi { line-height: 1; vertical-align: -.125em; }

/* ---------- fundo: campo de pixels da marca + marca d'água do escudo ---------- */
.bg-tech { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden;
  background:
    radial-gradient(1200px 520px at 50% -180px, rgba(25, 198, 214, .10), transparent 70%),
    var(--abyss);
}
.bg-tech::before { /* malha de pixels esparsa */
  content: ""; position: absolute; inset: 0; opacity: .5;
  background-image:
    radial-gradient(rgba(133, 146, 173, .16) 1px, transparent 1.4px);
  background-size: 22px 22px;
  mask-image: linear-gradient(180deg, #000, transparent 85%);
}
.bg-mark { position: absolute; right: -120px; bottom: -80px; width: 560px; opacity: .05; transform: rotate(-8deg); filter: grayscale(.2); }
.pixels i { position: absolute; display: block; width: 10px; height: 10px; }
.pixels i:nth-child(1) { top: 14%; left: 7%; background: var(--ember); }
.pixels i:nth-child(2) { top: 14%; left: calc(7% + 18px); background: var(--cyan); width: 6px; height: 6px; top: calc(14% + 22px); }
.pixels i:nth-child(3) { bottom: 22%; right: 9%; background: var(--cyan); }
.pixels i:nth-child(4) { bottom: calc(22% + 20px); right: calc(9% + 22px); background: var(--ember); width: 6px; height: 6px; }
.pixels i:nth-child(5) { top: 62%; left: 5%; background: var(--emerald); width: 6px; height: 6px; }
.pixels i:nth-child(6) { display: none; }

/* ---------- painel chanfrado (substitui o "card" genérico) ---------- */
.card { position: relative; isolation: isolate; padding: 24px; }
.card::before, .card::after { content: ""; position: absolute; clip-path: var(--chamfer); pointer-events: none; }
.card::before { inset: 0; z-index: -2; background: var(--circuit); }
.card::after { inset: 1px; z-index: -1; background: linear-gradient(180deg, var(--hull-2), var(--hull) 140px); }
/* variante com destaque: a borda acende perto do canto cortado */
.card-glow::before { background: radial-gradient(circle at 0 0, var(--cyan) 0 72px, var(--circuit) 73px); }
.card-glow { --cut: 22px; }

/* ---------- botões ---------- */
.btn {
  --cut: 9px;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--display); font-weight: 600; font-size: .98rem; letter-spacing: .02em;
  padding: 11px 20px; border: 0; cursor: pointer; text-decoration: none; white-space: nowrap;
  color: #031418; background: var(--cyan);
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  transition: background .15s, color .15s, box-shadow .15s;
}
.btn:hover { background: #4fdbe7; color: #031418; }
.btn:active { background: #12a9b7; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn .bi { font-size: 1.1em; }
.btn-orange { background: var(--ember); color: #1a0700; }
.btn-orange:hover { background: var(--ember-2); color: #1a0700; }
/* ações secundárias: retas, só com contorno (o chanfro fica para a ação principal) */
.btn-ghost, .btn-danger { clip-path: none; border-radius: 2px; padding: 10px 18px; }
.btn-ghost { background: rgba(255, 255, 255, .02); color: var(--frost); border: 1px solid var(--circuit-2); }
.btn-ghost:hover { background: rgba(25, 198, 214, .08); color: #fff; border-color: var(--cyan); }
.btn-danger { background: transparent; color: #ff9aac; border: 1px solid rgba(255, 79, 109, .55); }
.btn-ghost.btn-sm, .btn-danger.btn-sm { padding: 6px 11px; }
.btn-danger:hover { background: rgba(255, 79, 109, .12); color: #ffc2cd; }
.btn-sm { --cut: 7px; padding: 7px 12px; font-size: .86rem; }
.btn-lg { --cut: 12px; padding: 15px 24px; font-size: 1.06rem; }
.btn-block { width: 100%; }

/* ---------- etiquetas de estado ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 7px; padding: 3px 9px; border-radius: 2px;
  font-size: .78rem; font-weight: 500; border: 1px solid; white-space: nowrap;
}
.badge::before { content: ""; width: 6px; height: 6px; background: currentColor; }
.badge-open, .badge-valid { color: var(--emerald); border-color: rgba(30, 212, 127, .4); background: rgba(30, 212, 127, .07); }
.badge-open::before { animation: blink 1.6s steps(2, start) infinite; }
@keyframes blink { to { visibility: hidden; } }
.badge-closed { color: var(--amber); border-color: rgba(245, 177, 61, .4); background: rgba(245, 177, 61, .07); }
.badge-archived { color: var(--steel); border-color: var(--circuit-2); background: transparent; }
.badge-absent { color: #ff9aac; border-color: rgba(255, 79, 109, .4); background: rgba(255, 79, 109, .07); }

/* ---------- formulários ---------- */
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 500; font-size: .9rem; margin-bottom: 6px; color: #c9d4e8; }
.field .hint { font-size: .8rem; color: var(--steel); margin-top: 6px; }
.input, textarea.input, select.input {
  width: 100%; font: inherit; font-size: 1rem; color: var(--frost);
  background: var(--abyss); border: 1px solid var(--circuit-2); border-radius: 3px;
  padding: 12px 14px; transition: border-color .15s, box-shadow .15s;
}
textarea.input { min-height: 100px; resize: vertical; }
.input::placeholder { color: #55617d; }
.input:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(25, 198, 214, .18); }
.field.has-error .input { border-color: var(--alert); }
.field-error { display: flex; align-items: center; gap: 6px; color: #ff9aac; font-size: .82rem; margin-top: 6px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .86rem; color: #b9c4da; cursor: pointer; }
.check span { font-weight: 400; }
.check input { margin-top: 3px; width: 17px; height: 17px; accent-color: var(--cyan); flex: none; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
input[type="file"].input { padding: 9px; font-size: .9rem; }
input[type="file"].input::file-selector-button { font: inherit; font-family: var(--display); font-weight: 600; margin-right: 12px; padding: 6px 12px; border: 0; border-radius: 2px; background: var(--circuit-2); color: var(--frost); cursor: pointer; }
.input-icon { position: relative; }
.input-icon > .bi { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #5d6a88; font-size: 1.05rem; pointer-events: none; transition: color .15s; }
.input-icon .input { padding-left: 42px; }
.input-icon:focus-within > .bi { color: var(--cyan); }
.field.has-error .input-icon > .bi { color: #ff9aac; }

.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 3px; margin-bottom: 18px; font-size: .92rem; border: 1px solid; border-left-width: 3px; }
.alert .bi { font-size: 1.05rem; margin-top: 2px; flex: none; }
.alert-success { background: rgba(30, 212, 127, .07); border-color: rgba(30, 212, 127, .35); border-left-color: var(--emerald); color: #a6f0c9; }
.alert-error { background: rgba(255, 79, 109, .07); border-color: rgba(255, 79, 109, .35); border-left-color: var(--alert); color: #ffc2cd; }
.alert-warning { background: rgba(245, 177, 61, .07); border-color: rgba(245, 177, 61, .35); border-left-color: var(--amber); color: #ffdf9e; }

.muted { color: var(--steel); }
.mono { font-variant-numeric: tabular-nums; }
.grad-text { color: var(--cyan); }
.m0 { margin: 0 !important; }
.tiny { font-size: .78rem; }
.debug { white-space: pre-wrap; font-family: var(--mono); font-size: .72rem; overflow: auto; max-height: 50vh; }

/* =========================================================
   PÁGINAS PÚBLICAS (celular primeiro)
   ========================================================= */
.pub { min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: clamp(18px, 5vh, 52px) 16px 22px; }
.pub-card { width: 100%; max-width: 480px; padding: clamp(24px, 6vw, 34px) clamp(20px, 6vw, 32px) clamp(24px, 6vw, 30px); }
.pub-head { margin-bottom: 26px; }
.pub-logo-wrap {
  --cut: 12px; width: 92px; height: 92px; margin-bottom: 20px; padding: 10px;
  display: grid; place-items: center; background: var(--abyss);
  clip-path: var(--chamfer); box-shadow: inset 0 0 0 1px var(--circuit-2);
}
.pub-logo { width: 100%; height: 100%; object-fit: contain; }
.eyebrow { display: flex; align-items: center; gap: 9px; color: var(--ember-2); font-weight: 500; font-size: .95rem; margin-bottom: 6px; }
.eyebrow::before { content: ""; width: 8px; height: 8px; background: var(--ember); flex: none; }
.pub-head h1 { font-size: clamp(1.75rem, 7vw, 2.25rem); margin-bottom: 10px; }
.pub-desc { color: #b4bfd6; white-space: pre-line; font-size: .97rem; margin: 0; max-width: 46ch; }
.pub-form { border-top: 1px solid var(--circuit); padding-top: 24px; }
.form-foot { display: flex; gap: 8px; align-items: flex-start; font-size: .82rem; margin: 16px 0 0; color: var(--steel); }
.form-foot .bi { color: var(--emerald); margin-top: 2px; }
.pub-foot { margin-top: auto; padding-top: 30px; display: flex; align-items: center; gap: 10px; color: var(--steel); font-size: .82rem; }
.pub-foot img { height: 30px; width: auto; }
.pub-actions { display: flex; margin-top: 20px; }

.success-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin: -4px 0 18px; border-left: 3px solid var(--emerald); background: rgba(30, 212, 127, .06); }
.success-head .bi { font-size: 1.5rem; color: var(--emerald); }
.success-head strong { display: block; font-family: var(--display); font-size: 1.1rem; }
.success-head span { display: block; font-size: .86rem; color: var(--steel); }

/* bilhete com o número da sorte */
.ticket { --cut: 14px; position: relative; isolation: isolate; }
.ticket::before, .ticket::after { content: ""; position: absolute; clip-path: var(--chamfer); }
.ticket::before { inset: 0; z-index: -2; background: radial-gradient(circle at 100% 100%, var(--ember) 0 54px, var(--circuit-2) 55px); }
.ticket::after { inset: 1px; z-index: -1; background: var(--abyss); }
.ticket-main { padding: 18px 18px 16px; }
.ticket-label { display: flex; align-items: center; gap: 8px; font-size: .88rem; color: var(--cyan); font-weight: 500; }
.ticket-name { font-family: var(--display); font-weight: 600; font-size: 1.15rem; overflow-wrap: anywhere; }
.ticket-cut { height: 0; border-top: 1px dashed var(--circuit-2); margin: 0 18px; }
.ticket-meta { margin: 0; padding: 12px 18px 16px; display: grid; gap: 5px; font-size: .86rem; }
.ticket-meta div { display: flex; justify-content: space-between; gap: 16px; }
.ticket-meta dt { color: var(--steel); }
.ticket-meta dd { margin: 0; text-align: right; overflow-wrap: anywhere; }

.lucky-digits { display: flex; gap: 6px; margin: 12px 0 12px; }
.lucky-digits span {
  flex: 1 1 0; max-width: 64px; height: clamp(62px, 18vw, 80px);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--display); font-weight: 700; font-size: clamp(2.1rem, 10vw, 2.9rem); line-height: 1;
  font-variant-numeric: tabular-nums; color: var(--frost);
  background: linear-gradient(180deg, var(--hull-2), var(--hull)); border: 1px solid var(--circuit-2); border-radius: 2px;
  position: relative;
}
.lucky-digits span::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgba(6, 10, 19, .7); }
.lucky-digits span.locked { color: var(--cyan); border-color: rgba(25, 198, 214, .55); text-shadow: 0 0 18px rgba(25, 198, 214, .45); }
.lucky-digits span:nth-child(even).locked { color: var(--emerald); border-color: rgba(30, 212, 127, .5); text-shadow: 0 0 18px rgba(30, 212, 127, .4); }

.notice { display: flex; gap: 10px; align-items: flex-start; font-size: .88rem; color: #b4bfd6; border: 1px dashed var(--circuit-2); border-radius: 3px; padding: 12px 14px; margin: 16px 0 0; }
.notice .bi { color: var(--ember-2); font-size: 1.1rem; }
.state h2 { font-size: 1.45rem; }
.state p { color: var(--steel); margin: 0; }
.state-icon { --cut: 10px; width: 60px; height: 60px; margin-bottom: 16px; display: grid; place-items: center; font-size: 1.7rem; color: var(--amber); background: rgba(245, 177, 61, .08); clip-path: var(--chamfer); box-shadow: inset 0 0 0 1px rgba(245, 177, 61, .4); }
.state-icon.is-done { color: var(--cyan); background: rgba(25, 198, 214, .08); box-shadow: inset 0 0 0 1px rgba(25, 198, 214, .4); }
.home-logo { width: 140px; margin-bottom: 14px; }

/* =========================================================
   PÁGINAS SIMPLES (login, instalação, erros)
   ========================================================= */
.plain { min-height: 100vh; display: grid; place-items: center; padding: 30px 16px; }
.plain-box { width: 100%; max-width: 410px; }
.plain-brand { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.plain-brand img { height: 46px; width: auto; }
.plain-brand span { font-size: .84rem; color: var(--steel); }
.plain h1 { font-size: 1.4rem; display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.plain h1 .bi { color: var(--cyan); }
.error-code { font-family: var(--display); font-size: 4.2rem; font-weight: 700; line-height: 1; margin-bottom: 8px; color: var(--cyan); }

/* =========================================================
   PAINEL ADMINISTRATIVO
   ========================================================= */
.admin { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  background: var(--hull); border-right: 1px solid var(--circuit); padding: 20px 12px;
}
.sidebar .brand { display: block; padding: 0 8px 18px; margin-bottom: 14px; border-bottom: 1px solid var(--circuit); }
.sidebar .brand img { width: 150px; height: auto; }
.sidebar .brand small { display: block; margin-top: 8px; color: var(--steel); font-size: .8rem; }
.nav a {
  display: flex; align-items: center; gap: 11px; padding: 9px 10px; margin-bottom: 2px;
  color: #aab5cc; font-weight: 500; font-size: .93rem; border-left: 2px solid transparent;
}
.nav a:hover { background: rgba(255, 255, 255, .03); color: var(--frost); }
.nav a.active { color: #fff; border-left-color: var(--cyan); background: linear-gradient(90deg, rgba(25, 198, 214, .12), transparent); }
.nav a .bi { width: 18px; font-size: 1.02rem; text-align: center; color: var(--steel); }
.nav a.active .bi { color: var(--cyan); }
.sidebar-foot { margin-top: auto; border-top: 1px solid var(--circuit); padding-top: 14px; font-size: .84rem; }
.sidebar-foot .who { color: var(--steel); margin: 0 8px 10px; overflow: hidden; text-overflow: ellipsis; }
.sidebar-foot .who b { color: var(--frost); display: block; font-weight: 600; }
.sidebar-foot form { margin: 0; }

.main { padding: 28px clamp(18px, 3vw, 40px) 60px; min-width: 0; max-width: 1400px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; padding-bottom: 18px; border-bottom: 1px solid var(--circuit); }
.page-head h1 { font-size: clamp(1.5rem, 2.4vw, 1.95rem); margin-bottom: 6px; }
.page-head .sub { color: var(--steel); font-size: .93rem; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.crumb { display: inline-flex; align-items: center; gap: 6px; font-size: .86rem; color: var(--steel); margin-bottom: 8px; }
.crumb:hover { color: var(--cyan); }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.tight { gap: 0 14px; }
.section { margin-top: 18px; }
.card > h2, .section h2 { font-size: 1.12rem; display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.card > h2 .bi, .section h2 .bi, .toolbar h2 .bi { color: var(--cyan); }
h2 .count { font-family: var(--body); font-size: .84rem; color: var(--steel); font-weight: 400; }

/* leitura de números em faixa única */
.readout { --cut: 14px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 0; }
.readout > div { padding: 16px 20px; border-left: 1px solid var(--circuit); }
.readout > div:first-child { border-left: 0; }
.readout dt { font-size: .84rem; color: var(--steel); display: flex; align-items: center; gap: 7px; }
.readout dd { margin: 4px 0 0; font-family: var(--display); font-weight: 700; font-size: 2rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.readout .hl dd { color: var(--emerald); }

.link-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; margin-bottom: 18px; }
.link-row:last-child { margin-bottom: 0; }
.link-row label { font-weight: 500; font-size: .9rem; display: block; margin-bottom: 6px; }
.link-row .hint { font-size: .8rem; color: var(--steel); grid-column: 1 / -1; }
.copy-box { display: flex; gap: 8px; }
.copy-box .input { font-family: var(--mono); font-size: .82rem; padding: 9px 12px; color: #b9f2f7; }

.raffle-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 16px; }
.raffle-item { display: flex; flex-direction: column; gap: 14px; color: var(--frost); }
.raffle-item:hover { color: var(--frost); }
.raffle-item:hover::before { background: radial-gradient(circle at 0 0, var(--cyan) 0 90px, var(--circuit-2) 91px); }
.raffle-item .top { display: flex; gap: 14px; align-items: center; }
.raffle-item .thumb { --cut: 8px; width: 54px; height: 54px; background: var(--abyss); display: grid; place-items: center; padding: 6px; flex: none; clip-path: var(--chamfer); box-shadow: inset 0 0 0 1px var(--circuit-2); }
.raffle-item .thumb img { width: 100%; height: 100%; object-fit: contain; }
.raffle-item h3 { font-size: 1.08rem; margin: 0; }
.raffle-item .ev { color: var(--steel); font-size: .86rem; }
.raffle-item .meta { display: flex; justify-content: space-between; align-items: center; font-size: .84rem; color: var(--steel); border-top: 1px solid var(--circuit); padding-top: 12px; }
.raffle-item .meta b { color: var(--frost); font-family: var(--display); }
.meta-stats { display: inline-flex; gap: 14px; }
.meta-stats .bi { color: var(--cyan); margin-right: 3px; }
.empty { padding: 48px 24px; color: var(--steel); }
.empty .big .bi { font-size: 2.4rem; color: var(--cyan); }
.empty p { margin: 10px 0 18px; }

.table-wrap { overflow-x: auto; border: 1px solid var(--circuit); border-radius: 3px; }
table.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--circuit); vertical-align: middle; }
.table th { font-size: .8rem; color: var(--steel); font-weight: 500; background: var(--abyss); }
.table tbody tr:hover td { background: rgba(255, 255, 255, .015); }
.table tr:last-child td { border-bottom: 0; }
.table tr.is-winner td { background: rgba(30, 212, 127, .05); }
.table tr.is-winner td:first-child { box-shadow: inset 2px 0 0 var(--emerald); }
.table .num { font-family: var(--display); font-weight: 700; font-size: 1rem; color: var(--cyan); letter-spacing: .04em; }
.table form { margin: 0; }
.toolbar { display: flex; gap: 12px; justify-content: space-between; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar h2 { margin: 0; font-size: 1.12rem; display: flex; align-items: center; gap: 10px; }
.toolbar form { display: flex; gap: 8px; }
.toolbar .input { padding: 8px 12px; font-size: .9rem; min-width: 280px; }
.pager { display: flex; gap: 4px; justify-content: center; margin-top: 14px; flex-wrap: wrap; }
.pager a, .pager span { min-width: 34px; text-align: center; padding: 5px 10px; border-radius: 2px; border: 1px solid var(--circuit); font-size: .86rem; color: var(--frost); font-family: var(--display); }
.pager span.current { border-color: var(--cyan); color: var(--cyan); }

.danger-zone::before { background: radial-gradient(circle at 0 0, var(--alert) 0 72px, rgba(255, 79, 109, .35) 73px); }
.danger-zone h2, .card.danger-zone > h2 .bi { color: #ff9aac; }
.control-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 14px 0; border-bottom: 1px solid var(--circuit); }
.control-row:last-child { border-bottom: 0; padding-bottom: 0; }
.control-row:first-of-type { padding-top: 0; }
.control-row p { margin: 2px 0 0; font-size: .87rem; color: var(--steel); max-width: 560px; }
.control-row strong { display: block; font-size: .97rem; color: var(--frost); font-weight: 600; }
.control-row form { margin: 0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.activity { list-style: none; margin: 0; padding: 0; font-size: .87rem; }
.activity li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0 9px 14px; border-bottom: 1px solid var(--circuit); position: relative; }
.activity li::before { content: ""; position: absolute; left: 0; top: 16px; width: 5px; height: 5px; background: var(--cyan); }
.activity li:last-child { border-bottom: 0; }
.activity .when { color: var(--steel); white-space: nowrap; font-size: .8rem; font-variant-numeric: tabular-nums; }

.form-card { max-width: 720px; }
.logo-preview { display: flex; align-items: center; gap: 16px; margin: 4px 0 10px; }
.logo-preview img { max-height: 72px; max-width: 160px; object-fit: contain; background: var(--abyss); border: 1px solid var(--circuit-2); border-radius: 3px; padding: 8px; }
.with-icon { display: flex; gap: 10px; align-items: flex-start; }
.with-icon .bi { color: var(--cyan); margin-top: 3px; }

@media (max-width: 1100px) { .grid-4, .readout { grid-template-columns: repeat(2, minmax(0, 1fr)); } .readout > div:nth-child(3) { border-left: 0; } .readout > div:nth-child(n+3) { border-top: 1px solid var(--circuit); } }
@media (max-width: 860px) {
  .admin { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px; }
  .sidebar .brand { border: 0; padding: 0; margin: 0 auto 0 0; }
  .sidebar .brand img { width: 120px; }
  .sidebar .brand small { display: none; }
  .nav { display: flex; flex-wrap: wrap; gap: 2px; width: 100%; order: 3; }
  .nav a { margin: 0; padding: 7px 10px; font-size: .86rem; border-left: 0; border-bottom: 2px solid transparent; }
  .nav a.active { border-bottom-color: var(--cyan); background: none; }
  .sidebar-foot { margin: 0; border: 0; padding: 0; }
  .sidebar-foot .who { display: none; }
  .main { padding: 22px 16px 50px; }
  .grid-2 { grid-template-columns: 1fr; }
  .toolbar .input { min-width: 0; }
}
@media (max-width: 520px) { .link-row { grid-template-columns: 1fr; } .readout dd { font-size: 1.6rem; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition: none !important; } }
