/* GROVE SORTEIOS | GROVE UI DESIGN SYSTEM
 * Hierarquia de leitura: 16px corpo, 14px auxiliares, pesos 400/600/700.
 * Never use tiny + heavy text. Tokens apply to all routes.
 */
:root {
  color-scheme: light;
  --blue: #0033AB;
  --blue-hover: #002A8C;
  --blue-soft: #EDF3FF;
  --accent: #F2C94C;
  --navy: #071B48;
  --ink: #13213A;
  --ink-strong: #0D1930;
  --muted: #55647A;
  --line: #DFE6F0;
  --line-strong: #CDD8E9;
  --card: #FFFFFF;
  --bg: #F4F6FB;
  --shadow: 0 2px 12px rgba(24, 52, 103, 0.035);
  --radius: 12px;
  --sidebar-width: 258px;
  --font: "Open Sans", Arial, sans-serif;
}
*,*::before,*::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}
button,input,textarea,select { font: inherit; }
button,select { cursor: pointer; }
button { transition: background-color .18s, border-color .18s, color .18s; }
button:disabled { opacity: .48; cursor: not-allowed; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
img { max-width: 100%; }
h1,h2,h3,h4 { color: var(--ink-strong); line-height: 1.25; margin: 0 0 16px; letter-spacing: -.025em; }
h1 { font-size: clamp(26px, 2.5vw, 34px); font-weight: 700; }
h2 { font-size: 24px; font-weight: 700; }
h3 { font-size: 20px; font-weight: 700; }
p { margin: 0 0 16px; }
strong,b { font-weight: 700; }
:focus-visible { outline: 3px solid #7FA6FF; outline-offset: 3px; }
::selection { background: #B8D0FF; color: #0D1930; }
.muted { color: var(--muted); }
.smalltext,.tiny { font-size: 14px; line-height: 1.6; font-weight: 400; }
.tiny b,.smalltext b { font-weight: 600; }
.eyebrow {
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: .065em;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
}
.shell { max-width: 1500px; padding: 0 30px 50px; margin: 0 auto; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -.055em; font-size: 24px; line-height: 1.2; color: var(--ink-strong); white-space: nowrap; }
.brand span { color: var(--blue); }
.brand img { max-width: 172px; width: auto; height: auto; max-height: 52px; object-fit: contain; }
.brand em { font-style: normal; color: var(--accent); }
.topbar {
  min-height: 82px;
  padding: 14px 0;
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
  background: var(--bg);
}
.topbar .brand { font-size: 24px; }
.toplinks { display:flex; align-items:center; gap:10px; }
.link,.action-link {
  background: transparent;
  color: var(--blue);
  border: 0;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.4;
  font-weight: 600;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 8px;
}
.link:hover,.action-link:hover { background: var(--blue-soft); text-decoration: none; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 20px;
  background: var(--blue);
  color: #FFFFFF;
  border: 1px solid var(--blue);
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
}
.btn:hover:not(:disabled) { background: var(--blue-hover); border-color: var(--blue-hover); color: #FFFFFF; text-decoration: none; }
.btn.ghost { background: #FFFFFF; color: var(--blue); border-color: var(--line-strong); }
.btn.ghost:hover:not(:disabled) { background: var(--blue-soft); border-color: var(--blue); color: var(--blue); }
.btn.danger { background: #FFF2F2; color: #A32335; border-color: #F3CCD2; }
.btn.small { min-height: 44px; padding: 9px 12px; font-size: 14px; }
.btn.full { width: 100%; }
.input,textarea,select {
  display: block;
  width: 100%;
  min-height: 48px;
  background: #FFFFFF;
  border: 1px solid var(--line-strong);
  color: var(--ink);
  border-radius: 8px;
  padding: 11px 14px;
  font-size: 16px;
  line-height: 1.5;
  font-weight: 400;
}
textarea { min-height: 122px; resize: vertical; }
.input::placeholder,textarea::placeholder { color: #697890; opacity: 1; }
.input:focus,textarea:focus,select:focus { border-color: var(--blue); outline: 3px solid #0033AB1A; }
input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--blue); vertical-align: middle; margin: 0 9px 0 0; }
input[type="color"] { padding: 5px; min-height: 50px; }
label { display: block; color: #25334C; font-size: 14px; font-weight: 600; line-height: 1.5; margin-bottom: 8px; }
label:has(input[type="checkbox"]) { display: flex; align-items: center; font-weight: 500; font-size: 15px; min-height: 30px; }
.field { margin-bottom: 22px; min-width: 0; }
.card {
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  min-width: 0;
}
.panel-title { color: var(--ink-strong); font-size: 20px; font-weight: 700; margin-bottom: 20px; line-height: 1.35; }
.row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.between { justify-content: space-between; }
.grid2 { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
.grid3 { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; }
.stack { display: grid; gap: 20px; min-width: 0; }
.margin-top { margin-top: 22px; }
.form-foot { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.divider { height: 1px; background: var(--line); margin: 22px 0; }
.right { text-align:right; }
.center { text-align:center; }
.hidden { display:none !important; }
.loading { padding: 22vh 20px; text-align: center; color: var(--blue); font-weight: 600; font-size: 17px; }
.pill,.status {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  max-width: 100%;
  padding: 7px 12px;
  border-radius: 6px;
  background: var(--blue-soft);
  color: #173E93;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  white-space: normal;
}
.pill.warn { background: #FFF5E2; color: #805316; }
.pill.dark { background: #EFF2F6; color: #485A76; }
.status { color: #1B693C; background: #E9F6ED; }
.alert {
  background: #F5F8FF;
  border: 1px solid #CEDBF3;
  border-left: 3px solid var(--blue);
  border-radius: 8px;
  padding: 16px 18px;
  color: #28426E;
  font-size: 15px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.upload { padding: 18px; border: 1px dashed #A9BEDF; border-radius: 8px; background: #F9FBFE; }
.file-input { display: block; width: 100%; font-size: 15px; padding: 8px 0; }
.empty { padding: 52px 20px; text-align: center; color: var(--muted); font-size: 15px; }

/* ADMIN | White workspace, Grove blue navigation, generous spacing. */
.admin-layout { display:grid; grid-template-columns: var(--sidebar-width) minmax(0,1fr); gap:28px; align-items: start; }
.admin-main { min-width: 0; padding-bottom: 50px; }
.sidebar {
  min-height: calc(100vh - 114px);
  padding: 22px 15px 19px;
  background: var(--blue);
  border-radius: 10px;
  color: #FFFFFF;
  position: sticky;
  top: 18px;
  display: flex;
  flex-direction: column;
}
.sidebar .brand { font-size: 22px; margin-bottom: 26px; padding: 2px 12px; color: #FFFFFF; }
.sidebar .brand span { color: #FFFFFF; }
.sidebar .brand img { max-width: 158px; }
.sidebar nav { display: grid; gap: 6px; }
.nav-button {
  width: 100%;
  background: transparent;
  border: 1px solid transparent;
  color: #E9F0FF;
  padding: 12px 13px;
  min-height: 48px;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 7px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
}
.nav-button:hover { color: #FFFFFF; background: rgba(255,255,255,.13); }
.nav-button.active { background: #FFFFFF; color: var(--blue); font-weight: 600; }
.nav-button:focus-visible { outline-color: #FFFFFF; }
.nav-icon { width: 18px; height: 18px; flex: 0 0 18px; stroke-width: 1.8; }
.sidebar .bottom { margin-top: auto; padding: 22px 12px 0; border-top: 1px solid #FFFFFF35; color: #E1ECFF; font-size: 14px; line-height: 1.6; font-weight: 400; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.section-heading h1 { margin-bottom: 4px; }
.section-heading p { margin-bottom: 0; }
.dash-grid { display:grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; margin-bottom: 22px; }
.metric { background: #FFFFFF; border: 1px solid var(--line); border-radius: var(--radius); padding: 25px 24px; }
.metric span { display:block; font-size: 14px; font-weight: 500; color: var(--muted); line-height: 1.5; }
.metric b { color: var(--blue); display:block; font-size: clamp(30px,3vw,40px); line-height: 1.2; font-weight: 700; letter-spacing:-.04em; margin-top: 9px; }
.table-wrap { overflow-x:auto; width:100%; border-radius: 8px; }
table { width:100%; border-collapse:collapse; font-size: 14px; line-height: 1.55; }
th { color: #3E5071; background: #F6F8FC; text-align:left; font-size: 14px; font-weight: 600; letter-spacing: 0; text-transform: none; padding: 15px 14px; border-bottom: 1px solid var(--line-strong); white-space: nowrap; }
td { color:var(--ink); font-size:14px; font-weight:400; padding: 15px 14px; border-bottom:1px solid var(--line); vertical-align:middle; overflow-wrap: anywhere; }
td b { font-weight:600; }
td:last-child { text-align:right; }
tbody tr:last-child td { border-bottom:0; }
tbody tr:hover { background:#F9FBFF; }
table .action-link { white-space:nowrap; }
.proof { background:#F6F8FC; border:1px solid var(--line); padding:14px; border-radius:7px; font:400 14px/1.65 ui-monospace,SFMono-Regular,Menlo,monospace; overflow-wrap:anywhere; }
.preview {
  min-height: 260px;
  padding: 32px;
  border-radius: 10px;
  background: var(--navy);
  color: #FFFFFF;
  text-align: center;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
}
.preview .brand { color:#FFFFFF; font-size:25px; }
.preview .brand span { color: #FFFFFF; }
.preview h2 { color: #FFFFFF; font-size: clamp(26px,2.6vw,36px); line-height:1.25; }
.preview .eyebrow { color: #DAE6FF; }
.preview p { color: var(--accent); margin-bottom:0; }
.menu-toggle,.menu-close,.mobile-backdrop { display:none; }

/* PARTICIPANT | Accessible, light, brand-first; no decorative gradients. */
.hero-page {
  min-height: 100svh;
  background: var(--bg);
  color: var(--ink);
  padding: 24px 20px 34px;
}
.hero-wrap { width:100%; max-width: 630px; margin: 0 auto; }
.hero-head {
  min-height: 77px;
  padding: 16px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  border-bottom: 2px solid var(--blue);
}
.hero-head .brand { font-size:26px; color:var(--ink); }
.hero-head .brand span { color:var(--blue); }
.hero-head .pill { background: var(--blue-soft); }
.hero-content { padding: 46px 0 24px; }
.hero-content h1 { color:var(--ink-strong); font-size: clamp(31px,5vw,46px); line-height:1.22; font-weight:700; letter-spacing:-.04em; margin: 15px 0 18px; }
.hero-content p { color:var(--muted); font-size: 16px; line-height:1.7; margin-bottom:22px; }
.hero-content .eyebrow { color:var(--blue); }
.hero-content .card { padding: 28px; margin-top: 26px; }
.hero-content .alert { color:#28426E; background:#F5F8FF; border-color:#CEDBF3; }
.hero-content .alert b { color:var(--ink); }
.hero-content .alert a { color:var(--blue); }
.hero-footer { color: var(--muted); font-size:14px; line-height:1.6; padding:15px 0; border-top:1px solid var(--line); }
.ticket-card {
  margin: 30px 0 22px;
  padding: 35px 25px;
  border:1px solid var(--line);
  border-top:4px solid var(--blue);
  border-radius: 12px;
  background: #FFFFFF;
  box-shadow: var(--shadow);
  text-align:center;
}
.ticket { color:var(--blue); font-size: clamp(76px,15vw,116px); line-height:1.15; font-weight:700; letter-spacing:-.065em; font-variant-numeric:tabular-nums; margin:12px 0; }
.ticket-card .status { margin-top:8px; }
.hero-content .btn.full { min-height:54px; font-size:16px; }
.hero-content .row .btn { flex: 1 1 auto; }
.login-card { max-width: 470px; margin: clamp(40px,10vh,105px) auto 0; }
.login-card .brand { justify-content:center; font-size:27px; }
.login-card h1 { font-size:32px; }
.login-card .card { padding:34px; }
.login-card .smalltext { color:var(--muted); }

/* FULLSCREEN TELÃO | Only large text and high-contrast color. */
.screen {
  position:relative;
  display:flex;
  justify-content:center;
  align-items:center;
  background:var(--navy);
  color:#FFFFFF;
  width:100%;
  min-height:100svh;
  overflow:hidden;
}
.screen-inner { width:100%; max-width:1420px; margin:auto; padding: clamp(30px,6vw,100px); text-align:center; position:relative; z-index:1; }
.screen .brand { justify-content:center; color:#FFFFFF; font-size:clamp(24px,3vw,46px); }
.screen .brand span { color:#FFFFFF; }
.screen .brand img { max-width: clamp(160px,16vw,300px); max-height:100px; }
.screen .eyebrow { font-size:clamp(16px,1.5vw,23px); color:#D9E4FF; font-weight:600; letter-spacing:.08em; }
.screen h1 { color:#FFFFFF; font-size:clamp(44px,5vw,98px); line-height:1.14; font-weight:700; margin:28px 0; }
.screen p { font-size:clamp(20px,2vw,30px); color:#DFE8FA; margin:10px 0; }
.screen-number { font-size:clamp(120px,22vw,320px); line-height:1; font-weight:700; letter-spacing:-.085em; font-variant-numeric:tabular-nums; color:#FFFFFF; }
.screen .winner { color:#FFFFFF; font-size:clamp(36px,5vw,74px); font-weight:700; line-height:1.2; margin:8px 0 14px; }
.screen .prize { color:var(--accent); font-size:clamp(23px,3vw,43px); font-weight:600; }
.screen .bottomnote { position:absolute; inset:auto 0 20px; text-align:center; color:#CCD9F3; font-size:clamp(14px,1.15vw,18px); font-weight:400; padding:0 20px; }
.live-dot { display:inline-block; vertical-align:middle; width:11px; height:11px; border-radius:50%; background:#8AD8C1; margin-right:10px; }
.spin { animation: pulse .7s infinite alternate; }
@keyframes pulse { to { opacity:.75; transform:scale(1.018); } }
.overlay-win {
  position:fixed; inset:0; z-index:80;
  background:rgba(7,27,72,.84);
  display:flex; align-items:center; justify-content:center;
  padding:20px;
}
.overlay-inner { width:100%; max-width:580px; background:#FFFFFF; border:1px solid var(--line); border-radius:14px; padding:36px; text-align:center; box-shadow:0 25px 80px #00174D40; }
.overlay-inner h2 { font-size:clamp(30px,4vw,42px); line-height:1.25; }
.overlay-inner p { font-size:16px; }
#notice { position:fixed; right:20px; bottom:20px; z-index:100; width:min(420px,calc(100vw - 40px)); }
.toast { color:#FFFFFF; font-size:14px; font-weight:500; line-height:1.6; background:#17345E; border:1px solid #446089; padding:17px 20px; border-radius:9px; margin-top:10px; box-shadow:0 8px 24px #0002; }
.toast.bad { background:#9E2A3E; border-color:#8D2535; }

/* CONSISTENT RESPONSIVE BEHAVIOR */
@media(max-width:1180px) {
  .shell { padding-left:20px; padding-right:20px; }
  .admin-layout { gap:20px; --sidebar-width:228px; }
  .sidebar { padding:18px 12px; }
  .card { padding:24px; }
  .grid2 { gap:16px; }
}
@media(max-width:850px) {
  .shell { padding:0 20px 36px; }
  .topbar { position:sticky; top:0; z-index:30; min-height:72px; margin:0 -20px 24px; padding:12px 20px; background:#FFFFFF; }
  .topbar .brand { font-size:22px; }
  .toplinks { gap:4px; }
  .admin-layout { display:block; }
  .admin-main { width:100%; }
  .menu-toggle,.menu-close { display:inline-flex; align-items:center; justify-content:center; width:44px; height:44px; border:1px solid var(--line-strong); color:var(--blue); background:#FFFFFF; border-radius:8px; font-size:24px; }
  .menu-close { margin:0 0 20px auto; background:transparent; color:#FFFFFF; border-color:#FFFFFF50; }
  .sidebar {
    position:fixed;
    left:0; top:0; bottom:0;
    width:min(310px,87vw);
    max-height:100svh;
    min-height:0;
    overflow:auto;
    border-radius:0 12px 12px 0;
    padding:22px;
    z-index:55;
    transform:translateX(-105%);
    visibility:hidden;
    transition:transform .2s ease,visibility .2s;
  }
  .shell.menu-open .sidebar { transform:translateX(0);visibility:visible; }
  .mobile-backdrop { display:block; position:fixed; inset:0; width:100%; height:100svh; border:0; background:#061936A8; z-index:54; opacity:0; pointer-events:none; transition:opacity .2s; }
  .shell.menu-open .mobile-backdrop { opacity:1;pointer-events:auto; }
  .dash-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media(max-width:680px) {
  .shell { padding:0 16px 30px; }
  .topbar { margin:0 -16px 22px; padding:12px 16px; }
  .section-heading { align-items:flex-start; flex-direction:column; gap:10px; }
  .section-heading h1 { font-size:26px; }
  .grid2,.grid3 { grid-template-columns:minmax(0,1fr); gap:16px; }
  .dash-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
  .metric { padding:20px; }
  .metric b { font-size:32px; }
  .card { padding:20px; }
  .hero-page { padding:16px 20px 25px; }
  .hero-content { padding:32px 0 20px; }
  .hero-content h1 { font-size:clamp(30px,8vw,41px); }
  .hero-head .brand { font-size:23px; }
  .ticket-card { padding:28px 18px; }
  .form-foot { justify-content:stretch; }
  .form-foot .btn { flex:1; }
  .login-card { margin-top:52px; }
  .login-card .card { padding:24px; }
  .alert,.smalltext,.tiny { font-size:14px; }
  .file-input { font-size:16px; }
  .screen-inner { padding:26px; }
  .screen .bottomnote { bottom:13px; font-size:14px; }
  .overlay-inner { padding:26px 18px; }
}
@media(max-width:430px) {
  .topbar .brand { font-size:20px; }
  .toplinks .link { padding:8px; font-size:14px; }
  .dash-grid { grid-template-columns:minmax(0,1fr); }
  .metric { padding:18px; }
  .row .btn { width:100%; }
  .hero-content .row .btn { flex-basis:100%; }
  .section-heading h1 { font-size:25px; }
  #notice { right:12px; bottom:12px; width:calc(100vw - 24px); }
}
@media(prefers-reduced-motion: reduce) {
  *,*::before,*::after { animation-duration:.01ms !important;animation-iteration-count:1 !important;scroll-behavior:auto !important;transition-duration:.01ms !important; }
}

/* Sidebar alignment refinements */
.sidebar nav { margin-top:6px; }
.sidebar .nav-button span { flex:1; }
.topbar .menu-toggle { flex-shrink:0; }
