:root {
    --login-primary: #2c7be5;
    --login-primary-dark: #1a68d1;
}

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    margin: 0;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

.login-page-body {
    min-height: 100vh;
}

.login-page-body.login-mode-dynamic {
    background: #f4f7fb;
}

.login-wrapper {
    min-height: 100vh;
    display: flex;
}

.login-left {
    width: 45%;
    background: linear-gradient(145deg, #1a3a6e 0%, var(--login-primary) 60%, var(--login-primary-dark) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2.5rem;
    position: relative;
    overflow: hidden;
    color: #fff;
}

.login-left::before {
    content: '';
    position: absolute;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    top: -80px;
    right: -80px;
}

.login-left::after {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    bottom: -60px;
    left: -60px;
}

.brand-logo-wrap {
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-radius: 20px;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(6px);
    position: relative;
    z-index: 1;
}

.brand-logo-image {
    width: 64px;
    height: 64px;
    object-fit: contain;
    border-radius: 12px;
}

.brand-title {
    font-size: 1.9rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    margin-bottom: 0.4rem;
    text-align: center;
    position: relative;
    z-index: 1;
}

.brand-subtitle {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.78);
    text-align: center;
    max-width: 320px;
    line-height: 1.6;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.stats-strip {
    display: flex;
    gap: 1.2rem;
    width: 100%;
    max-width: 340px;
    margin-top: 0.5rem;
    position: relative;
    z-index: 1;
}

.stat-pill {
    flex: 1;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 0.8rem 0.6rem;
    text-align: center;
    backdrop-filter: blur(4px);
}

.stat-pill .num {
    font-size: 1.35rem;
    font-weight: 700;
    display: block;
}

.stat-pill .lbl {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.75);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 2rem 0 0;
    width: 100%;
    max-width: 340px;
    position: relative;
    z-index: 1;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 0.65rem;
}

.feature-list li i {
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.login-right {
    flex: 1;
    background: #f4f7fb;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
}

.login-card,
.standard-login-card {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 8px 40px rgba(44, 123, 229, 0.1);
    padding: 2.5rem 2.4rem;
    width: 100%;
    max-width: 430px;
}

.login-card-header {
    margin-bottom: 2rem;
}

.login-card-header h2,
.standard-login-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e3a5f;
    margin-bottom: 0.3rem;
}

.login-card-header p,
.standard-login-subtitle {
    font-size: 0.875rem;
    color: #6c757d;
    margin: 0;
}

.form-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #344563;
    margin-bottom: 0.35rem;
}

.input-wrap {
    position: relative;
    margin-bottom: 1.1rem;
}

.login-input {
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.65rem 1rem 0.65rem 2.6rem;
    font-size: 0.9rem;
    width: 100%;
    background: #f8fafc;
    color: #1e3a5f;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.login-input:focus {
    border-color: var(--login-primary);
    box-shadow: 0 0 0 3px rgba(44, 123, 229, 0.12);
    background: #fff;
}

.login-input.is-invalid {
    border-color: #dc3545;
}

.input-icon {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: #a0aec0;
    font-size: 0.95rem;
    pointer-events: none;
}

.password-toggle {
    position: absolute;
    right: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: 0;
    color: #a0aec0;
    cursor: pointer;
    font-size: 0.95rem;
    padding: 0;
    line-height: 1;
}

.password-toggle:hover {
    color: var(--login-primary);
}

.login-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.4rem;
}

.login-meta label {
    font-size: 0.83rem;
    color: #4a5568;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.login-meta a {
    font-size: 0.83rem;
    color: var(--login-primary);
    text-decoration: none;
    font-weight: 500;
}

.login-meta a:hover {
    text-decoration: underline;
}

.remember-checkbox {
    accent-color: var(--login-primary);
    width: 15px;
    height: 15px;
}

.btn-login {
    width: 100%;
    background: linear-gradient(90deg, var(--login-primary) 0%, var(--login-primary-dark) 100%);
    color: #fff;
    border: 0;
    border-radius: 10px;
    padding: 0.75rem;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
}

.btn-login:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

.btn-login:active {
    transform: translateY(0);
}

.login-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.5rem 0 1.2rem;
    color: #cbd5e0;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

.login-footer-note {
    text-align: center;
    font-size: 0.78rem;
    color: #a0aec0;
    margin-top: 1.5rem;
}

.field-error {
    font-size: 0.78rem;
    color: #dc3545;
    margin-top: 0.3rem;
}

.login-alert {
    border-radius: 10px;
    padding: 0.7rem 1rem;
    font-size: 0.85rem;
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.login-alert-success {
    background: #d1e7dd;
    color: #0f5132;
}

.login-alert-error {
    background: #fff5f5;
    color: #c53030;
    border: 1px solid #fed7d7;
}

.standard-login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: radial-gradient(circle at top right, #e9f2ff 0%, #f5f8fe 48%, #eef3ff 100%);
}

.standard-login-logo {
    width: 72px;
    height: 72px;
    object-fit: contain;
    margin-bottom: 0.8rem;
    border-radius: 14px;
}

.standard-login-title,
.standard-login-subtitle {
    text-align: center;
}

.standard-login-title {
    margin-bottom: 0.3rem;
}

.standard-login-subtitle {
    margin-bottom: 1.6rem;
}

@media (max-width: 767px) {
    .login-left {
        display: none;
    }

    .login-right {
        background: #fff;
    }

    .login-card,
    .standard-login-card {
        box-shadow: none;
        padding: 1.5rem 1rem;
    }
}
