/* Painel Rádio 98 FM — menu lateral, azul da marca, tudo legível para quem não é técnico. */
:root {
  --bg: #f1f4f9;
  --card: #ffffff;
  --field: #f6f8fc;
  --ink: #0b1630;
  --muted: #56627a;
  --line: #e0e6f0;
  --line-strong: #c9d2e2;
  --brand: #0048cc;
  --brand-bright: #0d90f5;
  --brand-ink: #ffffff;
  --brand-soft: #e5edfd;
  --danger: #c4251c;
  --ok: #0f7a4a;
  --warn: #8f5500;
  --side: #001a52;
  --side-ink: #e8eefc;
  --side-muted: #9fb2de;
  --side-line: rgb(255 255 255 / 0.1);
  --shadow: 0 1px 2px rgb(11 22 48 / 0.05), 0 8px 24px rgb(11 22 48 / 0.05);
  --radius: 14px;
  --side-w: 16.5rem;
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #070b16;
    --card: #101729;
    --field: #0a0f1d;
    --ink: #edf1fa;
    --muted: #9ba8c0;
    --line: #212a3f;
    --line-strong: #34405c;
    --brand: #6b97ff;
    --brand-bright: #3ea8ff;
    --brand-ink: #05112c;
    --brand-soft: #16254b;
    --danger: #ff8077;
    --ok: #4fd596;
    --warn: #f2b755;
    --side: #040a1c;
    --side-line: rgb(255 255 255 / 0.07);
    --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 8px 24px rgb(0 0 0 / 0.3);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #070b16;
  --card: #101729;
  --field: #0a0f1d;
  --ink: #edf1fa;
  --muted: #9ba8c0;
  --line: #212a3f;
  --line-strong: #34405c;
  --brand: #6b97ff;
  --brand-bright: #3ea8ff;
  --brand-ink: #05112c;
  --brand-soft: #16254b;
  --danger: #ff8077;
  --ok: #4fd596;
  --warn: #f2b755;
  --side: #040a1c;
  --side-line: rgb(255 255 255 / 0.07);
  --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 8px 24px rgb(0 0 0 / 0.3);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--font-display); letter-spacing: -0.02em; }
h1 { font-size: clamp(1.6rem, 2.4vw + 1rem, 2.15rem); line-height: 1.12; font-weight: 800; margin: 0; }
h2 { font-size: 1.1rem; font-weight: 700; margin: 0 0 1rem; }
a { color: var(--brand); }
strong { font-weight: 700; }

