/*
 * =========================================================
 * AGENTMARKT
 * ARCHIVO: assets/css/auth.css
 * FASE 7 - OPTIMIZADO APP - ESTÉTICA 100% INTACTA
 * [MEMORIZADO: assets/css/auth.css v7.2]
 *
 * ÍNDICE
 * ---------------------------------------------------------
 * 1. Layout Auth APP
 * 2. Header Auth
 * 3. Card APP
 * 4. Campos APP
 * 5. Botones APP
 * 6. Roles Grid APP
 * 7. Estados y Mensajes
 * 8. Responsive APP
 * 9. Utilidades para página de verificación pendiente
 * =========================================================
 */

/* =========================================================
   1. LAYOUT AUTH APP
   ========================================================= */
.auth-page {
  min-height: 100dvh;
  padding: 24px 16px calc(var(--nav-h) + 40px + env(safe-area-inset-bottom));
  background: var(--bg-soft);
}
.auth-container {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
}

/* =========================================================
   2. HEADER AUTH
   ========================================================= */
.auth-header {
  margin-bottom: 24px;
  text-align: center;
}
.auth-header .app-logo {
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  border-radius: 18px;
  background: #000;
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.5px;
  box-shadow: var(--shadow);
}
.auth-header .app-title {
  margin: 0;
  color: var(--text);
  font-size: 24px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.5px;
}
.auth-header .app-subtitle {
  margin: 8px 0 0;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.5;
}
.auth-role-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
}

/* =========================================================
   3. CARD APP
   ========================================================= */
.auth-card {
  padding: 24px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
}
.auth-card-title {
  margin: 0 0 6px;
  color: var(--text);
  font-size: 18px;
  font-weight: 750;
  line-height: 1.3;
}
.auth-card-description {
  margin: 0 0 20px;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.5;
}
.auth-card form .auth-card-title {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}
.auth-card form .auth-card-title:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

/* =========================================================
   4. CAMPOS APP - Input 100% nativo
   ========================================================= */
.auth-field {
  margin-bottom: 16px;
}
.auth-label {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}
.auth-input {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  font-size: 15px;
  line-height: 1.4;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
}
.auth-input:focus {
  border-color: var(--black);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
}
.auth-input:disabled {
  background: var(--bg-soft);
  color: var(--text-soft);
}
select.auth-input {
  cursor: pointer;
}
.auth-field-help {
  margin-top: 8px;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.4;
}
.club-results {
  border: 1px solid var(--border);
  max-height: 200px;
  overflow: auto;
  display: none;
  margin-top: 6px;
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.club-item {
  padding: 10px 14px;
  cursor: pointer;
  font-size: 14px;
}
.club-item:active {
  background: var(--bg-soft);
}
.solicitud-box {
  background: var(--bg-soft);
  padding: 14px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  margin-top: 8px;
}

/* =========================================================
   5. BOTONES APP
   ========================================================= */
.auth-button {
  width: 100%;
  min-height: 50px;
  margin-top: 24px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: var(--black);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  transition: transform 0.12s, opacity 0.12s;
  will-change: transform;
}
.auth-button:active {
  transform: scale(0.98);
  opacity: 0.9;
}
.auth-back {
  display: block;
  margin-top: 16px;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
}
.auth-back:hover {
  color: var(--text);
}
/* Añadido para reemplazar el inline style del registro */
.auth-link-secondary {
  margin-top: 8px;
}

/* =========================================================
   6. ROLES GRID APP
   ========================================================= */
.auth-role-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.auth-role {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  text-align: center;
  transition: border-color 0.15s, transform 0.12s;
}
.auth-role:active {
  transform: scale(0.98);
  border-color: var(--black);
}
.auth-role-title {
  margin-bottom: 4px;
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
}
.auth-role-description {
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.4;
  max-width: 300px;
}

/* =========================================================
   7. ESTADOS Y MENSAJES
   ========================================================= */
.auth-error {
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid #fecaca;
  border-radius: 12px;
  background: #fef2f2;
  color: #991b1b;
  font-size: 13px;
  line-height: 1.4;
}
.auth-success {
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  background: #f0fdf4;
  color: #166534;
  font-size: 13px;
  line-height: 1.4;
}
.auth-field input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0 8px 0 0;
  accent-color: #000;
  vertical-align: middle;
}
.club-selected-text {
  font-weight: 700; margin-top: 6px; font-size: 13px; color: var(--text);
}
.input-spaced {
  margin-top: 6px;
}

/* =========================================================
   8. RESPONSIVE APP
   ========================================================= */
@media (max-width: 480px) {
  .auth-page {
    padding: 16px 12px calc(var(--nav-h) + 24px + env(safe-area-inset-bottom));
  }
  .auth-card {
    padding: 20px 16px;
    border-radius: 18px;
  }
}
@media (min-width: 768px) {
  .auth-page {
    padding-top: 40px;
  }
  .auth-container {
    max-width: 520px;
  }
}

/* =========================================================
   9. UTILIDADES PARA PÁGINA DE VERIFICACIÓN PENDIENTE
   ========================================================= */
.pending-steps {
  text-align: left;
  line-height: 1.6;
}
.pending-btn {
  display: block;
  width: 100%;
  text-align: center;
  text-decoration: none;
  margin-top: 16px;
}