/* =========================================================
   Sistema de Registro de Votaciones · PP 2026
   Leandro N. Alem · Misiones
   ========================================================= */

:root {
  --forest: #0b3b30;
  --forest-deep: #072a22;
  --forest-mid: #115343;
  --green: #146b54;
  --green-light: #1f8a6d;
  --green-soft: #e8f3ee;
  --gold: #b88a3b;
  --gold-deep: #8a641f;
  --gold-soft: #f6eede;
  --blue: #315c74;
  --blue-soft: #eaf0f4;
  --slate-soft: #eef1f3;
  --red: #a23a32;
  --red-soft: #f8e9e7;
  --ink: #14231f;
  --ink-soft: #34443f;
  --muted: #65756f;
  --muted-light: #6f7e78;
  --line: #dfe7e3;
  --line-strong: #cad6d1;
  --bg: #f3f6f4;
  --surface: #ffffff;
  --surface-soft: #f8faf9;
  --shadow-xs: 0 1px 2px rgba(12, 41, 33, 0.05);
  --shadow-sm: 0 8px 24px rgba(12, 41, 33, 0.055);
  --shadow-md: 0 18px 44px rgba(12, 41, 33, 0.09);
  --shadow-lg: 0 32px 80px rgba(7, 42, 34, 0.18);
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --sidebar-width: 274px;
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Cascadia Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--font);
  font-size: 14.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.login-body {
  background: #f7f9f8;
}

body.error-body {
  background:
    radial-gradient(circle at 20% 20%, rgba(184, 138, 59, 0.08), transparent 30%),
    var(--bg);
}

