/* Login Page Layout — locked to viewport on desktop, scrollable on mobile */
html.login-html,
html.login-html body {
    height: 100%;
}

.login-page {
    display: flex;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

/* Left Branding Panel */
.login-branding {
    flex: 1;
    background: var(--gradient-1);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 48px;
}

.branding-content {
    text-align: center;
    color: white;
    position: relative;
    z-index: 1;
}

.branding-logo {
    text-decoration: none;
    display: inline-block;
    margin-bottom: 40px;
}

.branding-logo h1 {
    font-size: 36px;
    font-weight: 800;
}

.branding-logo .logo-leo {
    color: #FFD700;
}

.branding-logo .logo-class {
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: white;
    background-clip: unset;
    color: white;
}

.branding-icon {
    font-size: 80px;
    margin-bottom: 24px;
    animation: roar 2s ease-in-out infinite;
}

.branding-tagline {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 12px;
}

.branding-desc {
    font-size: 16px;
    opacity: 0.85;
    line-height: 1.6;
}

/* Decorative circles */
.branding-decorations {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.decoration-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
}

.circle-1 {
    width: 300px;
    height: 300px;
    top: -80px;
    right: -80px;
}

.circle-2 {
    width: 200px;
    height: 200px;
    bottom: -60px;
    left: -60px;
}

.circle-3 {
    width: 120px;
    height: 120px;
    bottom: 20%;
    right: 10%;
}

/* Right Form Panel */
.login-form-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
    background: var(--bg-white);
    overflow: hidden;
}

.login-form-container {
    width: 100%;
    max-width: 420px;
}

/* Mobile logo - hidden on desktop */
.login-mobile-logo {
    display: none;
    text-align: center;
    margin-bottom: 24px;
}

.login-mobile-logo a {
    text-decoration: none;
}

.login-mobile-logo h1 {
    font-size: 28px;
    font-weight: 800;
}

/* Header */
.login-header {
    margin-bottom: 28px;
}

.login-header h2 {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 6px;
    letter-spacing: -0.02em;
}

.login-header p {
    font-size: 15px;
    color: var(--text-light);
}

/* Form Groups */
.login-form-group {
    margin-bottom: 18px;
}

.login-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.login-form-group input[type="email"],
.login-form-group input[type="password"],
.login-form-group input[type="text"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    transition: var(--transition);
    background: var(--bg-white);
    color: var(--text-dark);
}

.login-form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

.login-form-group input.error {
    border-color: #dc3545;
}

/* Password field wrapper */
.password-input-wrapper {
    position: relative;
}

.password-input-wrapper input {
    padding-right: 48px;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--text-lighter);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle:hover {
    color: var(--text-dark);
}

/* Options row */
.login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-light);
    cursor: pointer;
}

.remember-me input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.forgot-password {
    font-size: 14px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.forgot-password:hover {
    color: var(--primary-dark);
}

/* Submit button */
.login-submit {
    width: 100%;
    padding: 14px 32px;
    font-size: 16px;
}

/* Form message (reuses landing page pattern) */
#loginForm .form-message {
    margin-bottom: 14px;
}

/* Footer links */
.login-footer-links {
    text-align: center;
    margin-top: 20px;
}

.login-footer-links p {
    font-size: 14px;
    color: var(--text-light);
}

.login-footer-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    margin-left: 4px;
    transition: var(--transition);
}

.login-footer-links a:hover {
    color: var(--primary-dark);
}

.login-footer-links a.btn {
    color: #fff;
    margin-left: 0;
}

.login-footer-links a.btn:hover {
    color: #fff;
}

/* Bottom bar with back link and language switcher */
.login-bottom-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.back-to-home {
    font-size: 14px;
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.back-to-home:hover {
    color: var(--primary-color);
}

/* Language switcher on login page — dropdown opens UPWARD */
.login-bottom-bar .lang-dropdown {
    top: auto;
    bottom: calc(100% + 8px);
    right: 0;
    left: auto;
    transform: translateY(8px);
}

.login-bottom-bar .lang-switcher.open .lang-dropdown {
    transform: translateY(0);
}

/* Responsive — tablet / small desktop */
@media (max-width: 968px) {
    .login-page {
        height: auto;
        min-height: 100vh;
        min-height: 100dvh;
        overflow: auto;
    }

    .login-branding {
        display: none;
    }

    .login-form-panel {
        padding: 24px;
    }

    .login-mobile-logo {
        display: block;
    }

    /* Override style.css 968px lang-dropdown rules for login page */
    .login-bottom-bar .lang-dropdown {
        top: auto;
        bottom: calc(100% + 8px);
        left: 50%;
        right: auto;
        transform: translateX(-50%) translateY(8px);
    }

    .login-bottom-bar .lang-switcher.open .lang-dropdown {
        transform: translateX(-50%) translateY(0);
    }
}

/* Reset password success / error icon */
.reset-success-icon {
    margin-bottom: 20px;
}

/* Responsive — mobile */
@media (max-width: 640px) {
    .login-form-panel {
        padding: 20px 20px;
    }

    .login-header h2 {
        font-size: 26px;
    }

    .login-header p {
        font-size: 14px;
    }

    .login-bottom-bar {
        flex-direction: column;
        gap: 12px;
        align-items: center;
        margin-top: 20px;
        padding-top: 16px;
    }
}
