/* ==========================================================================
   SISTEMA DE GENERACIÓN DE RECAUDOS DE RENOVACIÓN - RADIOCLUB / CONATEL
   Hoja de Estilos CSS3 - Paleta Exclusiva: Azul, Blanco y Rojo
   ========================================================================== */

:root {
  /* Fondo general y superficies limpias */
  --bg-main: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-soft: #f1f5f9;
  --bg-card: #ffffff;
  --border-color: #e2e8f0;
  --border-focus: #004b91;
  
  /* Paleta: Azul, Blanco y Rojo */
  --c-blue: #004b91;
  --c-blue-dark: #00366b;
  --c-blue-light: #eff6ff;
  --c-blue-accent: #0284c7;
  --c-blue-border: #bfdbfe;
  
  --c-red: #dc2626;
  --c-red-dark: #b91c1c;
  --c-red-light: #fef2f2;
  --c-red-border: #fecaca;
  
  --c-white: #ffffff;
  
  /* Textos oscuros sobre fondo blanco */
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-subtle: #64748b;
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-full: 9999px;
  
  --shadow-card: 0 4px 20px -2px rgba(15, 23, 42, 0.06), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
  --shadow-hover: 0 10px 25px -5px rgba(0, 75, 145, 0.15);
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--bg-main);
  background-image: 
    radial-gradient(at 0% 0%, rgba(0, 75, 145, 0.06) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(220, 38, 38, 0.05) 0px, transparent 50%);
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.55;
  font-size: 14.5px;
  -webkit-font-smoothing: antialiased;
}

/* Franja superior decorativa Azul y Roja */
body::before {
  content: "";
  display: block;
  height: 4px;
  width: 100%;
  background: linear-gradient(90deg, #004b91 0%, #004b91 65%, #dc2626 65%, #dc2626 100%);
  position: sticky;
  top: 0;
  z-index: 100;
}

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 20px 20px 60px;
}

/* ==========================================================================
   HEADER PRINCIPAL CON LOGO RCV
   ========================================================================== */
.site-header {
  margin-bottom: 22px;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  padding: 16px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.header-inner::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--c-blue) 0%, var(--c-blue) 75%, var(--c-red) 100%);
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-logo-wrap {
  width: 58px;
  height: 58px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-logo-img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0, 75, 145, 0.25));
  transition: var(--transition);
}

.brand-logo-img:hover {
  transform: scale(1.05);
}

.brand-info h1 {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--c-blue);
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.brand-tag {
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--c-red-light);
  color: var(--c-red);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  border: 1px solid var(--c-red-border);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.brand-info p {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
}

.header-badges {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.stat-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface-soft);
  border: 1px solid var(--border-color);
  padding: 6px 14px;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.stat-badge .stat-num {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--c-blue);
  font-feature-settings: "tnum";
}

.privacy-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--c-blue-light);
  border: 1px solid var(--c-blue-border);
  color: var(--c-blue);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.74rem;
  font-weight: 700;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--c-red);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.7);
  animation: pulse-ring 1.8s infinite cubic-bezier(0.66, 0, 1, 1);
}

@keyframes pulse-ring {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(220, 38, 38, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
}

/* ==========================================================================
   BANNER DE PRIVACIDAD & SEGURIDAD
   ========================================================================== */
.privacy-banner {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: #ffffff;
  border-left: 4px solid var(--c-blue);
  border-top: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 14px 18px;
  border-radius: var(--radius-md);
  margin-bottom: 22px;
  box-shadow: var(--shadow-card);
}

.privacy-banner-icon {
  color: var(--c-blue);
  flex-shrink: 0;
  margin-top: 1px;
}

.privacy-banner-content h3 {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--c-blue);
  margin-bottom: 2px;
}

.privacy-banner-content p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* ==========================================================================
   LAYOUT PRINCIPAL: CARDS BLANCAS
   ========================================================================== */
.app-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}