h1, h2, h3, h4, h5, h6, p, ul, ol, dl, dd, figure {
  margin: 0;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.025em;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

img, svg {
  max-width: 100%;
}

ul, ol {
  padding: 0;
  list-style: none;
}

[hidden] {
  display: none !important;
}

::selection {
  color: var(--forest-deep);
  background: #efd9ab;
}

:focus-visible {
  outline: 3px solid rgba(184, 138, 59, 0.55);
  outline-offset: 3px;
}

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

.skip-link {
  position: fixed;
  top: -60px;
  left: 18px;
  z-index: 1000;
  padding: 10px 18px;
  border-radius: 0 0 8px 8px;
  color: var(--forest);
  background: #fff;
  font-weight: 700;
  box-shadow: var(--shadow-md);
  transition: top 0.18s ease;
}

.skip-link:focus {
  top: 0;
}

/* =========================================================
   Utilidades y componentes comunes
   ========================================================= */

.tone-forest { color: var(--forest); background: #e8f0ed; }
.tone-green { color: var(--green); background: var(--green-soft); }
.tone-gold { color: var(--gold-deep); background: var(--gold-soft); }
.tone-blue { color: var(--blue); background: var(--blue-soft); }
.tone-slate { color: #596b65; background: var(--slate-soft); }
.tone-red { color: var(--red); background: var(--red-soft); }
.tone-neutral { color: var(--muted); background: var(--surface-soft); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 11px;
  color: var(--gold-deep);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow i {
  font-size: 11px;
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px 0;
}

.card-kicker {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.card-head h2,
.table-card-head h2 {
  font-size: 18px;
  letter-spacing: -0.02em;
}

.card-description {
  max-width: 560px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.card-head-icon {
  display: grid;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  color: var(--forest);
  background: var(--green-soft);
  font-size: 17px;
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11.5px;
}

.card-foot i {
  margin-right: 5px;
  color: var(--green);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 17px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  transition: transform 0.15s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn i {
  font-size: 12px;
}

.btn-primary {
  color: #fff;
  background: var(--forest);
  border-color: var(--forest);
  box-shadow: 0 7px 16px rgba(11, 59, 48, 0.16);
}

.btn-primary:hover {
  background: var(--forest-mid);
  border-color: var(--forest-mid);
  box-shadow: 0 9px 22px rgba(11, 59, 48, 0.22);
}

.btn-gold {
  color: var(--forest-deep);
  background: var(--gold);
  border-color: var(--gold);
  box-shadow: 0 7px 16px rgba(184, 138, 59, 0.18);
}

.btn-gold:hover {
  background: #c69a4b;
  border-color: #c69a4b;
}

.btn-outline {
  color: var(--ink-soft);
  background: #fff;
  border-color: var(--line-strong);
}

.btn-outline:hover {
  color: var(--forest);
  border-color: #aebeb7;
  background: var(--surface-soft);
}

.btn-ghost {
  color: var(--muted);
  background: transparent;
}

.btn-ghost:hover {
  color: var(--forest);
  background: var(--green-soft);
}

.btn-danger {
  color: #fff;
  background: var(--red);
  border-color: var(--red);
}

.btn-danger-outline {
  color: var(--red);
  background: #fff;
  border-color: #e4c3bf;
}

.btn-danger-outline:hover {
  background: var(--red-soft);
  border-color: #dba7a1;
}

.btn-sm {
  min-height: 36px;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 12px;
}

.btn-xs {
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 7px;
  font-size: 11.5px;
}

.btn-lg {
  min-height: 49px;
  padding: 12px 22px;
  border-radius: 11px;
  font-size: 14px;
}

.btn-block {
  width: 100%;
}

.btn.is-loading,
.btn:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
  box-shadow: none;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--green);
  font-size: 12.5px;
  font-weight: 700;
  transition: color 0.18s ease;
}

.text-link:hover {
  color: var(--forest);
}

.text-link i {
  font-size: 10px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.badge i {
  font-size: 10px;
}

.badge.is-voted {
  color: #0c664b;
  background: #e3f3ec;
}

.badge.is-enabled {
  color: var(--gold-deep);
  background: var(--gold-soft);
}

.badge.is-pending {
  color: #5e6f68;
  background: var(--slate-soft);
}

.category-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 800;
  white-space: nowrap;
}

.category-pill i {
  font-size: 9.5px;
}

.category-pill.is-joven {
  color: var(--green);
  background: var(--green-soft);
}

.category-pill.is-general {
  color: var(--blue);
  background: var(--blue-soft);
}

.category-pill.is-neutral {
  color: var(--muted);
  background: var(--slate-soft);
}

.avatar {
  display: inline-grid;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid #d8e5df;
  border-radius: 12px;
  color: var(--forest);
  background: linear-gradient(145deg, #f1f7f4, #e4efe9);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.avatar-sm {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: 10.5px;
}

.avatar-lg {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  font-size: 17px;
}

.avatar-xl {
  width: 82px;
  height: 82px;
  border-radius: 21px;
  font-size: 24px;
}

.legend-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.legend-dot.is-voted,
.shortcut-dot.is-voted {
  background: var(--green);
}

.legend-dot.is-enabled,
.shortcut-dot.is-enabled {
  background: var(--gold);
}

.legend-dot.is-pending,
.shortcut-dot.is-pending {
  background: #c3cec9;
}

.legend-dot.is-joven,
.shortcut-dot.is-joven {
  background: var(--green-light);
}

.legend-dot.is-general,
.shortcut-dot.is-general {
  background: var(--blue);
}

/* =========================================================
   Inicio de sesión
   ========================================================= */

.login-page {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(430px, 0.92fr);
  min-height: 100vh;
}

.login-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  padding: 42px clamp(38px, 5vw, 78px) 34px;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 78% 8%, rgba(184, 138, 59, 0.19), transparent 32%),
    radial-gradient(circle at 12% 92%, rgba(31, 138, 109, 0.22), transparent 38%),
    linear-gradient(145deg, #072a22 0%, #0a352b 52%, #0d4638 100%);
}

.login-visual::after {
  position: absolute;
  right: -150px;
  bottom: -280px;
  width: 560px;
  height: 560px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  content: "";
}

.login-visual-glow {
  position: absolute;
  top: -180px;
  right: -110px;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(184, 138, 59, 0.13), transparent 68%);
  pointer-events: none;
}

.login-visual-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background-image: radial-gradient(rgba(255, 255, 255, 0.36) 0.7px, transparent 0.7px);
  background-size: 19px 19px;
  mask-image: linear-gradient(120deg, #000 0%, transparent 52%);
  pointer-events: none;
}

.login-visual-header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 13px;
}

.login-crest {
  display: inline-grid;
  width: 50px;
  height: 54px;
  place-items: center;
  border-radius: 13px;
  color: var(--forest-deep);
  background: linear-gradient(145deg, #d0a759, var(--gold));
  box-shadow: 0 9px 24px rgba(0, 0, 0, 0.18);
  font-size: 16px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.login-logo {
  display: grid;
  flex: 0 0 auto;
  width: 58px;
  height: 48px;
  padding: 6px;
  place-items: center;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 9px 24px rgba(0, 0, 0, 0.18);
}

.login-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.login-logo-sm {
  width: 46px;
  height: 38px;
  padding: 4px;
  border-radius: 9px;
  box-shadow: none;
}

.login-crest-sm {
  width: 42px;
  height: 45px;
  border-radius: 11px;
  font-size: 14px;
}

.login-brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.login-brand-copy strong {
  font-size: 16px;
  letter-spacing: 0.01em;
}

.login-brand-copy span {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.56);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.login-access-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.05);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}

.login-copy {
  position: relative;
  z-index: 1;
  max-width: 620px;
  margin: 56px 0 34px;
}

.login-eyebrow {
  margin-bottom: 18px;
  color: #d7b66f;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.login-copy h1 {
  max-width: 620px;
  font-size: clamp(38px, 4.2vw, 60px);
  font-weight: 650;
  letter-spacing: -0.045em;
  line-height: 1.04;
}

.login-copy h1 em {
  color: #d7b66f;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: -0.035em;
}

.login-lead {
  max-width: 490px;
  margin-top: 25px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 14px;
  line-height: 1.7;
}

.login-event-card {
  position: relative;
  z-index: 1;
  max-width: 480px;
  padding: 22px 24px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.055);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
}

.login-event-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.login-event-kicker {
  color: rgba(255, 255, 255, 0.5);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.login-event-year {
  color: #d7b66f;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.login-event-date {
  display: flex;
  align-items: center;
  gap: 13px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.login-event-day {
  font-family: var(--font-display);
  font-size: 46px;
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.06em;
}

.login-event-month {
  display: flex;
  flex-direction: column;
  color: #d7b66f;
  font-size: 13px;
  font-weight: 750;
  text-transform: capitalize;
}

.login-event-month small {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.48);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: capitalize;
}

.login-event-details {
  display: grid;
  gap: 8px;
  margin-top: 15px;
}

.login-event-details p {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: rgba(255, 255, 255, 0.66);
  font-size: 11.5px;
}

.login-event-details i {
  width: 13px;
  margin-top: 3px;
  color: #d7b66f;
  font-size: 10px;
}

.login-visual-footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
  color: rgba(255, 255, 255, 0.38);
  font-size: 9.5px;
  letter-spacing: 0.06em;
}

.login-visual-footer i {
  color: rgba(215, 182, 111, 0.72);
}

.login-footer-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
}

.login-panel {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 38px clamp(30px, 5vw, 72px);
  background:
    radial-gradient(circle at 100% 0%, rgba(184, 138, 59, 0.055), transparent 30%),
    #fbfcfb;
}

.login-panel-inner {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  width: min(100%, 420px);
  margin: 0 auto;
}

.login-mobile-brand {
  display: none;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
}

.login-mobile-brand div {
  display: flex;
  flex-direction: column;
}

.login-mobile-brand strong {
  color: var(--forest);
  font-size: 15px;
}

.login-mobile-brand span:last-child {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.login-card {
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: 0 26px 70px rgba(11, 59, 48, 0.075);
}

.login-card h2 {
  margin-bottom: 8px;
  font-size: 29px;
  letter-spacing: -0.035em;
}

.login-subtitle {
  margin-bottom: 25px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
}

.login-alert {
  margin-bottom: 19px;
}

.login-form {
  display: grid;
  gap: 17px;
}

.form-field {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.form-field > label {
  margin-bottom: 7px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.required {
  color: var(--red);
}

.input-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 47px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: #fff;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.input-icon-wrap:focus-within {
  border-color: var(--green);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(20, 107, 84, 0.11);
}

.input-icon-wrap > i {
  flex: 0 0 auto;
  width: 42px;
  color: #8a9a94;
  font-size: 12px;
  text-align: center;
}

.input-icon-wrap input,
.input-icon-wrap select {
  width: 100%;
  min-width: 0;
  height: 44px;
  padding: 0 12px 0 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 13.5px;
}

.input-icon-wrap input::placeholder,
.input-icon-wrap select:invalid {
  color: #a3b0ab;
}

.input-icon-wrap select {
  cursor: pointer;
  appearance: none;
  padding-right: 34px;
  background-image: linear-gradient(45deg, transparent 50%, #8a9a94 50%), linear-gradient(135deg, #8a9a94 50%, transparent 50%);
  background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.input-icon-wrap.has-action input {
  padding-right: 46px;
}

.input-icon-wrap.has-error {
  border-color: #d6a29d;
  background: #fffafa;
}

.input-icon-wrap-sm {
  min-height: 40px;
}

.input-icon-wrap-sm > i {
  width: 36px;
}

.input-icon-wrap-sm input {
  height: 38px;
  font-size: 12.5px;
}

.password-toggle {
  position: absolute;
  right: 8px;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 0;
  border-radius: 7px;
  color: #7c8c86;
  background: transparent;
}

.password-toggle:hover {
  color: var(--forest);
  background: var(--green-soft);
}

.btn-login {
  width: 100%;
  min-height: 49px;
  margin-top: 3px;
  font-size: 13px;
}

.btn-login i {
  margin-left: auto;
}

.login-security-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 23px;
  padding-top: 19px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.login-security-note i {
  margin-top: 3px;
  color: var(--green);
  font-size: 12px;
}

.login-security-note p {
  font-size: 10.5px;
  line-height: 1.6;
}

.login-help {
  margin-top: 16px;
  color: var(--muted-light);
  font-size: 10.5px;
  text-align: center;
}

.login-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 34px;
  color: #9aa7a2;
  font-size: 9.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.login-footer-logo {
  display: block;
  width: 165px;
  max-width: 55vw;
  height: auto;
}

/* =========================================================
   Alerts y avisos
   ========================================================= */

.alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  animation: fade-slide-in 0.25s var(--ease);
}

.alert + .alert {
  margin-top: 12px;
}

.alert-icon {
  display: grid;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 9px;
  font-size: 13px;
}

.alert-copy {
  flex: 1;
  min-width: 0;
  padding-top: 1px;
}

.alert-copy strong {
  display: block;
  font-size: 12.5px;
  line-height: 1.35;
}

.alert-copy p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.5;
}

.alert-close {
  display: grid;
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
}

.alert-close:hover {
  background: rgba(0, 0, 0, 0.05);
}

.alert-success {
  border-color: #c8e4d8;
  background: #f4fbf7;
}

.alert-success .alert-icon {
  color: var(--green);
  background: var(--green-soft);
}

.alert-error {
  border-color: #eccfcc;
  background: #fdf8f7;
}

.alert-error .alert-icon {
  color: var(--red);
  background: var(--red-soft);
}

.alert-warning {
  border-color: #ead7b0;
  background: #fffcf5;
}

.alert-warning .alert-icon {
  color: var(--gold-deep);
  background: var(--gold-soft);
}

.alert-info {
  border-color: #cfdfe7;
  background: #f7fafb;
}

.alert-info .alert-icon {
  color: var(--blue);
  background: var(--blue-soft);
}

.alert.is-closing {
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

@keyframes fade-slide-in {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =========================================================
   Estructura de la aplicación
   ========================================================= */

.app-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  width: var(--sidebar-width);
  padding: 24px 17px 19px;
  overflow-y: auto;
  color: rgba(255, 255, 255, 0.8);
  background:
    radial-gradient(circle at 0% 0%, rgba(184, 138, 59, 0.1), transparent 28%),
    linear-gradient(170deg, #072a22 0%, #0a352b 45%, #0b3b30 100%);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.sidebar::before {
  position: absolute;
  inset: 0;
  opacity: 0.15;
  background-image: radial-gradient(rgba(255, 255, 255, 0.28) 0.6px, transparent 0.6px);
  background-size: 17px 17px;
  mask-image: linear-gradient(180deg, #000, transparent 38%);
  content: "";
  pointer-events: none;
}

.sidebar > * {
  position: relative;
  z-index: 1;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 1px 5px 0;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.brand-crest {
  display: grid;
  flex: 0 0 auto;
  width: 38px;
  height: 41px;
  place-items: center;
  border-radius: 10px;
  color: var(--forest-deep);
  background: linear-gradient(145deg, #d1a859, var(--gold));
  font-size: 12px;
  font-weight: 900;
  letter-spacing: -0.03em;
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.18);
}

.brand-logo {
  display: grid;
  flex: 0 0 auto;
  width: 46px;
  height: 39px;
  padding: 4px;
  place-items: center;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.18);
}

.brand-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.2;
}

.brand-copy strong {
  overflow: hidden;
  color: #fff;
  font-size: 14px;
  letter-spacing: -0.01em;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.brand-copy small {
  margin-top: 3px;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.43);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.sidebar-close {
  display: none;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 0;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.07);
}

.sidebar-season {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 20px 6px 22px;
  padding: 8px 11px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.035);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.season-year {
  color: #d7b66f;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.season-divider {
  width: 1px;
  height: 11px;
  background: rgba(255, 255, 255, 0.12);
}

.season-place {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.main-nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nav-label {
  padding: 0 12px;
  margin-bottom: 7px;
  color: rgba(255, 255, 255, 0.33);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.nav-label-spaced {
  margin-top: 22px;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 43px;
  padding: 9px 12px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  font-weight: 600;
  transition: color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.nav-item > i {
  width: 17px;
  color: rgba(255, 255, 255, 0.34);
  font-size: 13px;
  text-align: center;
  transition: color 0.18s ease;
}

.nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.055);
}

.nav-item:hover > i {
  color: rgba(215, 182, 111, 0.9);
}

.nav-item.is-active {
  color: #fff;
  background: rgba(255, 255, 255, 0.085);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.nav-item.is-active > i {
  color: #d7b66f;
}

.nav-item.is-active::before {
  position: absolute;
  left: -17px;
  width: 3px;
  height: 22px;
  border-radius: 0 3px 3px 0;
  background: #d7b66f;
  content: "";
}

.nav-item-download > i {
  color: rgba(215, 182, 111, 0.72);
}

.nav-item-download:hover > i {
  color: #d7b66f;
}

.sidebar-event {
  margin-top: 27px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
}

.sidebar-event-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.sidebar-event-label {
  color: rgba(255, 255, 255, 0.38);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.sidebar-event-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(184, 138, 59, 0.12);
}

.sidebar-event-date {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-event-date strong {
  color: #d7b66f;
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.06em;
}

.sidebar-event-date span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  line-height: 1.35;
  text-transform: uppercase;
}

.sidebar-event-place,
.sidebar-event-hours {
  display: flex;
  gap: 7px;
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.48);
  font-size: 9.5px;
  line-height: 1.45;
}

.sidebar-event-place i,
.sidebar-event-hours i {
  flex: 0 0 auto;
  margin-top: 2px;
  color: rgba(215, 182, 111, 0.75);
  font-size: 8.5px;
}

.sidebar-footer {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding: 24px 5px 0;
  color: rgba(255, 255, 255, 0.26);
  font-size: 8px;
  letter-spacing: 0.04em;
}

.sidebar-footer-mark {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.44);
  font-size: 5.5px;
  font-weight: 900;
}

.sidebar-footer-logo {
  display: block;
  width: 150px;
  height: auto;
  padding: 4px 6px;
  border-radius: 4px;
  background: #fff;
}

.sidebar-footer-version {
  margin-left: auto;
  opacity: 0.65;
}

.app-frame {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin-left: var(--sidebar-width);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 24px;
  height: 73px;
  padding: 0 31px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.93);
  backdrop-filter: blur(14px);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}

.icon-button {
  display: grid;
  width: 37px;
  height: 37px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink-soft);
  background: #fff;
  font-size: 13px;
}

.icon-button:hover {
  color: var(--forest);
  background: var(--green-soft);
}

.sidebar-toggle {
  display: none;
}

.topbar-context {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.3;
}

.topbar-eyebrow {
  overflow: hidden;
  color: var(--muted-light);
  font-size: 8.5px;
  font-weight: 750;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.topbar-eyebrow span {
  color: #bdc7c3;
}

.topbar-title {
  margin-top: 2px;
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.015em;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.topbar-search {
  position: relative;
  display: flex;
  align-items: center;
  width: min(340px, 30vw);
  height: 39px;
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.topbar-search:focus-within {
  border-color: #b7c9c1;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(20, 107, 84, 0.07);
}

.topbar-search i {
  width: 36px;
  color: #8a9a94;
  font-size: 11px;
  text-align: center;
}

.topbar-search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 11.5px;
}

.topbar-search input::placeholder {
  color: #98a6a1;
}

.topbar-search kbd {
  display: grid;
  width: 22px;
  height: 22px;
  margin-right: 7px;
  place-items: center;
  border: 1px solid #dce4e0;
  border-radius: 5px;
  color: #93a09b;
  background: #fff;
  font-family: var(--font);
  font-size: 10px;
}

.kbd {
  display: inline-grid;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  place-items: center;
  border: 1px solid #dce4e0;
  border-radius: 4px;
  background: #fff;
  font-size: 10px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 19px;
}

.topbar-date {
  display: flex;
  align-items: center;
  gap: 7px;
  padding-left: 19px;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 650;
  white-space: nowrap;
}

.topbar-date i {
  color: var(--gold-deep);
  font-size: 11px;
}

.user-menu {
  position: relative;
}

.user-trigger {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 4px 5px 4px 4px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  text-align: left;
}

.user-trigger:hover {
  background: var(--surface-soft);
}

.user-avatar {
  display: grid;
  flex: 0 0 auto;
  width: 35px;
  height: 35px;
  place-items: center;
  border-radius: 9px;
  color: #fff;
  background: linear-gradient(145deg, var(--forest-mid), var(--forest));
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.user-avatar-sm {
  width: 34px;
  height: 34px;
}

.user-copy {
  display: flex;
  flex-direction: column;
  max-width: 120px;
  line-height: 1.25;
}

.user-copy strong {
  overflow: hidden;
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.user-copy small {
  margin-top: 1px;
  color: var(--muted-light);
  font-size: 8px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.user-chevron {
  margin-left: 2px;
  color: #96a39e;
  font-size: 8px;
  transition: transform 0.18s ease;
}

.user-trigger[aria-expanded="true"] .user-chevron {
  transform: rotate(180deg);
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 60;
  width: 236px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow-md);
  animation: fade-slide-in 0.15s ease;
}

.user-dropdown-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 9px 12px;
  border-bottom: 1px solid var(--line);
}

.user-dropdown-header div {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.user-dropdown-header strong {
  overflow: hidden;
  font-size: 11px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.user-dropdown-header small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9.5px;
}

.dropdown-link {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 9px;
  border: 0;
  border-radius: 7px;
  color: var(--ink-soft);
  background: transparent;
  font-size: 11.5px;
  font-weight: 600;
  text-align: left;
}

.dropdown-link i {
  width: 14px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.dropdown-link:hover {
  color: var(--forest);
  background: var(--green-soft);
}

.dropdown-link:hover i {
  color: var(--green);
}

.dropdown-link-danger {
  color: var(--red);
}

.dropdown-link-danger i {
  color: var(--red);
}

.dropdown-link-danger:hover {
  color: var(--red);
  background: var(--red-soft);
}

.dropdown-separator {
  height: 1px;
  margin: 7px 4px;
  background: var(--line);
}

.sidebar-scrim {
  display: none;
}

.app-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 12px 30px 18px;
  color: #9aa7a2;
  font-size: 8.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.app-footer-sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
}

.page {
  width: 100%;
  max-width: 1540px;
  margin: 0 auto;
  padding: 30px 31px 10px;
  flex: 1;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 23px;
}

.page-head-copy h1 {
  margin-bottom: 6px;
  font-size: 29px;
  letter-spacing: -0.04em;
}

.page-subtitle {
  max-width: 690px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
}

.page-head-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  padding-bottom: 2px;
}

.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid #cfe5db;
  border-radius: 999px;
  color: var(--green);
  background: #f4fbf7;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #1b8d68;
  box-shadow: 0 0 0 4px rgba(27, 141, 104, 0.1);
  animation: pulse-dot 2.2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 3px rgba(27, 141, 104, 0.09); }
  50% { box-shadow: 0 0 0 5px rgba(27, 141, 104, 0.15); }
}

.audit-chip,
.report-date-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fff;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.audit-chip i,
.report-date-chip i {
  color: var(--gold-deep);
}

/* =========================================================
   Panel de control
   ========================================================= */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
  margin-bottom: 18px;
}

.stat-card {
  position: relative;
  padding: 18px 19px 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-xs);
  transition: transform 0.2s var(--ease), box-shadow 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.stat-card.is-highlight {
  border-color: #dfcfaf;
  background: linear-gradient(145deg, #fff 0%, #fdfaf3 100%);
}

.stat-card.is-highlight::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), #e1c991);
  content: "";
}

.stat-top {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 13px;
}

.stat-icon {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border-radius: 8px;
  font-size: 12px;
}

.stat-label {
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stat-value {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(25px, 2.3vw, 32px);
  font-weight: 750;
  letter-spacing: -0.045em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.stat-unit {
  margin-left: 2px;
  color: var(--gold-deep);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0;
}

.stat-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 11px;
  color: var(--muted);
  font-size: 9.5px;
}

.stat-meta strong {
  color: var(--ink-soft);
  font-weight: 750;
}

.meta-sep {
  width: 1px;
  height: 9px;
  background: var(--line);
}

.stat-progress-text {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.stat-progress-text i {
  color: var(--green);
  font-size: 9px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(300px, 0.92fr);
  gap: 17px;
  margin-bottom: 18px;
}

.turnout-card {
  padding-bottom: 19px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.status-open {
  color: var(--green);
  background: var(--green-soft);
}

.status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.turnout-body {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 26px 24px 21px;
}

.turnout-highlight {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
}

.turnout-number {
  color: var(--forest);
  font-family: var(--font-display);
  font-size: clamp(42px, 4.2vw, 59px);
  font-weight: 750;
  letter-spacing: -0.06em;
  line-height: 0.9;
  font-variant-numeric: tabular-nums;
}

.turnout-percent {
  margin-left: 2px;
  color: var(--gold-deep);
  font-size: 19px;
  font-weight: 700;
}

.turnout-highlight p {
  flex-basis: 100%;
  margin-top: 9px;
  color: var(--muted);
  font-size: 11px;
}

.turnout-side {
  display: flex;
  gap: 22px;
  padding-bottom: 2px;
}

.turnout-side-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 76px;
}

.turnout-side-item span {
  color: var(--muted-light);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.turnout-side-item strong {
  color: var(--ink);
  font-size: 19px;
  font-weight: 750;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.turnout-side-item strong.is-small {
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0;
}

.stacked-track {
  display: flex;
  width: calc(100% - 48px);
  height: 10px;
  margin: 0 24px;
  overflow: hidden;
  border-radius: 5px;
  background: #e8eeeb;
}

.stacked-segment {
  height: 100%;
  transition: width 0.5s var(--ease);
}

.segment-voted {
  background: var(--green);
}

.segment-enabled {
  background: var(--gold);
}

.segment-pending {
  background: #d1dad6;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 12px 24px 0;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 9.5px;
}

.legend-item strong {
  color: var(--ink-soft);
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.chart-legend-percent {
  margin-left: auto;
  color: var(--green);
}

.chart-legend-percent i {
  font-size: 9px;
}

.turnout-card .card-foot {
  margin: 18px 24px 0;
}

.event-card {
  display: flex;
  gap: 20px;
  padding: 22px;
  overflow: hidden;
  background:
    radial-gradient(circle at 100% 0%, rgba(184, 138, 59, 0.08), transparent 40%),
    #fff;
}

.event-date-block {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 82px;
  height: 110px;
  padding: 10px;
  border-radius: 11px;
  color: #fff;
  background: var(--forest);
  box-shadow: 0 9px 22px rgba(11, 59, 48, 0.16);
}

.event-month {
  color: #d7b66f;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.event-day {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 750;
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.event-year {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.48);
  font-size: 8px;
  letter-spacing: 0.12em;
}

.event-card-copy {
  min-width: 0;
}

.event-card-copy h2 {
  margin: 2px 0 11px;
  font-size: 19px;
}

.event-list {
  display: grid;
  gap: 7px;
}

.event-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.5;
}

.event-list i {
  flex: 0 0 auto;
  width: 12px;
  margin-top: 2px;
  color: var(--gold-deep);
  font-size: 9px;
}

.event-note {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.event-note i {
  flex: 0 0 auto;
  margin-top: 2px;
  color: var(--green);
  font-size: 10px;
}

.event-note p {
  font-size: 9.5px;
  line-height: 1.5;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px;
  margin-bottom: 18px;
}

.category-card {
  position: relative;
  padding: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-xs);
}

.category-card::after {
  position: absolute;
  top: -42px;
  right: -38px;
  width: 145px;
  height: 145px;
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.category-card.is-joven::after {
  background: radial-gradient(circle, rgba(20, 107, 84, 0.09), transparent 68%);
}

.category-card.is-general::after {
  background: radial-gradient(circle, rgba(49, 92, 116, 0.09), transparent 68%);
}

.category-head {
  display: flex;
  align-items: center;
  gap: 11px;
  position: relative;
  z-index: 1;
}

.category-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 10px;
  font-size: 14px;
}

.is-joven .category-icon {
  color: var(--green);
  background: var(--green-soft);
}

.is-general .category-icon {
  color: var(--blue);
  background: var(--blue-soft);
}

.category-head h2 {
  font-size: 17px;
}

.category-range {
  margin-left: auto;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.category-number {
  margin: 17px 0 11px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(27px, 2.7vw, 35px);
  font-weight: 750;
  letter-spacing: -0.05em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.category-number small {
  color: var(--muted);
  font-family: var(--font);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.category-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-bottom: 11px;
}

.category-stats span {
  color: var(--muted);
  font-size: 9.5px;
}

.category-stats strong {
  color: var(--ink-soft);
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.progress {
  height: 6px;
  overflow: hidden;
  border-radius: 3px;
  background: #e9efec;
}

.progress-sm {
  height: 5px;
  margin-bottom: 15px;
}

.progress-bar {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
  transition: width 0.5s var(--ease);
}

.progress-bar.is-blue {
  background: var(--blue);
}

.category-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.school-participation-card {
  padding-bottom: 22px;
  margin-bottom: 17px;
}

.school-chart {
  padding: 16px 24px 0;
}

.school-chart-scale {
  display: flex;
  justify-content: space-between;
  padding: 0 60px 0 162px;
  margin-bottom: 7px;
  color: var(--muted-light);
  font-size: 7px;
  font-weight: 700;
}

.school-chart-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) 60px;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.school-chart-row:last-child {
  border-bottom: 0;
}

.school-chart-label {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}

.school-chart-label strong {
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.school-chart-label span {
  margin-top: 2px;
  color: var(--muted-light);
  font-size: 7.5px;
}

.school-chart-track {
  height: 11px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--green-soft);
}

.school-chart-bar {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), #2e9277);
  transition: width 0.6s var(--ease);
}

.school-chart-row:nth-child(even) .school-chart-bar {
  background: linear-gradient(90deg, var(--gold-deep), #cba35b);
}

.school-chart-value {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  gap: 2px;
}

.school-chart-value strong {
  color: var(--forest);
  font-family: var(--font-mono);
  font-size: 11px;
}

.school-chart-value small {
  color: var(--muted-light);
  font-size: 7px;
}

.dashboard-lower {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr);
  gap: 17px;
}

.activity-card {
  padding-bottom: 10px;
}

.activity-list {
  display: flex;
  flex-direction: column;
  padding: 5px 24px 0;
}

.activity-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #edf2ef;
}

.activity-item:last-child {
  border-bottom: 0;
}

.activity-icon {
  display: grid;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 9px;
  font-size: 11px;
}

.activity-copy {
  min-width: 0;
  flex: 1;
}

.activity-topline {
  display: flex;
  align-items: baseline;
  gap: 7px;
  flex-wrap: wrap;
}

.activity-topline strong {
  font-size: 11px;
  font-weight: 750;
}

.activity-user {
  color: var(--muted);
  font-size: 9.5px;
}

.activity-topline time {
  margin-left: auto;
  color: var(--muted-light);
  font-size: 8.5px;
  white-space: nowrap;
}

.activity-copy p {
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.quick-card {
  padding-bottom: 0;
}

.quick-list {
  display: flex;
  flex-direction: column;
  padding: 11px 17px 4px;
}

.quick-link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 8px;
  border-radius: 9px;
  transition: background 0.15s ease;
}

.quick-link:hover {
  background: var(--surface-soft);
}

.quick-icon {
  display: grid;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 9px;
  font-size: 12px;
}

.quick-link > span:nth-child(2) {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.quick-link strong {
  font-size: 11.5px;
  font-weight: 650;
}

.quick-link small {
  margin-top: 1px;
  color: var(--muted-light);
  font-size: 9px;
}

.quick-link > i {
  color: #a4b1ac;
  font-size: 8px;
}

.quick-foot {
  margin: 4px 17px 0;
  padding: 13px 0 17px;
  font-size: 9px;
}

.quick-foot i {
  color: var(--green);
}

/* =========================================================
   Buscador
   ========================================================= */

.search-panel {
  padding: 24px 25px 16px;
  margin-bottom: 14px;
  border: 1px solid #d3e3dc;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 96% 0%, rgba(184, 138, 59, 0.08), transparent 30%),
    linear-gradient(145deg, #fcfefd, #f5faf7);
  box-shadow: var(--shadow-xs);
}

.search-panel-copy {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 17px;
}

.search-panel-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 11px;
  color: var(--green);
  background: #fff;
  box-shadow: 0 4px 13px rgba(11, 59, 48, 0.07);
  font-size: 16px;
}

.search-panel-copy h2 {
  font-size: 17px;
}

.search-panel-copy p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.search-form {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 58px;
  padding: 6px 6px 6px 20px;
  border: 1px solid #c9dad3;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 7px 20px rgba(11, 59, 48, 0.05);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.search-form:focus-within {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(20, 107, 84, 0.08), 0 9px 25px rgba(11, 59, 48, 0.07);
}

.search-form-icon {
  flex: 0 0 auto;
  color: #8a9a94;
  font-size: 16px;
}

.search-form input {
  flex: 1;
  min-width: 0;
  height: 40px;
  padding: 0 4px;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.search-form input::placeholder {
  color: #a1aea9;
  font-size: 13px;
  font-weight: 400;
}

.search-submit {
  min-height: 44px;
  padding: 0 20px;
}

.search-tips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 19px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 9px;
}

.search-tips span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.search-tips i {
  color: var(--gold-deep);
  font-size: 9px;
}

.search-tips kbd {
  display: inline-grid;
  width: 16px;
  height: 16px;
  place-items: center;
  border: 1px solid #d7e0dc;
  border-radius: 3px;
  background: #fff;
  font-size: 8px;
}

.search-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 15px;
}

.shortcut-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  background: #fff;
  font-size: 10px;
  font-weight: 650;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.shortcut-pill:hover {
  border-color: #bdcdc6;
  background: var(--surface-soft);
}

.shortcut-range {
  color: var(--muted-light);
  font-size: 8.5px;
  font-weight: 500;
}

.results-card {
  margin-bottom: 16px;
  overflow: hidden;
}

.results-card-head {
  align-items: center;
  padding-bottom: 17px;
  border-bottom: 1px solid var(--line);
}

.results-status {
  max-width: 45%;
  overflow: hidden;
  color: var(--muted);
  font-size: 9.5px;
  text-align: right;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.search-results {
  min-height: 170px;
  padding: 16px 24px 20px;
  transition: opacity 0.15s ease;
}

.search-results.is-loading {
  opacity: 0.48;
  pointer-events: none;
}

.results-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 11px;
  color: var(--muted);
  font-size: 9.5px;
}

.results-summary strong {
  color: var(--ink-soft);
  font-weight: 750;
}

.results-summary-tip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--green);
  font-size: 8.5px;
}

.result-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.result-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.result-card:hover {
  border-color: #c6d8d0;
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.result-card.is-voted {
  border-left: 3px solid #9fcdb8;
}

.result-card.is-enabled {
  border-left: 3px solid #dbc18e;
}

.result-card.is-pending {
  border-left: 3px solid #d6dedb;
}

.result-main {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 13px;
  min-width: 0;
}

.result-content {
  min-width: 0;
  flex: 1;
}

.result-title-row {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.result-title-row h3 {
  font-size: 14px;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.result-title-row h3 span {
  font-weight: 500;
}

.result-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 12px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 9.5px;
}

.result-meta i {
  margin-right: 3px;
  color: #9aa7a2;
  font-size: 8.5px;
}

.result-sub {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 5px;
  color: var(--muted-light);
  font-size: 9px;
}

.result-sub i {
  margin-right: 3px;
  font-size: 8px;
}

.result-time {
  color: var(--muted);
}

.result-time.is-muted {
  color: #a4b0ab;
}

.result-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
}

.result-complete {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-right: 5px;
  color: var(--green);
  font-size: 9px;
  font-weight: 700;
}

.result-complete i {
  font-size: 10px;
}

.search-hint {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 24px 16px;
  color: var(--muted);
}

.search-hint-icon {
  display: grid;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 10px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 14px;
}

.search-hint strong {
  color: var(--ink-soft);
  font-size: 11.5px;
}

.search-hint p {
  margin-top: 3px;
  font-size: 10.5px;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 45px 24px;
  text-align: center;
}

.empty-state-search {
  padding: 30px 16px;
}

.empty-icon {
  display: grid;
  width: 50px;
  height: 50px;
  margin-bottom: 12px;
  place-items: center;
  border: 1px solid #dce7e2;
  border-radius: 14px;
  color: #90a09a;
  background: var(--surface-soft);
  font-size: 18px;
}

.empty-state h2,
.empty-state h3 {
  margin-bottom: 5px;
  font-size: 16px;
}

.empty-state p {
  max-width: 430px;
  color: var(--muted);
  font-size: 11.5px;
}

.empty-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 15px;
}

.search-empty-dni .empty-icon {
  border-color: #e6d6b8;
  color: var(--gold-deep);
  background: var(--gold-soft);
}

.search-empty-note {
  margin-top: 12px;
  color: var(--green) !important;
  font-size: 8.5px !important;
}

.search-empty-note i {
  margin-right: 4px;
  font-size: 8px;
}

.empty-state-compact {
  padding: 25px 24px;
}

.empty-state-compact .empty-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 9px;
  font-size: 14px;
}

.empty-state-compact p {
  font-size: 10.5px;
}

.search-guides {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
}

.guide-card {
  display: flex;
  gap: 11px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.guide-icon {
  display: grid;
  flex: 0 0 auto;
  width: 33px;
  height: 33px;
  place-items: center;
  border-radius: 9px;
  font-size: 12px;
}

.guide-card h3 {
  margin-bottom: 3px;
  font-size: 12px;
  letter-spacing: -0.01em;
}

.guide-card p {
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.55;
}

/* =========================================================
   Tablas, filtros y paginación
   ========================================================= */

.filter-card {
  padding: 18px;
  margin-bottom: 15px;
}

.filters-form {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-field {
  display: flex;
  flex: 0 0 190px;
  flex-direction: column;
  min-width: 0;
}

.filter-search {
  flex: 1 1 260px;
}

.filter-field > label {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.filter-field select {
  width: 100%;
  height: 40px;
  padding: 0 33px 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  outline: 0;
  background:
    linear-gradient(45deg, transparent 50%, #8a9a94 50%) calc(100% - 16px) 50% / 5px 5px no-repeat,
    linear-gradient(135deg, #8a9a94 50%, transparent 50%) calc(100% - 11px) 50% / 5px 5px no-repeat,
    #fff;
  appearance: none;
  font-size: 11.5px;
}

.filter-field select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(20, 107, 84, 0.09);
}

.filter-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.filter-actions .btn {
  min-height: 40px;
}

.table-card {
  overflow: hidden;
}

.table-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 19px 22px;
  border-bottom: 1px solid var(--line);
}

.table-card-head h2 {
  font-size: 15.5px;
}

.table-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.table-note {
  color: var(--muted-light);
  font-size: 8.5px;
  white-space: nowrap;
}

.table-note i {
  margin-right: 4px;
  color: var(--green);
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.data-table thead th {
  padding: 10px 15px;
  color: var(--muted-light);
  background: #fafcfb;
  border-bottom: 1px solid var(--line);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.data-table tbody td {
  padding: 11px 15px;
  border-bottom: 1px solid #eef3f0;
  vertical-align: middle;
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.data-table tbody tr {
  transition: background 0.14s ease;
}

.data-table tbody tr:hover {
  background: #fbfdfc;
}

.person-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 210px;
}

.person-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.35;
}

.person-copy strong {
  font-size: 11.5px;
  font-weight: 700;
}

.person-copy span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8.5px;
}

.person-copy span i {
  margin-right: 3px;
  color: #9aa7a2;
  font-size: 8px;
}

.age-value-sm {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.table-time {
  color: var(--ink-soft);
  font-size: 9px;
  white-space: nowrap;
}

.table-muted {
  color: #9aa7a2;
  font-size: 9px;
}

.table-link {
  color: var(--green);
  font-size: 10px;
  font-weight: 650;
  white-space: nowrap;
}

.table-link:hover {
  text-decoration: underline;
}

.cell-actions {
  text-align: right !important;
  white-space: nowrap;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.pagination-info {
  color: var(--muted);
  font-size: 9px;
}

.pagination-info strong {
  color: var(--ink-soft);
  font-weight: 700;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.page-button {
  display: grid;
  min-width: 28px;
  height: 28px;
  padding: 0 7px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink-soft);
  background: #fff;
  font-size: 9.5px;
  font-weight: 650;
  transition: background 0.14s ease, border-color 0.14s ease;
}

.page-button:hover {
  border-color: #b9cac2;
  background: var(--surface-soft);
}

.page-button.is-current {
  border-color: var(--forest);
  color: #fff;
  background: var(--forest);
}

.page-button.is-disabled {
  opacity: 0.4;
  pointer-events: none;
}

.page-arrow {
  color: var(--muted);
  font-size: 8px;
}

.page-ellipsis {
  padding: 0 2px;
  color: var(--muted-light);
  font-size: 9px;
}

.action-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 7px;
  border-radius: 5px;
  font-size: 8.5px;
  font-weight: 700;
  white-space: nowrap;
}

.audit-user {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--ink-soft);
  font-size: 9.5px;
  white-space: nowrap;
}

.audit-user i {
  color: #9aa7a2;
  font-size: 8px;
}

.audit-detail {
  display: block;
  max-width: 390px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}

.mono,
.is-mono {
  font-family: var(--font-mono);
  font-size: 0.92em;
}

/* =========================================================
   Ficha del votante
   ========================================================= */

.back-nav {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 9.5px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--green);
  font-weight: 650;
}

.back-link:hover {
  color: var(--forest);
}

.back-divider {
  color: #bcc7c2;
}

.back-current {
  color: var(--muted-light);
}

.voter-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 25px 27px;
  margin-bottom: 16px;
  overflow: hidden;
  border: 1px solid #d6e3dd;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 96% -20%, rgba(184, 138, 59, 0.11), transparent 31%),
    linear-gradient(145deg, #fff, #f8fbf9);
  box-shadow: var(--shadow-xs);
}

.voter-hero-main {
  display: flex;
  align-items: center;
  gap: 17px;
  min-width: 0;
}

.voter-identity {
  min-width: 0;
}

.voter-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.voter-identity h1 {
  overflow: hidden;
  font-size: clamp(23px, 2.7vw, 31px);
  letter-spacing: -0.04em;
  text-overflow: ellipsis;
}

.voter-identity h1 span {
  font-weight: 500;
}

.voter-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 15px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 10px;
}

.voter-hero-meta i {
  margin-right: 4px;
  color: #94a19c;
  font-size: 9px;
}

.voter-hero-stats {
  display: flex;
  gap: 26px;
  flex: 0 0 auto;
  padding-left: 26px;
  border-left: 1px solid var(--line);
}

.voter-hero-stats > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.voter-hero-stats span {
  color: var(--muted-light);
  font-size: 8px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.voter-hero-stats strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: 750;
  line-height: 1.2;
}

.voter-hero-stats strong small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 500;
}

.hero-category.is-joven {
  color: var(--green);
}

.hero-category.is-general {
  color: var(--blue);
}

.hero-origin {
  font-size: 11px !important;
  font-weight: 650 !important;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr);
  align-items: start;
  gap: 16px;
}

.detail-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.detail-card {
  padding-bottom: 12px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  padding: 11px 24px 0;
}

.info-item {
  min-width: 0;
  padding: 13px 0;
  border-bottom: 1px solid #eef3f0;
}

.info-item:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.info-item-wide {
  grid-column: 1 / -1;
}

.info-item dt {
  margin-bottom: 3px;
  color: var(--muted-light);
  font-size: 8px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.info-item dd {
  overflow-wrap: anywhere;
  color: var(--ink-soft);
  font-size: 11.5px;
  font-weight: 550;
}

.info-item dd.is-break {
  word-break: break-word;
}

.detail-activity {
  padding-bottom: 16px;
}

.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 5px 24px 0;
}

.timeline::before {
  position: absolute;
  top: 14px;
  bottom: 16px;
  left: 39px;
  width: 1px;
  background: var(--line);
  content: "";
}

.timeline-item {
  position: relative;
  display: flex;
  gap: 12px;
  padding: 10px 0;
}

.timeline-marker {
  position: relative;
  z-index: 1;
  display: grid;
  flex: 0 0 auto;
  width: 31px;
  height: 31px;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 50%;
  font-size: 9px;
}

.timeline-copy {
  min-width: 0;
  flex: 1;
  padding-top: 1px;
}

.timeline-topline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.timeline-topline strong {
  font-size: 10.5px;
  font-weight: 750;
}

.timeline-topline time {
  color: var(--muted-light);
  font-size: 8.5px;
  white-space: nowrap;
}

.timeline-copy p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.5;
}

.timeline-user {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 5px;
  color: var(--muted-light);
  font-size: 8px;
}

.timeline-user i {
  font-size: 7px;
}

.detail-aside {
  display: flex;
  flex-direction: column;
  gap: 13px;
  min-width: 0;
}

.action-card {
  padding: 22px;
}

.action-status {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 15px;
}

.action-status-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 10px;
  font-size: 13px;
}

