/* ========================================
   eLMS Login Page - Modern Split Design
   Updated: 2026-02-24
   ======================================== */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap");

/* Root Variables */
:root {
    --primary-color: #0D47A1;
    --primary-dark: #0a3475;
    --primary-light: #1565c0;
    --purple-gradient-start: #7c3aed;
    --purple-gradient-end: #4f46e5;
    --bg-main: #f8fafc;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --success-color: #10b981;
}

* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
    background: #ffffff;
    min-height: 100vh;
}

/* Main Container */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    position: relative;
    overflow: hidden;
}

.login-wrapper {
    display: grid;
    grid-template-columns: 1.75fr 0.85fr;
    width: 100vw;
    max-width: none;
    height: 100vh;
    background: white;
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
    position: relative;
    z-index: 1;
}

/* Left Side - Visual Section (Now on left) */
.login-visual-section {
    background: url('../images/login-bg.jpg') center center/cover no-repeat;
    padding: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    border-right: 1px solid rgba(0, 0, 0, 0.08);
}

/* Right Side - Form Section (Now on right, more compact) */
.login-form-section {
    padding: 1.75rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-height: 100vh;
    overflow-y: auto;
}

.login-form-content {
    max-width: 340px;
    margin: 0 auto;
    width: 100%;
}

/* Logo */
.login-logo {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin-bottom: 1.5rem;
}

.logo-text {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Header */
.login-header {
    margin-bottom: 1.25rem;
}

.login-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    letter-spacing: -0.5px;
}

.login-subtitle {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin: 0;
}

.register-link {
    color: var(--primary-color);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
}

.register-link:hover {
    color: var(--primary-dark);
}

/* Form Styling */
.login-form {
    margin-bottom: 1.25rem;
}

.form-field {
    margin-bottom: 0.875rem;
}

.form-field label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.375rem;
}

.form-field input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
    color: var(--text-primary);
    background: white;
    border: 1.5px solid var(--border-color);
    border-radius: 6px;
    outline: none;
    transition: all 0.2s;
}

.form-field input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(13, 71, 161, 0.1);
}

.form-field input::placeholder {
    color: var(--text-muted);
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    cursor: pointer;
    margin: 0;
}

.checkbox-wrapper input[type="checkbox"] {
    width: 14px;
    height: 14px;
    cursor: pointer;
}

.checkbox-label {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.forgot-password {
    font-size: 0.8125rem;
    color: var(--primary-color);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
}

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

/* Buttons */
.btn-sign-in {
    display: block;
    width: auto;
    padding: 0.55rem 1.5rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: white;
    background: var(--primary-color);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    margin: 0 auto 0.875rem;
}

.btn-sign-in:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(13, 71, 161, 0.3);
}

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

/* Divider */
.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1rem 0;
    color: var(--text-muted);
    font-size: 0.6875rem;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

.divider span {
    padding: 0 1rem;
}

/* Alternative Actions */
.alternative-actions {
    display: flex;
    gap: 0.625rem;
    margin-bottom: 1.25rem;
}

.btn-guest,
.btn-admin {
    flex: 1;
    padding: 0.625rem 0.875rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-primary);
    background: white;
    border: 1.5px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-guest:hover,
.btn-admin:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(13, 71, 161, 0.04);
}

/* Dropdown */
.dropdown-menu {
    border: 1.5px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    border-radius: 6px;
    padding: 0.375rem;
    margin-top: 0.375rem;
}

.dropdown-item {
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
    color: var(--text-primary);
    border-radius: 4px;
    transition: all 0.2s;
}

.dropdown-item:hover {
    background: rgba(13, 71, 161, 0.08);
    color: var(--primary-color);
}

/* Footer Links */
.login-footer {
    text-align: center;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-color);
}

.login-footer p {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.625rem;
    font-size: 0.8125rem;
}

.footer-links a {
    color: var(--primary-color);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
}

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

.footer-links span {
    color: var(--text-muted);
}

/* Footer Link (back to login) */
.footer-link {
    display: inline-block;
    color: #0D47A1;
    text-decoration: none;
    font-size: 0.875rem;
    padding: 0.4rem 0.75rem;
    border-radius: 4px;
    transition: all 0.2s;
}

.footer-link:hover {
    background: rgba(13, 71, 161, 0.08);
    color: var(--primary-dark);
}

/* Cancel Link */
.cancel-link {
    display: inline-block;
    color: #6c757d;
    text-decoration: none;
    font-size: 0.875rem;
    padding: 0.4rem 0.75rem;
    border-radius: 4px;
    transition: all 0.2s;
}

.cancel-link:hover {
    background: rgba(108, 117, 125, 0.08);
    color: #495057;
}

/* Alert Messages */
.alert {
    padding: 0.625rem 0.75rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.8125rem;
    border: none;
}

.alert-danger {
    background: #fef2f2;
    color: #dc2626;
    border-left: 3px solid #dc2626;
}

/* Right Side - Visual Section */
.login-visual-section {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.08) 0%, rgba(79, 70, 229, 0.08) 100%),
                url('../images/login-bg.jpg') center center/cover no-repeat;
    padding: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    image-rendering: auto;
}

.visual-content {
    position: relative;
    z-index: 2;
    color: white;
    text-align: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.visual-header h2 {
    font-size: 1.625rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.visual-header p {
    font-size: 0.9375rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* Stats Cards */
.stats-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(2px);
    padding: 1.25rem;
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    text-align: left;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.stat-label {
    font-size: 0.6875rem;
    opacity: 0.8;
    margin-bottom: 0.375rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.375rem;
}

.stat-change {
    font-size: 0.8125rem;
    font-weight: 600;
}

.stat-change.positive {
    color: #86efac;
}

/* Decorative Elements */
.decorative-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(124, 58, 237, 0.08);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(124, 58, 237, 0.15);
}

.circle-1 {
    width: 400px;
    height: 400px;
    top: -150px;
    right: -150px;
    animation: float 6s ease-in-out infinite;
}

.circle-2 {
    width: 300px;
    height: 300px;
    bottom: -100px;
    left: -100px;
    animation: float 8s ease-in-out infinite reverse;
}

.circle-3 {
    width: 250px;
    height: 250px;
    top: 50%;
    left: 10%;
    animation: float 7s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

/* Responsive Design */
@media (max-width: 968px) {
    .login-wrapper {
        grid-template-columns: 1fr;
        width: 100vw;
        height: 100vh;
    }
    
    .login-visual-section {
        display: none;
    }
    
    .login-form-section {
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 640px) {
    .login-container {
        padding: 0;
    }
    
    .login-form-section {
        padding: 2rem 1.5rem;
    }
    
    .login-header h1 {
        font-size: 1.5rem;
    }
    
    .alternative-actions {
        flex-direction: column;
    }
    
    .stats-cards {
        grid-template-columns: 1fr;
    }
}
