/*
==========================================================================
LMS - Login Page Styles
==========================================================================
*/

/* ========================================
   CSS Variables - Dark Theme (Default)
======================================== */
:root, [data-theme="dark"] {
    --bg-primary: #1c1c1e;
    --bg-secondary: #232325;
    --bg-card: #2c2c2e;
    --bg-card-hover: #343436;
    --accent-copper: #b87333;
    --accent-copper-light: #c9845a;
    --accent-gradient: linear-gradient(135deg, #b87333 0%, #d4945a 50%, #c9845a 100%);
    --accent-gradient-hover: linear-gradient(135deg, #c9845a 0%, #daa57a 50%, #d4945a 100%);
    --text-primary: #f5f0e8;
    --text-secondary: #a8a8a8;
    --text-muted: #6e6e6e;
    --gain: #6b8e6b;
    --loss: #c27878;
    --border: #3a3a3c;
    --shadow: rgba(0, 0, 0, 0.3);
    --chart-grid: rgba(255, 255, 255, 0.05);
    --overlay: rgba(0, 0, 0, 0.5);
}

/* ========================================
   CSS Variables - Light Theme
======================================== */
[data-theme="light"] {
    --bg-primary: #f5f5f7;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f0f0f2;
    --accent-copper: #d4945a;
    --accent-copper-light: #e8b88a;
    --accent-gradient: linear-gradient(135deg, #d4945a 0%, #e8b88a 50%, #f0c89a 100%);
    --accent-gradient-hover: linear-gradient(135deg, #e8b88a 0%, #f0c89a 50%, #f5d4a8 100%);
    --text-primary: #1c1c1e;
    --text-secondary: #6e6e6e;
    --text-muted: #9a9a9a;
    --gain: #5a9a5a;
    --loss: #c76b6b;
    --border: #e0e0e2;
    --shadow: rgba(0, 0, 0, 0.08);
    --chart-grid: rgba(0, 0, 0, 0.05);
    --overlay: rgba(0, 0, 0, 0.5);
}

body.auth-page {
    display: flex;
}

/* ========================================
   Auth Branding (Left Side)
======================================== */
.auth-branding {
    flex: 1;
    background: var(--accent-gradient);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px;
    position: relative;
    overflow: hidden;
}

.auth-branding::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 70%, rgba(255,255,255,0.1) 0%, transparent 50%);
    animation: float 15s ease-in-out infinite;
}

.auth-branding::after {
    content: '';
    position: absolute;
    bottom: -30%;
    right: -30%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 70% 30%, rgba(0,0,0,0.1) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(30px, 30px) rotate(5deg); }
}

.branding-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: #1c1c1e;
}

.branding-logo {
    width: 80px;
    height: 80px;
    background-color: rgba(28, 28, 30, 0.2);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 700;
    margin: 0 auto 24px;
    backdrop-filter: blur(10px);
}

.branding-title {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 16px;
}

.branding-subtitle {
    font-size: 18px;
    opacity: 0.8;
    max-width: 400px;
    margin: 0 auto 48px;
}

.branding-features {
    display: flex;
    flex-direction: column;
    gap: 16px;
    text-align: left;
}

.branding-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
}