.action-status-icon.is-pending {
  color: #64736e;
  background: var(--slate-soft);
}

.action-status-icon.is-enabled {
  color: var(--gold-deep);
  background: var(--gold-soft);
}

.action-status-icon.is-voted {
  color: var(--green);
  background: var(--green-soft);
}

.action-status-label {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.action-card h2 {
  margin-bottom: 6px;
  font-size: 20px;
  letter-spacing: -0.03em;
}

.action-card > p {
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.6;
}

.action-detail-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 16px 0;
  padding: 4px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.action-detail-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
}

.action-detail-list span {
  color: var(--muted);
  font-size: 9.5px;
}

.action-detail-list strong {
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 700;
  text-align: right;
}

.action-form {
  margin-top: 14px;
}

.action-footnote {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 11px;
  color: var(--muted-light);
  font-size: 8.5px;
  line-height: 1.45;
}

.action-footnote i {
  margin-top: 2px;
  color: var(--green);
  font-size: 8px;
}

.action-success {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 17px;
  padding: 11px 12px;
  border: 1px solid #cce3d8;
  border-radius: 8px;
  color: var(--green);
  background: #f4fbf7;
  font-size: 10.5px;
  font-weight: 700;
}

.action-success i {
  font-size: 13px;
}

.danger-zone {
  margin-top: 17px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.danger-zone summary {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 650;
  cursor: pointer;
  list-style: none;
}

.danger-zone summary::-webkit-details-marker {
  display: none;
}

.danger-zone summary:hover {
  color: var(--red);
}

.danger-zone summary i {
  font-size: 9px;
}

.danger-zone[open] summary {
  color: var(--red);
  margin-bottom: 8px;
}

.danger-zone p {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.danger-zone form {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 10px;
}

.danger-zone label {
  color: var(--muted);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.danger-zone textarea {
  width: 100%;
  min-height: 62px;
  padding: 9px 10px;
  border: 1px solid #e1cecb;
  border-radius: 7px;
  outline: 0;
  background: #fff;
  font-size: 10px;
  resize: vertical;
}

.danger-zone textarea:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(162, 58, 50, 0.08);
}

.danger-zone .btn {
  align-self: flex-start;
}

.mini-summary-card {
  padding: 8px 18px;
}

.mini-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #eef3f0;
}

.mini-summary-row:last-child {
  border-bottom: 0;
}

.mini-summary-row span {
  color: var(--muted);
  font-size: 9.5px;
}

.mini-summary-row span i {
  width: 15px;
  margin-right: 5px;
  color: #9aa7a2;
  font-size: 9px;
}

.mini-summary-row strong {
  color: var(--ink-soft);
  font-size: 9.5px;
  font-weight: 700;
  text-align: right;
}

/* =========================================================
   Formularios y alta de votantes
   ========================================================= */

.form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.8fr);
  align-items: start;
  gap: 17px;
}