.ico { width: 1.25rem; height: 1.25rem; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Marca ---------- */
.brand { display: inline-flex; align-items: center; gap: 0.7rem; text-decoration: none; color: inherit; font-weight: 800; letter-spacing: -0.01em; }
.brand__text { display: grid; line-height: 1.15; }
.brand small { font-size: 0.78rem; font-weight: 500; color: var(--side-muted); letter-spacing: 0; }
.mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--brand-bright), #0048cc);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.18);
  flex: none;
}
.mark b { font: 800 1.05rem/1 var(--font-display); letter-spacing: -0.04em; }
.mark i { position: absolute; top: 0.32rem; right: 0.32rem; width: 0.4rem; height: 0.4rem; border-radius: 50%; background: #ff3b30; box-shadow: 0 0 0 2px #0a63e0; }

/* ---------- Estrutura do painel ---------- */
.shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; }
.mobilebar { display: none; }
.scrim { display: none; }

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1.25rem 0.9rem 1rem;
  background: var(--side);
  color: var(--side-ink);
  overflow-y: auto;
}
.sidebar__top { display: flex; align-items: center; justify-content: space-between; padding: 0 0.4rem; }
.sidebar .brand { color: #fff; }
.sidebar .sidebar__close { display: none; }

.menu { display: grid; gap: 0.2rem; }
.menu a, .menu__site {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 2.8rem;
  padding: 0.5rem 0.85rem;
  border-radius: 11px;
  color: var(--side-muted);
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s;
}
.menu a:hover, .menu__site:hover { background: var(--side-line); color: #fff; }
.menu a[aria-current="page"] { background: rgb(255 255 255 / 0.12); color: #fff; }
.menu a[aria-current="page"]::before {
  content: "";
  position: absolute;
  left: -0.9rem;
  top: 0.55rem;
  bottom: 0.55rem;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: var(--brand-bright);
}

.sidebar__end { margin-top: auto; display: grid; gap: 0.6rem; padding-top: 0.9rem; border-top: 1px solid var(--side-line); }
.who { display: flex; align-items: center; gap: 0.55rem; padding: 0.35rem 0.4rem; }
.who form { margin: 0; }
.who__avatar { display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 50%; background: var(--brand-bright); color: #04122e; font-weight: 800; flex: none; }
.who__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: 0.92rem; }

.iconbtn {
  display: inline-grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  transition: background-color 0.15s;
}
.iconbtn:hover { background: var(--side-line); }
.sidebar .iconbtn { color: var(--side-muted); }
.sidebar .iconbtn:hover { color: #fff; }
.iconbtn svg { width: 1.2rem; height: 1.2rem; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: none; }
}

.page { min-width: 0; width: 100%; max-width: 66rem; margin: 0 auto; padding: 2.25rem 2rem 5rem; }
.page:has(.post-layout) { max-width: 88rem; }

.head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1rem 1.5rem; margin-bottom: 1.75rem; }
.head__text { min-width: 0; }
.head__actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.lead { color: var(--muted); margin: 0.4rem 0 0; max-width: 44rem; }
.hint { color: var(--muted); font-size: 0.92rem; margin: 0 0 0.85rem; }
.back { display: inline-flex; align-items: center; gap: 0.2rem; margin: 0 0 0.6rem -0.25rem; padding: 0.2rem 0.5rem 0.2rem 0.15rem; border-radius: 8px; color: var(--muted); font-weight: 600; font-size: 0.92rem; text-decoration: none; }
.back:hover { color: var(--brand); background: var(--brand-soft); }
.back .ico { width: 1.1rem; height: 1.1rem; }

/* ---------- Cartões e botões ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.5rem; margin-bottom: 1.25rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.75rem;
  padding: 0.5rem 1.1rem;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s, transform 0.1s, box-shadow 0.15s;
}
.btn .ico { width: 1.1rem; height: 1.1rem; }
.btn:hover { border-color: var(--brand); color: var(--brand); }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); box-shadow: 0 1px 2px rgb(0 72 204 / 0.25); }
.btn--primary:hover { background: color-mix(in srgb, var(--brand) 88%, #000); border-color: transparent; color: var(--brand-ink); }
.btn--ghost { background: transparent; border-color: transparent; }
.btn--ghost:hover { background: var(--brand-soft); border-color: transparent; }
.btn--quiet { border-color: transparent; background: var(--field); color: var(--muted); }
.btn--quiet:hover { background: var(--brand-soft); border-color: transparent; }
.btn--danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); background: transparent; }
.btn--danger:hover { background: color-mix(in srgb, var(--danger) 10%, transparent); border-color: var(--danger); color: var(--danger); }
.btn--small { min-height: 2.25rem; padding: 0.25rem 0.8rem; font-size: 0.9rem; border-radius: 9px; }
.btn--big { min-height: 3.1rem; padding: 0.7rem 1.6rem; font-size: 1.02rem; }
.btn.is-busy { opacity: 0.7; pointer-events: none; }

:is(.btn, .icon, .iconbtn, .back, a, input, select, textarea, .toggle input, .menu a):focus-visible { outline: 3px solid var(--brand-bright); outline-offset: 2px; }

/* ---------- Avisos ---------- */
.flash {
  position: fixed;
  bottom: 1.25rem;
  right: 1rem;
  z-index: 50;
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  width: min(26rem, calc(100vw - 2rem));
  margin: 0;
  padding: 0.85rem 0.6rem 0.85rem 1rem;
  border: 1px solid;
  border-radius: 12px;
  background: var(--card);
  font-weight: 600;
  box-shadow: 0 10px 30px rgb(11 22 48 / 0.18);
  animation: toast-in 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.flash > span { flex: 1; padding-top: 0.05rem; }
.flash--ok { border-color: var(--ok); color: var(--ok); background: color-mix(in srgb, var(--ok) 9%, var(--card)); }
.flash--error { border-color: var(--danger); color: var(--danger); background: color-mix(in srgb, var(--danger) 8%, var(--card)); }
.flash.is-leaving { opacity: 0; transform: translateY(8px); transition: opacity 0.25s, transform 0.25s; }
.flash__x { display: grid; place-items: center; width: 1.9rem; height: 1.9rem; padding: 0; border: 0; border-radius: 8px; background: transparent; color: inherit; cursor: pointer; }
.flash__x:hover { background: color-mix(in srgb, currentColor 14%, transparent); }
.flash__x .ico { width: 1rem; height: 1rem; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }

/* ---------- Início ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.tile {
  display: grid;
  gap: 0.4rem;
  padding: 1.15rem 1.2rem 1.2rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.15s, transform 0.15s;
}
.tile:hover { border-color: var(--brand-bright); transform: translateY(-2px); }
.tile__top { display: flex; align-items: center; gap: 0.6rem; color: var(--muted); }
.tile__top strong { color: var(--ink); font-size: 1rem; }
.tile__num { display: flex; align-items: baseline; gap: 0.45rem; margin-top: 0.35rem; font: 800 3rem/1 var(--font-display); letter-spacing: -0.05em; color: var(--ink); }
.tile__num small { font: 600 0.9rem var(--font); letter-spacing: 0; color: var(--muted); }
.tile__sub { color: var(--muted); font-size: 0.88rem; }
.meter { display: flex; gap: 3px; height: 0.9rem; margin-top: 0.15rem; }
.meter i { flex: 1; max-width: 1.1rem; border-radius: 2px; background: var(--line); }
.meter i.on { background: linear-gradient(to top, var(--brand), var(--brand-bright)); }
.tile--accent { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.tile--accent .tile__top, .tile--accent .tile__top strong, .tile--accent .tile__num, .tile--accent .tile__num small, .tile--accent .tile__sub { color: var(--brand-ink); }
.tile--accent .tile__sub, .tile--accent .tile__num small { opacity: 0.8; }
.tile--accent:hover { border-color: var(--brand-bright); }

.alerts { list-style: none; margin: 0; padding: 0; display: grid; }
.alerts li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; padding: 0.75rem 0; border-top: 1px solid var(--line); }
.alerts li:first-child { border-top: 0; padding-top: 0; }
.alerts li:last-child { padding-bottom: 0; }
.alerts a { display: grid; gap: 0.05rem; color: var(--ink); text-decoration: none; }
.alerts a:hover strong { color: var(--brand); text-decoration: underline; }
.alerts__where { color: var(--muted); font-size: 0.86rem; }

/* ---------- Listas ---------- */
.rows { list-style: none; margin: 0 0 1.25rem; padding: 0; display: grid; gap: 0.65rem; }
.row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.75rem 1rem 0.75rem 0.5rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: border-color 0.15s, opacity 0.15s;
}
.row:hover { border-color: var(--line-strong); }
.row.is-off .thumb, .row.is-off .row__title { opacity: 0.55; }
.rows--plain .row { border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; box-shadow: none; padding-left: 0; }
.rows--plain .row:first-child { border-top: 0; }
.row.is-dragging { opacity: 0.5; border-color: var(--brand-bright); box-shadow: 0 8px 24px rgb(0 72 204 / 0.2); }
.grip { display: grid; place-items: center; width: 1.6rem; align-self: stretch; color: var(--line-strong); cursor: grab; user-select: none; }
.grip .ico { width: 1.1rem; height: 1.1rem; fill: currentColor; stroke: none; }
.row:hover .grip { color: var(--muted); }
.row__main { flex: 1; min-width: 0; display: grid; gap: 0.1rem; justify-items: start; }
.row__title { font-weight: 800; font-size: 1.02rem; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.row__title:hover { color: var(--brand); }
.row__sub { margin: 0; color: var(--muted); font-size: 0.9rem; overflow-wrap: anywhere; }
.row__actions { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; justify-content: flex-end; }
.inline { display: inline-flex; gap: 0.35rem; align-items: center; margin: 0; }
.icon {
  display: inline-grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--card);
  color: var(--muted);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.icon .ico { width: 1.05rem; height: 1.05rem; }
.icon:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.icon:disabled { opacity: 0.3; cursor: default; }

.thumb { display: block; width: 6rem; height: 3.75rem; flex: none; object-fit: cover; border-radius: 9px; background: var(--field); }
.thumb--logo { object-fit: contain; padding: 0.35rem; border: 1px solid var(--line); background: #fff; }
.thumb--empty { display: grid; place-items: center; color: var(--line-strong); border: 1px dashed var(--line-strong); }

.pill { display: inline-flex; align-items: center; gap: 0.4rem; flex: none; padding: 0.2rem 0.75rem; border-radius: 999px; font-size: 0.82rem; font-weight: 700; white-space: nowrap; background: var(--field); color: var(--muted); border: 1px solid var(--line); }
.pill--live { background: color-mix(in srgb, var(--ok) 13%, transparent); color: var(--ok); border-color: transparent; }
.pill--live::before { content: ""; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: currentColor; animation: onair 1.8s ease-in-out infinite; }
.pill--soon { background: color-mix(in srgb, var(--warn) 14%, transparent); color: var(--warn); border-color: transparent; }
.pill--scheduled { background: var(--brand-soft); color: var(--brand); border-color: transparent; }
.pill--ended { background: color-mix(in srgb, var(--danger) 11%, transparent); color: var(--danger); border-color: transparent; }
@keyframes onair { 50% { opacity: 0.3; } }

.empty { display: grid; justify-items: center; gap: 0.35rem; text-align: center; padding: 3rem 1rem; border: 2px dashed var(--line-strong); border-radius: var(--radius); color: var(--muted); }
.empty p { margin: 0; }
.empty .btn { margin-top: 0.75rem; }
.empty__icon { display: grid; place-items: center; width: 3.2rem; height: 3.2rem; margin-bottom: 0.4rem; border-radius: 50%; background: var(--brand-soft); color: var(--brand); }
.empty__title { font: 700 1.1rem var(--font-display); color: var(--ink); }

/* ---------- Formulários ---------- */
.form { display: grid; gap: 1.4rem; max-width: 42rem; }
.form h2 { margin: 0; }
.field { display: grid; gap: 0.4rem; }
.field label { font-weight: 700; }
.field label b { color: var(--danger); }
.field label em { font-style: normal; font-size: 0.75rem; font-weight: 700; padding: 0.1rem 0.55rem; border-radius: 999px; background: var(--brand-soft); color: var(--brand); margin-left: 0.4rem; }
.field--private { padding: 0.9rem; border: 1px dashed var(--line-strong); background: var(--field); border-radius: 12px; }
.help { margin: 0; color: var(--muted); font-size: 0.875rem; }
input[type="text"], input[type="email"], input[type="url"], input[type="password"], input[type="date"], input[type="search"], select, textarea {
  width: 100%;
  min-height: 2.9rem;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:hover, select:hover, textarea:hover { border-color: color-mix(in srgb, var(--brand) 55%, var(--line-strong)); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand-bright); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-bright) 22%, transparent); }
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--muted) 70%, transparent); }
input[type="file"] { color: var(--muted); font: inherit; max-width: 100%; }
input[type="file"]::file-selector-button { margin-right: 0.75rem; padding: 0.5rem 0.9rem; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--field); color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; }
input[type="file"]::file-selector-button:hover { border-color: var(--brand); color: var(--brand); }
textarea { resize: vertical; }
input[hidden] { display: none; }
.check { display: flex; align-items: center; gap: 0.6rem; font-weight: 600; }
.check input { width: 1.25rem; height: 1.25rem; accent-color: var(--brand); }

