﻿/* Override body/layout for full-viewport login */
body {
    background: var(--body-bg);
}

/* Hide sidebar space — login is full screen */
.app-main-full {
    padding-top: 0 !important;
}

/* ---- Full-viewport two-column layout ---- */
.login-page {
    display: flex;
    min-height: 100vh;
}

/* === LEFT PANEL === */
.login-left {
    flex: 0 0 48%;
    background: linear-gradient(145deg, var(--brand-700) 0%, var(--brand-500) 55%, var(--brand-300) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
    position: relative;
    overflow: hidden;
}

    /* Decorative circles */
    .login-left::before {
        content: '';
        position: absolute;
        width: 420px;
        height: 420px;
        border-radius: 50%;
        border: 60px solid rgba(255,255,255,.06);
        top: -120px;
        right: -120px;
    }

    .login-left::after {
        content: '';
        position: absolute;
        width: 280px;
        height: 280px;
        border-radius: 50%;
        border: 40px solid rgba(255,255,255,.06);
        bottom: -60px;
        left: -60px;
    }

.login-left-inner {
    position: relative;
    z-index: 1;
    max-width: 420px;
    width: 100%;
}

/* Brand */
.login-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 64px;
}

.login-brand-icon {
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #fff;
    backdrop-filter: blur(6px);
}

.login-brand-name {
    font-size: 1.25rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -.02em;
}

/* Hero text */
.login-hero-title {
    font-size: 2.1rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
    letter-spacing: -.03em;
    margin-bottom: 16px;
}

.login-hero-sub {
    font-size: .95rem;
    color: rgba(255,255,255,.75);
    line-height: 1.7;
    margin-bottom: 48px;
}

/* Feature list */
.login-features {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.lf-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.lf-icon {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    background: rgba(255,255,255,.15);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    color: #fff;
}

.lf-title {
    font-size: .88rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 2px;
}

.lf-desc {
    font-size: .78rem;
    color: rgba(255,255,255,.65);
    line-height: 1.5;
}

/* === RIGHT PANEL === */
.login-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 32px;
    background: var(--body-bg);
}

.login-card {
    width: 100%;
    max-width: 420px;
}

.login-card-header {
    margin-bottom: 32px;
}

.login-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-900);
    margin: 0 0 6px;
    letter-spacing: -.02em;
}

.login-subtitle {
    font-size: .875rem;
    color: var(--text-500);
    margin: 0;
}

/* Form groups */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 24px;
}

.lf-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .82rem;
    font-weight: 700;
    color: var(--text-700);
}

    .form-label i {
        color: var(--brand-400);
        font-size: 14px;
    }

.lf-optional {
    font-size: .72rem;
    font-weight: 500;
    color: var(--text-300);
    margin-left: 4px;
}

.form-control, .form-select {
    height: 44px;
    font-size: .9rem;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border);
    transition: border-color .18s, box-shadow .18s;
}

    .form-control:focus, .form-select:focus {
        border-color: var(--brand-400);
        box-shadow: 0 0 0 3px rgba(99,102,241,.12);
    }

/* Submit button */
.login-submit {
    height: 46px;
    font-size: .95rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--brand-600), var(--brand-400));
    border: none;
    box-shadow: 0 4px 16px rgba(99,102,241,.35);
    transition: opacity .18s, box-shadow .18s, transform .18s;
    margin-top: 4px;
}

    .login-submit:hover {
        opacity: .93;
        box-shadow: 0 6px 22px rgba(99,102,241,.45);
        transform: translateY(-1px);
    }

    .login-submit:active {
        transform: translateY(0);
    }

/* Footer note */
.login-card-footer {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: .78rem;
    color: var(--text-300);
    padding: 14px 0 0;
    border-top: 1px solid var(--border-light);
}

    .login-card-footer i {
        color: var(--brand-300);
        font-size: 14px;
    }

/* =============================================
   === RESPONSIVE BREAKPOINTS ===
   ============================================= */

/* --- Tablet landscape (max 1024px): shrink left panel --- */
@media (max-width: 1024px) {
    .login-left {
        flex: 0 0 42%;
        padding: 36px 32px;
    }

    .login-hero-title {
        font-size: 1.75rem;
    }

    .login-brand {
        margin-bottom: 40px;
    }

    .login-hero-sub {
        margin-bottom: 32px;
    }
}

/* --- Tablet portrait (max 900px): stack layout vertically --- */
@media (max-width: 900px) {
    .login-page {
        flex-direction: column;
        min-height: 100vh;
    }

    .login-left {
        flex: 0 0 auto;
        padding: 36px 24px 40px;
        /* Compact banner on top */
    }

    .login-left-inner {
        max-width: 100%;
    }

    /* Hide feature list on tablets — keep hero + brand */
    .login-features {
        display: none;
    }

    .login-brand {
        margin-bottom: 24px;
        margin-top: 20px;
    }

    .login-hero-title {
        font-size: 1.6rem;
    }

    .login-hero-sub {
        font-size: .875rem;
        margin-bottom: 0;
    }

    .login-right {
        flex: 1;
        padding: 40px 24px;
        align-items: flex-start;
    }

    .login-card {
        max-width: 480px;
        margin: 0 auto;
    }
}

/* --- Mobile (max 600px): tighten spacing --- */
@media (max-width: 600px) {
    .login-left {
        padding: 28px 20px 32px;
    }

    .login-hero-title {
        font-size: 1.35rem;
    }

    .login-hero-sub {
        font-size: .82rem;
    }

    .login-right {
        padding: 28px 16px;
    }

    .login-card-header {
        margin-bottom: 20px;
    }

    .login-title {
        font-size: 1.45rem;
    }

    .form-control,
    .form-select {
        height: 42px;
        font-size: .875rem;
    }

    .login-submit {
        height: 44px;
        font-size: .9rem;
    }
}

/* --- Small mobile (max 400px) --- */
@media (max-width: 400px) {
    .login-left {
        padding: 20px 16px 24px;
    }

    .login-brand-name {
        font-size: 1.05rem;
    }

    .login-hero-title {
        font-size: 1.2rem;
    }

    .login-right {
        padding: 20px 12px;
    }

    .login-form {
        gap: 14px;
    }
}