.form-main {
  display: flex;
  flex-direction: column;
  gap: 15px;
  min-width: 0;
}

.form-card {
  padding: 22px;
}

.form-section-head {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.step-number {
  display: grid;
  flex: 0 0 auto;
  width: 29px;
  height: 29px;
  place-items: center;
  border-radius: 8px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 8.5px;
  font-weight: 800;
}

.step-number.is-muted {
  color: var(--muted);
  background: var(--slate-soft);
}

.form-section-head h2 {
  font-size: 16px;
}

.form-section-head p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9.5px;
}

.required-note {
  margin-left: auto;
  color: var(--muted-light);
  font-size: 8px;
  white-space: nowrap;
}

.required-note span {
  color: var(--red);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.form-field-wide {
  grid-column: 1 / -1;
}

.form-error-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 7px;
  padding-left: 13px;
  list-style: disc;
}

.form-error-list li {
  color: var(--red);
  font-size: 9.5px;
  line-height: 1.45;
}

.field-error {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  margin-top: 5px;
  color: var(--red);
  font-size: 9px;
}

.field-error i {
  margin-top: 2px;
  font-size: 8px;
}

.field-help {
  margin-top: 5px;
  color: var(--muted-light);
  font-size: 8.5px;
}

.new-voter-form .input-icon-wrap select {
  height: 45px;
}

.switch-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 16px 18px;
  border: 1px solid #cfe3d9;
  border-radius: var(--radius);
  background: #f8fcfa;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.switch-card:hover {
  border-color: #afcfc0;
  background: #f4faf7;
}

.switch-card input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.switch-track {
  position: relative;
  flex: 0 0 auto;
  width: 40px;
  height: 23px;
  border-radius: 999px;
  background: #c8d5cf;
  transition: background 0.2s ease;
}

.switch-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s var(--ease);
}

.switch-card input:checked + .switch-track {
  background: var(--green);
}

.switch-card input:checked + .switch-track .switch-thumb {
  transform: translateX(17px);
}

.switch-card input:focus-visible + .switch-track {
  outline: 3px solid rgba(184, 138, 59, 0.5);
  outline-offset: 3px;
}

.switch-copy {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.switch-copy strong {
  font-size: 11.5px;
  font-weight: 700;
}

.switch-copy small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}

.switch-state {
  padding: 3px 7px;
  border-radius: 4px;
  color: var(--green);
  background: #e1f1e9;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 0;
}

.form-actions-right {
  justify-content: flex-end;
}

.form-aside {
  position: sticky;
  top: 88px;
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.age-card {
  padding: 21px;
  overflow: hidden;
  border-color: #d7e2dc;
  background:
    radial-gradient(circle at 100% 0%, rgba(184, 138, 59, 0.1), transparent 36%),
    #fff;
}

.age-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.age-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 9px;
  color: var(--gold-deep);
  background: var(--gold-soft);
  font-size: 13px;
}

.age-card-head h2 {
  font-size: 15px;
}

.age-display {
  display: flex;
  align-items: baseline;
  gap: 7px;
  color: var(--forest);
  font-family: var(--font-display);
  font-size: 57px;
  font-weight: 750;
  letter-spacing: -0.07em;
  line-height: 0.9;
  font-variant-numeric: tabular-nums;
}

.age-display small {
  color: var(--muted);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
}

.age-caption {
  margin-top: 7px;
  color: var(--muted);
  font-size: 9px;
}

.age-category-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 15px;
}

.age-today {
  color: var(--muted-light);
  font-size: 8.5px;
}

.age-today strong {
  color: var(--ink-soft);
  font-weight: 700;
}

.age-message {
  margin-top: 11px;
  padding: 9px 10px;
  border: 1px solid #d9e9e1;
  border-radius: 7px;
  color: var(--green);
  background: #f5fbf8;
  font-size: 9px;
  line-height: 1.45;
}

.age-message.is-error {
  border-color: #eccfcc;
  color: var(--red);
  background: #fdf8f7;
}

.age-card.is-invalid .age-display {
  color: var(--red);
}

.age-divider {
  height: 1px;
  margin: 15px 0 12px;
  background: var(--line);
}

.age-legend {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--muted);
  font-size: 8.5px;
}

.age-legend span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.checklist-card {
  padding: 19px 20px;
}

.checklist-card h3 {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 11px;
  font-size: 12px;
}

.checklist-card h3 i {
  color: var(--green);
  font-size: 11px;
}

.checklist {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.checklist li {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.checklist li i {
  flex: 0 0 auto;
  margin-top: 2px;
  color: var(--green);
  font-size: 7.5px;
}

.checklist-note {
  display: flex;
  gap: 7px;
  margin-top: 13px;
  padding-top: 11px;
  border-top: 1px solid var(--line);
  color: var(--muted-light);
}

.checklist-note i {
  flex: 0 0 auto;
  margin-top: 2px;
  color: var(--green);
  font-size: 9px;
}

.checklist-note p {
  font-size: 8.5px;
  line-height: 1.5;
}

/* =========================================================
   Reportes
   ========================================================= */

.report-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.report-summary-item {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  padding: 15px 17px;
  background: #fff;
}

.summary-icon {
  display: grid;
  flex: 0 0 auto;
  width: 33px;
  height: 33px;
  place-items: center;
  border-radius: 9px;
  font-size: 12px;
}

.report-summary-item div {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.report-summary-item span:not(.summary-icon) {
  color: var(--muted);
  font-size: 8px;
  font-weight: 750;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.report-summary-item strong {
  margin-top: 2px;
  font-size: 19px;
  font-weight: 750;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.summary-percent {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.voted-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  padding: 22px 24px;
  margin-bottom: 18px;
  border-color: #d6e3dd;
  background:
    radial-gradient(circle at 100% 0%, rgba(184, 138, 59, 0.1), transparent 32%),
    linear-gradient(145deg, #fbfdfc, #f5faf7);
}

.voted-banner-main {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  flex: 1;
  min-width: 0;
}

.voted-banner-icon {
  display: grid;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 12px;
  color: var(--gold-deep);
  background: var(--gold-soft);
  font-size: 16px;
}

.voted-banner-copy {
  flex: 1;
  min-width: 0;
}

.voted-banner-copy h2 {
  margin-bottom: 10px;
  font-size: 18px;
  letter-spacing: -0.025em;
}

.voted-progress {
  width: min(100%, 540px);
  height: 7px;
  background: #dfe9e4;
}

.voted-banner-note {
  margin-top: 7px;
  color: var(--muted);
  font-size: 9px;
}

.voted-banner-side {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: flex-end;
  gap: 9px;
}

.voted-banner-percent {
  display: flex;
  align-items: baseline;
  color: var(--forest);
  font-family: var(--font-display);
  font-variant-numeric: tabular-nums;
}

.voted-banner-percent strong {
  font-size: 36px;
  font-weight: 750;
  letter-spacing: -0.06em;
  line-height: 0.9;
}

.voted-banner-percent span {
  margin-left: 2px;
  color: var(--gold-deep);
  font-size: 15px;
  font-weight: 700;
}

.voted-banner-side .btn {
  min-height: 36px;
  font-size: 10.5px;
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
  margin-bottom: 18px;
}

.report-card {
  display: flex;
  flex-direction: column;
  min-height: 210px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-xs);
  transition: transform 0.18s var(--ease), box-shadow 0.18s ease;
}

.report-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.report-card-featured {
  border-color: #d9e6e0;
  background:
    radial-gradient(circle at 100% 0%, rgba(184, 138, 59, 0.09), transparent 34%),
    #fff;
}

.report-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 13px;
}

.report-icon {
  display: grid;
  width: 37px;
  height: 37px;
  place-items: center;
  border-radius: 10px;
  font-size: 14px;
}

.report-tag {
  padding: 4px 7px;
  border-radius: 4px;
  color: var(--gold-deep);
  background: var(--gold-soft);
  font-size: 7.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.report-card h2 {
  margin-bottom: 5px;
  font-size: 16px;
}

.report-card > p {
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.55;
}

.report-count {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: auto;
  padding: 15px 0 12px;
}

.report-count strong {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 29px;
  font-weight: 750;
  letter-spacing: -0.05em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.report-count span {
  color: var(--muted);
  font-size: 8px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.report-card-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.report-card-actions .text-link {
  font-size: 10px;
}

.report-card-compact {
  min-height: 195px;
}

.report-builder {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.8fr);
  align-items: stretch;
  gap: 15px;
}

.builder-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.8fr);
  gap: 26px;
  padding: 25px;
}

.builder-copy h2 {
  margin-bottom: 6px;
  font-size: 20px;
}

.builder-copy > p {
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.6;
}

.builder-points {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 13px;
}

.builder-points li {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  color: var(--muted);
  font-size: 9px;
}

.builder-points i {
  margin-top: 2px;
  color: var(--green);
  font-size: 7.5px;
}

.builder-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-soft);
}

.builder-form .filter-field {
  flex: 1 1 auto;
}

.builder-actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 3px;
}

.builder-actions .btn {
  flex: 1 1 auto;
  min-height: 38px;
  font-size: 10px;
}

.report-note {
  display: flex;
  flex-direction: column;
  padding: 24px;
  background: var(--forest);
  color: rgba(255, 255, 255, 0.72);
}

.report-note-icon {
  display: grid;
  width: 38px;
  height: 38px;
  margin-bottom: 15px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  color: #d7b66f;
  background: rgba(255, 255, 255, 0.05);
  font-size: 15px;
}

.report-note h3 {
  margin-bottom: 6px;
  color: #fff;
  font-size: 16px;
}

.report-note p {
  color: rgba(255, 255, 255, 0.56);
  font-size: 9.5px;
  line-height: 1.6;
}

.report-note-footer {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: auto;
  padding-top: 17px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.4);
  font-size: 8.5px;
}

.report-note-footer i {
  margin-top: 2px;
  color: #d7b66f;
  font-size: 8px;
}

/* =========================================================
   Administradores
   ========================================================= */

.admin-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.78fr);
  align-items: start;
  gap: 16px;
}

.admin-list-card {
  overflow: hidden;
}

.admin-count {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  padding: 6px 9px;
  border-radius: 999px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 8.5px;
  font-weight: 700;
  white-space: nowrap;
}

.admin-count strong {
  font-size: 11px;
  font-weight: 800;
}

.admin-table {
  min-width: 760px;
}

.admin-table .person-cell {
  min-width: 230px;
}

