/* =====================================================================
   Tema — troque as cores aqui para combinar com a sua marca
   ===================================================================== */
:root {
  /* Cores do Portal */
  --brand-blue: #04679e;
  --brand-blue-dark: #03507b;
  --brand-green: #8cc63f;
  --brand-green-dark: #5e9a1f;

  --bg: #f2f4f7;
  --bg-soft: #ffffff;
  --card: #ffffff;
  --card-2: #eef2f6;
  --line: #dbe2ea;
  --text: #15212c;
  --muted: #5c6875;
  --gold: var(--brand-blue);        /* cor principal (botões, seleção) */
  --gold-2: var(--brand-blue-dark); /* textos de destaque */
  --gold-ink: #ffffff;              /* texto sobre a cor principal */
  --green: #3f8f1b;
  --red: #d23b3b;
  --warn: #a8660a;
  --radius: 16px;
  --radius-sm: 10px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  background-image: radial-gradient(ellipse 80% 50% at 50% -10%, rgba(4, 103, 158, .13), transparent 70%);
  background-repeat: no-repeat;
  color: var(--text);
  font: 16px/1.5 var(--font);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--gold-2); }
h1, h2, h3 { line-height: 1.2; margin: 0; }
p { margin: 0; }
code { background: var(--card-2); padding: 1px 6px; border-radius: 6px; font-size: .9em; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.spacer { flex: 1; }
.empty { color: var(--muted); text-align: center; padding: 40px 16px; }
.warn-text { color: var(--warn); margin-top: 8px; }
[hidden] { display: none !important; }

/* ---------- Botões e campos ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--line); background: var(--card-2); color: var(--text);
  padding: 11px 18px; border-radius: 999px; font: 600 15px var(--font);
  cursor: pointer; text-decoration: none; transition: transform .08s, background .15s, border-color .15s;
  white-space: nowrap;
}
.btn:hover { border-color: #a9b8c7; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.primary {
  background: linear-gradient(180deg, #0a7bbb, var(--brand-blue)); color: #fff;
  border-color: transparent; box-shadow: 0 6px 20px rgba(4, 103, 158, .25);
}
.btn.ghost { background: transparent; }
.btn.danger { color: var(--red); }
.btn.danger:hover { border-color: var(--red); }
.btn.sm { padding: 7px 12px; font-size: 13px; }
.btn.block { width: 100%; }
.icon-btn {
  width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line);
  background: transparent; color: var(--text); cursor: pointer; font-size: 14px;
}
.icon-btn:disabled { opacity: .3; cursor: default; }
.icon-btn.danger { color: var(--red); }

input, select, textarea {
  width: 100%; background: var(--bg-soft); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 11px 13px; font: 15px var(--font); outline: none; transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(4, 103, 158, .18); }
input[type=checkbox] { width: 18px; height: 18px; padding: 0; accent-color: var(--gold); flex: none; }
input.saved { border-color: var(--green); box-shadow: 0 0 0 3px rgba(62, 207, 142, .18); }
input[aria-invalid=true] { border-color: var(--red); }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--muted); }
.field small { font-size: 12px; }
.req { color: var(--gold); }
.field-err { color: var(--red); font-size: 14px; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; white-space: nowrap; }

.loading { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 60px 16px; color: var(--muted); }
.spinner {
  width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line);
  border-top-color: var(--gold); animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Avisos ---------- */
#toasts {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  display: flex; flex-direction: column; gap: 8px; z-index: 100; width: min(92vw, 420px);
}
.toast {
  background: #ffffff; border: 1px solid var(--line); border-left: 4px solid var(--green);
  padding: 12px 16px; border-radius: 12px; font-size: 14px; box-shadow: 0 10px 30px rgba(21, 33, 44, .15);
  animation: pop .2s ease-out; transition: opacity .3s, transform .3s;
}
.toast.err { border-left-color: var(--red); }
.toast.warn { border-left-color: var(--warn); }
.toast.out { opacity: 0; transform: translateY(8px); }
@keyframes pop { from { opacity: 0; transform: translateY(8px); } }

/* =====================================================================
   PÁGINA DE VOTAÇÃO
   ===================================================================== */
.vote-wrap { max-width: 880px; margin: 0 auto; padding: 0 16px 40px; }

