/* ═══════════════════════════════════════════════════════════════════
   SIRA — Sistema de Información Religiosa del Atlántico
   Design System · Gobernación del Atlántico
   Colores institucionales gov.co
═══════════════════════════════════════════════════════════════════ */

/* ── Variables ──────────────────────────────────────────────────── */
:root {
  --rojo:        #E40E20;
  --rojo-dark:   #D31A2B;
  --gris-dark:   #333435;
  --gris-mid:    #7A858C;
  --gris-light:  #C1C5C8;
  --gris-bg:     #F4F4F6;
  --blanco:      #FFFFFF;
  --negro:       #1A1A1A;
  --success:     #198754;
  --warning:     #FFC107;
  --sombra:      0 2px 12px rgba(0,0,0,.10);
  --sombra-lg:   0 4px 24px rgba(0,0,0,.13);
  --radio:       10px;
  --radio-lg:    16px;
}

/* ── Reset & Base ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Outfit', system-ui, sans-serif;
  background: var(--gris-bg);
  color: var(--gris-dark);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}


.gov-topbar {
  background-color: #e40e20;
  width: 100%;
  padding: 6px 0;
}

.gov-topbar .top-header {
  display: flex;
  align-items: center;
}

.gov-topbar .top-header img {
  height: 28px;
  width: auto;
  display: block;
}

/* Responsive */
@media (max-width: 576px) {
  .gov-topbar .top-header img {
    height: 22px;
  }
}

/* ══════════════════════════════════════════════════════════════════
   TOPBAR gov.co (franja superior institucional)
══════════════════════════════════════════════════════════════════ */
.gov-topbar {
  background: var(--negro);
  color: #ccc;
  font-size: .72rem;
  padding: 5px 0;
  letter-spacing: .3px;
}
.gov-topbar a { color: #ccc; text-decoration: none; }
.gov-topbar a:hover { color: #fff; }
.gov-topbar .dot { color: var(--rojo); margin: 0 6px; }

/* ══════════════════════════════════════════════════════════════════
   HEADER PRINCIPAL
══════════════════════════════════════════════════════════════════ */
.sira-header {
  background: var(--blanco);
  border-bottom: 3px solid var(--rojo);
  box-shadow: var(--sombra);
  z-index: 1030;
}
.sira-logo { height: 54px; width: auto; object-fit: contain; }
.sira-vr { height: 44px; border-left: 2px solid var(--gris-light); }
.sira-header-title {
  font-size: .82rem;
  font-weight: 600;
  color: var(--gris-dark);
  text-transform: uppercase;
  letter-spacing: .5px;
}
.sira-header-sub {
  font-size: .72rem;
  color: var(--gris-mid);
}

/* Barra de progreso header */
.sira-step-badge {
  font-size: .72rem;
  font-weight: 600;
  color: var(--rojo);
  text-align: right;
}
.sira-progress-bar-wrap {
  background: var(--gris-light);
  border-radius: 99px;
  height: 5px;
  width: 120px;
  overflow: hidden;
}
.sira-progress-bar-fill {
  background: linear-gradient(90deg, var(--rojo-dark), var(--rojo));
  height: 100%;
  border-radius: 99px;
  transition: width .4s ease;
}

/* ══════════════════════════════════════════════════════════════════
   HERO STRIP
══════════════════════════════════════════════════════════════════ */
/*.sira-hero-strip {
  background: linear-gradient(135deg, var(--rojo-dark) 0%, var(--rojo) 60%, #ff4b59 100%);
  background-image:
    url('../img/tapiz.png'),
    linear-gradient(135deg, var(--rojo-dark) 0%, var(--rojo) 60%, #ff4b59 100%);
  background-size: cover, cover;
  background-blend-mode: multiply;
  color: var(--blanco);
  padding: 18px 0;
}*/

.sira-hero-strip {
  background: transparent;
  color: #4a4a4a;
  padding: 18px 0;
  text-align: center;
}
.sira-hero-text {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: .3px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ══════════════════════════════════════════════════════════════════
   MAIN
══════════════════════════════════════════════════════════════════ */
.sira-main { flex: 1; }

/* ── Card formulario ──────────────────────────────────────────── */
.sira-card {
  background: var(--blanco);
  border-radius: var(--radio-lg);
  box-shadow: 0 4px 24px rgba(0,0,0,.08), 0 1px 4px rgba(0,0,0,.04);
  padding: 2.4rem 2.2rem;
  border: 1px solid rgba(0,0,0,.05);
  border-top: 3px solid var(--rojo);
  transition: box-shadow .25s;
}
.sira-card:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,.11), 0 2px 6px rgba(0,0,0,.05);
}
@media (max-width:576px) {
  .sira-card { padding: 1.2rem 1rem; }
}

/* ── Sidebar pasos ────────────────────────────────────────────── */
.sira-sidebar {
  background: var(--blanco);
  border-radius: var(--radio-lg);
  box-shadow: var(--sombra);
  padding: 1.4rem 1rem;
  position: sticky;
  top: 86px;
}
.sira-sidebar-title {
  font-size: .75rem;
  font-weight: 700;
  color: var(--gris-mid);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1rem;
}
.sira-paso-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: .83rem;
  color: var(--gris-mid);
  margin-bottom: 2px;
  transition: all .2s;
}
.sira-paso-item.activo {
  background: rgba(228,14,32,.08);
  color: var(--rojo);
  font-weight: 600;
}
.sira-paso-item.completado {
  color: var(--success);
}
.sira-paso-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--gris-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .72rem;
  font-weight: 700;
  flex-shrink: 0;
  border: 2px solid var(--gris-light);
}
.sira-paso-item.activo .sira-paso-num {
  background: var(--rojo);
  color: #fff;
  border-color: var(--rojo);
}
.sira-paso-item.completado .sira-paso-num {
  background: var(--success);
  color: #fff;
  border-color: var(--success);
}

