/* ==========================================================================
   Lite Medic - Elegant Pastel Styling System (Light & Professional)
   ========================================================================== */

/* 1. Variables & Global Reset */
:root {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.85);
    --border-color: rgba(15, 23, 42, 0.08);
    --border-hover: rgba(15, 23, 42, 0.25);
    
    /* Elegant & Serious Colors */
    --color-primary: #1e293b;       /* Dark Slate */
    --color-primary-glow: rgba(30, 41, 59, 0.06);
    --color-secondary: #475569;     /* Slate */
    --color-accent: #0f172a;        /* Deep Charcoal / Slate 900 */
    --color-accent-glow: rgba(15, 23, 42, 0.08);
    
    /* Text Colors */
    --text-main: #0f172a;
    --text-muted: #475569;
    --text-inverse: #ffffff;
    
    /* Feedback Colors (Serious Pastels) */
    --color-error: #991b1b;
    --color-error-bg: #fef2f2;
    --color-success: #065f46;
    --color-success-bg: #ecfdf5;
    
    /* Font */
    --font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    
    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: var(--font-family);
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 50%, #e2e8f0 100%);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
}

/* Subtle, serious background grid pattern */
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(rgba(15, 23, 42, 0.02) 1px, transparent 1px);
    background-size: 32px 32px;
    z-index: -1;
    pointer-events: none;
}

/* 2. Main Container */
.login-container {
    width: 100%;
    max-width: 1050px;
    min-height: 560px;
    margin: 20px;
    background: var(--bg-glass);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.05), 0 4px 12px rgba(15, 23, 42, 0.03);
    display: flex;
    overflow: hidden;
    animation: fadeInContainer 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeInContainer {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 3. Left Panel - Branding */
.left-panel {
    flex: 1.1;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-right: 1px solid var(--border-color);
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    text-align: center;
    position: relative;
}

.brand-wrapper {
    margin: auto 0;
    z-index: 1;
}

.brand-logo-img {
    width: auto;
    height: auto;
    max-width: 380px;
    max-height: 230px;
    object-fit: contain;
    margin-bottom: 0;
    /* Blend mode multiply helps if the user's logo has a white background */
    mix-blend-mode: multiply;
    transition: transform var(--transition-normal);
}

.brand-logo-img:hover {
    transform: scale(1.03);
}

.developer-credit {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 400;
    font-style: italic;
    z-index: 1;
}

.developer-credit span {
    color: var(--color-primary);
    font-weight: 600;
}

/* 4. Right Panel - Form Card */
.right-panel {
    flex: 1;
    padding: 60px 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #ffffff;
}

.auth-card {
    width: 100%;
    max-width: 380px;
}

.auth-header {
    margin-bottom: 32px;
}

.doctor-welcome {
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.auth-subtitle {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* 5. Alert System */
.alert {
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 0.9rem;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: shakeAlert 0.4s ease-in-out;
}

.alert.error {
    background-color: var(--color-error-bg);
    border: 1px solid rgba(153, 27, 27, 0.15);
    color: var(--color-error);
}

.alert i {
    font-size: 1rem;
}

@keyframes shakeAlert {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

/* 6. Form Controls */
#loginForm {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

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

.input-group input {
    width: 100%;
    padding: 14px 14px 14px 44px;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    color: var(--text-main);
    font-family: var(--font-family);
    font-size: 0.95rem;
    transition: all var(--transition-fast);
    outline: none;
}

.input-group input::placeholder {
    color: var(--text-muted);
    opacity: 0.8;
}

.input-group input:focus {
    background-color: #ffffff;
    border-color: var(--color-secondary);
    box-shadow: 0 0 0 3px var(--color-primary-glow);
}

.input-icon {
    position: absolute;
    left: 16px;
    color: var(--text-muted);
    font-size: 1rem;
    pointer-events: none;
    transition: color var(--transition-fast);
}

.input-group input:focus ~ .input-icon {
    color: var(--color-primary);
}

.toggle-password-btn {
    position: absolute;
    right: 14px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color var(--transition-fast);
}

.toggle-password-btn:hover {
    color: var(--text-main);
}

/* 7. Button Style (Serious Slate/Charcoal) */
.btn-primary {
    width: 100%;
    padding: 14px;
    background-color: var(--color-accent);
    border: none;
    border-radius: 10px;
    color: var(--text-inverse);
    font-family: var(--font-family);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    transition: all var(--transition-normal);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
}

.btn-primary:hover {
    background-color: var(--color-primary);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.2);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(1px);
}

.btn-primary i {
    transition: transform var(--transition-fast);
}

.btn-primary:hover i {
    transform: translateX(3px);
}

/* 8. Responsive Adjustments */
@media (max-width: 850px) {
    .login-container {
        max-width: 500px;
        flex-direction: column;
        min-height: auto;
    }
    
    .left-panel {
        padding: 40px;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    .brand-logo-img {
        max-width: 320px;
        max-height: 180px;
        margin-bottom: 16px;
    }
    
    .right-panel {
        padding: 40px 30px;
    }
}

@media (max-width: 480px) {
    .login-container {
        margin: 10px;
        border-radius: 16px;
    }
    
    .left-panel {
        padding: 30px 20px;
    }
    
    .right-panel {
        padding: 30px 20px;
    }
    
    .doctor-welcome {
        font-size: 1.4rem;
    }
}