.preview-bar {
  margin: 12px 0 0; padding: 10px 14px; border-radius: 12px; font-size: 14px;
  background: rgba(255, 181, 71, .12); color: var(--warn); border: 1px solid rgba(255, 181, 71, .35);
}

.hero { position: relative; text-align: center; padding: 56px 8px 36px; }
.hero.has-cover { margin: 16px 0 8px; padding: 72px 20px 40px; border-radius: 22px; overflow: hidden; }
.hero-cover { position: absolute; inset: 0; background-size: cover; background-position: center; }
.hero-cover::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(242, 244, 247, .35) 0%, rgba(242, 244, 247, .85) 70%, var(--bg) 100%);
}
.hero-inner { position: relative; }
.hero-icon { font-size: 44px; filter: drop-shadow(0 6px 20px rgba(4, 103, 158, .45)); }
.hero h1 {
  font-family: var(--display); font-weight: 700; font-size: clamp(30px, 6vw, 48px); margin-top: 8px;
  background: linear-gradient(90deg, var(--brand-blue) 35%, var(--brand-green-dark)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-desc { color: #33414e; max-width: 620px; margin: 14px auto 0; font-size: 17px; }
.hero-meta { color: var(--muted); font-size: 14px; margin-top: 10px; }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; margin-top: 16px;
}
.card.center { text-align: center; padding: 36px 22px; }
.card .big, .big { font-size: 18px; }

.code-card { max-width: 420px; margin: 8px auto 0; display: flex; flex-direction: column; gap: 12px; text-align: center; }
.code-card input { text-align: center; font-size: 20px; letter-spacing: .08em; }

.cat { scroll-margin-top: 20px; transition: border-color .2s; }
.cat.done { border-color: rgba(4, 103, 158, .45); }
.cat.missing { border-color: var(--red); }
.cat-err { color: var(--red); font-size: 14px; margin-top: 12px; }
.cat-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 18px; }
.cat-head h2 { font-family: var(--display); font-size: 23px; font-weight: 600; }
.cat-head .muted { margin-top: 4px; }
.cat-num {
  flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: var(--card-2); border: 1px solid var(--line); color: var(--gold-2); font-weight: 700; font-size: 14px;
}
.cat.done .cat-num { background: var(--gold); color: var(--gold-ink); border-color: var(--gold); }
.cat-rules { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--gold); margin-top: 6px; font-weight: 600; }

