/* ═══════════════════════════════════════════
   ESCRUTADOR ELECTORAL — Custom CSS
   Universidad Nacional de Cuyo
   ═══════════════════════════════════════════ */

/* ── Variables institucionales ── */
:root {
  --primary:        #1B3A6B;
  --primary-medium: #2a5298;
  --primary-light:  #e8eef7;
  --accent:         #C68E17;
  --accent-light:   #fdf3dc;
}

/* ── Cards ── */
.card {
  box-shadow: 0 1px 6px rgba(0,0,0,0.08) !important;
}
.card.hoverable:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.14) !important;
  transform: translateY(-2px);
  transition: all 0.2s ease;
}

/* ── Tablas ── */
table.striped > tbody > tr:nth-child(odd) {
  background-color: #fafbfc;
}
table.highlight > tbody > tr:hover {
  background-color: var(--primary-light) !important;
}
th {
  font-size: 0.78rem !important;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 12px 16px !important;
}
td {
  padding: 10px 16px !important;
  font-size: 0.88rem;
}

/* ── Botones institucionales ── */
.btn-institucional {
  background: var(--primary) !important;
}
.btn-institucional:hover, .btn-institucional:focus {
  background: var(--primary-medium) !important;
}

/* ── Chips de estado ── */
.chip {
  font-size: 0.75rem !important;
  height: 24px !important;
  line-height: 24px !important;
  padding: 0 10px !important;
  border-radius: 12px !important;
}

/* ── Progress bars ── */
.progress {
  background-color: #e0e0e0 !important;
  border-radius: 4px !important;
  height: 6px !important;
}
.progress .determinate {
  border-radius: 4px !important;
}

/* ── Inputs Materialize ── */
input:not([type]).validate:focus:not([readonly]),
input[type=text].validate:focus:not([readonly]),
input[type=number].validate:focus:not([readonly]),
input[type=email].validate:focus:not([readonly]),
input[type=date].validate:focus:not([readonly]) {
  border-bottom: 2px solid var(--primary) !important;
  box-shadow: 0 1px 0 0 var(--primary) !important;
}
label.active {
  color: var(--primary) !important;
}
.input-field .prefix.active {
  color: var(--primary) !important;
}

/* ── Select browser-default ── */
select.browser-default {
  background: #fff !important;
}

/* ── Switch ── */
.switch label input[type=checkbox]:checked + .lever {
  background-color: color-mix(in srgb, var(--accent) 40%, white) !important;
}
.switch label input[type=checkbox]:checked + .lever:after {
  background-color: var(--accent) !important;
}

/* ── Votos input (carga) ── */
.votos-input {
  text-align: center;
  font-size: 1rem !important;
  font-weight: 600 !important;
  color: var(--primary) !important;
}
.votos-especial {
  font-weight: 500 !important;
}

/* ── Page header ── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}
.page-header h4 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--primary);
  margin: 0;
}

/* ── Toast personalizado ── */
#toast-container .toast {
  border-radius: 8px !important;
  font-size: 0.88rem !important;
}

/* ── Formularios: card-panel error ── */
.card-panel.red {
  border-left: 4px solid #c62828 !important;
}

/* ── Dropdown menu ── */
.dropdown-content li > a, .dropdown-content li > span {
  color: var(--primary) !important;
}
.dropdown-content li:hover {
  background: var(--primary-light) !important;
}

/* ── Sticky footer carga ── */
.sticky-footer {
  position: sticky;
  bottom: 0;
  background: #fff;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.10);
  padding: 12px 20px;
  z-index: 90;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  border-top: 1px solid #eee;
  margin: 0 -24px;
}

/* ── Pagination ── */
.pagination li.active a {
  background: var(--primary) !important;
}
.pagination li a {
  color: var(--primary) !important;
}

/* ── Responsive table wrapper ── */
.card .card-content.overflow-x {
  overflow-x: auto;
  padding: 0;
}

/* ── Error highlight in form ── */
.field-error input {
  border-bottom: 2px solid #e53935 !important;
}