.toggle { position: relative; display: flex; align-items: flex-start; gap: 0.85rem; cursor: pointer; }
.toggle input { position: absolute; opacity: 0; width: 3rem; height: 1.75rem; margin: 0; cursor: pointer; }
.toggle__track { position: relative; flex: none; width: 3rem; height: 1.75rem; border-radius: 999px; background: var(--line-strong); transition: background-color 0.2s; }
.toggle__track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 1.25rem; height: 1.25rem; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / 0.3); transition: transform 0.2s cubic-bezier(0.3, 0.7, 0.3, 1); }
.toggle input:checked ~ .toggle__track { background: var(--ok); }
.toggle input:checked ~ .toggle__track::after { transform: translateX(1.25rem); }
.toggle input:focus-visible ~ .toggle__track { outline: 3px solid var(--brand-bright); outline-offset: 2px; }
.toggle__text { display: grid; gap: 0.05rem; }
.toggle__text small { color: var(--muted); font-size: 0.875rem; }
.switch { padding-bottom: 1.25rem; border-bottom: 1px solid var(--line); }

.form__actions { display: flex; flex-wrap: wrap; gap: 0.6rem; padding-top: 0.25rem; }
.form.card > .form__actions { position: sticky; bottom: 0; z-index: 5; margin: 0 -1.5rem -1.5rem; padding: 1rem 1.5rem; background: color-mix(in srgb, var(--card) 92%, transparent); backdrop-filter: blur(10px); border-top: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); }

