/*
  Estilos de la landing de registro de clientes.
  Paleta corporativa configurable mediante variables CSS.
  Un tercero puede ajustar los colores cambiando estas variables.
*/

:root {
  /* Tono alineado con login.html */
  --brand-primary: #0e3f76;    /* Azul corporativo principal */
  --brand-secondary: #4ab458;  /* Verde corporativo/acento */
  --brand-accent: #4ab458;     /* Éxito/acento */
  --brand-danger: #dc3545;     /* Errores */
  --text-color: #1f2630;
  --bg-color: #f5f7fb;
  --card-bg: #ffffff;
  --border-color: #e2e6ef;
}

/* Barra superior de marca */
.brand-bar {
  width: 100%;
  height: 6px;
  background: linear-gradient(90deg, var(--brand-primary), var(--brand-secondary));
}

/* Layout base */
html, body { height: 100%; }
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

body {
  margin: 0;
  font-family: 'Inter', -apple-system, Segoe UI, Roboto, Arial;
  color: var(--text-color);
  background:
    linear-gradient(135deg, #0e3f76 0%, #1a5490 25%, #2d6ba8 50%, #4ab458 100%);
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image:
    radial-gradient(circle at 20% 80%, rgba(74, 180, 88, 0.10) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(14, 63, 118, 0.10) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(74, 180, 88, 0.05) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* Capa de suavizado para bajar la intensidad del fondo */
body::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(255, 255, 255, 0.25); /* opacar el gradiente */
  pointer-events: none;
  z-index: 0;
}

.container {
  max-width: 720px;
  width: 95%;
  margin: 2rem auto;
  padding: 1.25rem 1.25rem 1.75rem 1.25rem;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(14,63,118,0.12);
  position: relative;
  z-index: 1; /* por encima del fondo decorativo */
  box-sizing: border-box; /* asegurar que padding no provoque overflow */
}

.title {
  font-size: 1.6rem;
  margin: .25rem 0 1rem;
  letter-spacing: .2px;
  text-align: center; /* mejor presentación y consistencia móvil */
}

/* Campos del formulario */
.field { margin-bottom: 1rem; position: relative; }
label { display:block; font-weight:600; margin-bottom:.5rem; }

input[type="text"],
input[type="email"],
input[type="tel"],
select {
  width: 100%;
  padding: .85rem .9rem;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  font-size: 1rem;
  background: #fbfcff;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
  box-sizing: border-box; /* evitar que padding aumente el ancho efectivo */
  display: block; /* asegurar ocupación de línea completa */
  max-width: 100%; /* evitar desbordes en contenedores estrechos */
}

input::placeholder { color: #8a94a6; }

input:focus,
select:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 4px rgba(14,77,170,.12);
  background: #fff;
}

.hint { font-size:.9rem; color:#6b7280; margin-top:.25rem; min-height:1.1rem; overflow-wrap: anywhere; }
.error { color: var(--brand-danger); font-size:.9rem; margin-top:.25rem; overflow-wrap: anywhere; }

/* Acciones */
.actions { display:flex; gap:.75rem; align-items:center; }

.btn {
  padding: .8rem 1.1rem;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 700;
  letter-spacing: .2px;
}

.btn-primary { background: var(--brand-primary); color:#fff; }
.btn-primary:hover { filter: brightness(1.05); }
.btn-primary:disabled { opacity:.6; cursor:not-allowed; }

.btn-secondary { background:#6c757d; color:#fff; }
.btn-secondary:hover { filter: brightness(1.05); }

.status { margin-top:1rem; min-height:1.5rem; }
.success { color: var(--brand-accent); }

/* Loader */
.loader { display:flex; align-items:center; gap:.5rem; max-width: 100%; }
.spinner { display:none; width:20px; height:20px; border:3px solid #e2e6ef; border-top-color:var(--brand-primary); border-radius:50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg);} }

/* Responsividad */
@media (max-width: 600px){
  .container { width: 92%; margin: 1rem auto; padding: 1rem; }
  .title { font-size: 1.4rem; }
  label { font-size: .95rem; }
  input[type="text"], input[type="email"], input[type="tel"], select { font-size: .95rem; padding: .75rem .85rem; }
  .actions { flex-direction: column; align-items: stretch; }
  .btn { width: 100%; }
  .status { font-size: .95rem; }
}

/* Microajustes para pantallas muy pequeñas */
@media (max-width: 380px){
  .title { font-size: 1.25rem; }
  input[type="text"], input[type="email"], input[type="tel"], select { font-size: .9rem; }
}

/* Layout de dos columnas con panel informativo a la derecha */
.layout {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 1rem;
}

.info-panel {
  background: #ffffffcc; /* panel ligeramente translúcido sobre el fondo */
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .5rem;
}

.info-logo { max-width: 150px; height: auto; margin-bottom: .25rem; }
.info-title { font-size: 1.1rem; font-weight: 700; margin: .25rem 0; }
.info-text { color: #4b5563; margin: 0; }
.info-list { list-style: none; padding: 0; margin: .25rem 0 0; }
.info-list li { margin: .15rem 0; color: #1f2630; }

@media (max-width: 900px){
  .layout { grid-template-columns: 1fr; }
  .info-panel { order: 2; }
}
/* Encabezado con logo al inicio */
.page-header {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem 0;
  position: relative;
  z-index: 1;
}

.page-logo {
  max-width: 160px;
  height: auto;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.08));
}

/* Ocultar loader por defecto; solo mostrar durante envío */
.loader { display: none; }