/* Login Page Styles */
:root {
    --primary-color: #7A70BA;
    --secondary-color: #48A3D7;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --dark-color: #2F2F3B;
    --light-color: #F8F9FA;
    --gray-color: #6c757d;
    --border-color: #dee2e6;
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow-md: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --border-radius: 0.5rem;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background: #f5f6fa;
}

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Main Container */
.login-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 1200px;
    width: 100%;
    min-height: 600px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Left Side - Branding */
.login-branding {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.login-branding::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(50%, -50%);
}

.branding-content {
    position: relative;
    z-index: 2;
}

.brand-header {
    margin-bottom: 40px;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.brand-logo i {
    font-size: 36px;
    color: white;
}

.brand-name {
    font-size: 32px;
    font-weight: 800;
    color: white;
}

.brand-tagline {
    font-size: 16px;
    opacity: 0.9;
    margin: 0;
}

/* Features */
.feature-list {
    margin-bottom: 40px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 16px;
    font-weight: 500;
}

.feature-item i {
    font-size: 20px;
    opacity: 0.8;
    width: 24px;
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.stat-item {
    text-align: center;
    padding: 20px 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
}

.stat-number {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 12px;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Right Side - Form */
.login-form-section {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.form-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 400px;
    margin: 0 auto;
    width: 100%;
}

/* Form Header */
.form-header {
    text-align: center;
    margin-bottom: 32px;
}

.form-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 8px;
}

.form-subtitle {
    font-size: 16px;
    color: var(--gray-color);
    margin: 0;
}

/* Alert Messages */
.alert {
    border: none;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 24px;
    font-weight: 500;
    display: flex;
    align-items: center;
}

.alert-danger {
    background: rgba(220, 53, 69, 0.1);
    color: var(--danger-color);
    border-left: 4px solid var(--danger-color);
}

.alert-success {
    background: rgba(40, 167, 69, 0.1);
    color: var(--success-color);
    border-left: 4px solid var(--success-color);
}

/* Form Styles */
.login-form {
    margin-bottom: 32px;
}

.form-group {
    margin-bottom: 24px;
}

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

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 16px;
    color: var(--gray-color);
    font-size: 16px;
    z-index: 2;
    transition: var(--transition);
}

.form-control {
    width: 100%;
    padding: 16px 16px 16px 48px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 500;
    background: white;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(122, 112, 186, 0.25);
}

.input-wrapper.focused .input-icon {
    color: var(--primary-color);
}

.password-toggle {
    position: absolute;
    right: 16px;
    background: none;
    border: none;
    color: var(--gray-color);
    cursor: pointer;
    padding: 8px;
    font-size: 16px;
    transition: var(--transition);
}

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

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

.form-check {
    display: flex;
    align-items: center;
}

.form-check-input {
    margin-right: 8px;
    accent-color: var(--primary-color);
}

.form-check-label {
    font-size: 14px;
    color: var(--gray-color);
    cursor: pointer;
}

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

.forgot-link:hover {
    color: var(--secondary-color);
}

/* Login Button */
.btn-login {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    margin-bottom: 24px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(122, 112, 186, 0.3);
}

.btn-login:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-loading {
    display: none;
}

.btn-login.loading .btn-text {
    display: none;
}

.btn-login.loading .btn-loading {
    display: block;
}

/* Register Section */
.register-section {
    text-align: center;
    padding: 24px 0;
    border-top: 1px solid var(--border-color);
}

.register-section p {
    color: var(--gray-color);
    margin-bottom: 12px;
    font-size: 14px;
}

.register-link {
    display: inline-flex;
    align-items: center;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

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

/* Security Badges */
.security-badges {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 24px;
}

.security-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--gray-color);
}

.security-badge i {
    color: var(--success-color);
}

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

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--gray-color);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
}

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

.copyright {
    font-size: 12px;
    color: var(--gray-color);
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .login-container {
        grid-template-columns: 1fr;
        max-width: 480px;
        margin: 20px;
    }
    
    .login-branding {
        padding: 40px 30px;
        text-align: center;
    }
    
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }
    
    .stat-item {
        padding: 15px 10px;
    }
    
    .stat-number {
        font-size: 20px;
    }
    
    .login-form-section {
        padding: 30px 20px;
    }
    
    .form-title {
        font-size: 28px;
    }
    
    .form-options {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }
    
    .footer-links {
        flex-wrap: wrap;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .login-page {
        padding: 10px;
    }
    
    .login-container {
        margin: 10px;
    }
    
    .brand-name {
        font-size: 28px;
    }
    
    .feature-item {
        font-size: 14px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    
    .form-control {
        padding: 14px 14px 14px 44px;
    }
    
    .btn-login {
        padding: 14px 20px;
    }
}

/* Loading Animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.fa-spin {
    animation: spin 1s linear infinite;
}

/* Focus States */
.form-control:focus,
.btn-login:focus,
.form-check-input:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Dark Theme Support */
@media (prefers-color-scheme: dark) {
    :root {
        --dark-color: #ffffff;
        --light-color: #1a1a1a;
        --border-color: #404040;
        --gray-color: #a0a0a0;
    }
    
    body {
        background: #1a1a1a;
    }
    
    .login-container {
        background: #2d2d2d;
    }
    
    .form-control {
        background: #404040;
        border-color: #606060;
        color: white;
    }
}