@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

@font-face {
  font-family: 'Aldo';
  src: url('/fonts/Aldo-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* ============================================================
   TOKENS
   Paleta ENEHISP preservada. Papel domina (60%), ouro/estrutura
   sustenta (30%), marrom/terracota é só ação e destaque (10%).
   ============================================================ */
:root {
  --paper: #faf7f0;
  --paper-raised: #ffffff;
  --paper-sunken: #f2ecdd;
  --ink: #3d3018;
  --ink-soft: #6b5c3f;
  --ink-faint: #9c8f72;
  --gold: #a18b64;
  --gold-line: #e6dcc4;
  --gold-line-soft: #f0e9d8;
  --brown: #875705;
  --brown-hover: #6d4404;
  --brown-lift: #a66a06;
  --confirm: #4b6b3f;
  --confirm-bg: #eef2ea;
  --decline: #a3432f;
  --decline-bg: #f6eae7;
  --pending: #93783f;
  --pending-bg: #f3efe2;

  --surface: rgba(255, 255, 255, 0.78);
  --surface-quiet: rgba(255, 255, 255, 0.52);
  --surface-line: rgba(161, 139, 100, 0.18);
  --surface-line-strong: rgba(161, 139, 100, 0.34);
  --glass-bg: rgba(255, 255, 255, 0.6);
  --glass-bg-strong: rgba(255, 255, 255, 0.78);
  --glass-border: rgba(255, 255, 255, 0.7);
  --glass-border-inner: rgba(161, 139, 100, 0.16);
  --glass-blur: 20px;

  --accent-surface: linear-gradient(158deg, #9a6206, #7a4d04 62%, #613c03);
  --accent-ink: #fdf6e8;
  --accent-ink-soft: rgba(253, 246, 232, 0.74);
  --accent-line: rgba(253, 246, 232, 0.2);

  --deep-surface: linear-gradient(158deg, #4a3a1e, #332812);
  --deep-ink: #f6efe0;
  --deep-ink-soft: rgba(246, 239, 224, 0.7);

  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --sp-8: 72px;
  --sp-9: 96px;

  --t-caption: 12px;
  --t-small: 13.5px;
  --t-body: 16px;
  --t-lead: 18px;
  --t-h3: 15px;
  --t-h2: 20px;
  --t-h1: clamp(28px, 6vw, 44px);
  --t-display: clamp(38px, 9vw, 72px);

  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --radius-xl: 34px;
  --radius: var(--radius-md);

  --shadow-sm: 0 1px 2px rgba(61, 48, 24, 0.05);
  --shadow-card: 0 1px 1px rgba(61, 48, 24, 0.03), 0 24px 48px -18px rgba(89, 67, 24, 0.26), 0 8px 20px -12px rgba(89, 67, 24, 0.13);
  --shadow-raise: 0 2px 4px rgba(61, 48, 24, 0.04), 0 32px 64px -22px rgba(89, 67, 24, 0.34);
  --shadow-pop: 0 24px 60px -14px rgba(61, 48, 24, 0.3);
  --shadow-inset-top: inset 0 1px 0 rgba(255, 255, 255, 0.85);

  --ease: cubic-bezier(0.22, 0.68, 0.32, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur-fast: 0.14s;
  --dur: 0.24s;
  --dur-slow: 0.42s;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1a1509;
    --paper-raised: #241d0f;
    --paper-sunken: #141007;
    --ink: #f4ecda;
    --ink-soft: #c3b494;
    --ink-faint: #8d7f62;
    --gold: #c0a87c;
    --gold-line: #4a3d24;
    --gold-line-soft: #362c1a;
    --brown: #e0973a;
    --brown-hover: #f0a949;
    --brown-lift: #f5b65e;
    --confirm: #8fc178;
    --confirm-bg: rgba(143, 193, 120, 0.14);
    --decline: #e08a72;
    --decline-bg: rgba(224, 138, 114, 0.14);
    --pending: #d3b775;
    --pending-bg: rgba(211, 183, 117, 0.14);

    --surface: rgba(48, 39, 21, 0.78);
    --surface-quiet: rgba(48, 39, 21, 0.5);
    --surface-line: rgba(192, 168, 124, 0.22);
    --surface-line-strong: rgba(192, 168, 124, 0.4);
    --glass-bg: rgba(48, 39, 21, 0.6);
    --glass-bg-strong: rgba(48, 39, 21, 0.8);
    --glass-border: rgba(192, 168, 124, 0.18);
    --glass-border-inner: rgba(192, 168, 124, 0.2);

    --shadow-card: 0 1px 1px rgba(0, 0, 0, 0.3), 0 24px 48px -18px rgba(0, 0, 0, 0.6);
    --shadow-raise: 0 2px 4px rgba(0, 0, 0, 0.3), 0 32px 64px -22px rgba(0, 0, 0, 0.66);
    --shadow-inset-top: inset 0 1px 0 rgba(255, 255, 255, 0.07);
  }
}

* { box-sizing: border-box; }

html {
  background:
    radial-gradient(1100px 620px at 8% -8%, rgba(161, 139, 100, 0.16), transparent 60%),
    radial-gradient(900px 700px at 105% 8%, rgba(135, 87, 5, 0.09), transparent 55%),
    radial-gradient(1000px 800px at 50% 115%, rgba(161, 139, 100, 0.12), transparent 60%),
    var(--paper);
  background-attachment: fixed;
  -webkit-text-size-adjust: 100%;
}
@media (prefers-color-scheme: dark) {
  html {
    background:
      radial-gradient(1100px 620px at 8% -8%, rgba(224, 151, 58, 0.12), transparent 60%),
      radial-gradient(900px 700px at 105% 8%, rgba(224, 151, 58, 0.07), transparent 55%),
      var(--paper);
  }
}

body {
  margin: 0;
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: var(--t-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  min-height: 100dvh;
}

/* ================= TIPOGRAFIA ================= */
h1, h2, h3, .serif {
  font-family: 'Aldo', Georgia, serif;
  font-weight: 600;
  color: var(--brown);
  margin: 0;
  line-height: 1.16;
}

h1, h2, h3 {
  text-transform: uppercase;
  letter-spacing: 0.02em;
  /* 1.24 em vez do 1.16 herdado acima: folga extra que o padding-top sozinho
     não cobria em todo motor de renderização — confirmado visualmente num
     caso real de corte no Chrome (Õ saindo parecido com Ô). display/serif
     fora desta regra mantêm o line-height 1.16 original. */
  line-height: 1.24;
}

/* Força minúscula em UMA letra específica dentro de um título que, por
   herança do h1/h2/h3, vai inteiro para caixa alta — usado tanto para o "õ"
   (convenção do evento) quanto para o "h" de hora ("8h", "14h"), que em
   português nunca aparece maiúsculo mesmo em texto todo em caixa alta.
   Nota técnica: na Aldo, os acentos altos (Õ e É com yMax 915, Ã com 879)
   ultrapassam o ascent declarado da fonte (864). Sem folga vertical o topo do
   acento é cortado — por isso a regra abaixo. */
.o-baixo {
  text-transform: lowercase;
}

/* Folga para acentos que estouram o ascent da Aldo (Ã, Õ, É, Ó...).
   Sem isso o topo do til/agudo é cortado em títulos grandes. */
h1, h2, h3, .display, .serif, .stat .stat-num, .bento-tile .tile-v, input.codigo {
  padding-top: 0.1em;
  overflow: visible;
}

h1 { font-size: var(--t-h1); letter-spacing: 0.005em; }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); }

.display {
  font-family: 'Aldo', Georgia, serif;
  font-weight: 600;
  font-size: var(--t-display);
  line-height: 1.02;
  letter-spacing: -0.005em;
  text-transform: uppercase;
  color: var(--brown);
  margin: 0;
  text-wrap: balance;
}

.eyebrow {
  font-family: 'Aldo', serif;
  font-weight: 600;
  color: var(--ink-soft);
  font-size: var(--t-caption);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: var(--sp-2);
}

.lead {
  font-size: var(--t-lead);
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 54ch;
  text-wrap: pretty;
}

/* ================= CABEÇALHO / ESTRUTURA ================= */
.header-brand { display: flex; align-items: center; gap: var(--sp-3); }
.header-icon {
  height: 38px; width: 38px; display: block;
  filter: drop-shadow(0 6px 14px rgba(89, 67, 24, 0.22));
}
.header-wordmark { height: 22px; width: auto; display: block; }
@media (prefers-color-scheme: dark) {
  .header-wordmark { filter: invert(1) brightness(1.6) sepia(0.3); }
}

.wrap { max-width: 660px; margin: 0 auto; padding: var(--sp-7) 22px var(--sp-9); }
.wrap.wide { max-width: 1120px; }

.hero { margin-top: var(--sp-6); }

.rule {
  height: 1px;
  background: linear-gradient(90deg, var(--gold), transparent 85%);
  margin: var(--sp-7) 0;
  border: none;
}
/* Régua institucional (separador1/2.svg).
   Os SVGs traziam ~86% de área vazia no viewBox; foram recortados para a
   arte real (5 barras sólidas contíguas). Como são retângulos sólidos,
   preserveAspectRatio="none" permite esticar na horizontal sem distorção
   perceptível — assim a régua atravessa a largura inteira com espessura
   constante em qualquer breakpoint, em vez de afinar junto com a tela. */
.rule-img {
  display: block;
  width: 100%;
  height: 7px;
  margin: var(--sp-6) 0;
  opacity: 0.9;
}
@media (max-width: 640px) { .rule-img { height: 5px; margin: var(--sp-5) 0; } }
@media (prefers-color-scheme: dark) { .rule-img { opacity: 0.6; } }

/* variante para separar blocos dentro da página (ex.: dashboard -> lista de STs) */
.rule-img.secao { margin: var(--sp-7) 0 var(--sp-6); opacity: 0.75; }

/* ================= CARDS ================= */
.card {
  position: relative;
  background: var(--glass-bg-strong);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.4);
  backdrop-filter: blur(var(--glass-blur)) saturate(1.4);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card), var(--shadow-inset-top);
  padding: var(--sp-6);
  margin-top: var(--sp-5);
  animation: subir-e-aparecer var(--dur-slow) var(--ease) both;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(155deg, rgba(161, 139, 100, 0.35), transparent 40%, transparent 60%, rgba(161, 139, 100, 0.18));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.card-accent {
  background: var(--accent-surface);
  border-color: transparent;
  color: var(--accent-ink);
}
.card-accent::before { background: linear-gradient(155deg, rgba(255,255,255,0.28), transparent 45%); }
.card-accent h1, .card-accent h2, .card-accent h3, .card-accent .serif, .card-accent .display { color: var(--accent-ink); }
.card-accent .muted, .card-accent .eyebrow, .card-accent .k { color: var(--accent-ink-soft); }
.card-accent .label-row { border-top-color: var(--accent-line); }

.card-deep { background: var(--deep-surface); border-color: transparent; color: var(--deep-ink); }
.card-deep h1, .card-deep h2, .card-deep h3, .card-deep .serif { color: var(--deep-ink); }
.card-deep .muted, .card-deep .k { color: var(--deep-ink-soft); }

@keyframes subir-e-aparecer {
  from { opacity: 0; transform: translateY(12px) scale(0.988); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ================= BENTO ================= */
.bento {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-3);
  margin-top: var(--sp-5);
}
.bento > * { margin-top: 0; }
.bento .span-2 { grid-column: span 2; }
.bento-tile {
  position: relative;
  border-radius: var(--radius-md);
  padding: var(--sp-5);
  background: var(--surface-quiet);
  border: 1px solid var(--surface-line);
  box-shadow: var(--shadow-inset-top);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  min-height: 108px;
  justify-content: center;
}
.bento-tile .tile-k {
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-soft);
}
.bento-tile .tile-v {
  font-family: 'Aldo', serif; font-size: 22px; line-height: 1.1; color: var(--brown);
}
.bento-tile .tile-v.sm {
  font-family: 'Inter', sans-serif; font-size: var(--t-body);
  font-weight: 600; color: var(--ink); line-height: 1.35;
}
.bento-tile.accent { background: var(--accent-surface); border-color: transparent; }
.bento-tile.accent .tile-k { color: var(--accent-ink-soft); }
.bento-tile.accent .tile-v { color: var(--accent-ink); }

/* ================= FORMULÁRIOS ================= */
label {
  display: block; font-size: var(--t-caption); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--ink-soft); margin-bottom: var(--sp-2);
}

input[type="text"], input[type="date"], input[type="time"], input[type="email"], textarea, select {
  width: 100%;
  font-family: 'Inter', sans-serif;
  font-size: var(--t-body);
  min-height: 52px;
  padding: 14px 16px;
  border: 1.5px solid var(--glass-border-inner);
  border-radius: var(--radius-sm);
  background: var(--surface-quiet);
  color: var(--ink);
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
input::placeholder, textarea::placeholder { color: var(--ink-faint); }
input[type="text"]:focus, input[type="date"]:focus, input[type="time"]:focus, input[type="email"]:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--gold);
  background: var(--paper-raised);
  box-shadow: 0 0 0 4px rgba(161, 139, 100, 0.24);
}
textarea { resize: vertical; min-height: 96px; font-family: inherit; }

