/* assets/css/style.css */
:root {
  --fff-primary:   #1a3a6b;   /* azul iglesia */
  --fff-gold:      #c9a84c;   /* dorado 50 años */
  --fff-light:     #f4f6fb;
  --fff-white:     #ffffff;
  --fff-danger:    #dc3545;
  --fff-success:   #198754;
  --radius:        12px;
  --shadow:        0 4px 24px rgba(26,58,107,.13);
  --transition:    .3s cubic-bezier(.4,0,.2,1);
}

* { box-sizing: border-box; }

body {
  background: var(--fff-light);
  font-family: 'Segoe UI', system-ui, sans-serif;
  color: #222;
  min-height: 100vh;
}

/* ── Header ── */
.fff-header {
  background: var(--fff-primary);
  color: #fff;
  padding: 1.2rem 0;
  text-align: center;
  box-shadow: 0 2px 12px rgba(0,0,0,.2);
}
.fff-header img { height: 56px; margin-bottom: .4rem; }
.fff-header h1  { font-size: 1.35rem; margin: 0; letter-spacing: .5px; }
.fff-header p   { font-size: .85rem; margin: .2rem 0 0; opacity: .8; }
.fff-gold-bar   { height: 4px; background: var(--fff-gold); }

/* ── Card principal ── */
.fff-card {
  background: var(--fff-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem 2.2rem;
  margin: 2rem auto;
  max-width: 680px;
}

/* ── Sección datos del menor ── */
.datos-menor {
  background: var(--fff-light);
  border-left: 4px solid var(--fff-gold);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.1rem 1.4rem;
  margin-bottom: 1.5rem;
}
.datos-menor h5 { color: var(--fff-primary); font-weight: 700; margin-bottom: .6rem; }
.dato-row { display: flex; gap: .5rem; margin-bottom: .3rem; font-size: .93rem; }
.dato-label { color: #666; min-width: 120px; }
.dato-val   { font-weight: 600; color: #1a1a1a; }

/* ── Consentimiento texto ── */
.consentimiento-texto {
  font-size: .88rem;
  line-height: 1.65;
  color: #333;
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid #dde3ef;
  border-radius: 8px;
  padding: 1.1rem 1.3rem;
  margin-bottom: 1.2rem;
  background: #fafbfd;
}
.consentimiento-texto h6 { font-weight: 700; color: var(--fff-primary); margin: .9rem 0 .3rem; }
.consentimiento-texto p  { margin: 0 0 .5rem; }

/* ── Sección legal ── */
.seccion-legal {
  background: #fff8e6;
  border: 1px solid var(--fff-gold);
  border-radius: 8px;
  padding: 1rem 1.2rem;
  margin-bottom: 1.2rem;
  font-size: .84rem;
  color: #5a4200;
}
.seccion-legal strong { color: var(--fff-primary); }

/* ── Datos firmante ── */
.firmante-form label { font-weight: 600; font-size: .88rem; color: #444; }
.firmante-form .form-control,
.firmante-form .form-select {
  border-radius: 8px;
  border-color: #c8d0e0;
  font-size: .9rem;
  transition: border-color var(--transition);
}
.firmante-form .form-control:focus,
.firmante-form .form-select:focus {
  border-color: var(--fff-primary);
  box-shadow: 0 0 0 3px rgba(26,58,107,.12);
}

/* ── Checkbox aceptación ── */
.check-aceptar {
  display: flex;
  align-items: flex-start;
  gap: .8rem;
  background: #eef2fb;
  border-radius: 8px;
  padding: 1rem 1.2rem;
  margin: 1.2rem 0;
  cursor: pointer;
}
.check-aceptar input[type=checkbox] {
  width: 20px; height: 20px;
  margin-top: 2px;
  accent-color: var(--fff-primary);
  cursor: pointer;
  flex-shrink: 0;
}
.check-aceptar span { font-size: .88rem; line-height: 1.5; color: #333; }

/* ── Botón firmar ── */
.btn-firmar {
  background: var(--fff-primary);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: .85rem 2rem;
  font-size: 1rem;
  font-weight: 700;
  width: 100%;
  letter-spacing: .4px;
  transition: background var(--transition), transform var(--transition);
}
.btn-firmar:hover:not(:disabled) {
  background: #0f2548;
  transform: translateY(-1px);
}
.btn-firmar:disabled { background: #9aabca; cursor: not-allowed; }

/* ── Modal ── */
.modal-content { border-radius: var(--radius); border: none; box-shadow: var(--shadow); }
.modal-header  { background: var(--fff-primary); color: #fff; border-radius: var(--radius) var(--radius) 0 0; }
.modal-header .btn-close { filter: invert(1); }

/* ── Modal confirmación ── */
.confirm-icon { font-size: 3.5rem; text-align: center; margin-bottom: 1rem; }
.confirm-resumen {
  background: var(--fff-light);
  border-radius: 8px;
  padding: .9rem 1.1rem;
  font-size: .9rem;
  margin-bottom: 1rem;
}
.confirm-resumen .row { margin-bottom: .3rem; }
.confirm-resumen .col-5 { color: #666; font-size: .85rem; }
.confirm-resumen .col-7 { font-weight: 600; }

/* ── Modal éxito ── */
.exito-wrapper { text-align: center; padding: 1.5rem .5rem; }
.exito-wrapper .check-anim {
  font-size: 5rem;
  animation: popIn .5s cubic-bezier(.175,.885,.32,1.275) both;
}
@keyframes popIn {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.exito-wrapper h4 { color: var(--fff-success); font-weight: 700; margin: .8rem 0 .4rem; }
.btn-descarga {
  background: var(--fff-gold);
  color: #1a1a1a;
  border: none;
  border-radius: 10px;
  padding: .75rem 1.8rem;
  font-weight: 700;
  font-size: .95rem;
  margin-top: 1rem;
  transition: background var(--transition);
  text-decoration: none;
  display: inline-block;
}
.btn-descarga:hover { background: #b8932a; color: #fff; }

/* ── Estado ya firmado ── */
.ya-firmado {
  text-align: center;
  padding: 2.5rem 1rem;
}
.ya-firmado .icon { font-size: 4rem; margin-bottom: 1rem; }
.ya-firmado h3 { color: var(--fff-success); font-weight: 700; }

/* ── Token inválido ── */
.token-invalido {
  text-align: center;
  padding: 3rem 1rem;
}
.token-invalido .icon { font-size: 4rem; }
.token-invalido h3 { color: var(--fff-danger); }

/* ── Admin panel ── */
.admin-sidebar {
  background: var(--fff-primary);
  min-height: 100vh;
  padding: 0;
  width: 240px;
  position: fixed;
  left: 0; top: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
}
.admin-sidebar .brand {
  padding: 1.4rem 1.2rem;
  border-bottom: 1px solid rgba(255,255,255,.12);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
}
.admin-sidebar .brand span { color: var(--fff-gold); }
.admin-sidebar nav a {
  display: flex; align-items: center; gap: .7rem;
  padding: .75rem 1.4rem;
  color: rgba(255,255,255,.78);
  text-decoration: none;
  font-size: .92rem;
  transition: background var(--transition), color var(--transition);
}
.admin-sidebar nav a:hover,
.admin-sidebar nav a.active {
  background: rgba(255,255,255,.1);
  color: #fff;
}
.admin-main { margin-left: 240px; padding: 1.8rem 2rem; }

.stat-card {
  background: var(--fff-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.3rem 1.5rem;
  display: flex; align-items: center; gap: 1rem;
}
.stat-card .stat-icon {
  font-size: 2.2rem;
  background: var(--fff-light);
  border-radius: 10px;
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
}
.stat-card .stat-num { font-size: 2rem; font-weight: 800; color: var(--fff-primary); line-height: 1; }
.stat-card .stat-label { font-size: .82rem; color: #666; }

.badge-firmado   { background: #d1fae5; color: #065f46; border-radius: 20px; padding: .25rem .7rem; font-size: .78rem; font-weight: 700; }
.badge-pendiente { background: #fef3c7; color: #92400e; border-radius: 20px; padding: .25rem .7rem; font-size: .78rem; font-weight: 700; }
.badge-sms-ok    { background: #dbeafe; color: #1e40af; border-radius: 20px; padding: .25rem .7rem; font-size: .78rem; font-weight: 700; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .fff-card { padding: 1.2rem 1rem; margin: 1rem; }
  .datos-menor { padding: .8rem 1rem; }
  .admin-sidebar { width: 100%; min-height: auto; position: relative; }
  .admin-main { margin-left: 0; padding: 1rem; }
}
