/* ── Auth pages — GASA design system ───────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body.auth-body {
    margin: 0;
    font-family: 'Inter', ui-sans-serif, sans-serif;
    background: #192A4E;
}

/* ── Split layout ───────────────────────────────────────── */
.auth-split {
    display: flex;
    min-height: 100vh;
}

/* ── Left brand panel ───────────────────────────────────── */
.auth-brand-panel {
    width: 420px;
    flex-shrink: 0;
    background: #192A4E;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 48px 44px;
    position: relative;
    overflow: hidden;
}

.auth-brand-panel::before {
    content: '';
    position: absolute;
    top: -120px;
    right: -120px;
    width: 380px;
    height: 380px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(67,97,238,0.18) 0%, transparent 70%);
    pointer-events: none;
}

.auth-brand-panel::after {
    content: '';
    position: absolute;
    bottom: -80px;
    left: -80px;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(67,97,238,0.12) 0%, transparent 70%);
    pointer-events: none;
}

/* Logo */
.auth-logo-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.auth-logo-mark {
    width: 42px;
    height: 42px;
    background: #4361EE;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.auth-logo-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.3px;
}

/* Brand body */
.auth-brand-body {
    position: relative;
    z-index: 1;
}

.auth-brand-title {
    font-size: 1.65rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.25;
    margin: 0 0 14px;
}

.auth-brand-desc {
    color: rgba(255,255,255,0.55);
    font-size: 0.9rem;
    line-height: 1.65;
    margin: 0 0 32px;
}

.auth-brand-badges {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.auth-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255,255,255,0.7);
    font-size: 0.85rem;
    font-weight: 500;
}

.auth-badge svg {
    color: #4361EE;
    flex-shrink: 0;
}

/* Footer */
.auth-brand-footer {
    color: rgba(255,255,255,0.28);
    font-size: 0.75rem;
    position: relative;
    z-index: 1;
}

/* ── Right form panel ────────────────────────────────────── */
.auth-form-panel {
    flex: 1;
    background: #F5F6FA;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
}

.auth-form-card {
    background: #fff;
    border-radius: 20px;
    padding: 44px 48px;
    width: 100%;
    max-width: 460px;
    box-shadow: 0 4px 40px rgba(0,0,0,0.07);
}

/* ── Form elements inside card ───────────────────────────── */

/* Page title (h1 rendered by Identity UI) */
.auth-form-card h1 {
    font-size: 1.45rem;
    font-weight: 700;
    color: #1E293B;
    margin: 0 0 6px;
    line-height: 1.2;
}

/* Subtitle / secondary text */
.auth-form-card h2 {
    font-size: 1rem;
    font-weight: 600;
    color: #1E293B;
    margin: 24px 0 12px;
}

/* Intro paragraph */
.auth-form-card > section > p:first-of-type,
.auth-form-card .sub-text {
    color: #64748B;
    font-size: 0.875rem;
    margin: 0 0 28px;
}

/* Labels */
.auth-form-card label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 5px;
}

/* Text inputs */
.auth-form-card .form-control {
    border: 1.5px solid #E2E8F0;
    border-radius: 9px;
    padding: 10px 14px;
    font-size: 0.875rem;
    color: #1E293B;
    background: #FAFBFC;
    height: auto;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.auth-form-card .form-control:focus {
    border-color: #4361EE;
    box-shadow: 0 0 0 3px rgba(67,97,238,0.1);
    background: #fff;
    outline: none;
}

/* Floating label adjustments */
.auth-form-card .form-floating {
    margin-bottom: 14px;
}

.auth-form-card .form-floating > .form-control {
    padding-top: 20px;
    padding-bottom: 6px;
}

.auth-form-card .form-floating > label {
    font-size: 0.8rem;
    color: #94A3B8;
    font-weight: 500;
    padding: 0.65rem 0.875rem;
}

.auth-form-card .form-floating > .form-control:focus ~ label,
.auth-form-card .form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: #4361EE;
    font-size: 0.72rem;
}

/* Non-floating mb-3 groups */
.auth-form-card .mb-3 {
    margin-bottom: 14px !important;
}

/* Primary button */
.auth-form-card .btn-primary,
.auth-form-card .btn-lg.btn-primary {
    background: #4361EE;
    border-color: #4361EE;
    border-radius: 9px;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 12px 24px;
    letter-spacing: 0.1px;
    transition: background 0.15s, box-shadow 0.15s;
}

.auth-form-card .btn-primary:hover,
.auth-form-card .btn-lg.btn-primary:hover {
    background: #3451DE;
    border-color: #3451DE;
    box-shadow: 0 4px 12px rgba(67,97,238,0.3);
}

.auth-form-card .btn-primary:active {
    background: #2C43CC;
    border-color: #2C43CC;
}

/* Links */
.auth-form-card a {
    color: #4361EE;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.12s;
}

.auth-form-card a:hover {
    color: #3451DE;
    text-decoration: underline;
}

.auth-form-card p {
    font-size: 0.875rem;
    color: #64748B;
    margin-bottom: 6px;
}

/* Validation */
.auth-form-card .text-danger {
    font-size: 0.78rem !important;
    color: #E11D48 !important;
    margin-top: 4px;
    display: block;
}

/* Summary sin errores: oculto */
.auth-form-card .validation-summary-valid {
    display: none !important;
}

/* Summary con errores: caja destacada */
.auth-form-card .validation-summary-errors {
    background: #FFF1F2;
    border: 1px solid #FECDD3;
    border-radius: 9px;
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 0.875rem;
    color: #E11D48;
}

.auth-form-card .validation-summary-errors ul {
    margin: 0;
    padding-left: 18px;
}

.auth-form-card .validation-summary-errors li {
    list-style: disc;
}

/* Bootstrap grid override — make single-column */
.auth-form-card .row {
    --bs-gutter-x: 0;
    --bs-gutter-y: 0;
    margin: 0;
}

.auth-form-card .col-md-4 {
    width: 100%;
    max-width: 100%;
    flex: 0 0 100%;
    padding: 0;
}

.auth-form-card .col-md-6 {
    width: 100%;
    max-width: 100%;
    flex: 0 0 100%;
    padding: 0;
}

/* Checkbox */
.auth-form-card .form-check-input {
    border-color: #CBD5E1;
    border-radius: 4px;
}

.auth-form-card .form-check-input:checked {
    background-color: #4361EE;
    border-color: #4361EE;
}

.auth-form-card .form-check-label {
    font-size: 0.85rem;
    color: #64748B;
    font-weight: 400;
}

/* Divider for external logins section */
.auth-form-card hr {
    border-color: #F1F5F9;
    margin: 24px 0;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 900px) {
    .auth-brand-panel {
        width: 300px;
        padding: 36px 28px;
    }
    .auth-brand-title { font-size: 1.35rem; }
    .auth-form-card { padding: 36px 32px; }
}

@media (max-width: 680px) {
    .auth-brand-panel { display: none; }
    .auth-form-panel { background: #fff; padding: 0; align-items: stretch; }
    .auth-form-card {
        border-radius: 0;
        box-shadow: none;
        padding: 40px 24px;
        max-width: 100%;
    }
}
