/* IgleSoft Auth Shell (extraído de SitioWebAuth.Master para caché HTTP) */
:root {
    --auth-primary: #4338CA;
    --auth-primary-dark: #3730A3;
    --auth-accent: #FBBF24;
    --auth-success: #047857;
    --auth-warning: #B45309;
    --auth-danger: #B91C1C;
    --auth-text: #0F172A;
    --auth-text-soft: #475569;
    --auth-text-muted: #64748B;
    --auth-border: #E2E8F0;
    --auth-bg: #F6F7FB;
    --auth-bg-card: #FFFFFF;
}

html, body { height: auto; min-height: 100vh; margin: 0; overflow-x: clip; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--auth-text);
    background: var(--auth-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ═══ NAVBAR MÍNIMO ═══ */
.auth-navbar {
    background: #fff;
    border-bottom: 1px solid var(--auth-border);
    padding: calc(10px + env(safe-area-inset-top)) 20px 10px;
}
.auth-navbar-inner {
    max-width: 1240px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.auth-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none !important;
    color: var(--auth-text);
    min-height: 44px;
}
.auth-brand:hover { color: var(--auth-text); }
.auth-brand-logo {
    width: 32px; height: 32px;
    border-radius: 9px;
    background: transparent;
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 15px;
}
.auth-brand-text {
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -0.02em;
}
.auth-brand-text span { color: var(--auth-primary); }
.auth-back-link {
    font-size: 13.5px;
    color: var(--auth-text-soft);
    text-decoration: none;
    transition: color .15s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 44px;
    padding: 0 6px;
}
.auth-back-link:hover { color: var(--auth-text); text-decoration: none; }

/* ═══ MAIN ═══ */
.auth-main {
    min-height: calc(100vh - 140px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
    background:
        radial-gradient(circle at 15% 0%, rgba(67, 56, 202, 0.07), transparent 50%),
        radial-gradient(circle at 85% 100%, rgba(251, 191, 36, 0.08), transparent 50%);
}

/* ═══ FOOTER MÍNIMO ═══ */
.auth-footer {
    text-align: center;
    padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
    color: var(--auth-text-muted);
    font-size: 12.5px;
    border-top: 1px solid var(--auth-border);
    background: #fff;
}
.auth-footer a {
    color: var(--auth-text-soft);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 8px;
}
.auth-footer a:hover { color: var(--auth-text); text-decoration: none; }

/* ═══ CARD COMPARTIDA ═══ */
.auth-card {
    width: 100%;
    max-width: 460px;
    background: var(--auth-bg-card);
    border: 1px solid var(--auth-border);
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
    overflow: hidden;
}
.auth-card-head { padding: 32px 32px 0; text-align: center; }
.auth-icon {
    width: 64px; height: 64px;
    border-radius: 18px;
    margin: 0 auto 18px;
    display: flex; align-items: center; justify-content: center;
    font-size: 30px;
    color: #fff;
}
.auth-icon-primary  { background: linear-gradient(135deg, #4338CA, #6366F1); }
.auth-icon-success  { background: linear-gradient(135deg, #10b981, #059669); }
.auth-icon-warning  { background: linear-gradient(135deg, #f59e0b, #d97706); }
.auth-icon-error    { background: linear-gradient(135deg, #ef4444, #dc2626); }
.auth-icon-info     { background: linear-gradient(135deg, #3b82f6, #2563eb); }

.auth-title {
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    font-size: 24px;
    font-weight: 800;
    color: var(--auth-text);
    margin: 0 0 8px;
    letter-spacing: -0.4px;
}
.auth-subtitle {
    font-size: 14px;
    color: var(--auth-text-soft);
    margin: 0 0 24px;
    line-height: 1.55;
}
.auth-body { padding: 0 32px 32px; }

/* Form (16px para prevenir auto-zoom iOS Safari) */
.auth-form .form-label {
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
}
.auth-form .form-control {
    height: 48px;
    border-radius: 12px;
    border: 1px solid #cbd5e1;
    font-size: 16px;
    padding: 8px 14px;
    touch-action: manipulation;
}
.auth-form .form-control:focus {
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 4px rgba(67, 56, 202, 0.14);
}
.auth-form .form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
}
.auth-form .form-check-input {
    width: 20px;
    height: 20px;
    margin-top: 0;
    accent-color: var(--auth-primary);
}
.auth-hint {
    font-size: 12px;
    color: var(--auth-text-soft);
    margin-top: 4px;
    line-height: 1.5;
}

/* Botones */
.auth-btn {
    width: 100%;
    min-height: 50px;
    padding: 13px 16px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    border: none !important;
    cursor: pointer;
    transition: transform .08s, box-shadow .15s, background .15s;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #fff !important;
    touch-action: manipulation;
}
.auth-btn:active { transform: translateY(1px); }
.auth-btn:disabled, .auth-btn.disabled { opacity: 0.5; cursor: not-allowed; }
.auth-btn-primary { background: var(--auth-primary) !important; }
.auth-btn-primary:hover { background: var(--auth-primary-dark) !important; box-shadow: 0 6px 18px rgba(67, 56, 202, 0.3); color: #fff !important; }
.auth-btn-success { background: #047857 !important; }
.auth-btn-success:hover { background: #065F46 !important; box-shadow: 0 6px 18px rgba(4, 120, 87, 0.3); color: #fff !important; }
.auth-btn-warning { background: linear-gradient(135deg, #f59e0b, #d97706) !important; }
.auth-btn-warning:hover { box-shadow: 0 6px 18px rgba(245, 158, 11, 0.35); color: #fff !important; }
.auth-btn-ghost { background: #fff !important; color: var(--auth-text-soft) !important; border: 1px solid var(--auth-border) !important; }
.auth-btn-ghost:hover { background: var(--auth-bg) !important; color: var(--auth-text) !important; }

/* Alerts inline */
.auth-alert {
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 13px;
    margin-bottom: 16px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.5;
}
.auth-alert i { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.auth-alert.is-error   { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.auth-alert.is-info    { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }
.auth-alert.is-warning { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.auth-alert.is-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }

/* Info box */
.auth-info-box {
    background: var(--auth-bg);
    border: 1px solid var(--auth-border);
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 20px;
}
.auth-info-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    padding: 4px 0;
    gap: 12px;
}
.auth-info-row + .auth-info-row { border-top: 1px dashed var(--auth-border); }
.auth-info-label { color: var(--auth-text-soft); }
.auth-info-value { color: var(--auth-text); font-weight: 600; text-align: right; word-break: break-word; }

/* Badge */
.auth-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 500;
}
.auth-badge-pendiente { background: #fef3c7; color: #92400e; }
.auth-badge-aprobada  { background: #dcfce7; color: #166534; }
.auth-badge-rechazada { background: #fee2e2; color: #991b1b; }

/* Indicador de fuerza de contraseña */
.auth-strength { height: 5px; background: #e2e8f0; border-radius: 3px; margin-top: 8px; overflow: hidden; }
.auth-strength-bar { height: 100%; width: 0; transition: width .25s, background-color .25s; background: #ef4444; }

/* Footer links de la card */
.auth-card-footer {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--auth-border);
    text-align: center;
    font-size: 13.5px;
    color: var(--auth-text-soft);
}
.auth-card-footer a {
    color: var(--auth-primary);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 4px;
}
.auth-card-footer a:hover { text-decoration: underline; }
.auth-card-footer-divider { margin: 4px 0; }

@media (max-width: 575.98px) {
    .auth-card-head { padding: 24px 20px 0; }
    .auth-body { padding: 0 20px 24px; }
    .auth-main { padding: 20px 12px; }
}

input.form-control, textarea.form-control, select.form-control { box-shadow: none; }