.imagebox { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; padding: 0.9rem; border: 1px dashed var(--line-strong); border-radius: 12px; background: var(--field); }
.imagebox__preview { width: 11rem; max-height: 8rem; object-fit: contain; border-radius: 10px; border: 1px solid var(--line); background: var(--card); }
.imagebox__ctrl { display: grid; gap: 0.6rem; flex: 1; min-width: 14rem; }
.linkbox { display: grid; gap: 0.5rem; }

/* ---------- Horários dos programas ---------- */
.field--slots { gap: 0.75rem; }
.slots { display: grid; gap: 0.65rem; }
.slots__list { display: grid; gap: 0.65rem; margin: 0; padding: 0; list-style: none; }
.slot { display: grid; gap: 0.75rem; padding: 0.9rem; border: 1px solid var(--line); border-radius: 12px; background: var(--field); transition: border-color 0.2s; }
.slot:focus-within { border-color: color-mix(in srgb, var(--brand-bright) 60%, var(--line)); }
.slot__head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; min-height: 1.75rem; }
.slot__title { font-size: 0.9rem; font-weight: 800; color: var(--ink); line-height: 1.3; }
.slot__title.is-empty { color: var(--muted); font-weight: 600; }
.slot__remove { display: grid; place-items: center; flex: none; width: 1.85rem; height: 1.85rem; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; transition: background 0.15s, color 0.15s; }
.slot__remove svg { width: 0.95rem; height: 0.95rem; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.slot__remove:hover { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.slot__remove:focus-visible, .slot__preset:focus-visible, .slots__add:focus-visible { outline: 2px solid var(--brand-bright); outline-offset: 2px; }
.slot__days { margin: 0; padding: 0; border: 0; min-width: 0; }
.daychips { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 11px; background: var(--card); }
.daychip { position: relative; display: block; cursor: pointer; }
.daychip input { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; margin: 0; opacity: 0; cursor: pointer; }
.daychip span { display: grid; place-items: center; height: 2.3rem; border-radius: 8px; color: var(--muted); font-size: 0.78rem; font-weight: 800; transition: background 0.15s, color 0.15s; user-select: none; }
.daychip:hover span { background: var(--field); color: var(--ink); }
.daychip input:checked + span { background: var(--brand); color: var(--brand-ink); }
.daychip input:focus-visible + span { outline: 2px solid var(--brand-bright); outline-offset: 1px; }
.slot__presets { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.slot__preset { padding: 0.3rem 0.7rem; border: 1px solid var(--line-strong); border-radius: 999px; background: transparent; color: var(--muted); font: inherit; font-size: 0.78rem; font-weight: 700; cursor: pointer; transition: border-color 0.15s, color 0.15s, background 0.15s; }
.slot__preset:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.slot__time { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: end; gap: 0.5rem; }
.slot__clock { display: grid; gap: 0.3rem; min-width: 0; }
.slot__clock span { font-size: 0.8rem; font-weight: 700; color: var(--muted); }
.slot__clock input { width: 100%; min-width: 0; height: 2.6rem; padding: 0 0.6rem; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--card); color: var(--ink); font: inherit; font-size: 0.98rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.slot__clock input:focus { outline: none; border-color: var(--brand-bright); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-bright) 22%, transparent); }
.slot__arrow { padding-bottom: 0.65rem; color: var(--muted); font-size: 0.88rem; }
.slots__add { display: flex; align-items: center; justify-content: center; gap: 0.4rem; width: 100%; min-height: 2.7rem; border: 1px dashed var(--line-strong); border-radius: 12px; background: transparent; color: var(--brand); font: inherit; font-size: 0.9rem; font-weight: 800; cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.slots__add span { font-size: 1.15rem; line-height: 1; }
.slots__add:hover { border-color: var(--brand); background: var(--brand-soft); }

/* ---------- Excluir ---------- */
.danger { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 1.5rem; max-width: 42rem; margin-top: 1.5rem; padding: 1rem 1.25rem; border: 1px solid color-mix(in srgb, var(--danger) 30%, var(--line)); border-radius: var(--radius); }
.danger p { margin: 0.1rem 0 0; }
.post-layout ~ .danger { max-width: none; }

/* ---------- Cadastros (tabela) ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 0.6rem; padding: 1rem; }
.filters input[type="search"] { flex: 1; min-width: 14rem; }
.filters select { width: auto; max-width: 100%; }
.tablewrap { overflow-x: auto; padding: 0; }
table { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
th, td { text-align: left; padding: 0.8rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-size: 0.85rem; font-weight: 700; background: var(--field); white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--field); }
td form { margin: 0; }
.pager { display: flex; gap: 1rem; align-items: center; justify-content: center; color: var(--muted); }

/* ---------- Editor de posts ---------- */
.post-layout { display: grid; grid-template-columns: minmax(0, 1fr) 21rem; gap: 1.25rem; align-items: start; }
.post-layout__main { display: grid; gap: 1rem; min-width: 0; }
.post-layout__side { display: grid; gap: 1rem; position: sticky; top: 1.25rem; }
.post-layout__side .card { margin: 0; }
input[type="text"].post-title { min-height: 4.2rem; padding: 0.7rem 1.1rem; border-radius: var(--radius); font-size: clamp(1.4rem, 2.6vw, 2rem); font-weight: 800; letter-spacing: -0.02em; background: var(--card); box-shadow: var(--shadow); }
.permalink { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.75rem; font-size: 0.92rem; }
.permalink__label { font-weight: 700; color: var(--muted); }
.permalink__url { overflow-wrap: anywhere; font-weight: 600; }
.permalink__hint { color: var(--muted); }
.metabox { display: grid; gap: 1.1rem; padding: 1.2rem; margin: 0; }
.metabox h2 { margin: 0; font-size: 1rem; }
.metabox__status { margin: 0; }
.metabox__actions { display: grid; gap: 0.5rem; }
.metabox .imagebox { display: grid; }
.metabox .imagebox__preview { width: 100%; max-height: 12rem; object-fit: cover; aspect-ratio: 16 / 9; }
.metabox .imagebox__ctrl { min-width: 0; }
.metabox input[type="file"] { width: 100%; }
.tox-tinymce { border-color: var(--line-strong) !important; border-radius: var(--radius) !important; }

/* ---------- Entrada (login, senha, instalação) ---------- */
.auth { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); min-height: 100vh; }
.auth__brand {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 2.5rem clamp(1.5rem, 4vw, 3.5rem);
  background: radial-gradient(120% 90% at 0% 0%, #0a4fd0 0%, #001a52 62%);
  color: #fff;
  overflow: hidden;
}
.auth__brand .brand { font-size: 1.15rem; }
.auth__title { margin: auto 0 0; max-width: 15ch; font: 800 clamp(2rem, 3.4vw, 3.1rem)/1.05 var(--font-display); letter-spacing: -0.03em; }
.auth__text { margin: 0; max-width: 34ch; color: #bcd0fb; font-size: 1.05rem; }
.auth__wave { display: flex; align-items: flex-end; gap: 6px; height: 4.5rem; margin-top: 1rem; }
.auth__wave i { flex: 1; max-width: 12px; border-radius: 4px 4px 0 0; background: linear-gradient(to top, rgb(255 255 255 / 0.12), rgb(61 168 255 / 0.9)); height: 30%; transform-origin: bottom; animation: wave 2.4s ease-in-out infinite; }
.auth__wave i:nth-child(2n) { height: 65%; animation-delay: -0.4s; }
.auth__wave i:nth-child(3n) { height: 100%; animation-delay: -0.9s; }
.auth__wave i:nth-child(5n) { height: 45%; animation-delay: -1.4s; }
.auth__wave i:nth-child(7n) { height: 80%; animation-delay: -1.9s; }
@keyframes wave { 50% { transform: scaleY(0.45); } }
.auth__side { display: flex; flex-direction: column; min-width: 0; padding: 1rem 1.25rem 2rem; }
.auth__tools { display: flex; justify-content: flex-end; }
.auth__tools .iconbtn { border: 1px solid var(--line); background: var(--card); color: var(--ink); }
.auth__tools .iconbtn:hover { border-color: var(--brand); color: var(--brand); background: var(--card); }
.auth__main { flex: 1; display: grid; align-content: center; justify-items: center; }
.login { width: 100%; max-width: 26rem; display: grid; gap: 1rem; padding: 2rem; margin: 0; }
.login h1 { font-size: 1.6rem; }
.login .lead { margin: 0; }
.login .form { max-width: none; }
.login .form.card { padding: 0; }
.login .btn { width: 100%; }
.login .help { text-align: center; }

/* ---------- Telas pequenas ---------- */
@media (max-width: 960px) {
  .post-layout { grid-template-columns: minmax(0, 1fr); }
  .post-layout__side { position: static; }
}

@media (max-width: 860px) {
  .shell { display: block; }
  .mobilebar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.9rem;
    background: var(--side);
    color: #fff;
  }
  .mobilebar .iconbtn { color: #fff; }
  .sidebar { position: fixed; z-index: 40; inset: 0 auto 0 0; width: min(19rem, 86vw); transform: translateX(-102%); visibility: hidden; transition: transform 0.25s cubic-bezier(0.3, 0.7, 0.3, 1), visibility 0s 0.25s; box-shadow: 0 0 40px rgb(0 0 0 / 0.4); }
  .sidebar.is-open { transform: none; visibility: visible; transition: transform 0.25s cubic-bezier(0.3, 0.7, 0.3, 1); }
  .sidebar .sidebar__close { display: inline-grid; }
  .scrim { position: fixed; z-index: 30; inset: 0; display: block; background: rgb(3 10 30 / 0.55); }
  .page { padding: 1.5rem 1rem 4rem; }
  .flash { right: 1rem; }
  .row { flex-wrap: wrap; padding-left: 0.75rem; }
  .grip { display: none; }
  .row__main { flex: 1 1 9rem; }
  .row > .pill { white-space: normal; max-width: 100%; }
  .row__actions { width: 100%; justify-content: flex-start; }
  .thumb { width: 4.75rem; height: 3.2rem; }
  .form.card > .form__actions { margin: 0 -1.25rem -1.25rem; padding: 0.85rem 1.25rem; }
  .card { padding: 1.25rem; }
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth__brand { padding: 1.25rem 1.25rem 1.5rem; gap: 0.75rem; }
  .auth__title { margin-top: 0.75rem; font-size: 1.7rem; }
  .auth__text, .auth__wave { display: none; }
  .auth__tools { position: absolute; top: 1rem; right: 1rem; }
  .auth__side { padding-top: 1.5rem; }
  .login { padding: 0.5rem 0.25rem; border: 0; box-shadow: none; background: transparent; }
}

@media (prefers-reduced-motion: reduce) {
  .pill--live::before, .auth__wave i, .flash { animation: none; }
  .tile, .btn, .toggle__track::after, .sidebar { transition: none; }
  .tile:hover { transform: none; }
}

@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .slot__clock input { color-scheme: dark; } }
:root[data-theme="dark"] .slot__clock input { color-scheme: dark; }
:root[data-theme="light"] .slot__clock input { color-scheme: light; }