@media (min-width: 900px) {
  .app-grid {
    grid-template-columns: 1.5fr 1fr;
  }
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.card-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-surface-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-header h2 {
  font-size: 0.96rem;
  font-weight: 800;
  color: var(--c-blue);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-header h2 svg {
  color: var(--c-red);
}

.card-body {
  padding: 20px;
  background: #ffffff;
}

/* ==========================================================================
   FORMULARIO Y CAMPOS (AZUL Y ROJO SOBRE BLANCO)
   ========================================================================== */
.form-section-title {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--c-blue);
  margin: 16px 0 10px;
  padding-bottom: 5px;
  border-bottom: 2px solid var(--c-blue-border);
  display: flex;
  align-items: center;
  gap: 6px;
}

.form-section-title:first-child {
  margin-top: 0;
}

.form-section-title svg {
  color: var(--c-red);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

@media (min-width: 600px) {
  .form-row.two-cols {
    grid-template-columns: 1fr 1fr;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-main);
  display: block;
  margin-bottom: 2px;
}

.form-label .req {
  color: var(--c-red);
  margin-left: 2px;
  font-weight: 800;
}

.form-control {
  width: 100%;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  padding: 9px 12px;
  font-size: 0.88rem;
  font-family: inherit;
  transition: var(--transition);
}

.form-control.no-icon {
  padding-left: 12px;
}

.form-control:focus {
  outline: none;
  border-color: var(--c-blue);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(0, 75, 145, 0.15);
}

.form-control::placeholder {
  color: #94a3b8;
}

.form-control.callsign-input {
  text-transform: uppercase;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--c-blue);
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23004b91' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px;
  cursor: pointer;
}

select.form-control option {
  background-color: #ffffff;
  color: var(--text-main);
}

/* ==========================================================================
   CAJA DE ASISTENCIA / AUTORIZACIÓN
   ========================================================================== */
.assistance-box {
  background: var(--c-blue-light);
  border: 1px solid var(--c-blue-border);
  border-left: 4px solid var(--c-blue);
  border-radius: var(--radius-md);
  padding: 14px;
  margin: 14px 0 18px;
  transition: var(--transition);
}

.assistance-box:hover {
  background: #e0f2fe;
  border-color: var(--c-blue);
}

.checkbox-container {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  user-select: none;
  position: relative;
}

.checkbox-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  width: 22px;
  height: 22px;
  background-color: #ffffff;
  border: 2px solid #cbd5e1;
  border-radius: 4px;
  flex-shrink: 0;
  margin-top: 2px;
  transition: var(--transition);
  position: relative;
}

.checkbox-container input:checked ~ .checkmark {
  background-color: var(--c-blue);
  border-color: var(--c-blue);
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
  left: 6px;
  top: 2px;
  width: 6px;
  height: 11px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox-container input:checked ~ .checkmark:after {
  display: block;
}

.checkbox-label-content strong {
  font-size: 0.88rem;
  color: var(--text-main);
  display: block;
  margin-bottom: 2px;
}

.checkbox-label-content p {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.35;
  margin-bottom: 6px;
}

.pages-indicator {
  display: inline-block;
  font-size: 0.74rem;
  padding: 3px 8px;
  background: #ffffff;
  border: 1px solid var(--c-blue-border);
  color: var(--c-blue);
  border-radius: var(--radius-sm);
  font-weight: 700;
}

/* Botón Principal (Azul Institucional con Hover Rojo) */
.btn-submit-container {
  margin-top: 18px;
}

.btn-primary {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--c-blue) 0%, var(--c-blue-dark) 100%);
  color: #ffffff;
  border: none;
  padding: 12px 24px;
  font-size: 0.94rem;
  font-weight: 800;
  border-radius: var(--radius-md);
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 75, 145, 0.3);
  transition: var(--transition);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--c-red) 0%, var(--c-red-dark) 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(220, 38, 38, 0.35);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary svg {
  width: 18px;
  height: 18px;
}

.btn-primary .btn-loader {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   CHECKLIST DE RECAUDOS (PANEL LATERAL)
   ========================================================================== */
.recaudos-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.recaudo-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.recaudo-item:hover {
  border-color: var(--c-blue);
  background: var(--c-blue-light);
  transform: translateX(2px);
}

.recaudo-badge {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: var(--c-blue);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 75, 145, 0.25);
}

.recaudo-info h4 {
  font-size: 0.83rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 2px;
}

.recaudo-info p {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.club-info-box {
  margin-top: 16px;
  padding: 14px;
  background: var(--bg-surface-soft);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--c-red);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.club-info-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.club-mini-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.club-info-box h5 {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--c-blue);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.club-info-box ul {
  list-style: none;
  font-size: 0.76rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.club-info-box li strong {
  color: var(--text-main);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  margin-top: 32px;
  text-align: center;
  padding: 16px;
  border-top: 1px solid var(--border-color);
  color: var(--text-subtle);
  font-size: 0.78rem;
}

.site-footer p {
  margin-bottom: 4px;
}

.ham-greeting {
  font-weight: 800;
  color: var(--c-blue);
  letter-spacing: 0.04em;
}
