/* ROSEN ODP · tema central. Cambiar colores y medidas únicamente aquí. */
:root {
  --rosen-ink: #14252a;
  --rosen-muted: #535353;
  --rosen-red: #e90047;
  --rosen-orange: #ff9800;
  --rosen-purple: #913e93;
  --rosen-action: #8c215b;
  --rosen-bg: #f4f5f6;
  --rosen-border: #d5d9da;
  --rosen-white: #fff;
  --rosen-radius: 12px;
}
/* Base y navegación de las páginas de votación y administración. */
.rosen-portal, .rosen-ballot { margin:0; color:var(--rosen-ink); background:var(--rosen-bg); font-family:Montserrat, Arial, sans-serif; }
.rosen-portal .navbar { background:var(--rosen-white); border-bottom:1px solid var(--rosen-border); margin-bottom:0; min-height:76px; }
.rosen-portal:not(.rosen-admin) .navbar-fixed-top { position:relative; }
.rosen-portal .navbar-brand { height:auto; padding:12px 15px; }
.rosen-portal .navbar-brand img { width:auto; height:auto; max-height:54px; max-width:min(270px,70vw); }
.rosen-portal .content-wrapper { min-height:50vh; padding:40px 16px; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; }
.rosen-portal .success-box, .rosen-portal .login-card, .rosen-portal .error-box, .rosen-portal .info-box { background:white; max-width:640px; width:100%; border-radius:var(--rosen-radius); padding:clamp(20px,4vw,32px); box-shadow:0 4px 18px #14252a12; }
.rosen-portal h1, .rosen-portal h2, .rosen-portal .success-box h1 { color:var(--rosen-ink); font-weight:700; }
.rosen-portal .success-box p { font-size:17px; line-height:1.55; }
.rosen-portal .banner { background:var(--rosen-ink); color:white; text-align:center; padding:24px 16px; }
.rosen-portal .banner h1 { color:white; font-size:clamp(22px,3vw,32px); }
.rosen-portal .btn-custom, .rosen-portal .btn-submit, .btn-vote { background:var(--rosen-action); color:white; border:1px solid var(--rosen-action); font-weight:700; border-radius:8px; padding:12px 22px; }
.rosen-portal .btn-custom:hover, .rosen-portal .btn-submit:hover, .btn-vote:hover:not(:disabled) { background:var(--rosen-ink); color:white; }
.rosen-access.modal-content { background:var(--rosen-ink); color:white; padding:16px; border-radius:var(--rosen-radius); max-width:500px; margin:auto; }
.rosen-access .modal-header,.rosen-access .modal-footer { border:0; }
.rosen-access .close { color:white; opacity:1; }
.rosen-access .rosen-modal-label { color:white; font-size:15px; }
.rosen-access .form-control { margin-bottom:15px; min-height:44px; }
.rosen-access .btn-submit { width:100%; }
/* Pie de página electoral: en el borde inferior si el contenido es corto.
   No usar position:fixed: en la papeleta larga el pie sigue al contenido. */
.rosen-footer-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}
.rosen-footer-page > .navbar,
.rosen-footer-page > .rosen-brand {
  flex: 0 0 auto;
}
.rosen-portal.rosen-footer-page > .content-wrapper {
  flex: 1 0 auto;
  min-height: 0;
}
.rosen-ballot.rosen-footer-page > .ballot-main {
  flex: 1 0 auto;
  width: 100%;
  margin: 0 auto;
}
.rosen-footer-page > #contact {
  flex: 0 0 auto;
  margin-top: auto;
  background: var(--rosen-ink);
  color: var(--rosen-white);
  border-top: 4px solid var(--rosen-orange);
  padding: 28px 16px;
  text-align: center;
}
.rosen-contact-inner {
  max-width: 1170px;
  margin: 0 auto;
}
#contact h4 {
  margin: 0 0 6px;
  color: var(--rosen-white);
}
.rosen-contact-hours {
  margin: 0 0 24px;
  font-size: 15px;
  line-height: 1.5;
}
.rosen-contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px 24px;
}
.rosen-contact-item {
  min-width: 0;
}
.rosen-contact-item i {
  color: var(--rosen-orange);
  font-size: 22px;
}
.rosen-contact-item h5 {
  color: var(--rosen-white);
  margin: 8px 0 4px;
  font-size: 14px;
  line-height: 1.4;
}
#contact a {
  display: inline-block;
  color: var(--rosen-white);
  text-decoration: underline;
  overflow-wrap: anywhere;
  padding: 6px 0;
}
#contact a:focus-visible {
  outline: 2px solid var(--rosen-orange);
  outline-offset: 3px;
}
@media (max-width: 600px) {
  .rosen-contact-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }
  .rosen-footer-page > #contact {
    padding: 24px 16px;
  }
  .rosen-contact-hours {
    margin-bottom: 16px;
  }
}
/* Papeleta: orden de lectura idéntico al original, sin favoritismos visuales. */
.rosen-brand { padding:12px 20px; background:white; border-bottom:1px solid var(--rosen-border); }
.rosen-brand img { width:min(250px,75vw); height:auto; display:block; }
.ballot-main { max-width:1480px; padding:20px clamp(10px,2vw,32px) 36px; margin:auto; }
.ballot-hero { display:flex; gap:20px; align-items:center; justify-content:space-between; padding:clamp(18px,3vw,32px); background:var(--rosen-ink); color:white; border-radius:var(--rosen-radius); border-bottom:4px solid var(--rosen-orange); }
.ballot-hero h1 { font-size:clamp(23px,3vw,36px); line-height:1.2; font-weight:700; margin:0 0 12px; }
.ballot-hero p { margin:6px 0; font-size:clamp(14px,1.4vw,17px); }
.ballot-hero img { width:clamp(100px,16vw,200px); height:auto; flex:none; }
.ballot-controls { position:sticky; top:0; z-index:5; background:var(--rosen-bg); padding:14px 0; display:flex; flex-wrap:wrap; gap:8px 20px; align-items:center; justify-content:space-between; }
#vote-count { font-weight:700; color:var(--rosen-action); font-size:17px; }
#vote-hint { color:var(--rosen-muted); }
.candidate-grid { display:grid; grid-template-columns:repeat(8,minmax(0,1fr)); gap:12px; }
.candidate-item { position:relative; display:flex; flex-direction:column; align-items:center; gap:9px; padding:9px; min-width:0; margin:0; background:white; border:2px solid var(--rosen-border); border-radius:var(--rosen-radius); cursor:pointer; text-align:center; }
.candidate-item.selected { border-color:var(--rosen-action); background:#fdf1f6; }
.candidate-item:focus-within { outline:3px solid var(--rosen-purple); outline-offset:2px; }
.candidate-image { display:block; width:100%; aspect-ratio:420 / 408; overflow:hidden; border-radius:7px; background:#f3f4f5; }
.candidate-image img { width:100%; height:100%; display:block; object-fit:contain; }
.candidate-check { position:absolute; top:12px; right:12px; width:28px; height:28px; margin:0!important; accent-color:var(--rosen-action); cursor:pointer; }
.candidate-name { font-size:14px; line-height:1.3; overflow-wrap:anywhere; color:var(--rosen-ink); font-weight:700; }
.candidate-group { font-size:12px; color:var(--rosen-muted); }
.ballot-actions { padding:20px 0 0; display:flex; justify-content:flex-end; }
.btn-vote { min-height:48px; font-size:17px; }
.btn-vote:disabled { opacity:.55; cursor:not-allowed; }
#overlayEnviando { position:fixed; inset:0; z-index:2000; background:#14252ab8; display:grid; place-items:center; padding:20px; }
#overlayEnviando[hidden] { display:none; }
.overlay-message { background:var(--rosen-ink); color:white; border-radius:12px; padding:24px; text-align:center; font-size:18px; }
@media(max-width:1199px) { .candidate-grid { grid-template-columns:repeat(6,minmax(0,1fr)); } }
@media(max-width:900px) { .candidate-grid { grid-template-columns:repeat(4,minmax(0,1fr)); } }
@media(max-width:600px) { .candidate-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; } .ballot-hero { align-items:flex-start; } .ballot-hero img { width:85px; } .candidate-name { font-size:15px; } .ballot-actions .btn { width:100%; } }
@media(max-width:330px) { .ballot-hero img { display:none; } }

/* Estados y componentes reutilizados del portal. */
.rosen-portal .success-box > i {font-size:54px;color:var(--rosen-action);margin:0 0 12px;}
.rosen-portal .login-card {text-align:left;}
.rosen-portal .login-card .form-control {min-height:44px;}
.rosen-portal .navbar-default .navbar-nav > li > a {color:var(--rosen-ink);}
.rosen-admin .navbar {min-height:66px;}
.rosen-admin .btn-primary,.rosen-admin .btn-primary:focus {background:var(--rosen-action);border-color:var(--rosen-action);}
.rosen-access .btn-submit {display:block;margin:0 auto;}
.rosen-access .modal-header h3 {font-size:20px;}
.rosen-portal .cabecera-soporte {border-color:var(--rosen-orange);}
.rosen-table-heading {background:var(--rosen-ink);color:white;}
.rosen-action-column {width:80px;text-align:center;}