.person-copy .current-admin-badge {
  display: inline-flex;
  margin: 0 0 0 5px;
  padding: 1px 5px;
  border-radius: 4px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  vertical-align: 1px;
}

.admin-table-foot {
  margin: 0;
  padding: 12px 20px;
}

.admin-table-foot span:last-child {
  color: var(--muted-light);
  font-size: 8.5px;
  white-space: nowrap;
}

.admin-aside {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.admin-create-card {
  padding: 21px;
}

.admin-create-head {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-bottom: 17px;
}

.admin-create-icon {
  display: grid;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 10px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 14px;
}

.admin-create-head h2 {
  font-size: 17px;
}

.admin-create-head p:last-child {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.5;
}

.admin-create-form {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.admin-form-alert {
  margin-bottom: 14px;
}

.password-card > .admin-form-alert {
  margin: 17px 24px 0;
}

.admin-create-note {
  margin-top: 15px;
}

.admin-help-card {
  padding: 20px;
}

.admin-help-card h3 {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 10px;
  font-size: 12px;
}

.admin-help-card h3 i {
  color: var(--green);
  font-size: 11px;
}

/* =========================================================
   Mi cuenta
   ========================================================= */

.account-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.5fr);
  align-items: start;
  gap: 16px;
}

.account-side {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.profile-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 27px 23px 21px;
  text-align: center;
}

.profile-avatar {
  display: grid;
  width: 72px;
  height: 72px;
  margin-bottom: 13px;
  place-items: center;
  border: 4px solid #f1f6f3;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, var(--forest-mid), var(--forest));
  font-size: 21px;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(11, 59, 48, 0.16);
}

.profile-card h2 {
  font-size: 19px;
}

.profile-username {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.role-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--gold-deep);
  background: var(--gold-soft);
  font-size: 8.5px;
  font-weight: 750;
}

.profile-meta {
  width: 100%;
  margin-top: 21px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.profile-meta > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
}

.profile-meta dt {
  color: var(--muted);
  font-size: 9px;
}

.profile-meta dd {
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 650;
  text-align: right;
}

.status-text {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.status-text span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green-light);
}

.status-text.is-active {
  color: var(--green);
}

.status-text:not(.is-active) {
  color: var(--muted);
}

.status-text:not(.is-active) span {
  background: #aebbb5;
}

.profile-logout {
  width: 100%;
  margin-top: 12px;
}

.security-card {
  padding: 20px;
}

.security-card h3 {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 10px;
  font-size: 12px;
}

.security-card h3 i {
  color: var(--green);
  font-size: 11px;
}

.password-card {
  padding-bottom: 24px;
}

.password-form {
  display: flex;
  flex-direction: column;
  gap: 17px;
  padding: 22px 24px 0;
}

.password-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}

.password-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 11px 12px;
  border: 1px solid #d6e3dd;
  border-radius: 8px;
  color: var(--muted);
  background: var(--surface-soft);
}

.password-note i {
  margin-top: 2px;
  color: var(--green);
  font-size: 10px;
}

.password-note p {
  font-size: 9px;
  line-height: 1.5;
}

/* =========================================================
   Modales y notificaciones
   ========================================================= */

.confirm-dialog {
  width: min(92vw, 410px);
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: transparent;
  box-shadow: var(--shadow-lg);
}

.confirm-dialog::backdrop {
  background: rgba(5, 27, 22, 0.5);
  backdrop-filter: blur(3px);
}

.confirm-dialog-inner {
  padding: 27px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  text-align: center;
}

.confirm-dialog-icon {
  display: grid;
  width: 48px;
  height: 48px;
  margin: 0 auto 13px;
  place-items: center;
  border-radius: 14px;
  color: var(--gold-deep);
  background: var(--gold-soft);
  font-size: 19px;
}

.confirm-dialog-icon.is-danger {
  color: var(--red);
  background: var(--red-soft);
}

.confirm-dialog h2 {
  font-size: 19px;
}

.confirm-dialog p {
  margin: 7px 0 21px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.6;
}

.confirm-dialog-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.toast-region {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 9px;
  width: min(365px, calc(100vw - 34px));
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 13px 13px 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s var(--ease);
  pointer-events: auto;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast-icon {
  display: grid;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 8px;
  font-size: 12px;
}

.toast-success .toast-icon { color: var(--green); background: var(--green-soft); }
.toast-error .toast-icon { color: var(--red); background: var(--red-soft); }
.toast-warning .toast-icon { color: var(--gold-deep); background: var(--gold-soft); }
.toast-info .toast-icon { color: var(--blue); background: var(--blue-soft); }

.toast-copy {
  flex: 1;
  min-width: 0;
}

.toast-copy strong {
  display: block;
  margin-bottom: 1px;
  font-size: 10.5px;
}

.toast-copy p {
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.5;
}

.toast-close {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 0;
  border-radius: 5px;
  color: var(--muted);
  background: transparent;
  font-size: 9px;
}

.toast-close:hover {
  background: var(--surface-soft);
}

/* =========================================================
   Página de error
   ========================================================= */

.error-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 30px 18px;
}

.error-card {
  width: min(100%, 500px);
  padding: 33px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 100% 0%, rgba(184, 138, 59, 0.08), transparent 35%),
    #fff;
  box-shadow: 0 26px 75px rgba(11, 59, 48, 0.1);
  text-align: center;
}

.error-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  margin-bottom: 27px;
  text-align: left;
}

.error-brand div {
  display: flex;
  flex-direction: column;
}

.error-brand strong {
  color: var(--forest);
  font-size: 13px;
}

