/* Auth portal — split-screen login (operations + config-manager) */
.auth-portal-body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: #f8fafc;
    -webkit-font-smoothing: antialiased;
}

.auth-portal-shell {
    min-height: 100vh;
    display: flex;
    flex-wrap: nowrap;
}

/* ── Left brand panel ── */
.auth-portal-brand {
    flex: 0 0 46%;
    max-width: 46%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 3.5rem;
    position: relative;
    overflow: hidden;
    color: #fff;
}

.auth-portal--operations .auth-portal-brand {
    background: linear-gradient(145deg, #0c4a6e 0%, #1d4ed8 42%, #2563eb 78%, #3b82f6 100%);
}

.auth-portal--config .auth-portal-brand {
    background: linear-gradient(145deg, #0f766e 0%, #0d9488 38%, #14b8a6 72%, #2dd4bf 100%);
}

.auth-portal--customer .auth-portal-brand {
    background: linear-gradient(145deg, #7c2d12 0%, #c2410c 38%, #ea580c 72%, #f97316 100%);
}

.auth-portal--customer .btn-portal-submit {
    background: #ea580c;
    color: #fff;
}

.auth-portal--customer .btn-portal-submit:hover,
.auth-portal--customer .btn-portal-submit:focus {
    background: #c2410c;
    color: #fff;
}

.auth-portal--customer .auth-portal-switch a {
    color: #ea580c;
}

.auth-portal--customer .auth-portal-badge {
    background: rgba(234, 88, 12, 0.12);
    color: #c2410c;
}

.auth-portal--config .auth-portal-brand::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
}

.auth-portal-brand-glow {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.auth-portal-brand-glow--1 {
    width: 380px;
    height: 380px;
    top: -100px;
    right: -80px;
    background: rgba(255, 255, 255, 0.07);
}

.auth-portal-brand-glow--2 {
    width: 260px;
    height: 260px;
    bottom: -70px;
    left: -50px;
    background: rgba(255, 255, 255, 0.05);
}

.auth-portal-brand-inner {
    position: relative;
    z-index: 1;
    max-width: 440px;
    width: 100%;
}

.auth-portal-logo-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 0.85rem;
    padding: 0.65rem 1.1rem;
    margin-bottom: 1.75rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    text-decoration: none;
}

.auth-portal-logo-box img {
    max-height: 52px;
    max-width: 180px;
    object-fit: contain;
}

.auth-portal-company {
    font-size: 2.15rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin: 0 0 0.85rem;
    color: #fff;
    line-height: 1.15;
}

.auth-portal-tagline {
    font-size: 0.975rem;
    line-height: 1.65;
    margin: 0 0 2rem;
    color: rgba(255, 255, 255, 0.88);
    font-weight: 400;
}

.auth-portal-features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.auth-portal-features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 0.65rem;
    font-weight: 500;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.95);
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(4px);
}

.auth-portal-features li i {
    flex-shrink: 0;
    font-size: 1.15rem;
    opacity: 0.95;
}

/* ── Right form panel ── */
.auth-portal-form-wrap {
    flex: 1 1 54%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 2rem;
    background: #fff;
}

.auth-portal-form-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 1rem;
    padding: 2rem 2.25rem 1.75rem;
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.04);
    border: 1px solid #e8edf3;
}

.auth-portal-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 1.25rem;
}

.auth-portal--operations .auth-portal-badge {
    background: #eff6ff;
    color: #2563eb;
}

.auth-portal--config .auth-portal-badge {
    background: #f0fdfa;
    color: #0d9488;
}

.auth-portal-form-title {
    font-size: 1.65rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 0.4rem;
    letter-spacing: -0.02em;
}

.auth-portal-form-sub {
    color: #64748b;
    font-size: 0.9rem;
    margin: 0 0 1.75rem;
    line-height: 1.5;
}

.auth-portal-form-card .form-label {
    font-weight: 600;
    color: #1e293b;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.auth-portal-form-card .form-control {
    border-radius: 0.55rem;
    border-color: #e2e8f0;
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
    font-size: 0.9rem;
}

.auth-portal-form-card .form-control:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.auth-portal--config .auth-portal-form-card .form-control:focus {
    border-color: #5eead4;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.12);
}

.auth-portal-form-card .btn-portal-submit {
    border-radius: 0.55rem;
    padding: 0.75rem 1rem;
    font-weight: 700;
    font-size: 0.95rem;
    border: none;
}

.auth-portal--operations .btn-portal-submit {
    background: #2563eb;
    color: #fff;
}

.auth-portal--operations .btn-portal-submit:hover,
.auth-portal--operations .btn-portal-submit:focus {
    background: #1d4ed8;
    color: #fff;
}

.auth-portal--config .btn-portal-submit {
    background: #0d9488;
    color: #fff;
}

.auth-portal--config .btn-portal-submit:hover,
.auth-portal--config .btn-portal-submit:focus {
    background: #0f766e;
    color: #fff;
}

.auth-portal-switch {
    margin-top: 1.35rem;
    padding-top: 1.15rem;
    border-top: 1px solid #f1f5f9;
    text-align: center;
    font-size: 0.85rem;
    color: #64748b;
}

.auth-portal-switch a {
    font-weight: 700;
    text-decoration: none;
}

.auth-portal--operations .auth-portal-switch a {
    color: #2563eb;
}

.auth-portal--config .auth-portal-switch a {
    color: #0d9488;
}

.auth-portal-copy {
    margin-top: 1.75rem;
    font-size: 0.75rem;
    color: #94a3b8;
    text-align: center;
}

.auth-portal-back {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    text-decoration: none;
    margin-bottom: 1rem;
}

.auth-portal-back:hover {
    color: #2563eb;
}

.auth-portal-alert {
    border-radius: 0.65rem;
    padding: 0.85rem 1rem;
    margin-bottom: 1.25rem;
    font-size: 0.85rem;
    font-weight: 500;
}

.auth-portal-alert--success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.auth-portal-alert--danger {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.auth-portal-alert ul {
    margin: 0.35rem 0 0;
    padding-left: 1.15rem;
}

@media (max-width: 991px) {
    .auth-portal-shell {
        flex-direction: column;
    }

    .auth-portal-brand {
        flex: none;
        max-width: 100%;
        min-height: auto;
        padding: 2.5rem 1.75rem;
    }

    .auth-portal-form-wrap {
        padding: 2rem 1.25rem 2.5rem;
    }

    .auth-portal-company {
        font-size: 1.65rem;
    }

    .auth-portal-features li {
        font-size: 0.8rem;
        padding: 0.6rem 0.85rem;
    }
}

@media (max-width: 575px) {
    .auth-portal-form-card {
        padding: 1.5rem 1.25rem 1.25rem;
        box-shadow: none;
        border: none;
    }
}
