/* --- Reused CSS Variables from base.css for consistency --- */
:root {
    --primary-color: #FF7A00;
    --primary-dark: #E56700;
    --primary-light: #FF9A40;
    --secondary-color: #2E2E2E;
    --secondary-light: #3A3A3A;
    --secondary-dark: #1E1E1E;
    --text-primary: #2E2E2E;
    --text-secondary: #666666;
    --text-muted: #999999;
    --dark-text-primary: #FFFFFF;
    --dark-text-secondary: #CCCCCC;
    --dark-text-muted: #AAAAAA;
    --background: #F5F5F5;
    --card-bg: #FFFFFF;
    --border-color: #E0E0E0;
    --success: #4CAF50;
    --warning: #FFC107;
    --error: #F44336;
    --info: #2196F3;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); /* Smoother transition */
}

/* --- Global & Layout --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Main Container with Full-Screen Background --- */
.login-container {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-dark) 100%);
    overflow: hidden;
}

/* --- Background Animation --- */
.bg-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.bg-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
}

.shape-1 { width: 500px; height: 500px; background-color: var(--primary-color); top: -100px; right: -100px; animation: float 20s infinite ease-in-out; }
.shape-2 { width: 400px; height: 400px; background-color: var(--primary-light); bottom: -100px; left: -100px; animation: float 15s infinite ease-in-out reverse; }
.shape-3 { width: 300px; height: 300px; background-color: var(--primary-color); top: 50%; left: 50%; transform: translate(-50%, -50%); animation: pulse 10s infinite ease-in-out; }

@keyframes float { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-20px) rotate(10deg); } }
@keyframes pulse { 0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.15; } 50% { transform: translate(-50%, -50%) scale(1.1); opacity: 0.2; } }

/* --- Centered Login Card --- */
.login-card {
    position: relative;
    z-index: 1;
    display: flex;
    width: 100%;
    max-width: 900px;
    min-height: 550px;
    background-color: var(--card-bg);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    /* Initial state for entrance animation */
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s 0.2s forwards;
}

/* --- Entrance Animation --- */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Left Panel: Branding --- */
.login-card-left {
    flex: 1;
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-dark) 100%);
    color: var(--dark-text-primary);
    padding: 50px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.branding-content {
    text-align: left;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--dark-text-primary);
    gap: 10px;
    margin-bottom: 30px;
}

.logo-icon { font-size: 32px; }
.logo-text { font-size: 22px; font-weight: 700; }
.highlight { color: var(--primary-color); }

.branding-content h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.branding-content p {
    font-size: 1rem;
    color: var(--dark-text-secondary);
    margin-bottom: 30px;
    line-height: 1.6;
}

.feature-list { margin-top: 20px; }
.feature-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: var(--dark-text-muted);
    opacity: 0;
    transform: translateX(-20px);
    animation: slideInLeft 0.5s 0.6s forwards;
}
.feature-item:nth-child(2) { animation-delay: 0.7s; }
.feature-item:nth-child(3) { animation-delay: 0.8s; }

@keyframes slideInLeft {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.feature-item i { color: var(--primary-color); width: 20px; text-align: center; }

/* --- Right Panel: Login Form --- */
.login-card-right {
    flex: 1;
    padding: 50px 40px;
    background-color: var(--card-bg);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.theme-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--background);
    border: none;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}
.theme-toggle:hover { color: var(--primary-color); background-color: rgba(255, 122, 0, 0.1); }

.form-wrapper { transition: transform 0.3s; }
.form-wrapper.has-error { animation: shake 0.5s; }

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.form-header { text-align: center; margin-bottom: 30px; }
.form-header h2 { font-size: 1.8rem; font-weight: 700; color: var(--text-primary); margin-bottom: 5px; }
.form-header p { color: var(--text-secondary); }

/* --- Form & Alert Styles (with animations) --- */
.form-group { margin-bottom: 25px; }
.input-with-icon { position: relative; }

.input-with-icon i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    transition: var(--transition);
    z-index: 2;
}

/* --- Floating Label & Input Styles --- */
.form-control {
    width: 100%;
    padding: 20px 15px 8px 45px; /* Adjusted padding for floating label */
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background-color: var(--background);
    color: var(--text-primary);
    font-size: 16px;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 122, 0, 0.2);
}

.input-with-icon i + .form-control:focus + label,
.input-with-icon i + .form-control:not(:placeholder-shown) + label {
    top: 8px;
    left: 45px;
    font-size: 12px;
    color: var(--primary-color);
    font-weight: 500;
}

.input-with-icon i + .form-control:focus ~ i {
    color: var(--primary-color);
}

.input-with-icon label {
    position: absolute;
    top: 50%;
    left: 45px;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    transition: var(--transition);
    z-index: 1;
}

.field-error { color: var(--error); font-size: 13px; margin-top: 5px; }

.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    font-size: 14px;
    animation: fadeIn 0.3s;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.alert-error { background-color: rgba(244, 67, 54, 0.1); color: var(--error); border-left: 4px solid var(--error); }
.alert i { margin-right: 10px; flex-shrink: 0; }

.form-options { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; font-size: 14px; }
.remember-me { display: flex; align-items: center; gap: 8px; }
.remember-me input[type="checkbox"] { accent-color: var(--primary-color); }

/* --- Animated Links --- */
.forgot-password, .signup-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: var(--transition);
}
.forgot-password::after, .signup-link a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}
.forgot-password:hover::after, .signup-link a:hover::after { width: 100%; }

/* --- Animated Button --- */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    position: relative;
    overflow: hidden;
}
.btn-primary {
    background-color: var(--primary-color);
    color: white;
    width: 100%;
    justify-content: center;
}
.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 122, 0, 0.4); /* Enhanced glow */
}
.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.btn-block { display: block; width: 100%; }

.signup-link { text-align: center; margin-top: 30px; font-size: 14px; color: var(--text-secondary); }


/* --- Responsive Design --- */
@media (max-width: 768px) {
    .login-card {
        flex-direction: column;
        max-width: 400px;
        min-height: auto;
        margin: 20px;
    }

    .login-card-left {
        padding: 30px 20px;
        text-align: center;
    }

    .branding-content h1 { font-size: 1.5rem; }
    .feature-list { display: none; } /* Hide features on mobile for a cleaner look */
    
    .login-card-right { padding: 30px 20px; }
}

@media (max-width: 480px) {
    .login-card { margin: 10px; }
    .login-card-left, .login-card-right { padding: 20px 15px; }
}