/* ── Títulos de sección ───────────────────────────────────────── */
.sira-section-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gris-dark);
  margin-bottom: .3rem;
}
.sira-section-sub {
  font-size: .85rem;
  color: var(--gris-mid);
  margin-bottom: 1.5rem;
}
.sira-divider {
  height: 3px;
  background: linear-gradient(90deg, var(--rojo), transparent);
  border-radius: 2px;
  margin: .6rem 0 1.8rem;
}

/* ── Labels & Inputs ──────────────────────────────────────────── */
.form-label {
  font-size: .84rem;
  font-weight: 600;
  color: var(--gris-dark);
  margin-bottom: .35rem;
}
.form-control, .form-select {
  border-radius: 8px;
  border: 1.5px solid var(--gris-light);
  font-size: .9rem;
  color: var(--gris-dark);
  padding: .55rem .85rem;
  transition: border-color .2s, box-shadow .2s, background-color .2s;
  background: var(--blanco);
}
.form-control:hover, .form-select:hover {
  border-color: var(--rojo);
  box-shadow: 0 2px 12px rgba(228, 14, 32, 0.15);
  background-color: #fff8f8;
}
.form-control:focus, .form-select:focus {
  border-color: var(--rojo);
  box-shadow: 0 0 0 3px rgba(228,14,32,.18), 0 2px 8px rgba(228,14,32,.1);
  background-color: #fff;
  outline: none;
}
.form-control.is-invalid, .form-select.is-invalid {
  border-color: var(--rojo);
}
.invalid-feedback { font-size: .78rem; }
textarea.form-control { min-height: 100px; resize: vertical; }

/* ── Checkboxes & Radio custom ────────────────────────────────── */
.form-check-input {
  width: 1.15em;
  height: 1.15em;
  border: 2px solid #c4c9d4;
  border-radius: 4px;
  cursor: pointer;
  transition: border-color .18s, box-shadow .18s, background-color .18s;
}
.form-check-input[type="radio"] { border-radius: 50%; }
.form-check-input:hover {
  border-color: var(--rojo);
  box-shadow: 0 0 0 3px rgba(228,14,32,.1);
}
.form-check-input:checked {
  background-color: var(--rojo);
  border-color: var(--rojo);
  box-shadow: 0 0 0 2px rgba(228,14,32,.18);
}
.form-check-input:focus {
  box-shadow: 0 0 0 3px rgba(228,14,32,.18);
  outline: none;
}
.form-check-label {
  font-size: .88rem;
  font-weight: 500;
  color: var(--gris-dark);
  cursor: pointer;
  padding-left: .25rem;
  transition: color .15s;
}
.form-check:hover .form-check-label { color: var(--rojo); }

/* Consentimiento card ────────────────────────────────────────── */
.sira-consent-box {
  background: rgba(228,14,32,.05);
  border: 1px solid rgba(228,14,32,.2);
  border-left: 4px solid var(--rojo);
  border-radius: var(--radio);
  padding: 1.2rem 1.4rem;
  font-size: .88rem;
  color: var(--gris-dark);
}