.error-brand span:last-child {
  color: var(--muted);
  font-size: 8px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.error-icon {
  display: grid;
  width: 58px;
  height: 58px;
  margin: 0 auto 11px;
  place-items: center;
  border-radius: 17px;
  color: var(--gold-deep);
  background: var(--gold-soft);
  font-size: 23px;
}

.error-code {
  display: block;
  margin-bottom: 4px;
  color: var(--muted-light);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
}

.error-card h1 {
  margin-bottom: 8px;
  font-size: 27px;
}

.error-message {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.error-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 23px;
}

.error-help {
  margin-top: 18px;
  color: var(--muted-light);
  font-size: 9px;
}

.error-footer {
  margin-top: 25px;
  color: #9aa7a2;
  font-size: 8.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* =========================================================
   Adaptación responsive
   ========================================================= */

@media (max-width: 1350px) {
  .page {
    padding-right: 24px;
    padding-left: 24px;
  }

  .topbar {
    padding: 0 24px;
  }

  .topbar-search {
    width: min(290px, 27vw);
  }

  .stats-grid {
    gap: 12px;
  }

  .stat-card {
    padding: 16px;
  }

  .dashboard-grid {
    grid-template-columns: minmax(0, 1.55fr) minmax(290px, 0.95fr);
  }

  .builder-card {
    grid-template-columns: minmax(0, 1fr) minmax(250px, 0.9fr);
    gap: 20px;
  }
}

@media (max-width: 1180px) {
  .topbar-search {
    width: 230px;
  }

  .user-copy {
    display: none;
  }

  .topbar-right {
    gap: 13px;
  }

  .topbar-date {
    padding-left: 13px;
  }

  .search-guides {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .report-grid {
    gap: 12px;
  }

  .report-card {
    padding: 17px;
  }

  .report-card h2 {
    font-size: 15px;
  }

  .report-count strong {
    font-size: 26px;
  }

  .builder-card {
    grid-template-columns: 1fr;
  }

  .builder-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: end;
  }

  .builder-actions {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1100px) {
  .sidebar {
    transform: translateX(-102%);
    transition: transform 0.26s var(--ease);
    box-shadow: none;
  }

  .sidebar.is-open {
    transform: translateX(0);
    box-shadow: 22px 0 60px rgba(4, 25, 20, 0.25);
  }

  .sidebar-close {
    display: grid;
  }

  .sidebar-scrim {
    position: fixed;
    inset: 0;
    z-index: 45;
    display: block;
    background: rgba(5, 27, 22, 0.48);
    backdrop-filter: blur(2px);
  }

  .app-frame {
    margin-left: 0;
  }

  .sidebar-toggle {
    display: grid;
  }

  body.sidebar-open {
    overflow: hidden;
  }

  .topbar-search {
    width: min(360px, 36vw);
  }

  .page {
    max-width: 1240px;
  }
}

@media (max-width: 980px) {
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat-value {
    font-size: 30px;
  }

  .dashboard-grid,
  .detail-layout,
  .form-layout,
  .account-layout,
  .admin-layout,
  .report-builder {
    grid-template-columns: 1fr;
  }

  .form-aside {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .category-grid {
    grid-template-columns: 1fr;
  }

  .voter-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .voter-hero-stats {
    width: 100%;
    padding-top: 17px;
    padding-left: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .report-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .report-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .login-page {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .login-visual {
    min-height: auto;
    padding: 30px clamp(26px, 6vw, 48px) 33px;
  }

  .login-copy {
    max-width: 700px;
    margin: 31px 0 0;
  }

  .login-copy h1 {
    font-size: clamp(34px, 6.4vw, 46px);
  }

  .login-lead {
    max-width: 600px;
    margin-top: 15px;
    font-size: 12px;
  }

  .login-event-card,
  .login-visual-footer {
    display: none;
  }

  .login-panel {
    min-height: auto;
    padding: 34px 24px 29px;
  }

  .login-panel-inner {
    justify-content: flex-start;
    width: min(100%, 500px);
  }

  .login-mobile-brand {
    display: none;
  }

  .login-card {
    padding: 30px;
  }

  .login-footer {
    margin-top: 24px;
  }

  .detail-aside {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(240px, 0.8fr);
    align-items: start;
  }

  .mini-summary-card {
    height: 100%;
  }
}

@media (max-width: 840px) {
  .topbar-search {
    display: none;
  }

  .topbar-right {
    margin-left: auto;
  }

  .page-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 15px;
  }

  .page-head-actions {
    width: 100%;
  }

  .page-subtitle {
    max-width: 100%;
  }

  .filters-form {
    align-items: stretch;
  }

  .filter-field,
  .filter-search {
    flex: 1 1 calc(50% - 6px);
  }

  .filter-actions {
    flex: 1 1 100%;
    padding-top: 3px;
  }

  .search-form {
    padding-left: 15px;
  }

  .search-form input {
    font-size: 14px;
  }

  .search-submit {
    padding: 0 14px;
  }

  .builder-form {
    display: flex;
  }

  .detail-aside {
    grid-template-columns: 1fr;
  }

  .form-aside {
    grid-template-columns: 1fr;
  }

  .data-table {
    min-width: 760px;
  }

  .audit-table {
    min-width: 880px;
  }

  .result-card {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .result-actions {
    width: 100%;
    justify-content: flex-end;
    padding-top: 4px;
  }

  .search-guides {
    grid-template-columns: 1fr;
  }

  .report-grid {
    grid-template-columns: 1fr;
  }

  .voted-banner {
    align-items: stretch;
    flex-direction: column;
    gap: 16px;
  }

  .voted-banner-side {
    align-items: center;
    flex-direction: row;
    justify-content: space-between;
  }

  .report-card {
    min-height: 190px;
  }

  .table-card-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }
}

@media (max-width: 700px) {
  .page {
    padding: 21px 16px 8px;
  }

  .topbar {
    height: 65px;
    padding: 0 16px;
    gap: 12px;
  }

  .topbar-date {
    display: none;
  }

  .topbar-context {
    max-width: calc(100vw - 180px);
  }

  .topbar-eyebrow {
    font-size: 7.5px;
  }

  .topbar-title {
    font-size: 12px;
  }

  .page-head-copy h1 {
    font-size: 25px;
  }

  .page-head-actions {
    gap: 7px;
  }

  .page-head-actions .btn {
    flex: 1 1 auto;
  }

  .live-indicator {
    flex: 1 1 100%;
    justify-content: center;
  }

  .stats-grid {
    gap: 10px;
  }

  .stat-card {
    padding: 14px;
  }

  .stat-top {
    gap: 7px;
    margin-bottom: 11px;
  }

  .stat-icon {
    width: 28px;
    height: 28px;
  }

  .stat-label {
    font-size: 8px;
    letter-spacing: 0.05em;
  }

  .stat-value {
    font-size: 26px;
  }

  .stat-meta {
    gap: 6px;
    margin-top: 8px;
    font-size: 8.5px;
  }

  .turnout-body {
    align-items: flex-start;
    flex-direction: column;
    gap: 17px;
    padding: 20px 18px 17px;
  }

  .turnout-side {
    gap: 25px;
  }

  .stacked-track {
    width: calc(100% - 36px);
    margin: 0 18px;
  }

  .chart-legend {
    gap: 10px;
    margin: 10px 18px 0;
  }

  .turnout-card .card-foot {
    margin: 15px 18px 0;
  }

  .event-card {
    align-items: flex-start;
    padding: 18px;
  }

  .event-date-block {
    width: 70px;
    height: 96px;
  }

  .event-day {
    font-size: 34px;
  }

  .category-card {
    padding: 17px;
  }

  .category-head {
    flex-wrap: wrap;
  }

  .category-range {
    margin-left: 49px;
  }

  .card-head {
    padding: 18px 18px 0;
  }

  .activity-list {
    padding: 3px 18px 0;
  }

  .quick-list {
    padding: 8px 12px 3px;
  }

  .quick-foot {
    margin-right: 12px;
    margin-left: 12px;
  }

  .search-panel {
    padding: 19px 17px 13px;
  }

  .search-panel-copy {
    align-items: flex-start;
  }

  .search-form {
    min-height: 54px;
    padding: 4px;
    padding-left: 13px;
  }

  .search-form-icon {
    font-size: 13px;
  }

  .search-submit {
    min-height: 42px;
  }

  .search-tips {
    gap: 7px 12px;
    font-size: 8.5px;
  }

  .search-results {
    padding: 13px 17px 17px;
  }

  .results-card-head {
    padding-bottom: 13px;
  }

  .results-status {
    display: none;
  }

  .result-card {
    padding: 12px;
  }

  .result-main {
    align-items: flex-start;
    gap: 10px;
  }

  .avatar-lg {
    width: 46px;
    height: 46px;
    border-radius: 13px;
    font-size: 14px;
  }

  .result-title-row h3 {
    font-size: 12.5px;
  }

  .result-meta {
    font-size: 8.5px;
    gap: 4px 8px;
  }

  .result-sub {
    font-size: 8.5px;
  }

  .result-actions {
    justify-content: stretch;
  }

  .result-actions .btn {
    flex: 1;
  }

  .result-complete {
    flex: 1;
  }

  .filter-card {
    padding: 14px;
  }

  .filter-field,
  .filter-search {
    flex: 1 1 100%;
  }

  .filter-actions {
    justify-content: stretch;
  }

  .filter-actions .btn {
    flex: 1;
  }

  .table-card-head {
    padding: 16px;
  }

  .table-actions {
    width: 100%;
  }

  .table-actions .btn {
    flex: 1;
  }

  .pagination {
    align-items: flex-start;
    flex-direction: column;
    padding: 13px 16px;
  }

  .pagination-controls {
    align-self: stretch;
    justify-content: center;
  }

  .voter-hero {
    padding: 19px;
  }

  .voter-hero-main {
    align-items: flex-start;
    gap: 12px;
  }

  .avatar-xl {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    font-size: 19px;
  }

  .voter-identity h1 {
    font-size: 23px;
  }

  .voter-hero-meta {
    gap: 5px 10px;
    font-size: 9px;
  }

  .voter-hero-stats {
    gap: 16px;
    justify-content: space-between;
  }

  .info-grid {
    grid-template-columns: 1fr;
    padding: 6px 18px 0;
  }

  .info-item,
  .info-item:nth-last-child(-n + 2) {
    border-bottom: 1px solid #eef3f0;
  }

  .info-item:last-child {
    border-bottom: 0;
  }

  .form-card {
    padding: 17px;
  }

  .form-section-head {
    flex-wrap: wrap;
  }

  .required-note {
    flex-basis: 100%;
    margin-left: 40px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-field-wide {
    grid-column: auto;
  }

  .form-actions {
    flex-direction: column-reverse;
  }

  .form-actions .btn {
    width: 100%;
  }

  .form-aside {
    grid-template-columns: 1fr;
  }

  .switch-card {
    align-items: flex-start;
  }

  .switch-state {
    display: none;
  }

  .age-display {
    font-size: 48px;
  }

  .report-summary {
    grid-template-columns: 1fr 1fr;
  }

  .report-summary-item {
    padding: 12px;
  }

  .report-summary-item strong {
    font-size: 17px;
  }

  .builder-card {
    padding: 18px;
  }

  .builder-form {
    padding: 14px;
  }

  .account-layout {
    grid-template-columns: 1fr;
  }

  .password-form {
    padding: 18px 18px 0;
  }

  .password-grid {
    grid-template-columns: 1fr;
  }

  .password-card .form-actions {
    flex-direction: column-reverse;
  }

  .confirm-dialog-inner {
    padding: 22px;
  }

  .toast-region {
    right: 16px;
    bottom: 16px;
    left: 16px;
    width: auto;
  }
}

@media (max-width: 560px) {
  .page {
    padding: 18px 13px 6px;
  }

  .topbar {
    padding: 0 13px;
  }

  .topbar-context {
    max-width: calc(100vw - 145px);
  }

  .user-copy {
    display: none;
  }

  .user-trigger {
    gap: 4px;
  }

  .user-avatar {
    width: 32px;
    height: 32px;
  }

  .page-head-copy h1 {
    font-size: 23px;
  }

  .page-head-actions .btn {
    flex: 1 1 100%;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .stat-value {
    font-size: 30px;
  }

  .stat-label {
    font-size: 9px;
  }

  .stat-meta {
    font-size: 9px;
  }

  .event-card {
    flex-direction: column;
    gap: 14px;
  }

  .event-date-block {
    width: 100%;
    height: auto;
    flex-direction: row;
    gap: 8px;
    padding: 9px 13px;
  }

  .event-month,
  .event-year {
    font-size: 8px;
  }

  .event-day {
    font-size: 25px;
  }

  .category-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .category-range {
    margin-left: 0;
  }

  .activity-topline time {
    flex-basis: 100%;
    margin-left: 0;
  }

  .search-form {
    flex-wrap: wrap;
    padding: 9px 9px 9px 12px;
  }

  .search-form input {
    flex-basis: calc(100% - 26px);
    font-size: 13px;
  }

  .search-submit {
    width: 100%;
    margin-top: 5px;
  }

  .result-actions {
    flex-direction: column;
  }

  .result-actions .btn {
    width: 100%;
  }

  .empty-actions {
    flex-direction: column;
    width: 100%;
  }

  .empty-actions .btn {
    width: 100%;
  }

  .report-summary {
    grid-template-columns: 1fr;
  }

  .voted-banner {
    padding: 18px;
  }

  .voted-banner-side {
    align-items: stretch;
    flex-direction: column;
  }

  .voted-banner-side .btn {
    width: 100%;
  }

  .report-card-actions .btn {
    flex: 1;
  }

  .builder-actions {
    flex-direction: column;
  }

  .builder-actions .btn {
    width: 100%;
  }

  .voter-hero-main {
    flex-direction: column;
  }

  .voter-hero-stats {
    flex-wrap: wrap;
    gap: 12px 22px;
  }

  .action-card {
    padding: 18px;
  }

  .form-card {
    padding: 15px;
  }

  .login-visual {
    padding: 24px 20px 27px;
  }

  .login-copy {
    margin-top: 23px;
  }

  .login-copy h1 {
    font-size: 30px;
  }

  .login-lead {
    font-size: 11px;
    line-height: 1.6;
  }

  .login-access-badge {
    display: none;
  }

  .login-panel {
    padding: 22px 15px 24px;
  }

  .login-card {
    padding: 23px 19px;
    border-radius: 16px;
  }

  .login-card h2 {
    font-size: 25px;
  }

  .login-security-note {
    margin-top: 18px;
    padding-top: 15px;
  }

  .login-footer {
    flex-wrap: wrap;
    font-size: 8px;
  }

  .error-card {
    padding: 25px 20px;
  }

  .error-actions {
    flex-direction: column;
  }

  .error-actions .btn {
    width: 100%;
  }

  .pagination-controls {
    gap: 3px;
  }

  .page-button {
    min-width: 26px;
    height: 27px;
    padding: 0 5px;
    font-size: 9px;
  }

  .page-button:nth-child(n + 5):not(.page-arrow):not(.is-current) {
    display: none;
  }
}

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

@media print {
  .sidebar,
  .topbar,
  .app-footer,
  .page-head-actions,
  .back-nav,
  .toast-region,
  .skip-link,
  .action-form,
  .danger-zone,
  .profile-logout {
    display: none !important;
  }

  body {
    background: #fff;
    font-size: 11pt;
  }

  .app-frame {
    margin-left: 0;
  }

  .page {
    max-width: none;
    padding: 0;
  }

  .card,
  .voter-hero {
    border-color: #ccc;
    box-shadow: none;
    break-inside: avoid;
  }

  .detail-layout {
    grid-template-columns: 1fr;
  }

  .status-pill,
  .live-indicator {
    border: 1px solid #ccc;
  }
}

/* =========================================================
   Conector móvil
   ========================================================= */

.scan-connect-dialog {
  width: min(94vw, 445px);
  padding: 0;
  border: 0;
  border-radius: 20px;
  background: transparent;
  box-shadow: 0 30px 90px rgba(4, 25, 20, 0.3);
}

.scan-connect-dialog::backdrop {
  background: rgba(5, 27, 22, 0.58);
  backdrop-filter: blur(4px);
}

.scan-connect-inner {
  position: relative;
  max-height: 90vh;
  padding: 27px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
}

.scan-dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 0;
  border-radius: 7px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 11px;
}

.scan-dialog-close:hover {
  color: var(--forest);
  background: var(--green-soft);
}

.scan-connect-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding-right: 20px;
  margin-bottom: 18px;
}

.scan-connect-icon {
  display: grid;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 11px;
  color: var(--gold-deep);
  background: var(--gold-soft);
  font-size: 16px;
}

.scan-connect-head h2 {
  font-size: 20px;
  letter-spacing: -0.03em;
}

.scan-connect-head p:last-child {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.scan-qr-box {
  display: grid;
  width: 230px;
  height: 230px;
  margin: 0 auto;
  padding: 10px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfdfc;
}

.scan-qr-image {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 8px;
}

.scan-qr-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 9.5px;
}

.scan-qr-loading i {
  color: var(--green);
  font-size: 18px;
}

.scan-connect-status {
  margin-top: 14px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
  text-align: center;
}

.scan-connect-status.is-success {
  color: var(--green);
}

.scan-connect-status.is-error {
  color: var(--red);
}

.scan-connect-status.is-warning {
  color: var(--gold-deep);
}

.scan-connect-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 9px;
}

.scan-connect-code {
  padding: 4px 7px;
  border-radius: 4px;
  color: var(--forest);
  background: var(--green-soft);
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.scan-connect-link {
  color: var(--green);
  font-size: 9px;
  font-weight: 650;
}

.scan-connect-link i {
  font-size: 8px;
}

.scan-connect-steps {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 13px;
  margin-top: 17px;
  border-radius: 9px;
  background: var(--surface-soft);
}

.scan-connect-steps > div {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}

.scan-connect-steps span {
  display: grid;
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  place-items: center;
  border-radius: 50%;
  color: var(--green);
  background: var(--green-soft);
  font-size: 7px;
  font-weight: 800;
}

.scan-connect-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 17px;
}

.scan-results {
  padding-top: 14px;
  margin-top: 14px;
  border-top: 1px solid var(--line);
}

.scan-results-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.scan-results-head h3 {
  font-size: 11px;
  letter-spacing: 0.02em;
}

.scan-results-head span {
  display: grid;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  place-items: center;
  border-radius: 999px;
  color: var(--green);
  background: var(--green-soft);
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 750;
}

.scan-results-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 320px;
  overflow-y: auto;
  padding-right: 2px;
}

.scan-result-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--green-light);
  border-radius: 9px;
  background: #fbfdfc;
}

.scan-result-card.is-new {
  border-left-color: var(--gold);
  background: #fffdf8;
}

.scan-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.scan-card-copy {
  min-width: 0;
}

.scan-card-kicker {
  margin-bottom: 1px;
  color: var(--muted-light);
  font-size: 7px;
  font-weight: 750;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.scan-card-copy h4 {
  overflow: hidden;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.3;
  text-overflow: ellipsis;
}

.scan-card-badge {
  flex: 0 0 auto;
  padding: 3px 6px;
  border-radius: 999px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 6.5px;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.scan-card-badge.is-new {
  color: var(--gold-deep);
  background: var(--gold-soft);
}

.scan-card-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px 10px;
  margin-top: 8px;
}

.scan-card-detail {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.scan-card-detail span {
  color: var(--muted-light);
  font-size: 6.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.scan-card-detail strong {
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 700;
}

.scan-card-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 9px;
}

.scan-card-actions .btn {
  min-height: 30px;
  padding: 0 10px;
  font-size: 8.5px;
}

.scan-connect-note {
  margin-top: 9px;
  color: var(--muted-light);
  font-size: 7.5px;
  line-height: 1.4;
  text-align: center;
}

.scan-connect-actions .btn {
  min-height: 37px;
  font-size: 10px;
}

.scan-connect-actions .btn {
  min-height: 37px;
  font-size: 10px;
}

/* =========================================================
   Lector móvil de DNI
   ========================================================= */

.scanner-body {
  background:
    radial-gradient(circle at 90% 0%, rgba(184, 138, 59, 0.08), transparent 25%),
    #eef3f0;
}

.scanner-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.scanner-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 68px;
  padding: 10px 18px;
  color: #fff;
  background:
    radial-gradient(circle at 95% 0%, rgba(184, 138, 59, 0.16), transparent 30%),
    var(--forest);
}

.scanner-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.scanner-brand .login-crest {
  width: 36px;
  height: 39px;
  border-radius: 9px;
  font-size: 12px;
}

.scanner-brand div {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.scanner-brand strong {
  font-size: 12px;
  font-weight: 700;
}

.scanner-brand span:last-child {
  margin-top: 2px;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.45);
  font-size: 7.5px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.scanner-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.scanner-connected {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 7.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.scanner-connected > span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #8bd5b8;
  box-shadow: 0 0 0 3px rgba(139, 213, 184, 0.12);
}

.scanner-exit {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: rgba(255, 255, 255, 0.56);
  font-size: 8.5px;
}

.scanner-page {
  width: min(100%, 630px);
  margin: 0 auto;
  padding: 24px 16px 35px;
  flex: 1;
}

.scanner-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.scanner-intro h1 {
  margin-bottom: 5px;
  font-size: 30px;
  letter-spacing: -0.04em;
}

.scanner-intro p:not(.eyebrow) {
  max-width: 470px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.scanner-live {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
  padding: 6px 9px;
  margin-top: 4px;
  border: 1px solid #cfe3d9;
  border-radius: 999px;
  color: var(--green);
  background: #f7fcf9;
  font-size: 7.5px;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.scanner-live > span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green-light);
  box-shadow: 0 0 0 3px rgba(20, 107, 84, 0.1);
}

.scanner-stage {
  position: relative;
  aspect-ratio: 4 / 3;
  margin: 18px 0 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 19px;
  background:
    radial-gradient(circle at 50% 40%, #173e33, #071b16 80%);
  box-shadow: 0 16px 36px rgba(7, 27, 22, 0.16);
}

.scanner-stage video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.scanner-stage.is-active video {
  opacity: 1;
}

.scanner-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: rgba(255, 255, 255, 0.48);
  text-align: center;
}

.scanner-placeholder-icon {
  display: grid;
  width: 52px;
  height: 52px;
  margin-bottom: 3px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 15px;
  color: #d7b66f;
  background: rgba(255, 255, 255, 0.04);
  font-size: 20px;
}

.scanner-placeholder strong {
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  font-weight: 650;
}

.scanner-placeholder > span:last-child {
  font-size: 8.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.scanner-frame {
  position: absolute;
  inset: 13% 10%;
  z-index: 2;
  border-radius: 13px;
  pointer-events: none;
}

.corner {
  position: absolute;
  width: 27px;
  height: 27px;
  border-color: #d7b66f;
  border-style: solid;
}

.corner-tl {
  top: 0;
  left: 0;
  border-width: 3px 0 0 3px;
  border-radius: 10px 0 0;
}

.corner-tr {
  top: 0;
  right: 0;
  border-width: 3px 3px 0 0;
  border-radius: 0 10px 0 0;
}

.corner-bl {
  bottom: 0;
  left: 0;
  border-width: 0 0 3px 3px;
  border-radius: 0 0 0 10px;
}

.corner-br {
  right: 0;
  bottom: 0;
  border-width: 0 3px 3px 0;
  border-radius: 0 0 10px;
}

.scanner-line {
  position: absolute;
  top: 15%;
  right: 6%;
  left: 6%;
  height: 1.5px;
  background: linear-gradient(90deg, transparent, #d7b66f, transparent);
  box-shadow: 0 0 8px rgba(215, 182, 111, 0.65);
  opacity: 0;
}

.scanner-stage.is-active .scanner-line {
  opacity: 1;
  animation: scanner-sweep 2.6s ease-in-out infinite;
}

@keyframes scanner-sweep {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(240px); }
}

.scanner-controls {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.scanner-controls .btn {
  min-height: 42px;
  font-size: 11px;
}

.scanner-status {
  min-height: 18px;
  margin-top: 11px;
  color: var(--muted);
  font-size: 9.5px;
  text-align: center;
}

.scanner-status.is-success {
  color: var(--green);
  font-weight: 650;
}

.scanner-status.is-error {
  color: var(--red);
  font-weight: 650;
}

.scanner-status.is-warning {
  color: var(--gold-deep);
}

.scanner-result {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 17px;
  margin-top: 17px;
  border: 1px solid #cce3d8;
  border-radius: 13px;
  background: #fff;
  box-shadow: var(--shadow-xs);
}

.scanner-result-check {
  display: grid;
  flex: 0 0 auto;
  width: 37px;
  height: 37px;
  place-items: center;
  border-radius: 10px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 16px;
}

.scanner-result-copy {
  min-width: 0;
  flex: 1;
}

.scanner-result-copy h2 {
  margin-bottom: 10px;
  font-size: 17px;
}

.scanner-result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
}

.scanner-result-grid > div {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.scanner-result-grid span {
  color: var(--muted-light);
  font-size: 7.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.scanner-result-grid strong {
  color: var(--ink-soft);
  font-size: 10.5px;
  font-weight: 700;
}

.scanner-result-copy > p:last-child {
  margin-top: 11px;
  color: var(--green);
  font-size: 9px;
}

.scanner-help {
  padding: 16px 17px;
  margin-top: 17px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.62);
}

.scanner-help h2 {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  font-size: 11px;
}

.scanner-help h2 i {
  color: var(--gold-deep);
  font-size: 10px;
}

.scanner-help ul {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-left: 13px;
  list-style: disc;
}

.scanner-help li {
  color: var(--muted);
  font-size: 8.5px;
  line-height: 1.5;
}

.scanner-footer {
  padding: 10px 16px 24px;
  color: #94a19c;
  font-size: 7.5px;
  letter-spacing: 0.05em;
  text-align: center;
  text-transform: uppercase;
}

.scanner-error-card {
  padding: 35px 26px;
  margin-top: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.scanner-error-icon {
  display: grid;
  width: 58px;
  height: 58px;
  margin: 0 auto 15px;
  place-items: center;
  border-radius: 16px;
  color: var(--gold-deep);
  background: var(--gold-soft);
  font-size: 23px;
}

.scanner-error-card h1 {
  margin-bottom: 7px;
  font-size: 24px;
}

.scanner-error-card > p:not(.eyebrow) {
  max-width: 390px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.scanner-error-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 20px;
}

@media (max-width: 560px) {
  .scanner-header {
    padding: 9px 13px;
  }

  .scanner-page {
    padding: 20px 13px 30px;
  }

  .scanner-intro {
    flex-direction: column;
    gap: 8px;
  }

  .scanner-intro h1 {
    font-size: 26px;
  }

  .scanner-live {
    margin-top: 0;
  }

  .scanner-stage {
    aspect-ratio: 3 / 3.35;
    margin-top: 15px;
  }

  .scanner-frame {
    inset: 12% 7%;
  }

  .scanner-controls .btn {
    flex: 1 1 auto;
  }

  .scanner-result {
    padding: 14px;
  }

  .scanner-result-grid {
    grid-template-columns: 1fr;
  }

  .scanner-error-card {
    padding: 28px 18px;
    margin-top: 14px;
  }

  .scan-connect-inner {
    padding: 22px 18px;
  }

  .scan-qr-box {
    width: 210px;
    height: 210px;
  }

  .scan-connect-actions {
    flex-direction: column-reverse;
  }

  .scan-connect-actions .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .scanner-line {
    animation: none !important;
  }
}

.scan-connected-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 24px 18px;
  border: 1px solid #cce3d8;
  border-radius: 14px;
  background: #f8fcfa;
  text-align: center;
}

.scan-connected-icon {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  border-radius: 14px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 20px;
}

.scan-connected-state strong {
  color: var(--forest);
  font-size: 14px;
  font-weight: 750;
}

.scan-connected-state > p {
  max-width: 300px;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.5;
}

.scan-connected-wait {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  margin-top: 3px;
  border-radius: 999px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 7.5px;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.scan-connected-wait > span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green-light);
  animation: connected-pulse 1.6s ease-in-out infinite;
}

@keyframes connected-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.75); }
}

.scanner-session-note {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 8px;
  margin-top: 7px !important;
  border-radius: 6px;
  color: var(--green) !important;
  background: var(--green-soft);
  font-size: 8px !important;
  font-weight: 600;
  line-height: 1.4 !important;
}

.scanner-meta {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  margin-top: 4px;
}

.scanner-operator {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 190px;
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
  font-weight: 650;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.scanner-operator i {
  color: var(--green);
  font-size: 8px;
}

.scanner-close-hint {
  color: rgba(255, 255, 255, 0.42);
  font-size: 7.5px;
  font-weight: 600;
  text-align: right;
}

@media (max-width: 560px) {
  .scanner-meta {
    align-items: flex-start;
    flex-direction: row;
    flex-wrap: wrap;
    margin-top: 0;
  }

  .scanner-operator {
    max-width: 170px;
  }

  .scanner-close-hint {
    max-width: 90px;
    line-height: 1.35;
  }
}

@media (prefers-reduced-motion: reduce) {
  .scan-connected-wait > span {
    animation: none !important;
  }
}

/* =========================================================
   Escuelas y alumnos
   ========================================================= */

.schools-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(250px, 0.75fr);
  gap: 22px;
  padding: 26px 28px;
  margin-bottom: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  color: #fff;
  background:
    radial-gradient(circle at 92% 0%, rgba(184, 138, 59, 0.24), transparent 34%),
    radial-gradient(circle at 0% 100%, rgba(94, 180, 146, 0.18), transparent 42%),
    linear-gradient(135deg, #0b3b30, #071f19);
  box-shadow: 0 16px 36px rgba(7, 31, 25, 0.16);
}

.schools-hero::after {
  position: absolute;
  right: -60px;
  bottom: -110px;
  width: 290px;
  height: 290px;
  border: 1px solid rgba(215, 182, 111, 0.12);
  border-radius: 50%;
  content: "";
}

.schools-hero-main {
  position: relative;
  z-index: 1;
}

.schools-hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 8px;
  font-weight: 750;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.schools-hero-kicker > span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #8bd5b8;
  box-shadow: 0 0 0 4px rgba(139, 213, 184, 0.12);
}

.schools-hero h2 {
  margin-top: 5px;
  font-size: clamp(25px, 3vw, 35px);
  letter-spacing: -0.04em;
}

.schools-hero-main > p {
  max-width: 540px;
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 10px;
  line-height: 1.55;
}

.schools-hero-search {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 590px;
  padding: 6px 6px 6px 12px;
  margin-top: 17px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(5px);
}

.schools-hero-search > i {
  color: rgba(255, 255, 255, 0.45);
  font-size: 12px;
}

.schools-hero-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
  font: inherit;
  font-size: 10px;
}

