/* ===================================================================
   Login y registro de clientes
   =================================================================== */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 32px 16px; background: #f6f5fb; }
.auth-shell { width: 100%; max-width: 1040px; display: grid; grid-template-columns: 1fr 1fr; background: #fff; border-radius: 24px; overflow: hidden;
    box-shadow: 0 30px 70px -30px rgba(49, 46, 129, .35); }

/* Panel de marca */
.auth-brand { position: relative; overflow: hidden; display: flex; flex-direction: column; padding: 40px 44px; color: #fff;
    background: radial-gradient(circle at 85% 10%, rgba(255,255,255,.16) 0, rgba(255,255,255,0) 40%),
                linear-gradient(140deg, var(--primary) 0%, #0f4a2c 100%); }
.auth-brand-logo img { height: 38px; width: auto; filter: brightness(0) invert(1); }
.auth-brand-body { margin-top: auto; margin-bottom: auto; padding: 40px 0; position: relative; z-index: 1; }
.auth-brand-kicker { display: inline-block; padding: 4px 12px; border-radius: 999px; background: rgba(255,255,255,.16); font-size: 12px; font-weight: 700;
    letter-spacing: .08em; text-transform: uppercase; margin-bottom: 16px; }
.auth-brand-title { font-size: 34px; line-height: 1.15; font-weight: 800; color: #fff; margin-bottom: 12px; }
.auth-brand-text { font-size: 15px; line-height: 1.6; opacity: .88; margin-bottom: 28px; }
.auth-brand-list li { display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 500; margin-bottom: 14px; }
.auth-brand-list i { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 10px; background: rgba(255,255,255,.16);
    display: inline-flex; align-items: center; justify-content: center; font-size: 18px; }
.auth-brand-circle { position: absolute; border-radius: 50%; border: 1px solid rgba(255,255,255,.18); pointer-events: none; }
.auth-brand-circle.c1 { width: 320px; height: 320px; right: -120px; bottom: -120px; }
.auth-brand-circle.c2 { width: 200px; height: 200px; right: -40px; bottom: -40px; background: rgba(255,255,255,.06); }

/* Formulario */
.auth-form { padding: 40px 52px 36px; display: flex; flex-direction: column; justify-content: center; }
.auth-back { align-self: flex-start; font-size: 13px; font-weight: 600; color: #6b7280; display: inline-flex; align-items: center; gap: 6px; margin-bottom: 28px; }
.auth-back:hover { color: var(--primary); }
.auth-title { font-size: 28px; font-weight: 800; color: #111827; margin-bottom: 6px; }
.auth-subtitle { font-size: 14px; color: #6b7280; margin-bottom: 24px; }

.auth-social { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.auth-social-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 46px; border-radius: 12px; border: 1.5px solid #e5e7eb;
    background: #fff; color: #111827; font-size: 14px; font-weight: 600; transition: border-color .15s ease, background .15s ease, transform .15s ease; }
.auth-social-btn:hover { border-color: color-mix(in srgb, var(--primary) 45%, #e5e7eb); background: #faf9ff; color: #111827; text-decoration: none; transform: translateY(-1px); }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 0 0 18px; color: #9ca3af; font-size: 12px; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: #ececf1; }
.auth-social { margin-bottom: 18px; }

.auth-field { margin-bottom: 16px; }
.auth-field label { font-size: 13px; font-weight: 600; color: #374151; margin-bottom: 6px; display: block; }
.auth-input { position: relative; }
.auth-input > .las:first-child, .auth-input > .lar:first-child { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 18px; color: #9ca3af; pointer-events: none; }
.auth-input .form-control { height: 48px; padding-left: 42px; border-radius: 12px !important; border: 1.5px solid #e5e7eb; background: #fafafc; font-size: 14px; }
.auth-input .form-control:focus { background: #fff; border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 12%, transparent); }
.auth-input .form-control.is-invalid { border-color: #ef4444; }
.auth-input .password-toggle { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: 20px; color: #9ca3af; cursor: pointer; }
.auth-input .password-toggle + .form-control, .auth-input .form-control:has(+ .password-toggle) { padding-right: 44px; }
.auth-error { font-size: 12px; color: #dc2626; margin-top: 4px; display: block; }
.auth-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.auth-link-sm { font-size: 12px; font-weight: 600; color: var(--primary); margin-bottom: 6px; }
.auth-check { font-size: 13px; color: #4b5563; margin: 4px 0 20px; }
.auth-check a { font-weight: 600; }
.auth-submit { height: 50px; border-radius: 12px !important; font-size: 15px; font-weight: 700; box-shadow: 0 10px 24px -10px color-mix(in srgb, var(--primary) 70%, transparent); }
.auth-switch { margin: 22px 0 0; text-align: center; font-size: 14px; color: #6b7280; }
.auth-switch a { font-weight: 700; color: var(--primary); margin-left: 4px; }

/* Tablet y móvil: el panel de marca se convierte en una cabecera compacta */
@media (max-width: 991px) {
    .auth-shell { grid-template-columns: 1fr; max-width: 520px; }
    .auth-brand { padding: 22px 24px; }
    .auth-brand-body { padding: 14px 0 0; margin: 0; }
    .auth-brand-kicker, .auth-brand-list, .auth-brand-circle.c1 { display: none; }
    .auth-brand-title { font-size: 22px; margin-bottom: 4px; }
    .auth-brand-text { font-size: 13px; margin-bottom: 0; }
    .auth-brand-logo img { height: 30px; }
    .auth-form { padding: 28px 24px 30px; }
    .auth-back { display: none; }
}
@media (max-width: 575px) {
    .auth-page { padding: 0; align-items: stretch; background: #fff; }
    .auth-shell { border-radius: 0; box-shadow: none; min-height: 100vh; align-content: start; }
    .auth-title { font-size: 24px; }
    .auth-row { grid-template-columns: 1fr; gap: 0; }
    .auth-input .form-control { font-size: 16px; } /* evita el zoom automático en iPhone */
}