/* Representación cards ───────────────────────────────────────── */
.sira-rep-card {
  border: 2px solid #e5e7eb;
  border-radius: var(--radio);
  padding: 1.4rem 1.1rem;
  cursor: pointer;
  transition: all .22s cubic-bezier(.4,0,.2,1);
  text-align: center;
  height: 100%;
  background: var(--blanco);
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.sira-rep-card:hover {
  border-color: var(--rojo);
  box-shadow: 0 6px 20px rgba(228,14,32,.15);
  transform: translateY(-2px);
}
.sira-rep-card.seleccionado {
  border-color: var(--rojo);
  background: rgba(228,14,32,.04);
  box-shadow: 0 4px 16px rgba(228,14,32,.18);
}
.sira-rep-card i { font-size: 2.2rem; color: var(--rojo); margin-bottom: .6rem; display: block; }
.sira-rep-card .titulo { font-weight: 700; font-size: .9rem; color: var(--gris-dark); }
.sira-rep-card .desc { font-size: .78rem; color: var(--gris-mid); margin-top: .3rem; line-height: 1.4; }

/* ── Botones navegación ───────────────────────────────────────── */
.sira-btn-next, .sira-btn-submit {
  background: linear-gradient(135deg, var(--rojo-dark) 0%, var(--rojo) 60%, #f74256 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: .72rem 2.2rem;
  font-weight: 700;
  font-size: .93rem;
  letter-spacing: .02em;
  transition: all .22s cubic-bezier(.4,0,.2,1);
  box-shadow: 0 3px 12px rgba(228,14,32,.32), 0 1px 3px rgba(228,14,32,.18);
  position: relative;
  overflow: hidden;
}
.sira-btn-next::after, .sira-btn-submit::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background .2s;
  border-radius: inherit;
}
.sira-btn-next:hover, .sira-btn-submit:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(228,14,32,.42), 0 2px 6px rgba(228,14,32,.22);
}
.sira-btn-next:hover::after, .sira-btn-submit:hover::after {
  background: rgba(255,255,255,.06);
}
.sira-btn-next:active, .sira-btn-submit:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(228,14,32,.3);
}
.sira-btn-prev {
  background: var(--blanco);
  color: var(--gris-dark);
  border: 1.5px solid #d1d5db;
  border-radius: 10px;
  padding: .72rem 1.7rem;
  font-weight: 600;
  font-size: .93rem;
  transition: all .22s cubic-bezier(.4,0,.2,1);
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.sira-btn-prev:hover {
  border-color: var(--rojo);
  color: var(--rojo);
  background: rgba(228,14,32,.04);
  box-shadow: 0 2px 10px rgba(228,14,32,.12);
  transform: translateY(-1px);
}
.sira-btn-prev:active {
  transform: translateY(0);
  box-shadow: none;
}

/* ── Alertas ──────────────────────────────────────────────────── */
.sira-alert-error {
  background: rgba(228,14,32,.06);
  border: 1px solid rgba(228,14,32,.3);
  border-left: 4px solid var(--rojo);
  color: var(--rojo-dark);
  border-radius: var(--radio);
}

/* ── Nota seguridad ───────────────────────────────────────────── */
.sira-security-note {
  font-size: .76rem;
  color: var(--gris-mid);
  text-align: center;
  padding: .5rem;
}

/* Sede card ──────────────────────────────────────────────────── */
.sede-card {
  background: var(--gris-bg);
  border: 1.5px solid var(--gris-light);
  border-radius: var(--radio);
  padding: 1.2rem;
  margin-bottom: 1rem;
  position: relative;
}
.sede-card .sede-num {
  position: absolute;
  top: -10px;
  left: 14px;
  background: var(--rojo);
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  padding: 1px 10px;
  border-radius: 99px;
}
.btn-remove-sede {
  position: absolute;
  top: 8px;
  right: 8px;
  background: none;
  border: none;
  color: var(--gris-mid);
  cursor: pointer;
  font-size: 1rem;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all .2s;
}
.btn-remove-sede:hover { background: rgba(228,14,32,.1); color: var(--rojo); }

/* ── Toggle switch ────────────────────────────────────────────── */
.sira-toggle { display: flex; gap: .5rem; }
.sira-toggle-btn {
  border: 1.5px solid var(--gris-light);
  background: var(--blanco);
  color: var(--gris-mid);
  border-radius: 8px;
  padding: .4rem 1.1rem;
  font-size: .84rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .2s;
}
.sira-toggle-btn.active-yes {
  background: rgba(25,135,84,.1);
  border-color: var(--success);
  color: var(--success);
  font-weight: 600;
}
.sira-toggle-btn.active-no {
  background: rgba(228,14,32,.07);
  border-color: var(--rojo);
  color: var(--rojo);
  font-weight: 600;
}

/* ── Loading overlay ──────────────────────────────────────────── */
.sira-loading {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,.85);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1rem;
}
.sira-loading.show { display: flex; }
.sira-spinner {
  width: 48px;
  height: 48px;
  border: 5px solid var(--gris-light);
  border-top-color: var(--rojo);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Firma canvas ───────────────────────────────────────────────── */
#firmaCanvas {
  border: 2px dashed var(--gris-light);
  border-radius: var(--radio);
  background: #fafafa;
  cursor: crosshair;
  touch-action: none;
  width: 100%;
  max-width: 500px;
  display: block;
}
#firmaCanvas:hover { border-color: var(--rojo); }

