/* ========== COMMON VARIABLES ========== */
:root {
    --primary-color: #3B82F6;
    --primary-light: #395E71;
    --text-color: #1E293B;
    --text-secondary: #64748B;
    --white: #FFFFFF;
    --border-color: #E5E5E5;
    --success-color: #22C55E;
    --error-color: #EF4444;
    --background-color: #F8FAFC;
    --warning-color: #F5A623;
    --danger-color: #EF4444;
    --card-background: white;
    --input-background: #F8FAFC;
}

/* ========== RESET & BASE STYLES ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    min-height: 100vh;
    line-height: 1.5;
}

.hide {
    display: none !important;
}

/* ========== LOGIN PAGE STYLES ========== */
.page-container {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    display: flex;
}

.login-container {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    width: 50%;
    background-color: var(--background-color);
}

.hero-container {
    position: relative;
    width: 50%;
    min-height: 100vh;
    overflow: hidden;
}

.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to right, rgba(30, 41, 59, 0.3), rgba(30, 41, 59, 0.1));
    backdrop-filter: blur(1px);
    z-index: 1;
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.logo {
    margin-bottom: 24px;
}

.logo img {
    height: 40px;
    width: auto;
}

.login-title {
    font-size: 32px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 8px;
}

.login-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.login-card {
    background: var(--card-background);
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    padding: 32px;
    margin-bottom: 32px;
}

.login-alert {
    display: none;
    width: 100%;
    max-width: 400px;
    padding: 20px;
    color: var(--error-color);
    margin-bottom: 16px;
    border-radius: 4px;
    background-color: rgba(239, 68, 68, 0.1);
}

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

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

.form-label i {
    color: var(--text-secondary);
    margin-left: 4px;
    font-size: 14px;
}

.form-input {
    width: 100%;
    height: 40px;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    background: var(--input-background);
    color: var(--text-color);
    transition: border-color 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.password-input-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    font-size: 14px;
}

.sign-in-button {
    width: 100%;
    height: 40px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.sign-in-button:hover {
    background: var(--primary-light);
}

.login-footer {
    text-align: center;
}

.dark-mode-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    color: var(--text-secondary);
    font-size: 14px;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border-color);
    transition: .4s;
    border-radius: 20px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: var(--primary-color);
}

input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

.copyright {
    color: var(--text-secondary);
    font-size: 14px;
}

.background-pattern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.1;
    pointer-events: none;
}

/* Dark mode styles */
body.dark-mode {
    --text-color: #F8FAFC;
    --text-secondary: #94A3B8;
    --background-color: #0F172A;
    --card-background: #1E293B;
    --border-color: #334155;
    --input-background: #1E293B;
}

/* Responsive styles */
@media (max-width: 1024px) {
    .page-container {
        flex-direction: column;
    }

    .login-container {
        width: 100%;
    }

    .hero-container {
        display: none;
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 24px;
    }

    .login-title {
        font-size: 28px;
    }

    .login-subtitle {
        font-size: 16px;
    }
}