input.codigo {
  font-family: 'Aldo', 'Inter', monospace;
  font-size: 22px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  min-height: 60px;
}

.field { margin-top: var(--sp-1); }
.field + .field { margin-top: var(--sp-4); }
.field-hint { font-size: var(--t-small); color: var(--ink-faint); margin-top: 6px; }

.sugestao-linha { display: flex; gap: var(--sp-2); margin-bottom: var(--sp-2); }
.sugestao-linha:last-child { margin-bottom: 0; }
.sugestao-linha input { flex: 1; }

/* ================= BOTÕES ================= */
button, a.btn-primary, a.btn-decline, a.btn-ghost, a.btn-confirm {
  font-family: 'Inter', sans-serif;
  font-size: 14.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border: none;
  border-radius: 999px;
  min-height: 52px;
  padding: 14px 26px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  text-decoration: none;
  transition: filter var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease-spring),
              background-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
button:hover, a.btn-primary:hover, a.btn-decline:hover, a.btn-ghost:hover { filter: brightness(0.97); transform: translateY(-1px); }
button:active, a.btn-primary:active { transform: translateY(1px) scale(0.99); }
button:disabled { opacity: 0.45; cursor: not-allowed; transform: none; filter: none; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

.btn-primary {
  background: linear-gradient(155deg, var(--brown-lift), var(--brown) 55%, var(--brown-hover));
  color: #fff;
  box-shadow: 0 10px 24px -8px rgba(135, 87, 5, 0.55);
}
.btn-primary:hover { filter: none; box-shadow: 0 16px 32px -8px rgba(135, 87, 5, 0.62); }
.btn-confirm { background: linear-gradient(155deg, #5d7a4d, var(--confirm)); color: #fff; box-shadow: 0 10px 24px -8px rgba(75, 107, 63, 0.5); }
.btn-confirm:hover { filter: brightness(1.06); }
.btn-decline { background: transparent; color: var(--decline); border: 1.5px solid rgba(163, 67, 47, 0.42); }
.btn-decline:hover { background: var(--decline-bg); filter: none; }
.btn-ghost { background: var(--surface-quiet); color: var(--ink-soft); border: 1.5px solid var(--glass-border-inner); }
.btn-ghost:hover { background: var(--surface); filter: none; }
.btn-desabilitado { background: var(--pending-bg); color: var(--pending); box-shadow: none; }
.btn-sm { min-height: 44px; padding: 10px 18px; font-size: 13px; }

button[aria-busy="true"] { position: relative; color: transparent !important; pointer-events: none; }
button[aria-busy="true"]::after {
  content: "";
  position: absolute;
  width: 18px; height: 18px;
  border: 2.5px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: girar 0.7s linear infinite;
}
.btn-ghost[aria-busy="true"]::after, .btn-decline[aria-busy="true"]::after {
  border-color: var(--surface-line-strong); border-top-color: var(--ink-soft);
}
@keyframes girar { to { transform: rotate(360deg); } }

.icon { display: inline-flex; width: 17px; height: 17px; flex-shrink: 0; }
.icon svg { width: 100%; height: 100%; }

/* ================= PARES RÓTULO/VALOR ================= */
.label-row {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: var(--sp-4); margin-top: var(--sp-4); padding-top: var(--sp-4);
  border-top: 1px solid var(--glass-border-inner);
}
.label-row:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.k {
  font-size: 11.5px; color: var(--ink-soft); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em; white-space: nowrap;
}
.v { font-size: 15px; text-align: right; max-width: 62%; }
.v.title { font-style: italic; }

.nota-realoc {
  display: block; font-size: 11.5px; color: var(--ink-faint);
  font-style: italic; margin-top: 3px;
}

/* ================= CHIPS ================= */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; padding: 7px 14px; border-radius: 999px;
  line-height: 1.35; white-space: nowrap; box-shadow: var(--shadow-sm);
}
.chip .icon { width: 12px; height: 12px; }
.chip.confirmado { background: var(--confirm-bg); color: var(--confirm); box-shadow: inset 0 0 0 1px rgba(75, 107, 63, 0.22); }
.chip.recusado { background: var(--decline-bg); color: var(--decline); box-shadow: inset 0 0 0 1px rgba(163, 67, 47, 0.22); }
.chip.aguardando { background: var(--pending-bg); color: var(--pending); box-shadow: inset 0 0 0 1px rgba(147, 120, 63, 0.22); }

/* ================= PROGRESSO / VAGAS ================= */
.progress {
  display: flex; height: 10px; width: 100%; border-radius: 999px;
  overflow: hidden; background: var(--surface-line);
  box-shadow: inset 0 1px 2px rgba(89, 67, 24, 0.12);
}
.progress-seg { height: 100%; transition: width var(--dur-slow) var(--ease); }
.progress-seg.confirmado { background: linear-gradient(90deg, #5b7d4c, var(--confirm)); }
.progress-seg.recusado { background: linear-gradient(90deg, #b4543c, var(--decline)); }
.progress-seg.aguardando { background: var(--gold-line); }
.progress-seg.ocupado { background: linear-gradient(90deg, var(--brown-lift), var(--brown)); }

.progress-legenda {
  display: flex; gap: var(--sp-4); flex-wrap: wrap; margin-top: 10px;
  font-size: var(--t-small); color: var(--ink-soft);
}
.progress-legenda span { display: inline-flex; align-items: center; gap: 6px; }
.progress-legenda i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }

.vagas-dots { display: flex; gap: 5px; flex-wrap: wrap; }
.vagas-dots i {
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--surface-line-strong); display: inline-block;
}
.vagas-dots i.livre { background: linear-gradient(155deg, var(--brown-lift), var(--brown)); }

/* ================= ESTATÍSTICAS ================= */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: var(--sp-3); }
.stat {
  background: var(--surface-quiet);
  border: 1px solid var(--glass-border-inner);
  border-radius: var(--radius-md);
  padding: var(--sp-5) var(--sp-4);
  box-shadow: var(--shadow-inset-top);
}
.stat .stat-num { font-family: 'Aldo', serif; font-size: 32px; color: var(--brown); line-height: 1; }
.stat .stat-label {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--ink-soft); margin-top: var(--sp-2); font-weight: 700;
}

/* ================= MENSAGENS ================= */
.error {
  display: flex; align-items: flex-start; gap: var(--sp-2);
  background: var(--decline-bg); color: var(--decline);
  padding: var(--sp-3) var(--sp-4); border-radius: var(--radius-sm);
  font-size: 14px; margin-top: var(--sp-4);
  box-shadow: inset 0 0 0 1px rgba(163, 67, 47, 0.2);
}
.error .icon { margin-top: 2px; }

.aviso-ok {
  display: flex; align-items: flex-start; gap: var(--sp-2);
  background: var(--confirm-bg); color: var(--confirm);
  padding: var(--sp-3) var(--sp-4); border-radius: var(--radius-sm);
  font-size: 14px; margin-top: var(--sp-4);
  box-shadow: inset 0 0 0 1px rgba(75, 107, 63, 0.2);
}

.actions { display: flex; gap: var(--sp-3); margin-top: var(--sp-6); flex-wrap: wrap; }
.actions button, .actions a { flex: 1; min-width: 180px; }

.muted { color: var(--ink-soft); font-size: var(--t-small); }
.muted a:not([class*="btn-"]), .card a:not([class*="btn-"]) {
  color: var(--brown); font-weight: 600;
  text-decoration-color: var(--gold-line); text-underline-offset: 3px;
}
.muted a:not([class*="btn-"]):hover, .card a:not([class*="btn-"]):hover { text-decoration-color: currentColor; }

/* ================= SESSÕES DE COMUNICAÇÃO LIVRE ================= */
.sessao-item { display: flex; flex-direction: column; gap: var(--sp-4); }
.sessao-item .sessao-info h3 { font-size: var(--t-h3); margin: 0 0 var(--sp-2); }
.sessao-item .sessao-info p {
  margin: 3px 0; font-size: var(--t-small); color: var(--ink-soft);
  display: flex; align-items: center; gap: 7px;
}
.sessao-acao { display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
.sessao-acao > .chip { align-self: flex-start; }

.card.esgotada, .card.conflito { opacity: 0.72; }
.card.conflito { border-style: dashed; }

@media (min-width: 720px) {
  .sessao-item { flex-direction: row; align-items: center; justify-content: space-between; gap: var(--sp-6); }
  .sessao-item .sessao-info { flex: 1; }
  .sessao-acao { min-width: 230px; }
}

/* ================= PAINEL / TABELAS ================= */
/* Cada ST é um bloco respirável: separação forte acima (inclusive do card de
   estatísticas), folga interna entre título, chips, barra e tabela. */
.grupo { margin-top: var(--sp-8); margin-bottom: 0; }
.grupo:first-child { margin-top: var(--sp-6); }
/* se vier logo após uma régua de seção, ela já faz a separação */
.rule-img.secao + .grupo { margin-top: 0; }

.st-header {
  display: flex; justify-content: space-between; align-items: baseline;
  column-gap: var(--sp-5); row-gap: var(--sp-3);
  flex-wrap: wrap; margin-bottom: var(--sp-4);
}
.st-header h2 { font-size: var(--t-h2); line-height: 1.22; max-width: 60ch; }
.st-header h3 { font-size: 14px; }
.st-counts { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.st-counts .chip { font-size: 10.5px; padding: 5px 11px; }

/* barra de ocupação do ST: afastada do cabeçalho e da tabela */
.grupo .progress { margin-top: var(--sp-2); }

table.trab { width: 100%; border-collapse: collapse; margin-top: var(--sp-5); font-size: var(--t-small); }
table.trab th {
  text-align: left; font-size: 11px; color: var(--ink-soft); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em; padding: 0 12px var(--sp-3);
  border-bottom: 1.5px solid var(--glass-border-inner);
}
table.trab td { padding: var(--sp-4) 12px; border-bottom: 1px solid var(--gold-line-soft); vertical-align: top; line-height: 1.5; }
table.trab tr:last-child td { border-bottom: none; }
table.trab tr:hover td { background: rgba(161, 139, 100, 0.06); }

table.cronograma { width: 100%; border-collapse: collapse; margin: var(--sp-4) 0; font-size: var(--t-small); }
table.cronograma th {
  text-align: left; font-size: 11px; color: var(--ink-soft); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em; padding: 11px 12px;
  border-bottom: 1.5px solid var(--glass-border-inner);
}
table.cronograma td { padding: 13px 12px; border-bottom: 1px solid var(--gold-line-soft); }
table.cronograma tr:last-child td { border-bottom: none; }

.duas-partes { display: flex; gap: var(--sp-3); flex-wrap: wrap; margin: var(--sp-5) 0; }
.parte {
  flex: 1; min-width: 230px; background: var(--surface-quiet);
  border: 1px solid var(--glass-border-inner); border-radius: var(--radius-md); padding: var(--sp-5);
}
.parte h3 { font-size: 14px; margin: 0 0 var(--sp-2); }
.parte p { font-size: var(--t-small); margin: 5px 0; color: var(--ink-soft); display: flex; align-items: center; gap: 7px; }
.parte .taxa { color: var(--ink); font-weight: 600; }
.links-uteis a { font-size: var(--t-small); }

/* ================= BARRA DE AÇÃO FIXA (mobile) ================= */
.action-bar {
  position: sticky;
  bottom: 0;
  z-index: 20;
  display: none;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-3) calc(var(--sp-3) + env(safe-area-inset-bottom));
  margin: var(--sp-5) -22px 0;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--surface-line);
}
.action-bar button, .action-bar a { flex: 1; }
.action-bar.ativa { display: flex; }
@media (min-width: 720px) { .action-bar.ativa { display: none; } }

/* ================= RODAPÉ ================= */
footer.credit-img { text-align: center; margin-top: var(--sp-9); }

/* Assinatura institucional.
   width 100% + height auto + aspect-ratio = escala sem distorção e sem
   reflow (reserva o espaço antes de carregar). A proporção é muito larga
   (8,69:1), então no mobile ela ocupa toda a largura útil — e ainda sangra
   um pouco além do padding — para o texto não ficar pequeno demais. */
.rodape-img {
  display: block;
  width: 100%;
  max-width: 720px;
  height: auto;
  aspect-ratio: 1520 / 175;
  margin: 0 auto;
  opacity: 0.94;
}

@media (max-width: 640px) {
  .rodape-img {
    width: calc(100% + 2 * var(--sp-2));
    max-width: none;
    margin-left: calc(-1 * var(--sp-2));
    margin-right: calc(-1 * var(--sp-2));
  }
}

/* No escuro a assinatura NÃO é invertida: a ilustração do grupo é vermelha e
   inverter destruiria a cor. Em vez disso ela ganha uma placa clara, que
   preserva a arte original e mantém o contraste do texto. */
@media (prefers-color-scheme: dark) {
  .rodape-img {
    background: #f6f1e6;
    /* placa desenhada por box-shadow: não entra na caixa, então não encolhe
       a arte nem briga com o aspect-ratio */
    box-shadow: 0 0 0 16px #f6f1e6;
    border-radius: 3px;
    margin-top: var(--sp-4);
    margin-bottom: var(--sp-4);
    opacity: 0.92;
  }
}
.credit-extra {
  margin-top: var(--sp-3);
  display: flex; align-items: center; justify-content: center; gap: 6px;
  font-size: var(--t-caption); color: var(--ink-soft);
}
.credit-extra .icon { width: 13px; height: 13px; }
.credit-extra a { color: var(--ink-soft); font-weight: 600; }

/* ================= RESPONSIVO ================= */
@media (max-width: 720px) {
  .wrap.wide { padding-left: 16px; padding-right: 16px; }
  .grupo { margin-top: var(--sp-7); }
}

@media (max-width: 640px) {
  .wrap { padding: var(--sp-6) 16px var(--sp-7); }
  .card { padding: var(--sp-5); border-radius: var(--radius-md); }
  .action-bar { margin-left: -16px; margin-right: -16px; }
  .v { max-width: 100%; text-align: left; }
  .label-row { flex-direction: column; align-items: flex-start; gap: var(--sp-1); }
  .sessao-acao { align-items: stretch; width: 100%; }
  .sessao-acao button { width: 100%; }
  .actions button, .actions a { min-width: 100%; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .bento { gap: var(--sp-2); }

  table.trab, table.trab thead, table.trab tbody, table.trab th, table.trab td, table.trab tr { display: block; }
  table.trab thead { position: absolute; left: -9999px; top: -9999px; }
  table.trab tr {
    background: var(--surface-quiet);
    border: 1px solid var(--glass-border-inner);
    border-radius: var(--radius-md);
    padding: var(--sp-4);
    margin-bottom: var(--sp-3);
  }
  table.trab tr:hover td { background: transparent; }
  table.trab td {
    display: flex; justify-content: space-between; align-items: flex-start;
    gap: var(--sp-3); padding: 7px 0;
    border-bottom: 1px dashed var(--gold-line-soft); text-align: right;
  }
  table.trab td:last-child { border-bottom: none; }
  table.trab td::before {
    content: attr(data-label);
    font-size: 10.5px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.06em; color: var(--ink-soft);
    text-align: left; flex-shrink: 0; padding-top: 1px;
  }
  table.trab td[data-label="Título"] { text-align: left; flex-direction: column; align-items: flex-start; }
  table.trab td[data-label="Título"]::before { display: block; margin-bottom: var(--sp-1); }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .bento { grid-template-columns: 1fr; }
  .bento .span-2 { grid-column: span 1; }
}

/* ================= MOVIMENTO REDUZIDO ================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .card { animation: none; }
}