/* ══════════════════════════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════════════════════════ */
.sira-footer {
  background: var(--gris-dark);
  color: var(--gris-light);
  padding: 0;
}
.sira-footer-top {
  border-bottom: 1px solid rgba(255,255,255,.1);
  padding: 2.5rem 0 2rem;
}
.sira-footer-logo { height: 44px; width: auto; filter: brightness(0) invert(1); opacity: .85; }
.sira-footer-brand { font-size: .95rem; font-weight: 600; color: #fff; }
.sira-footer-desc { font-size: .8rem; color: var(--gris-light); margin-top: .3rem; }
.sira-footer-heading {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gris-light);
  margin-bottom: .8rem;
}
.sira-footer-links { list-style: none; padding: 0; margin: 0; }
.sira-footer-links li { margin-bottom: .4rem; }
.sira-footer-links a {
  color: #aaa;
  text-decoration: none;
  font-size: .83rem;
  transition: color .2s;
}
.sira-footer-links a:hover { color: #fff; }
.sira-footer-bottom {
  background: rgba(0,0,0,.2);
  padding: 1rem 0;
}
.sira-footer-copy { font-size: .78rem; color: #999; }
.sira-footer-version {
  font-size: .72rem;
  color: var(--rojo);
  font-weight: 600;
  border: 1px solid var(--rojo);
  padding: 2px 8px;
  border-radius: 99px;
}
.sira-footer-gov { height: 22px; width: auto; filter: brightness(0) invert(1); opacity: .5; }

/* ══════════════════════════════════════════════════════════════════
   ADMIN PANEL
══════════════════════════════════════════════════════════════════ */
.admin-sidebar {
  background: var(--gris-dark);
  min-height: 100vh;
  width: 240px;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1040;
  display: flex;
  flex-direction: column;
  transition: transform .3s;
}
.admin-sidebar.collapsed { transform: translateX(-240px); }

.admin-sidebar-logo {
  padding: 1.2rem 1.4rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.admin-sidebar-logo img { height: 38px; filter: brightness(0) invert(1); opacity:.9; }
.admin-sidebar-brand { color: #fff; font-size: .8rem; font-weight: 600; margin-top: .4rem; }

.admin-nav { padding: .8rem 0; flex: 1; }
.admin-nav-label {
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: rgba(255,255,255,.35);
  padding: 1rem 1.4rem .4rem;
}
.admin-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: .65rem 1.4rem;
  color: rgba(255,255,255,.7);
  text-decoration: none;
  font-size: .87rem;
  font-weight: 500;
  transition: all .2s;
  border-left: 3px solid transparent;
}
.admin-nav-link:hover {
  background: rgba(255,255,255,.07);
  color: #fff;
}
.admin-nav-link.active {
  background: rgba(228,14,32,.15);
  color: #fff;
  border-left-color: var(--rojo);
  font-weight: 600;
}
.admin-nav-link i { font-size: 1rem; width: 20px; }

.admin-sidebar-footer {
  padding: 1rem 1.4rem;
  border-top: 1px solid rgba(255,255,255,.1);
}

/* Admin main ─────────────────────────────────────────────────── */
.admin-main {
  margin-left: 240px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left .3s;
}
.admin-main.expanded { margin-left: 0; }

.admin-topbar {
  background: var(--blanco);
  border-bottom: 2px solid var(--gris-light);
  padding: .75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 1020;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.admin-topbar-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gris-dark);
}
.admin-content { padding: 1.8rem; flex: 1; background: var(--gris-bg); }

/* Stat cards ─────────────────────────────────────────────────── */
.stat-card {
  background: var(--blanco);
  border-radius: var(--radio-lg);
  padding: 1.4rem 1.6rem;
  box-shadow: var(--sombra);
  border-left: 4px solid var(--rojo);
  display: flex;
  align-items: center;
  gap: 1rem;
}
.stat-card.green { border-left-color: var(--success); }
.stat-card.orange { border-left-color: #FD7E14; }
.stat-card.blue { border-left-color: #0D6EFD; }
.stat-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  background: rgba(228,14,32,.1);
  color: var(--rojo);
  flex-shrink: 0;
}
.stat-icon.green { background: rgba(25,135,84,.1); color: var(--success); }
.stat-icon.orange { background: rgba(253,126,20,.1); color: #FD7E14; }
.stat-icon.blue { background: rgba(13,110,253,.1); color: #0D6EFD; }
.stat-num { font-size: 1.7rem; font-weight: 800; color: var(--gris-dark); line-height: 1; }
.stat-label { font-size: .78rem; color: var(--gris-mid); margin-top: .2rem; }

/* Admin table ────────────────────────────────────────────────── */
.admin-table-card {
  background: var(--blanco);
  border-radius: var(--radio-lg);
  box-shadow: var(--sombra);
  overflow: hidden;
}
.admin-table-header {
  padding: 1.2rem 1.5rem;
  border-bottom: 1px solid var(--gris-bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .8rem;
}
.admin-table-title { font-size: 1rem; font-weight: 700; color: var(--gris-dark); }

.table { margin: 0; font-size: .86rem; }
.table thead th {
  background: var(--gris-bg);
  color: var(--gris-mid);
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .7px;
  border-bottom: 2px solid var(--gris-light);
  padding: .75rem 1rem;
  white-space: nowrap;
}
.table tbody td { padding: .75rem 1rem; vertical-align: middle; border-bottom: 1px solid #f0f0f2; }
.table tbody tr:hover { background: rgba(228,14,32,.03); }

/* Badges ─────────────────────────────────────────────────────── */
.badge-estado {
  font-size: .72rem;
  font-weight: 600;
  padding: .3rem .7rem;
  border-radius: 99px;
}
.badge-enviado  { background: rgba(13,110,253,.1);  color: #0D6EFD; }
.badge-revisado { background: rgba(253,126,20,.1);  color: #FD7E14; }
.badge-aprobado { background: rgba(25,135,84,.1);   color: var(--success); }
.badge-borrador { background: rgba(122,133,140,.1); color: var(--gris-mid); }

/* Filtros ────────────────────────────────────────────────────── */
.filtros-bar {
  background: var(--blanco);
  border-radius: var(--radio-lg);
  box-shadow: var(--sombra);
  padding: 1.2rem 1.5rem;
  margin-bottom: 1.5rem;
}
.filtros-bar .form-control,
.filtros-bar .form-select {
  font-size: .84rem;
  padding: .45rem .75rem;
}
.btn-filtrar {
  background: var(--rojo);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: .45rem 1.2rem;
  font-size: .84rem;
  font-weight: 600;
  transition: all .2s;
}
.btn-filtrar:hover { background: var(--rojo-dark); color: #fff; }
.btn-limpiar {
  background: var(--blanco);
  color: var(--gris-mid);
  border: 1.5px solid var(--gris-light);
  border-radius: 8px;
  padding: .45rem 1rem;
  font-size: .84rem;
  font-weight: 500;
  transition: all .2s;
  text-decoration: none;
}
.btn-limpiar:hover { border-color: var(--gris-dark); color: var(--gris-dark); }

/* Botones acción tabla ───────────────────────────────────────── */
.btn-ver, .btn-editar, .btn-eliminar {
  border: none;
  border-radius: 6px;
  padding: .3rem .6rem;
  font-size: .8rem;
  cursor: pointer;
  transition: all .2s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.btn-ver     { background: rgba(13,110,253,.1);  color: #0D6EFD; }
.btn-editar  { background: rgba(253,126,20,.1);  color: #FD7E14; }
.btn-eliminar{ background: rgba(228,14,32,.1);   color: var(--rojo); }
.btn-ver:hover     { background: #0D6EFD; color: #fff; }
.btn-editar:hover  { background: #FD7E14; color: #fff; }
.btn-eliminar:hover{ background: var(--rojo); color: #fff; }

/* Modal detalle ──────────────────────────────────────────────── */
.modal-header { border-bottom: 2px solid var(--rojo); }
.modal-title { font-weight: 700; }
.detalle-label { font-size: .75rem; font-weight: 700; text-transform: uppercase; color: var(--gris-mid); }
.detalle-val { font-size: .9rem; color: var(--gris-dark); }
.detalle-section {
  border-left: 3px solid var(--rojo);
  padding-left: 1rem;
  margin-bottom: 1.5rem;
}
.detalle-section-title { font-weight: 700; color: var(--gris-dark); font-size: .95rem; margin-bottom: .8rem; }

/* Admin login ────────────────────────────────────────────────── */
.admin-login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--gris-dark) 0%, #2c3136 100%);
  padding: 1rem;
}
.admin-login-card {
  background: var(--blanco);
  border-radius: var(--radio-lg);
  box-shadow: var(--sombra-lg);
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 400px;
}
.admin-login-logo { text-align: center; margin-bottom: 1.5rem; }
.admin-login-logo img { height: 60px; }
.admin-login-title { font-size: 1.1rem; font-weight: 700; text-align: center; color: var(--gris-dark); }
.admin-login-sub { font-size: .82rem; color: var(--gris-mid); text-align: center; margin-bottom: 1.5rem; }

.btn-login {
  background: linear-gradient(135deg, var(--rojo-dark), var(--rojo));
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: .7rem;
  font-weight: 700;
  font-size: .95rem;
  width: 100%;
  transition: all .2s;
  box-shadow: 0 3px 12px rgba(228,14,32,.3);
}
.btn-login:hover {
  background: linear-gradient(135deg, var(--rojo), var(--rojo-dark));
  color: #fff;
  transform: translateY(-1px);
}

/* ── Paginación ──────────────────────────────────────────────── */
.page-item .page-link {
  border-radius: 6px !important;
  border: 1.5px solid var(--gris-light);
  color: var(--gris-dark);
  font-size: .83rem;
  margin: 0 2px;
}
.page-item.active .page-link {
  background: var(--rojo);
  border-color: var(--rojo);
  color: #fff;
}
.page-item .page-link:hover { border-color: var(--rojo); color: var(--rojo); }

/* ── Responsive admin ─────────────────────────────────────────── */
@media (max-width: 991px) {
  .admin-sidebar {
    transform: translateX(-240px);
  }
  .admin-sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 20px rgba(0,0,0,.3);
  }
  .admin-main { margin-left: 0; }
  .admin-content { padding: 1rem; }
  .admin-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.4);
    z-index: 1039;
  }
  .admin-overlay.show { display: block; }
}

/* ── Success page ─────────────────────────────────────────────── */
.success-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(25,135,84,.12);
  color: var(--success);
  font-size: 2.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}
.success-uuid {
  font-family: monospace;
  background: var(--gris-bg);
  border-radius: 8px;
  padding: .6rem 1rem;
  font-size: .85rem;
  word-break: break-all;
  border: 1px solid var(--gris-light);
}

/* ── Utilidades ───────────────────────────────────────────────── */
.text-rojo { color: var(--rojo) !important; }
.bg-rojo   { background: var(--rojo) !important; }
.border-rojo { border-color: var(--rojo) !important; }

/* ── Sidebar group labels (added) ─────────────────────────────── */
.sira-sidebar-title {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gris-mid);
  margin-bottom: .8rem;
  padding: 0 .5rem;
}

/* ── Info/tip boxes ───────────────────────────────────────────── */
.sira-info-box {
  background: rgba(13,110,253,.06);
  border: 1px solid rgba(13,110,253,.2);
  border-left: 4px solid #0D6EFD;
  border-radius: var(--radio);
  padding: .9rem 1.1rem;
  font-size: .85rem;
  color: var(--gris-dark);
  margin-bottom: 1.2rem;
}

/* Hover — sombra roja sutil */
.sira-input:hover,
.sira-select:hover,
.sira-textarea:hover {
  border-color: var(--rojo);
  box-shadow: 0 2px 12px rgba(228, 14, 32, 0.15);
  background-color: #fff8f8;
  transition: border-color .2s, box-shadow .2s, background-color .2s;
}

/* Focus */
.sira-input:focus,
.sira-select:focus,
.sira-textarea:focus {
  border-color: var(--rojo);
  box-shadow: 0 0 0 3px rgba(228, 14, 32, 0.18), 0 2px 8px rgba(228, 14, 32, 0.12);
  background-color: #fff;
  outline: none;
}

/* Base transition para todos los inputs */
.sira-input,
.sira-select,
.sira-textarea {
  display: block;
  width: 100%;
  padding: .68rem 1rem;
  font-size: .9rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--gris-dark);
  background-color: #fff;
  background-clip: padding-box;
  border: 1.5px solid #d1d5db;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
  transition: border-color .2s, box-shadow .2s, background-color .2s;
  appearance: none;
}
.sira-select {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right .85rem center;
  background-size: 14px 10px;
  padding-right: 2.5rem;
}
.sira-textarea {
  resize: vertical;
  min-height: 100px;
}
.sira-input::placeholder,
.sira-textarea::placeholder {
  color: #adb5bd;
  font-size: .85rem;
}

/* ── Input con ícono prefijado ───────────────────────────────── */
.sira-input-icon {
  position: relative;
}
.sira-input-icon > i {
  position: absolute;
  left: .9rem;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  font-size: .85rem;
  pointer-events: none;
  transition: color .2s;
  z-index: 2;
}
.sira-input-icon .sira-input {
  padding-left: 2.4rem;
  border-radius: 10px !important;
}
.sira-input-icon:focus-within > i {
  color: var(--rojo);
}
.sira-input-icon:hover > i {
  color: var(--rojo);
}

/* Error */
.input-error {
  border-color: #fca5a5 !important;
  background-color: #fff5f5;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12) !important;
}

/* Mensaje */
.error-msg {
  color: #dc2626;
  font-size: 12px;
  margin-top: 4px;
}

/* ── Sub-section headers inside steps ────────────────────────── */
.sira-subsection {
  font-size: .82rem;
  font-weight: 800;
  color: var(--gris-dark);
  border-bottom: 2px solid #f0f0f2;
  padding-bottom: .55rem;
  margin: 1.8rem 0 1.1rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: .4rem;
}
.sira-subsection i { color: var(--rojo); font-size: 1rem; }
.sira-subsection::after {
  content: '';
  flex: 1;
  height: 2px;
  background: linear-gradient(to right, #f0f0f2, transparent);
  margin-left: .5rem;
  border-radius: 2px;
}

/* ── Field group: card-like container ─────────────────────────── */
.sira-field-group {
  background: #fafafa;
  border: 1px solid #ebebee;
  border-radius: 12px;
  padding: 1.4rem 1.5rem 1rem;
  margin-bottom: 1.2rem;
}
.sira-field-group-title {
  font-size: .75rem;
  font-weight: 800;
  color: var(--rojo);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: .4rem;
}

/* ── Sede card refinement ────────────────────────────────────── */
.sira-sede-card {
  background: #fafafa;
  border: 1.5px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.4rem;
  transition: border-color .2s, box-shadow .2s;
}
.sira-sede-card:hover {
  border-color: #d1d5db;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
}
.sira-sede-title {
  font-size: .82rem;
  font-weight: 800;
  color: var(--gris-dark);
  letter-spacing: .03em;
  text-transform: uppercase;
}

/* ── Toggle card ─────────────────────────────────────────────── */
.sira-toggle-card {
  background: #fafafa;
  border: 1.5px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.1rem 1.3rem;
  transition: border-color .2s, box-shadow .2s;
}
.sira-toggle-card:hover {
  border-color: #d1d5db;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
}

/* ── Inline radio (Sí / No toggles) ─────────────────────────── */
.sira-inline-radio {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  cursor: pointer;
  padding: .35rem .85rem;
  border-radius: 8px;
  border: 1.5px solid #e5e7eb;
  background: #fff;
  font-size: .84rem;
  font-weight: 600;
  color: #6b7280;
  transition: all .18s;
  user-select: none;
}
.sira-inline-radio:hover {
  border-color: var(--rojo);
  color: var(--rojo);
  background: rgba(228,14,32,.04);
}
.sira-inline-radio input[type="radio"] {
  accent-color: var(--rojo);
  width: .95em;
  height: .95em;
  margin: 0;
  cursor: pointer;
}
.sira-inline-radio:has(input:checked) {
  border-color: var(--rojo);
  background: rgba(228,14,32,.07);
  color: var(--rojo);
  box-shadow: 0 0 0 2px rgba(228,14,32,.12);
}

/* ── Firma section ────────────────────────────────────────────── */
.firma-toolbar {
  display: flex;
  gap: .5rem;
  margin-top: .7rem;
  flex-wrap: wrap;
}
.btn-firma-clear {
  background: rgba(228,14,32,.08);
  color: var(--rojo);
  border: 1px solid rgba(228,14,32,.2);
  border-radius: 7px;
  padding: .35rem .9rem;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
}
.btn-firma-clear:hover { background: var(--rojo); color: #fff; }

/* ── Admin topbar hamburger (responsive fix) ──────────────────── */
@media (min-width:992px) {
  #sidebarToggle { display: none; }
}

/* ══════════════════════════════════════════════════════════════════
   STEP COMPONENTS (used by step_*.php)
══════════════════════════════════════════════════════════════════ */

/* Step header */
.sira-step-header {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  margin-bottom: 2rem;
  padding-bottom: 1.3rem;
  border-bottom: 2px solid #f0f0f3;
}
.sira-step-icon-wrap {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--rojo-dark) 0%, var(--rojo) 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(228,14,32,.28);
}
.sira-step-title {
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--gris-dark);
  margin-bottom: .18rem;
  letter-spacing: -.01em;
}
.sira-step-desc {
  font-size: .83rem;
  color: var(--gris-mid);
  margin: 0;
  line-height: 1.5;
}

/* Info boxes */
.sira-info-box {
  background: rgba(13,110,253,.05);
  border: 1px solid rgba(13,110,253,.18);
  border-left: 4px solid #0D6EFD;
  border-radius: var(--radio);
  padding: 1rem 1.2rem;
}
.sira-info-icon { font-size: 1.3rem; color: #0D6EFD; flex-shrink: 0; margin-top: 2px; }
.sira-info-title { font-size: .95rem; font-weight: 700; color: var(--gris-dark); margin-bottom: .4rem; }
.sira-info-text  { font-size: .84rem; color: var(--gris-dark); line-height: 1.6; }
.sira-info-label { font-size: .76rem; color: var(--gris-mid); }

/* Labels */
.sira-label {
  display: block;
  font-size: .8rem;
  font-weight: 700;
  color: #4b5563;
  margin-bottom: .38rem;
  letter-spacing: .025em;
  text-transform: uppercase;
}
.sira-label-sm {
  display: block;
  font-size: .78rem;
  font-weight: 700;
  color: #4b5563;
  margin-bottom: .35rem;
  letter-spacing: .025em;
  text-transform: uppercase;
}
.sira-required { color: var(--rojo); margin-left: 2px; font-weight: 700; }

/* Wrapper elegante label+input */
.sira-field {
  position: relative;
  margin-bottom: .25rem;
}
.sira-field .sira-input,
.sira-field .sira-select,
.sira-field .sira-textarea {
  padding-left: 1rem;
}

/* Radio cards (step 1 representación) */
.sira-radio-card {
  display: block;
  border: 2px solid #e5e7eb;
  border-radius: var(--radio);
  padding: 1.4rem 1.1rem;
  cursor: pointer;
  transition: all .22s cubic-bezier(.4,0,.2,1);
  position: relative;
  height: 100%;
  background: var(--blanco);
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.sira-radio-card:hover {
  border-color: var(--rojo);
  box-shadow: 0 6px 20px rgba(228,14,32,.14);
  transform: translateY(-2px);
}
.sira-radio-card.selected {
  border-color: var(--rojo);
  background: rgba(228,14,32,.04);
  box-shadow: 0 4px 16px rgba(228,14,32,.18);
}
.sira-radio-input { position: absolute; opacity: 0; width: 0; height: 0; }
.sira-radio-body  { text-align: center; }
.sira-radio-icon  { font-size: 2rem; color: var(--rojo); display: block; margin-bottom: .5rem; }
.sira-radio-title { font-weight: 700; font-size: .9rem; color: var(--gris-dark); margin-bottom: .3rem; }
.sira-radio-desc  { font-size: .76rem; color: var(--gris-mid); line-height: 1.4; }
.sira-radio-check {
  position: absolute;
  top: 8px;
  right: 8px;
  color: var(--rojo);
  font-size: 1.1rem;
  display: none;
}
.sira-radio-card.selected .sira-radio-check { display: block; }

/* Checkbox custom */
.sira-check {
  accent-color: var(--rojo);
  width: 1.15em;
  height: 1.15em;
  cursor: pointer;
  transition: box-shadow .18s;
}
.sira-check:hover { box-shadow: 0 0 0 3px rgba(228,14,32,.12); border-radius: 3px; }
.sira-check-label {
  font-size: .87rem;
  font-weight: 500;
  color: var(--gris-dark);
  cursor: pointer;
  transition: color .15s;
}
.form-check:hover .sira-check-label { color: var(--rojo); }

/* Toggle yes/no buttons */
.sira-toggle-group { display: flex; gap: .5rem; }
.sira-toggle-option {
  border: 1.5px solid var(--gris-light);
  background: var(--blanco);
  color: var(--gris-mid);
  border-radius: 8px;
  padding: .45rem 1.2rem;
  font-size: .85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .2s;
}
.sira-toggle-option.active-yes {
  background: rgba(25,135,84,.08);
  border-color: var(--success);
  color: var(--success);
  font-weight: 600;
}
.sira-toggle-option.active-no {
  background: rgba(228,14,32,.06);
  border-color: var(--rojo);
  color: var(--rojo);
  font-weight: 600;
}

/* Section group */
.sira-group {
  background: var(--gris-bg);
  border-radius: var(--radio);
  padding: 1.3rem 1.4rem;
  margin-bottom: 1rem;
}
.sira-group-title {
  font-size: .88rem;
  font-weight: 700;
  color: var(--gris-dark);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.sira-group-title i { color: var(--rojo); }

/* Collapse sections */
.sira-collapse-trigger {
  background: rgba(228,14,32,.06);
  border: 1.5px dashed rgba(228,14,32,.3);
  border-radius: var(--radio);
  padding: .75rem 1rem;
  cursor: pointer;
  font-size: .88rem;
  font-weight: 600;
  color: var(--rojo-dark);
  margin-top: .5rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.sira-collapse-trigger:hover { background: rgba(228,14,32,.1); }

/* Firma pad */
#firmaCanvas {
  border: 2px dashed var(--gris-light);
  border-radius: var(--radio);
  background: #fafafa;
  cursor: crosshair;
  touch-action: none;
  max-width: 100%;
  display: block;
  margin: 0 auto;
}
#firmaCanvas:hover { border-color: var(--rojo); }

/* ════════════════════════════════════════════════════════════════
   Widget Dirección Estructurada
   ════════════════════════════════════════════════════════════════ */
.sira-dir-widget {
  width: 100%;
}

/* Fila de componentes */
.sira-dir-row {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: flex-end;
  background: #f9fafb;
  border: 1.5px solid #e5e7eb;
  border-radius: 12px;
  padding: .9rem 1rem;
}

/* Columnas internas */
.sira-dir-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.sira-dir-col-via      { flex: 2 1 140px; }
.sira-dir-col-num      { flex: 1 1 70px; }
.sira-dir-col-hash     { flex: 0 0 auto; align-self: flex-end; padding-bottom: .55rem; }
.sira-dir-col-guion    { flex: 0 0 auto; align-self: flex-end; padding-bottom: .55rem; }
.sira-dir-col-compl    { flex: 1.5 1 110px; }
.sira-dir-col-compl-val { flex: 1 1 80px; display: flex; flex-direction: column; }

/* Separadores # y – */
.sira-dir-hash {
  font-size: 1.1rem;
  font-weight: 700;
  color: #9ca3af;
  line-height: 1;
  padding: 0 .15rem;
}

/* Labels internos */
.sira-dir-lbl {
  font-size: .72rem;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: .28rem;
  display: block;
}

/* Inputs internos más compactos */
.sira-dir-row .sira-input {
  padding: .45rem .65rem;
  font-size: .85rem;
  border-radius: 8px !important;
}

/* Preview de dirección */
.sira-dir-preview {
  margin-top: .6rem;
  padding: .5rem .85rem;
  border-radius: 8px;
  background: #f3f4f6;
  border: 1.5px dashed #d1d5db;
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .82rem;
  color: #9ca3af;
  transition: all .2s;
}
.sira-dir-preview i {
  color: #d1d5db;
  font-size: .9rem;
  flex-shrink: 0;
  transition: color .2s;
}
.sira-dir-preview--filled {
  background: rgba(228,14,32,.04);
  border-color: rgba(228,14,32,.3);
  color: var(--gris-dark);
}
.sira-dir-preview--filled i {
  color: var(--rojo);
}
.sira-dir-preview-text {
  font-weight: 500;
  letter-spacing: .01em;
}

/* Responsive: apilar en móvil */
@media (max-width: 576px) {
  .sira-dir-row { padding: .75rem; gap: .4rem; }
  .sira-dir-col-via,
  .sira-dir-col-num,
  .sira-dir-col-compl { flex: 1 1 100%; }
  .sira-dir-col-hash,
  .sira-dir-col-guion { display: none; }
}
/* ══ Fin Widget Dirección ══════════════════════════════════════ */
