/* Radar Eleitoral 2026 | ITNext — identidade visual
   Base azul-marinho profundo, destaques ciano/roxo com moderação.
   Contraste mínimo AA em ambos os temas. */

:root {
  --navy-950: #050b1a;
  --navy-900: #0a1330;
  --navy-800: #101c44;
  --navy-700: #172759;
  --navy-600: #22366f;
  --cyan-400: #3fd0e0;
  --cyan-500: #22b8cc;
  --cyan-600: #1897a8;
  --purple-400: #a685f2;
  --purple-500: #8a5cf0;
  --neutral-50: #f6f7fb;
  --neutral-100: #eceff5;
  --neutral-200: #d7dcea;

  --bg: var(--neutral-50);
  --text: var(--navy-900);
  --text-muted: #3c4a6b;
  --surface: #ffffff;
  --border: var(--neutral-200);
}

[data-theme="dark"] {
  --bg: var(--navy-950);
  --text: var(--neutral-50);
  --text-muted: #b7c0d6;
  --surface: var(--navy-800);
  --border: var(--navy-700);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", Inter, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 1rem; }

a { color: inherit; }

.skip-link {
  position: absolute;
  top: -4rem;
  left: 0.5rem;
  z-index: 50;
  background: var(--cyan-500);
  color: var(--navy-950);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-weight: 600;
  transition: top 0.15s ease-in-out;
}
.skip-link:focus { top: 0.5rem; }

:focus-visible {
  outline: 3px solid var(--cyan-500);
  outline-offset: 2px;
  border-radius: 2px;
}

.site-header {
  background: var(--navy-900);
  color: var(--neutral-50);
  position: sticky;
  top: 0;
  z-index: 40;
}
.site-header__top {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
}
.brand { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; }
.brand__mark {
  display: flex; align-items: center; justify-content: center;
  width: 2.25rem; height: 2.25rem; border-radius: 8px;
  background: linear-gradient(135deg, var(--cyan-500), var(--purple-500));
  color: var(--navy-950); font-weight: 700;
}
.brand__text { display: flex; flex-direction: column; line-height: 1.2; }
.brand__title { font-size: 0.9rem; font-weight: 600; color: var(--neutral-100); }
.brand__sub { font-size: 0.75rem; color: var(--cyan-400); }

.btn-ghost {
  background: transparent;
  border: 1px solid var(--navy-600);
  color: var(--neutral-100);
  padding: 0.4rem 0.9rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
}
.btn-ghost:hover { background: var(--navy-700); }

.site-nav { background: rgba(23, 39, 89, 0.6); border-top: 1px solid rgba(255,255,255,0.08); }
.site-nav ul {
  max-width: 1100px; margin: 0 auto; padding: 0.25rem 0.5rem;
  list-style: none; display: flex; flex-wrap: wrap; gap: 0.25rem;
}
.site-nav a {
  display: block; padding: 0.5rem 0.75rem; border-radius: 4px;
  text-decoration: none; color: var(--neutral-200); font-size: 0.85rem;
}
.site-nav a:hover, .site-nav a.is-active { background: var(--navy-700); color: #fff; }

main.container { padding-top: 2rem; padding-bottom: 3rem; min-height: 55vh; }

h1 { font-size: 1.75rem; margin: 0 0 0.5rem; }
h2 { font-size: 1.25rem; margin: 1.5rem 0 0.75rem; }
.subtitle { color: var(--text-muted); max-width: 48rem; }

.notice {
  border: 1px solid var(--cyan-600);
  background: rgba(34, 184, 204, 0.06);
  border-radius: 8px;
  padding: 1rem;
  margin: 1rem 0;
  font-size: 0.9rem;
}
.notice--purple { border-color: var(--purple-500); background: rgba(138, 92, 240, 0.06); }

.empty-state {
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin: 1rem 0;
  font-size: 0.9rem;
  background: rgba(23, 39, 89, 0.03);
}
[data-theme="dark"] .empty-state { background: rgba(255,255,255,0.03); }
.empty-state__title { font-weight: 600; margin: 0 0 0.25rem; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin: 1rem 0;
}

table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { text-align: left; padding: 0.5rem 0.5rem; border-bottom: 1px solid var(--border); }

.uf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
  gap: 0.5rem;
}
.uf-cell {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.5rem;
  text-align: center;
  background: var(--surface);
}
.uf-cell strong { display: block; font-size: 0.95rem; }
.uf-cell span { font-size: 0.7rem; color: var(--text-muted); }

.site-footer {
  background: var(--navy-900);
  color: var(--neutral-200);
  padding: 2rem 0;
  margin-top: 3rem;
  font-size: 0.85rem;
}
.site-footer__title { color: #fff; font-weight: 600; margin-bottom: 0.5rem; }
.site-footer__small { color: #9fabc7; font-size: 0.75rem; }

form label { display: block; font-size: 0.85rem; font-weight: 500; margin-bottom: 0.25rem; }
form input[type="text"], form input[type="email"], form input[type="password"],
form input[type="number"], form input[type="date"], form input[type="file"], form select, form textarea {
  width: 100%;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}
.btn-primary {
  background: var(--navy-900);
  color: #fff;
  border: none;
  padding: 0.6rem 1.1rem;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
}
[data-theme="dark"] .btn-primary { background: var(--cyan-500); color: var(--navy-950); }
.btn-primary:hover { opacity: 0.9; }
.btn-secondary {
  background: transparent;
  border: 1px solid var(--border);
  padding: 0.4rem 0.9rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
}

.alert-error {
  border: 1px solid #d33; background: #fdeaea; color: #7a1414;
  border-radius: 6px; padding: 0.75rem 1rem; font-size: 0.85rem; margin-bottom: 1rem;
}
[data-theme="dark"] .alert-error { background: #3a1414; color: #ffb3b3; border-color: #7a1414; }
.alert-success {
  border: 1px solid #2a8a4a; background: #eafaf0; color: #16532e;
  border-radius: 6px; padding: 0.75rem 1rem; font-size: 0.85rem; margin-bottom: 1rem;
}
[data-theme="dark"] .alert-success { background: #123a20; color: #b3ffcc; border-color: #2a8a4a; }

.tabs { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.tab-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
}
.tab-btn[aria-selected="true"] { background: var(--navy-900); color: #fff; border-color: var(--navy-900); }
[data-theme="dark"] .tab-btn[aria-selected="true"] { background: var(--cyan-500); color: var(--navy-950); border-color: var(--cyan-500); }
.tab-panel[hidden] { display: none; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

fieldset {
  border: 1px solid var(--border); border-radius: 8px; padding: 1rem; margin-bottom: 1.25rem;
}
legend { font-weight: 600; padding: 0 0.4rem; font-size: 0.9rem; }
fieldset label {
  display: block; margin-bottom: 0.75rem; font-size: 0.85rem; color: var(--text-muted);
}
fieldset input[type="text"], fieldset input[type="url"], fieldset input[type="number"],
fieldset input[type="date"], fieldset select, fieldset textarea {
  display: block; width: 100%; margin-top: 0.25rem; padding: 0.5rem 0.6rem;
  border: 1px solid var(--border); border-radius: 6px; background: var(--bg); color: var(--text);
  font-size: 0.9rem;
}