.schools-hero-search input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.schools-hero-search .btn {
  min-height: 34px;
  white-space: nowrap;
}

.schools-hero-actions {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 9px;
}

.schools-hero-actions .btn {
  min-height: 29px;
  padding: 0 8px;
  border-color: transparent;
  color: rgba(255, 255, 255, 0.6);
  background: transparent;
  font-size: 8px;
}

.schools-hero-actions .btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.schools-hero-stats {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.045);
}

.schools-hero-stat {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 7px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.schools-hero-stat:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.schools-hero-stat strong {
  color: #f3dfb2;
  font-family: var(--font-mono);
  font-size: 18px;
  letter-spacing: -0.03em;
}

.schools-hero-stat span {
  max-width: 120px;
  color: rgba(255, 255, 255, 0.46);
  font-size: 7.5px;
  line-height: 1.35;
  text-align: right;
}

.schools-page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.75fr);
  gap: 16px;
  align-items: start;
}

.schools-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.schools-list-card {
  padding-bottom: 22px;
  margin-bottom: 18px;
}

.schools-list-card .school-tile-grid {
  padding: 16px 24px 0;
}

.school-tile-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.schools-tools-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 16px;
  align-items: start;
}

.schools-tools-grid.is-single {
  grid-template-columns: minmax(0, 1fr);
}

.school-tool-card {
  position: relative;
  min-width: 0;
  padding: 24px;
  overflow: hidden;
}

.school-create-card {
  box-shadow: inset 0 3px 0 var(--green), var(--shadow-xs);
}

.school-import-card {
  box-shadow: inset 0 3px 0 var(--gold), var(--shadow-xs);
}

.school-tool-head {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-bottom: 11px;
}

.school-tool-icon {
  display: grid;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 9px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 14px;
}

.school-tool-icon.is-gold {
  color: var(--gold-deep);
  background: var(--gold-soft);
}

.school-tool-head > div {
  min-width: 0;
  flex: 1;
}

.school-tool-head h2 {
  font-size: 14px;
  letter-spacing: -0.02em;
}

.school-tool-subtitle {
  max-width: 620px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

.school-create-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 16px;
  margin-top: 16px;
  border-top: 1px solid var(--line);
}

.school-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.school-input-wrap:focus-within {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(20, 107, 84, 0.11);
}

.school-input-wrap > i {
  color: var(--muted-light);
  font-size: 11px;
}

.school-input-wrap input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font: inherit;
  font-size: 10.5px;
}

.school-create-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.school-create-foot .field-help {
  margin: 0;
  flex: 1;
}

.school-create-foot .btn {
  min-height: 36px;
}

.school-command-card {
  margin-top: 11px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9px;
  background:
    radial-gradient(circle at 100% 0%, rgba(184, 138, 59, 0.16), transparent 38%),
    #0b2a22;
}

.school-command-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 9px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.school-command-head > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.school-command-head > span i {
  color: #d7b66f;
  font-size: 8px;
}

.school-copy-button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 23px;
  padding: 0 7px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.62);
  background: rgba(255, 255, 255, 0.06);
  font-size: 7px;
  font-weight: 650;
}

.school-copy-button:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.school-copy-button.is-icon {
  border-color: var(--line);
  color: var(--muted);
  background: #fff;
}

.school-copy-button.is-icon:hover {
  color: var(--green);
  background: var(--green-soft);
}

.school-command-card > code {
  display: block;
  padding: 11px;
  overflow-x: auto;
  color: #e8f4ef;
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 1.5;
  white-space: nowrap;
}

.school-import-grid {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 9px;
}

.school-import-item {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
}

.school-import-name {
  flex: 0 0 auto;
  color: var(--forest);
  font-size: 9.5px;
  font-weight: 750;
}

