/* ============================================================
   FORMULARIO CONOZCA SU CLIENTE – FUNDACIÓN MALECÓN 2000
   Estilos institucionales
   ============================================================ */

:root {
  --azul:       #003087;
  --azul-claro: #1a4da0;
  --dorado:     #C8A03F;
  --gris-claro: #f5f7fb;
  --borde:      #dee2e6;
  --texto:      #2c3e50;
  --rojo:       #e74c3c;
}

* { box-sizing: border-box; }

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background: var(--gris-claro);
  color: var(--texto);
  font-size: 0.95rem;
}

/* ── Cabecera ─────────────────────────────────────────── */
.site-header {
  background: #004289;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: none;
}
.site-header .logo-area {
  display: flex;
  align-items: center;
}
.site-header .logo-area img {
  height: 58px;
  display: block;
}
.site-header .form-subtitle {
  font-size: 1rem;
  font-weight: 600;
  color: #ddd8d0;
  text-align: right;
  line-height: 1.4;
}
.site-header .form-subtitle strong {
  display: block;
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: .3px;
}

/* ── Contenido principal ──────────────────────────────── */
.page-wrapper {
  max-width: 900px;
  margin: 30px auto 60px;
  padding: 0 16px;
}

/* ── Tarjeta de selección (índice) ───────────────────── */
.selector-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
  cursor: pointer;
  text-decoration: none !important;
  color: inherit;
}
.selector-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,48,135,.15);
}
.selector-card .card-icon {
  background: #004289;
  color: #fff;
  padding: 32px;
  text-align: center;
  font-size: 3.5rem;
  line-height: 1;
}
.selector-card.juridica .card-icon {
  background: #004289;
}
.selector-card .card-body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.selector-card h5 {
  color: var(--azul);
  font-weight: 700;
}

/* ── Sección del formulario ───────────────────────────── */
.form-section {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 1px 6px rgba(0,0,0,.07);
  margin-bottom: 24px;
  overflow: hidden;
}
.form-section .section-header {
  background: var(--azul);
  color: #fff;
  padding: 12px 20px;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: .5px;
  text-transform: uppercase;
  border-left: 5px solid var(--dorado);
}
.form-section .section-body {
  padding: 24px 20px;
}

/* ── Formulario ───────────────────────────────────────── */
.form-label {
  font-weight: 600;
  color: var(--texto);
  margin-bottom: 4px;
}
.form-label .req {
  color: var(--rojo);
  margin-left: 2px;
}
.form-control, .form-select {
  border-color: var(--borde);
  border-radius: 6px;
  font-size: 0.93rem;
}
.form-control:focus, .form-select:focus {
  border-color: var(--azul-claro);
  box-shadow: 0 0 0 .2rem rgba(26,77,160,.15);
}

/* Mayúsculas automáticas en todos los campos de texto excepto email */
input[type="text"].form-control,
input[type="tel"].form-control,
textarea.form-control {
  text-transform: uppercase;
}
.form-check-label {
  font-weight: 500;
}

/* ── Número de pregunta ───────────────────────────────── */
.q-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--azul);
  color: #fff;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 0.78rem;
  font-weight: 700;
  margin-right: 8px;
  flex-shrink: 0;
}

.q-label {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
  font-weight: 600;
}

/* ── Campos condicionales ─────────────────────────────── */
.conditional-block {
  background: #f0f4fc;
  border-left: 3px solid var(--dorado);
  border-radius: 0 8px 8px 0;
  padding: 16px;
  margin-top: 12px;
}

/* ── Declaración final ────────────────────────────────── */
.declaracion-box {
  background: #fff8e8;
  border: 1px solid var(--dorado);
  border-radius: 8px;
  padding: 18px 20px;
  font-size: 0.88rem;
  color: #4a3f00;
  line-height: 1.6;
}

/* ── Botón principal ──────────────────────────────────── */
.btn-submit {
  background: var(--azul);
  color: #fff;
  padding: 14px 40px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  width: 100%;
  cursor: pointer;
  transition: background .2s;
}
.btn-submit:hover { background: var(--azul-claro); }

/* ── Obligatorio ──────────────────────────────────────── */
.obligatorio-nota {
  font-size: 0.83rem;
  color: #666;
  margin-bottom: 20px;
}
.obligatorio-nota span { color: var(--rojo); }

/* ── Intro del formulario ─────────────────────────────── */
.form-intro {
  background: #fff;
  border-radius: 10px;
  padding: 20px 24px;
  margin-bottom: 24px;
  border-left: 5px solid var(--dorado);
  box-shadow: 0 1px 6px rgba(0,0,0,.06);
  font-size: 0.88rem;
  color: #555;
  line-height: 1.6;
}

/* ── Pie de página ────────────────────────────────────── */
.site-footer {
  text-align: center;
  padding: 20px;
  color: #888;
  font-size: 0.8rem;
  border-top: 1px solid var(--borde);
  margin-top: 40px;
}

/* ── Página de éxito ──────────────────────────────────── */
.success-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,.1);
  padding: 48px 40px;
  text-align: center;
  max-width: 520px;
  margin: 60px auto;
}
.success-card .check-icon {
  font-size: 4rem;
  color: #27ae60;
  margin-bottom: 20px;
}
.btn-download {
  background: var(--dorado);
  color: #fff;
  padding: 14px 40px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  display: inline-block;
  margin-top: 20px;
  transition: background .2s;
}
.btn-download:hover { background: #a87c2a; color: #fff; }

/* ── Admin ────────────────────────────────────────────── */
.admin-sidebar {
  background: var(--azul);
  min-height: 100vh;
  color: #fff;
  padding: 0;
}
.admin-sidebar .brand {
  padding: 24px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,.15);
}
.admin-sidebar .brand h6 { margin: 0; font-size: 0.85rem; opacity: .8; }
.admin-sidebar .nav-link {
  color: rgba(255,255,255,.8);
  padding: 12px 20px;
  display: block;
  transition: background .2s;
}
.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
  background: rgba(255,255,255,.12);
  color: #fff;
}
.admin-content { padding: 30px; }

.badge-natural  { background: #17a2b8; color: #fff; }
.badge-juridica { background: #6f42c1; color: #fff; }

.table th { background: #f0f4fc; color: var(--azul); font-size: .85rem; }

/* ── Date display (Air Datepicker text input) ─────────── */
.date-display {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23003087' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 0a.5.5 0 0 1 .5.5V1h8V.5a.5.5 0 0 1 1 0V1h1a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h1V.5a.5.5 0 0 1 .5-.5zM1 4v10a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V4H1z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
  padding-right: 36px;
  cursor: pointer;
}

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 600px) {
  .page-wrapper { margin: 16px auto 40px; }
  .form-section .section-body { padding: 16px 14px; }
  .success-card { padding: 32px 20px; margin: 30px 16px; }
  .admin-content { padding: 16px; }
}