.nominees { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.nominee {
  position: relative; display: flex; flex-direction: column; text-align: left;
  background: var(--bg-soft); border: 2px solid var(--line); border-radius: 14px;
  padding: 0; overflow: hidden; color: var(--text); font: inherit; cursor: pointer;
  transition: transform .12s, border-color .15s, box-shadow .15s;
}
.nominee:hover { transform: translateY(-2px); border-color: #9fb3c8; }
.nominee:focus-visible { outline: 3px solid var(--gold-2); outline-offset: 2px; }
.nominee.on { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(4, 103, 158, .2), 0 10px 24px rgba(21, 33, 44, .12); }
.nom-media { display: block; aspect-ratio: 1 / 1; background: var(--card-2); }
.nom-img { width: 100%; height: 100%; object-fit: cover; }
.nom-img.ph, .res-av.ph, .ed-thumb.ph {
  display: grid; place-items: center; width: 100%; height: 100%;
  background: linear-gradient(135deg, #e3eef6, #d4e7c0); color: var(--brand-blue);
  font-family: var(--display); font-weight: 700; font-size: 34px;
}
.nom-info { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px 12px; }
.nom-info strong { font-size: 15px; line-height: 1.3; }
.nom-info span { font-size: 13px; color: var(--muted); }
.nom-check {
  position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 800; font-size: 15px;
  background: rgba(242, 244, 247, .7); border: 2px solid rgba(255, 255, 255, .9); color: transparent;
  transition: all .15s;
}
.nominee.on .nom-check { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); transform: scale(1.08); }

.voter-card h2 { font-family: var(--display); font-size: 22px; margin-bottom: 16px; }
.voter-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.voter-grid .full { grid-column: 1 / -1; }
.check-line { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; cursor: pointer; }
.check-line input { margin-top: 2px; }

.submit-bar {
  position: sticky; bottom: 0; z-index: 10; margin: 20px -16px 0; padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 16px;
  background: rgba(242, 244, 247, .88); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
}
.progress-wrap { flex: 1; min-width: 0; }
.progress-text { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.progress { height: 6px; border-radius: 99px; background: var(--card-2); overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--brand-blue), var(--brand-green)); transition: width .3s; }
.big-btn { padding: 14px 26px; font-size: 16px; }

.thanks-icon { font-size: 54px; }
.thanks h2 { font-family: var(--display); font-size: 30px; margin: 8px 0 12px; }
.thanks .muted { margin: 12px 0 20px; }

.msg-box { max-width: 460px; margin: 18vh auto 0; text-align: center; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.msg-icon { font-size: 48px; }
.msg-box h1 { font-family: var(--display); font-size: 28px; }
.msg-box p { color: var(--muted); }

/* ---------- Resultados ---------- */
.results { display: flex; flex-direction: column; gap: 16px; margin-top: 16px; }
.res-cat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.res-cat header { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.res-cat h3 { font-family: var(--display); font-size: 21px; }
.res-cat header .muted { font-size: 13px; white-space: nowrap; }
.res-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.res-av { width: 42px; height: 42px; flex: none; border-radius: 50%; object-fit: cover; overflow: hidden; }
.res-av.ph { font-size: 15px; width: 42px; height: 42px; }
.res-main { flex: 1; min-width: 0; }
.res-top { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.res-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.res-num { font-weight: 700; white-space: nowrap; }
.res-num small { font-weight: 400; color: var(--muted); margin-left: 4px; }
.res-bar { height: 8px; border-radius: 99px; background: var(--card-2); overflow: hidden; }
.res-bar span { display: block; height: 100%; background: #b3c1ce; border-radius: 99px; }
.res-row.win .res-bar span { background: linear-gradient(90deg, var(--brand-blue), var(--brand-green)); }
.res-row.win .res-name { color: var(--gold-2); }

/* =====================================================================
   PAINEL
   ===================================================================== */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px;
  padding: 12px 20px; background: rgba(242, 244, 247, .9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.brand { font-weight: 700; font-size: 17px; color: var(--text); text-decoration: none; display: inline-flex; gap: 8px; align-items: center; }
.admin-wrap { max-width: 1040px; margin: 0 auto; padding: 24px 16px 80px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.page-head { display: flex; align-items: flex-end; gap: 12px; margin: 8px 0 18px; }
.page-head h1 { font-family: var(--display); font-size: 30px; }
.back { display: inline-block; color: var(--muted); text-decoration: none; font-size: 14px; margin-bottom: 6px; }
.back:hover { color: var(--text); }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.badge {
  font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 99px;
  background: var(--card-2); border: 1px solid var(--line); color: var(--muted);
}
.badge.green { color: var(--green); border-color: rgba(62, 207, 142, .4); }
.badge.red { color: var(--red); border-color: rgba(255, 107, 107, .4); }
.badge.gold { color: var(--gold-2); border-color: rgba(4, 103, 158, .5); }

.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 16px; }
.login .brand { font-size: 20px; justify-content: center; margin-bottom: 4px; }

.new-poll { display: flex; gap: 10px; margin-bottom: 18px; }
.poll-list { display: flex; flex-direction: column; gap: 12px; }
.poll-card { display: flex; justify-content: space-between; align-items: center; gap: 16px; text-decoration: none; color: var(--text); transition: border-color .15s; }
.poll-card:hover { border-color: var(--gold); }
.poll-card h3 { font-size: 18px; }
.poll-count { text-align: right; display: flex; flex-direction: column; }
.poll-count strong { font-size: 24px; color: var(--gold-2); }
.poll-count span { font-size: 12px; color: var(--muted); }

.linkbox { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.linkrow { display: flex; gap: 8px; align-items: center; }
.linkrow input { font-family: ui-monospace, Consolas, monospace; font-size: 14px; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs a {
  padding: 10px 14px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px;
  border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
}
.tabs a.on { color: var(--gold-2); border-bottom-color: var(--gold); }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid h2 { font-size: 16px; text-transform: uppercase; letter-spacing: .06em; color: var(--gold); margin-top: 10px; }
.form-grid h2:first-child { margin-top: 0; }
.prefix { display: flex; align-items: center; background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.prefix em { font-style: normal; color: var(--muted); padding-left: 12px; font-size: 14px; font-family: ui-monospace, Consolas, monospace; }
.prefix input { border: 0; background: transparent; box-shadow: none !important; }
.img-pick { display: flex; gap: 14px; align-items: stretch; }
.cover-prev {
  width: 200px; flex: none; aspect-ratio: 16 / 9; border-radius: 12px; border: 1px solid var(--line);
  background: var(--bg-soft) center / cover no-repeat;
}
.cover-prev.empty { background-image: repeating-linear-gradient(45deg, transparent 0 10px, rgba(21, 33, 44, .04) 10px 20px); }
.img-pick-ctrl { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.row-btns { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.field-row { display: grid; grid-template-columns: 1fr 220px auto 32px; gap: 10px; align-items: center; margin-bottom: 8px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 4px 0; }

.cat-toolbar { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.ed-cat { margin-bottom: 14px; }
.ed-cat-head { display: flex; gap: 12px; align-items: center; }
.ed-cat-name { font-size: 18px; font-weight: 700; }
.ed-cat-opts { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; margin: 12px 0 16px 46px; }
.inline { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; white-space: nowrap; }
.inline input { width: 70px; padding: 8px 10px; }
.ed-noms { display: flex; flex-direction: column; gap: 8px; margin-left: 46px; }
.ed-nom { display: flex; gap: 12px; align-items: center; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px; padding: 8px; }
.ed-thumb { width: 52px; height: 52px; flex: none; border-radius: 10px; object-fit: cover; overflow: hidden; }
.ed-thumb.ph { font-size: 18px; width: 52px; height: 52px; }
.ed-nom-fields { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; min-width: 0; }
.ed-nom-fields input { padding: 8px 10px; font-size: 14px; }
.ed-nom-add { margin: 12px 0 0 46px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.ed-nom-add details { width: 100%; }
.ed-nom-add summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.ed-nom-add textarea { margin: 8px 0; }

.publish-box { display: flex; align-items: center; gap: 16px; justify-content: space-between; margin-bottom: 14px; }
.publish-box.on { border-color: rgba(62, 207, 142, .5); }
.publish-box p { margin-top: 4px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 14px; }
.stat { display: flex; flex-direction: column; }
.stat strong { font-size: 28px; color: var(--gold-2); }
.stat span { font-size: 13px; color: var(--muted); }

/* ---------- Celular ---------- */
@media (max-width: 720px) {
  .hide-sm { display: none; }
  .voter-grid, .form-grid { grid-template-columns: 1fr; }
  .nominees { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .card { padding: 18px 16px; }
  .submit-bar { gap: 12px; }
  .big-btn { padding: 13px 18px; }
  .new-poll, .linkrow, .publish-box, .img-pick { flex-direction: column; align-items: stretch; }
  .cover-prev { width: 100%; }
  .field-row { grid-template-columns: 1fr 1fr; }
  .field-row input[data-k=label] { grid-column: 1 / -1; }
  .ed-cat-head { flex-wrap: wrap; }
  .ed-cat-name { flex: 1 1 60%; }
  .ed-cat-opts { grid-template-columns: 1fr; margin-left: 0; }
  .ed-noms, .ed-nom-add { margin-left: 0; }
  .ed-nom { flex-wrap: wrap; }
  .ed-nom-fields { grid-template-columns: 1fr; flex-basis: calc(100% - 64px); }
  .stats { grid-template-columns: 1fr 1fr 1fr; }
  .stat strong { font-size: 20px; }
  .poll-card { flex-direction: column; align-items: flex-start; }
  .poll-count { text-align: left; flex-direction: row; gap: 6px; align-items: baseline; }
}

/* ---------- Modo demonstração ---------- */
.demo-bar {
  display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap;
  padding: 8px 16px; font-size: 13px; text-align: center;
  background: #e6f0f7; color: #10324a; border-bottom: 1px solid #c6dbea;
}
.demo-bar button {
  background: transparent; color: var(--gold-2); border: 1px solid #9fbfd6; border-radius: 99px;
  padding: 4px 12px; font: 600 12px var(--font); cursor: pointer;
}
.center-text { text-align: center; }

/* ---------- Opções em lista (categorias sem fotos) ---------- */
.nominees.as-list { display: flex; flex-direction: column; gap: 8px; }
.nominees.as-list .nominee {
  flex-direction: row; align-items: center; gap: 14px;
  padding: 14px 16px; border-width: 1.5px; border-radius: 12px;
}
.nominees.as-list .nominee:hover { transform: none; background: var(--card-2); }
.nominees.as-list .nominee.on { background: rgba(4, 103, 158, .1); box-shadow: 0 0 0 1px var(--gold); }
.nominees.as-list .nom-info { padding: 0; flex: 1; min-width: 0; }
.nominees.as-list .nom-info strong { font-size: 16px; font-weight: 500; }
.nominees.as-list .nominee.on .nom-info strong { font-weight: 600; }
.nom-mark {
  flex: none; width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid #b3c1ce; display: grid; place-items: center; transition: all .15s;
}
.nominees.multi .nom-mark { border-radius: 6px; }
.nominee.on .nom-mark { border-color: var(--gold); background: var(--gold); }
.nominee.on .nom-mark::after {
  content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--gold-ink);
}
.nominees.multi .nominee.on .nom-mark::after {
  content: '✓'; width: auto; height: auto; background: none; color: var(--gold-ink);
  font-size: 14px; font-weight: 800; line-height: 1;
}

/* ---------- Aviso de voto secreto ---------- */
.submit-bar { flex-wrap: wrap; }
.secret-note { flex-basis: 100%; text-align: center; font-size: 13px; color: var(--muted); margin-top: -4px; }

/* ---------- Etapas (um grupo por tela) ---------- */
.stepper {
  position: sticky; top: 0; z-index: 12; margin: 0 -16px; padding: 12px 16px 10px;
  background: rgba(242, 244, 247, .92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.step-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.step-count { font-size: 13px; color: var(--muted); white-space: nowrap; }
.stepper select { width: auto; max-width: 62%; padding: 7px 10px; font-size: 14px; font-weight: 600; }
.group-title {
  font-family: var(--display); font-size: clamp(26px, 5vw, 34px); margin: 24px 0 4px;
  color: var(--gold-2);
}
.final-card h2 { font-family: var(--display); font-size: 28px; margin: 8px 0 10px; }
.final-card .muted { margin-top: 8px; }

/* ---------- Opção "Outro" ---------- */
.other-wrap { margin-top: 8px; }
.other-box { display: flex; align-items: center; gap: 10px; padding: 2px 2px 0 38px; }
.other-box input { flex: 1; }
.other-box input.invalid { border-color: var(--red); box-shadow: 0 0 0 3px rgba(255, 107, 107, .18); }
.other-count { font-size: 12px; color: var(--muted); white-space: nowrap; min-width: 44px; text-align: right; }
@media (max-width: 720px) { .other-box { padding-left: 0; } }

/* ---------- Tema Portal: detalhes ---------- */
body {
  background-image:
    radial-gradient(ellipse 70% 40% at 15% -5%, rgba(4, 103, 158, .10), transparent 70%),
    radial-gradient(ellipse 60% 40% at 90% -5%, rgba(140, 198, 63, .14), transparent 70%);
}
.hero h1, .cat-head h2, .group-title, .res-cat h3, .page-head h1, .voter-card h2, .final-card h2, .thanks h2, .msg-box h1 {
  font-weight: 800; letter-spacing: -.02em;
}
.hero-icon { filter: none; }
.card, .panel, .res-cat { box-shadow: 0 1px 2px rgba(21, 33, 44, .05); }
.cat.done { border-color: rgba(140, 198, 63, .8); }
.cat.done .cat-num { background: var(--brand-green); border-color: var(--brand-green); color: #fff; }
.group-title { color: var(--brand-blue); }
.cat-rules { color: var(--brand-green-dark); }
.badge.gold { color: var(--brand-blue); border-color: rgba(4, 103, 158, .4); }
.res-row.win .res-name { color: var(--brand-blue); }
.demo-bar button { color: var(--brand-blue); }

/* Resultados: nomes escritos em "Outro" */
.res-others { margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 10px; }
.res-others summary { cursor: pointer; font-size: 14px; color: var(--muted); font-weight: 600; }
.res-other { display: flex; justify-content: space-between; gap: 12px; padding: 6px 2px; border-bottom: 1px solid var(--card-2); font-size: 14px; }

/* Painel: título de grupo na lista de categorias */
.ed-group { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--brand-blue); margin: 22px 0 8px; }
.ed-cat-opts + .ed-cat-opts { margin-top: -6px; }