.feature-icon {
    width: 32px;
    height: 32px;
    background-color: rgba(28, 28, 30, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========================================
   Auth Form Container (Right Side)
======================================== */
.auth-form-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px;
    position: relative;
    background-color: var(--bg-secondary);
}

.theme-toggle-btn {
    position: absolute;
    top: 32px;
    right: 32px;
    width: 46px;
    height: 46px;
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
    background-color: var(--bg-card-hover);
    border-color: var(--accent-copper);
}

.theme-toggle-btn svg {
    stroke: var(--text-secondary);
}

.auth-form-wrapper {
    width: 100%;
    max-width: 420px;
}

.form-header {
    text-align: center;
    margin-bottom: 40px;
}

.form-header h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.form-header p {
    font-size: 16px;
    color: var(--text-secondary);
}

/* ========================================
   Auth Tabs
======================================== */
.auth-tabs {
    display: flex;
    background-color: var(--bg-card);
    border-radius: 12px;
    padding: 6px;
    margin-bottom: 32px;
}

.auth-tab {
    flex: 1;
    padding: 14px;
    border: none;
    background: none;
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.auth-tab:hover {
    color: var(--text-primary);
}

.auth-tab.active {
    background: var(--accent-gradient);
    color: #1c1c1e;
}

/* ========================================
   Auth Form
======================================== */
.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-input-wrapper {
    position: relative;
}

.auth-form .form-input {
    width: 100%;
    padding: 16px 16px 16px 50px;
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.auth-form .form-input:focus {
    outline: none;
    border-color: var(--accent-copper);
    box-shadow: 0 0 0 3px rgba(184, 115, 51, 0.15);
}

.input-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.password-toggle {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px;
    transition: color 0.2s ease;
}

.password-toggle:hover {
    color: var(--accent-copper);
}

.form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

/* ========================================
   Checkbox
======================================== */
.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.checkbox.checked {
    background: var(--accent-gradient);
    border-color: var(--accent-copper);
}

.checkbox svg {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.checkbox.checked svg {
    opacity: 1;
}

.checkbox-label {
    font-size: 14px;
    color: var(--text-secondary);
}

.forgot-link {
    font-size: 14px;
    color: var(--accent-copper);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.forgot-link:hover {
    color: var(--accent-copper-light);
}

/* ========================================
   Submit Button
======================================== */
.submit-btn {
    width: 100%;
    padding: 16px;
    background: var(--accent-gradient);
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    color: #1c1c1e;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 24px;
}

.submit-btn:hover {
    background: var(--accent-gradient-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(184, 115, 51, 0.3);
}

/* ========================================
   Divider
======================================== */
.divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.divider-line {
    flex: 1;
    height: 1px;
    background-color: var(--border);
}

.divider-text {
    font-size: 14px;
    color: var(--text-muted);
}

/* ========================================
   Social Buttons
======================================== */
.social-buttons {
    display: flex;
    gap: 16px;
    margin-bottom: 32px;
}

.social-btn {
    flex: 1;
    padding: 14px;
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 500;
    font-family: inherit;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.social-btn:hover {
    background-color: var(--bg-card-hover);
    border-color: var(--accent-copper);
}

/* ========================================
   Form Footer
======================================== */
.form-footer {
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
}

.form-footer a {
    color: var(--accent-copper);
    text-decoration: none;
    font-weight: 600;
}

.form-footer a:hover {
    color: var(--accent-copper-light);
}

/* ========================================
   Password Strength
======================================== */
.password-strength {
    display: flex;
    gap: 6px;
    margin-top: 12px;
}

.strength-bar {
    flex: 1;
    height: 4px;
    background-color: var(--border);
    border-radius: 2px;
    transition: background-color 0.3s ease;
}

.strength-bar.weak {
    background-color: var(--loss);
}

.strength-bar.medium {
    background-color: #c9a878;
}

.strength-bar.strong {
    background-color: var(--gain);
}

.strength-text {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 8px;
}

/* ========================================
   Success Message
======================================== */
.simple-success {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-secondary);
    padding: 30px 40px;
    border-radius: 16px;
    box-shadow: var(--shadow);
    text-align: center;
    z-index: 9999;
    min-width: 300px;
    border: 2px solid var(--accent-copper);
}

.simple-success.show {
    display: block;
}

.simple-success .icon {
    width: 60px;
    height: 60px;
    background: var(--accent-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
}

.simple-success .icon svg {
    width: 30px;
    height: 30px;
    stroke: #1c1c1e;
}

.simple-success h3 {
    color: var(--text-primary);
    font-size: 22px;
    margin-bottom: 10px;
}

.simple-success p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 20px;
}

.simple-success button {
    background: var(--accent-gradient);
    color: #1c1c1e;
    border: none;
    padding: 10px 25px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.simple-success button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.simple-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--overlay);
    z-index: 9998;
}

.simple-overlay.show {
    display: block;
}

/* ========================================
   Login Copyright
======================================== */
.auth-form-container .copyright {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    border-top: none;
    margin-top: 0;
    padding: 0;
}

/* ========================================
   Responsive
======================================== */
@media (max-width: 1024px) {
    body.auth-page {
        flex-direction: column;
    }

    .auth-branding {
        padding: 40px 24px;
        min-height: auto;
    }

    .branding-title {
        font-size: 32px;
    }

    .branding-features {
        display: none;
    }

    .auth-form-container {
        padding: 40px 24px 80px;
    }

    .theme-toggle-btn {
        top: 16px;
        right: 16px;
    }
}

@media (max-width: 640px) {
    .auth-branding {
        padding: 32px 20px;
    }

    .branding-logo {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }

    .branding-title {
        font-size: 24px;
    }

    .branding-subtitle {
        font-size: 14px;
        margin-bottom: 0;
    }

    .auth-form-container {
        padding: 32px 20px 80px;
    }

    .form-header h1 {
        font-size: 26px;
    }

    .social-buttons {
        flex-direction: column;
    }
}