.school-import-item > code {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.school-import-note {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 9px;
  color: var(--muted-light);
  font-size: 7.5px;
}

.school-import-note i {
  color: var(--green);
  font-size: 8px;
}

.school-tile {
  display: flex;
  flex-direction: column;
  gap: 11px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.school-tile:hover {
  border-color: #c9ddd3;
  box-shadow: var(--shadow-xs);
  transform: translateY(-1px);
}

.school-tile.is-active {
  border-color: #bfdccb;
  background: linear-gradient(145deg, #fbfdfc, #f3faf6);
  box-shadow: inset 3px 0 0 var(--green);
}

.school-tile-head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.school-tile-icon {
  display: grid;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 8px;
  color: var(--gold-deep);
  background: var(--gold-soft);
  font-size: 12px;
}

.school-tile.is-active .school-tile-icon {
  color: var(--green);
  background: var(--green-soft);
}

.school-tile-title {
  min-width: 0;
  flex: 1;
}

.school-tile-title h3 {
  overflow: hidden;
  color: var(--forest);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.25;
  text-overflow: ellipsis;
}

.school-tile-location {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
  color: var(--muted-light);
  font-family: var(--font-mono);
  font-size: 7px;
}

.school-tile-body {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 7px;
  background: var(--surface-soft);
}

.school-tile-count {
  display: flex;
  flex-direction: column;
}

.school-tile-count strong {
  color: var(--forest);
  font-family: var(--font-mono);
  font-size: 21px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.school-tile-count span {
  margin-top: 2px;
  color: var(--muted-light);
  font-size: 7px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.school-tile-slug {
  overflow: hidden;
  color: var(--muted-light);
  font-family: var(--font-mono);
  font-size: 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.school-tile-actions {
  display: flex;
  gap: 5px;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

.school-tile-actions .btn {
  min-height: 31px;
  padding: 0 9px;
  font-size: 8.5px;
}

.school-tile-actions form {
  margin: 0;
}

.schools-admin-card .card-head,
.schools-import-card .card-head {
  margin-bottom: 10px;
}

.schools-import-card > p {
  color: var(--muted);
  font-size: 8.5px;
  line-height: 1.55;
}

.school-file-badge {
  padding: 3px 6px;
  border-radius: 4px;
  color: var(--green);
  background: var(--green-soft);
  font-family: var(--font-mono);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.school-import-shortcuts {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 8px;
}

.school-import-shortcuts span {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 7.5px;
}

.school-import-shortcuts i {
  color: var(--gold-deep);
  font-size: 7px;
}

.school-import-shortcuts code {
  overflow-wrap: anywhere;
  color: var(--forest);
  font-family: var(--font-mono);
  font-size: 7.5px;
}

/* DNI legible en listados y resultados */
.dni-text {
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.015em;
  white-space: nowrap;
}

.school-table .table-mono {
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.015em;
}

.school-table .school-student-name strong {
  font-size: 11.5px;
  line-height: 1.3;
}

.school-table .school-student-name small {
  font-size: 8.5px;
}

.school-table .dni-text,
.school-table .table-mono .dni-text {
  font-size: 12px;
}

.school-membership-copy h3 .dni-text {
  font-size: 13px;
}

.result-meta .dni-text {
  font-size: 10.5px;
}

@media (max-width: 1050px) {
  .schools-hero {
    grid-template-columns: 1fr;
  }

  .schools-hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .schools-hero-stat {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
    padding: 0;
    border: 0;
  }

  .schools-hero-stat span {
    max-width: none;
    text-align: left;
  }

  .schools-page-grid {
    grid-template-columns: 1fr;
  }

  .schools-side {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .schools-tools-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1200px) {
  .school-tile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .schools-hero {
    padding: 20px 17px;
  }

  .schools-hero h2 {
    font-size: 25px;
  }

  .schools-hero-search {
    align-items: stretch;
    flex-direction: column;
    padding: 9px;
  }

  .schools-hero-search > i {
    display: none;
  }

  .schools-hero-search input {
    min-height: 32px;
    padding: 0 2px;
  }

  .schools-hero-stats {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .schools-tile-grid,
  .school-tile-grid {
    grid-template-columns: 1fr;
  }

  .schools-side {
    grid-template-columns: 1fr;
  }

  .schools-hero-actions {
    gap: 0;
  }

  .school-chart {
    padding: 14px 16px 0;
  }

  .school-chart-scale {
    display: none;
  }

  .school-chart-row {
    grid-template-columns: 110px minmax(0, 1fr) 48px;
    gap: 8px;
  }

  .school-chart-label strong {
    font-size: 9px;
  }

  .school-chart-value strong {
    font-size: 9.5px;
  }

  .school-tool-card {
    padding: 18px;
  }

  .schools-list-card {
    padding-bottom: 18px;
  }

  .schools-list-card .school-tile-grid {
    padding: 14px 16px 0;
  }

  .school-create-foot {
    align-items: stretch;
    flex-direction: column;
  }

  .school-create-foot .btn {
    width: 100%;
  }
}

.topbar-school {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 180px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-soft);
}

.topbar-school > i {
  color: var(--gold-deep);
  font-size: 11px;
}

.topbar-school > span {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar-school small {
  color: var(--muted-light);
  font-size: 6.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.topbar-school strong {
  overflow: hidden;
  color: var(--forest);
  font-size: 8.5px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.school-active-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  margin-bottom: 18px;
  border: 1px solid #cfe3d9;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #f7fcf9, #eef7f2);
}

.school-active-icon {
  display: grid;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 10px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 16px;
}

.school-active-banner > div {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.school-active-label {
  color: var(--muted-light);
  font-size: 7px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.school-active-banner strong {
  color: var(--forest);
  font-size: 13px;
  font-weight: 750;
}

.school-active-banner p {
  margin-top: 1px;
  color: var(--muted);
  font-size: 8.5px;
}

.school-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.9fr);
  gap: 16px;
  align-items: start;
}

.school-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.school-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.school-card {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.school-card.is-active {
  border-color: #bfdccb;
  background: #fbfdfc;
  box-shadow: inset 3px 0 0 var(--green);
}

.school-card-icon {
  display: grid;
  flex: 0 0 auto;
  width: 35px;
  height: 35px;
  place-items: center;
  border-radius: 9px;
  color: var(--gold-deep);
  background: var(--gold-soft);
  font-size: 13px;
}

.school-card-copy {
  min-width: 0;
  flex: 1;
}

.school-card-title {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.school-card-title h3 {
  font-size: 12px;
  font-weight: 750;
}

.school-card-copy p {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
  color: var(--muted-light);
  font-size: 7.5px;
}

.school-card-copy code {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 7.5px;
}

.school-card-count {
  display: inline-block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 8px;
}

.school-card-count strong {
  color: var(--forest);
  font-size: 11px;
}

.school-card-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-end;
  flex-direction: column;
  gap: 5px;
}

.school-card-actions .btn {
  min-height: 29px;
  padding: 0 9px;
  font-size: 8px;
}

.count-badge {
  display: grid;
  min-width: 23px;
  height: 23px;
  padding: 0 6px;
  place-items: center;
  border-radius: 999px;
  color: var(--green);
  background: var(--green-soft);
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 750;
}

.stack-form {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.form-field > span:first-child {
  margin-bottom: 7px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.school-help-card p {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.55;
}

.school-command {
  display: block;
  padding: 9px;
  margin: 9px 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--forest);
  background: var(--surface-soft);
  font-family: var(--font-mono);
  font-size: 7.5px;
  white-space: nowrap;
}

.school-membership-card {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 13px 15px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
}

.school-membership-card.has-school {
  border-color: #cfe3d9;
  background: linear-gradient(135deg, #f7fcf9, #eef7f2);
}

.school-membership-card.is-empty {
  background: var(--surface-soft);
}

.school-membership-icon {
  display: grid;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 10px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 15px;
}

.school-membership-card.is-empty .school-membership-icon {
  color: var(--muted);
  background: #edf1ef;
}

.school-membership-copy {
  min-width: 0;
  flex: 1;
}

.school-membership-copy h3 {
  margin-bottom: 6px;
  color: var(--forest);
  font-size: 12px;
  font-weight: 750;
}

.school-membership-copy > p:not(.card-kicker) {
  color: var(--muted);
  font-size: 8.5px;
}

.school-membership-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.school-membership-row {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  padding-top: 6px;
  border-top: 1px solid rgba(20, 107, 84, 0.1);
}

.school-membership-name {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--green);
  font-size: 10px;
  font-weight: 750;
}

.school-membership-name i {
  font-size: 8px;
}

.school-membership-row > span:not(.badge) {
  color: var(--muted);
  font-size: 8px;
}

.school-membership-row .btn {
  min-height: 27px;
  padding: 0 8px;
  font-size: 7.5px;
}

.school-match-card {
  padding: 14px 16px;
  margin-bottom: 16px;
  border: 1px solid #cfe3d9;
  border-radius: var(--radius-md);
  background: #fbfdfc;
}

.school-match-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
}

.school-match-head h2 {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}

.school-match-head h2 i {
  color: var(--gold-deep);
  font-size: 10px;
}

.school-match-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.school-match-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.school-match-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.school-match-copy strong {
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 9.5px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.school-match-copy span {
  color: var(--muted);
  font-size: 8px;
}

.school-match-status {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
}

.school-match-status .btn {
  min-height: 28px;
  padding: 0 8px;
  font-size: 7.5px;
}

.school-detail-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
}

.school-detail-badge {
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  border-radius: 9px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 14px;
}

.school-detail-head > div:last-child {
  display: flex;
  flex-direction: column;
}

.school-detail-head strong {
  color: var(--forest);
  font-size: 11px;
}

.school-detail-head p {
  color: var(--muted);
  font-size: 8px;
}

.school-detail-head code {
  font-family: var(--font-mono);
}

.school-search-panel {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 11px;
  margin-bottom: 13px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
}

.school-search-panel > i {
  color: var(--muted-light);
  font-size: 12px;
}

.school-search-panel input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 11px;
}

.school-table {
  min-width: 940px;
}

.school-table .is-right,
.data-table .is-right {
  text-align: right;
}

.table-mono {
  font-family: var(--font-mono);
  font-size: 9px;
  white-space: nowrap;
}

.school-student-name {
  display: flex;
  align-items: center;
  gap: 7px;
}

.school-student-name > div {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.school-student-name strong {
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 700;
}

.school-student-name small {
  margin-top: 1px;
  color: var(--gold-deep);
  font-size: 7.5px;
}

@media (max-width: 980px) {
  .school-layout {
    grid-template-columns: 1fr;
  }

  .school-side {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topbar-school {
    max-width: 130px;
  }
}

@media (max-width: 700px) {
  .school-side {
    grid-template-columns: 1fr;
  }

  .school-card {
    flex-wrap: wrap;
  }

  .school-match-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .school-match-row {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .school-match-status {
    padding-left: 32px;
  }

  .school-card-actions {
    align-items: stretch;
    flex-basis: 100%;
    flex-direction: row;
    justify-content: flex-end;
  }

  .school-active-banner {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .topbar-school span {
    display: none;
  }

  .topbar-school {
    padding: 6px;
  }
}

/* =========================================================
   Certificado de votación y WhatsApp
   ========================================================= */

.certificate-dialog {
  width: min(94vw, 455px);
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: transparent;
  box-shadow: 0 30px 90px rgba(4, 25, 20, 0.32);
}

.certificate-dialog::backdrop {
  background: rgba(5, 27, 22, 0.6);
  backdrop-filter: blur(4px);
}

.certificate-inner {
  position: relative;
  padding: 27px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.certificate-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 0;
  border-radius: 7px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 11px;
}

.certificate-icon {
  display: grid;
  width: 44px;
  height: 44px;
  margin-bottom: 10px;
  place-items: center;
  border-radius: 12px;
  color: var(--gold-deep);
  background: var(--gold-soft);
  font-size: 19px;
}

.certificate-inner h2 {
  font-size: 21px;
  letter-spacing: -0.03em;
}

.certificate-subtitle {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.certificate-voter {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 11px 12px;
  margin: 15px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.certificate-voter strong {
  color: var(--forest);
  font-size: 12px;
}

.certificate-voter > span {
  color: var(--muted);
  font-size: 9px;
}

.certificate-phone-wrap {
  display: flex;
  align-items: center;
  min-height: 43px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
}

.certificate-phone-wrap:focus-within {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(20, 107, 84, 0.11);
}

.certificate-prefix {
  padding: 0 10px;
  color: var(--green);
  background: var(--green-soft);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 750;
  line-height: 43px;
}

.certificate-phone-wrap input {
  min-width: 0;
  flex: 1;
  padding: 0 10px;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font: inherit;
  font-size: 12px;
  letter-spacing: 0.02em;
}

.certificate-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 15px;
}

.certificate-status {
  padding: 7px 9px;
  margin-top: 10px;
  border-radius: 6px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 9px;
  line-height: 1.45;
}

.certificate-status.is-success {
  color: var(--green);
  background: var(--green-soft);
}

.certificate-status.is-error {
  color: var(--red);
  background: var(--red-soft);
}

/* Verificación pública */

.verify-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 90% 0%, rgba(184, 138, 59, 0.12), transparent 30%),
    linear-gradient(160deg, #f1f6f2, #e5eee9);
}

.verify-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.verify-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 22px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.verify-brand img {
  display: block;
  width: 240px;
  max-width: 60vw;
  height: auto;
}

.verify-home {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 650;
}

.verify-main {
  display: grid;
  flex: 1;
  padding: 28px 16px 40px;
  place-items: center;
}

.verify-card {
  width: min(100%, 680px);
  padding: 28px;
  border: 1px solid #d8e4dc;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 20px 48px rgba(7, 31, 25, 0.1);
  text-align: center;
}

.verify-logos {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.verify-logos img:first-child {
  width: 190px;
  max-width: 55%;
}

.verify-logos img:last-child {
  width: 115px;
  max-width: 32%;
}

.verify-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 8px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.verify-card h1 {
  margin: 8px 0 3px;
  color: var(--forest);
  font-size: 29px;
  letter-spacing: -0.04em;
}

.verify-subtitle {
  color: var(--muted);
  font-size: 10px;
}

.verify-name {
  margin-top: 20px;
  color: var(--forest);
  font-size: 22px;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.verify-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: 20px 0;
  text-align: left;
}

.verify-grid > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-soft);
}

.verify-grid span {
  color: var(--muted-light);
  font-size: 7px;
  font-weight: 750;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.verify-grid strong {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 750;
}

.verify-code {
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
}

.verify-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.verify-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-top: 20px;
  color: var(--muted-light);
  font-size: 8px;
}

/* WhatsApp */

.wa-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  gap: 16px;
  align-items: start;
}

.wa-status-card {
  padding: 22px;
}

.wa-status-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.wa-status-head h2 {
  font-size: 17px;
}

.wa-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 7.5px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.wa-status-pill > span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.wa-status-pill.is-conectado {
  color: var(--green);
  background: var(--green-soft);
}

.wa-status-pill.is-qr,
.wa-status-pill.is-conectando,
.wa-status-pill.is-iniciando,
.wa-status-pill.is-reiniciando {
  color: var(--gold-deep);
  background: var(--gold-soft);
}

.wa-status-pill.is-error,
.wa-status-pill.is-cerrado {
  color: var(--red);
  background: var(--red-soft);
}

.wa-qr-stage {
  display: grid;
  width: min(100%, 280px);
  padding: 12px;
  margin: 0 auto 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  place-items: center;
}

.wa-qr-stage img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
}

.wa-connected,
.wa-waiting {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 22px 16px;
  text-align: center;
}

.wa-connected-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #25d366;
  font-size: 24px;
}

.wa-connected strong {
  color: var(--green);
  font-size: 13px;
}

.wa-connected p,
.wa-waiting p {
  color: var(--muted);
  font-size: 9px;
}

.wa-waiting {
  color: var(--muted);
  font-size: 18px;
}

.wa-error {
  padding: 8px 10px;
  margin: 10px 0;
  border-radius: 6px;
  color: var(--red);
  background: var(--red-soft);
  font-size: 8.5px;
  line-height: 1.45;
}

.wa-help {
  padding-top: 12px;
  margin-top: 12px;
  border-top: 1px solid var(--line);
}

.wa-help p {
  color: var(--muted);
  font-size: 8.5px;
  line-height: 1.55;
}

.wa-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.wa-stat-card {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 14px;
}

.wa-stat {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 2px;
  padding: 4px;
  border-right: 1px solid var(--line);
}

.wa-stat:last-child {
  border-right: 0;
}

.wa-stat span {
  color: var(--muted-light);
  font-size: 7px;
  font-weight: 750;
  text-transform: uppercase;
}

.wa-stat strong {
  color: var(--forest);
  font-family: var(--font-mono);
  font-size: 19px;
}

.wa-delay-card {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 17px;
}

.wa-delay-icon {
  display: grid;
  flex: 0 0 auto;
  width: 35px;
  height: 35px;
  place-items: center;
  border-radius: 9px;
  color: var(--gold-deep);
  background: var(--gold-soft);
  font-size: 14px;
}

.wa-delay-card h2 {
  font-size: 13px;
}

.wa-delay-card p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8.5px;
  line-height: 1.5;
}

.wa-queue-card {
  padding-bottom: 16px;
  margin-top: 16px;
}

.wa-queue-card .card-head {
  margin-bottom: 12px;
}

.wa-table {
  min-width: 820px;
}

.wa-category {
  display: block;
  margin-top: 2px;
  color: var(--muted-light);
  font-size: 7px;
}

.wa-state {
  display: inline-flex;
  padding: 3px 6px;
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 7px;
  font-weight: 750;
  text-transform: uppercase;
}

.wa-state.is-enviado {
  color: var(--green);
  background: var(--green-soft);
}

.wa-state.is-error {
  color: var(--red);
  background: var(--red-soft);
}

.wa-state.is-enviando,
.wa-state.is-pendiente {
  color: var(--gold-deep);
  background: var(--gold-soft);
}

.wa-item-error {
  display: block;
  max-width: 180px;
  margin-top: 2px;
  overflow: hidden;
  color: var(--red);
  font-size: 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1050px) {
  .wa-layout {
    grid-template-columns: 1fr;
  }

  .wa-side {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .certificate-inner {
    padding: 21px 17px;
  }

  .certificate-actions {
    flex-direction: column-reverse;
  }

  .certificate-actions .btn {
    width: 100%;
  }

  .verify-card {
    padding: 20px 16px;
  }

  .verify-grid {
    grid-template-columns: 1fr;
  }

  .verify-logos {
    flex-direction: column;
  }

  .verify-logos img:first-child,
  .verify-logos img:last-child {
    max-width: 75%;
  }

  .verify-card h1 {
    font-size: 24px;
  }

  .verify-name {
    font-size: 18px;
  }

  .wa-side {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   Widget del escáner vinculado
   ========================================================= */

.scanner-session-widget {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 75;
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: min(92vw, 370px);
  padding: 9px 10px 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 12px;
  color: #fff;
  background:
    radial-gradient(circle at 100% 0%, rgba(184, 138, 59, 0.2), transparent 34%),
    var(--forest);
  box-shadow: 0 12px 32px rgba(4, 27, 22, 0.28);
}

.scanner-session-pulse {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #8bd5b8;
  box-shadow: 0 0 0 4px rgba(139, 213, 184, 0.13);
  animation: connected-pulse 1.6s ease-in-out infinite;
}

.scanner-session-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.scanner-session-copy strong {
  font-size: 8.5px;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.scanner-session-copy span {
  margin-top: 1px;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.58);
  font-size: 8.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scanner-session-disconnect {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 4px;
  padding: 6px 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.06);
  font-size: 7.5px;
  font-weight: 650;
}

.scanner-session-disconnect:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

@media (max-width: 560px) {
  .scanner-session-widget {
    right: 10px;
    bottom: 10px;
    left: 10px;
    max-width: none;
  }

  .scanner-session-disconnect span {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .scanner-session-pulse {
    animation: none !important;
  }
}
