/* ========== ENTERPRISE LMS LOGIN STYLES ========== */

:root {
    --auth-primary: #013A70;         /* Deep Corporate Blue */
    --auth-primary-dark: #012447;    /* Darker Blue for Gradients */
    --auth-secondary: #15989C;       /* Medical Teal from Logo */
    --auth-bg: #ffffff;
    --auth-border: #e2e8f0;
    --auth-text-main: #0f172a;
    --auth-text-sub: #475569;
    --auth-text-muted: #94a3b8;
    --auth-focus-ring: rgba(21, 152, 156, 0.2); /* Teal focus glow */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.auth-body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--auth-bg);
    color: var(--auth-text-main);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Mobile Header (Hidden on Desktop) */
.auth-mobile-header {
    display: none;
    padding: 20px 24px;
    background: var(--auth-bg);
    border-bottom: 1px solid var(--auth-border);
    text-align: center;
}

.auth-logo-mobile {
    height: 32px;
    width: auto;
    object-fit: contain;
}

/* Split Screen Layout */
.auth-split-wrapper {
    display: flex;
    min-height: 100vh;
}

/* =========================================
   LEFT PANEL: BRANDING (LMS Style)
========================================= */
.auth-brand-panel {
    flex: 1.2; 
    background: linear-gradient(135deg, var(--auth-primary) 0%, var(--auth-primary-dark) 100%);
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 60px;
    color: #ffffff;
    overflow: hidden;
}

/* Tech/Medical Dot Pattern Overlay */
.auth-brand-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(rgba(21, 152, 156, 0.2) 2px, transparent 2px);
    background-size: 30px 30px;
    z-index: 1;
    opacity: 0.8;
}

/* Decorative glowing orb behind text */
.auth-brand-pattern::after {
    content: '';
    position: absolute;
    top: -20%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(21,152,156,0.15) 0%, rgba(1,58,112,0) 70%);
    border-radius: 50%;
}


.auth-brand-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.auth-logo-desktop {
    height: 40px;
    width: auto;
    object-fit: contain;
    filter: brightness(0) invert(1); 
    margin-bottom: auto; 
}

.auth-brand-text {
    /* max-width: 480px; */
    margin-bottom: auto; 
}

.auth-brand-text h1 {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -0.03em;
    color: #ffffff;
}

.auth-brand-text p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #cbd5e1;
    font-weight: 400;
}

.auth-brand-footer {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 500;
}

/* =========================================
   RIGHT PANEL: LOGIN FORM
========================================= */
.auth-form-panel {
    flex: 1;
    max-width: 600px;
    background: var(--auth-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.auth-form-container {
    width: 100%;
    max-width: 400px;
}

.auth-form-header {
    margin-bottom: 40px;
}

.auth-form-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--auth-text-main);
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.auth-form-header p {
    font-size: 0.95rem;
    color: var(--auth-text-sub);
}

/* Form Inputs */
.auth-form-group {
    margin-bottom: 24px;
}

.auth-form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--auth-text-main);
    margin-bottom: 8px;
}

.auth-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input-icon {
    position: absolute;
    left: 16px;
    color: var(--auth-text-muted);
    font-size: 0.95rem;
    transition: 0.2s;
}

.auth-input-wrapper input {
    width: 100%;
    padding: 12px 40px 12px 44px; 
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--auth-text-main);
    border: 1px solid var(--auth-border);
    border-radius: 8px;
    background-color: #f8fafc;
    transition: all 0.2s ease;
}

.auth-input-wrapper input::placeholder {
    color: var(--auth-text-muted);
}

.auth-input-wrapper input:focus {
    outline: none;
    border-color: var(--auth-secondary); 
    background-color: #ffffff;
    box-shadow: 0 0 0 4px var(--auth-focus-ring);
}

.auth-input-wrapper input:focus + .auth-input-icon,
.auth-input-wrapper input:focus ~ .auth-input-icon {
    color: var(--auth-secondary); 
}

/* Password Toggle */
.auth-password-toggle {
    position: absolute;
    right: 14px;
    background: transparent;
    border: none;
    color: var(--auth-text-muted);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
}

.auth-password-toggle:hover {
    color: var(--auth-text-sub);
}

/* Remember Me & Forgot Password */
.auth-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    margin-top: -8px;
}

.auth-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--auth-text-sub);
    font-weight: 500;
}

.auth-checkbox input {
    accent-color: var(--auth-primary);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.auth-forgot-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--auth-primary);
    text-decoration: none;
    transition: color 0.2s;
}

.auth-forgot-link:hover {
    color: var(--auth-secondary);
}

/* Submit Button */
.auth-btn-submit {
    width: 100%;
    background-color: var(--auth-primary);
    color: #fff;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(1, 58, 112, 0.15);
}

.auth-btn-submit:hover {
    background-color: var(--auth-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(1, 58, 112, 0.2);
}

/* Help Center Link */
.auth-help-center {
    margin-top: 32px;
    text-align: center;
    font-size: 0.85rem;
    color: var(--auth-text-sub);
}

.auth-help-center a {
    color: var(--auth-primary);
    font-weight: 600;
    text-decoration: none;
}

.auth-help-center a:hover {
    color: var(--auth-secondary);
    font-weight: 800;
}

/* =========================================
   FORGOT PASSWORD MODAL
========================================= */
.auth-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
}

.auth-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.auth-modal-content {
    background: #ffffff;
    width: 100%;
    max-width: 420px;
    padding: 32px;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.auth-modal-overlay.active .auth-modal-content {
    transform: translateY(0);
}

.auth-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: transparent;
    border: none;
    color: var(--auth-text-muted);
    font-size: 1.25rem;
    cursor: pointer;
    transition: color 0.2s;
    padding: 8px;
}

.auth-modal-close:hover {
    color: var(--auth-text-main);
}

.auth-modal-header {
    margin-bottom: 24px;
}

.auth-modal-header h3 {
    font-size: 1.5rem;
    color: var(--auth-text-main);
    margin-bottom: 8px;
    font-weight: 700;
}

.auth-modal-header p {
    font-size: 0.95rem;
    color: var(--auth-text-sub);
    line-height: 1.5;
}

.msg-success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.msg-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* =========================================
   PREMIUM CONTACT SUPPORT MODAL UI
========================================= */
.support-modal-premium {
    padding: 0 !important; /* Remove default padding to let header bleed */
    overflow: hidden;
    max-width: 420px;
}

/* Custom Close Button to overlay on the dark header */
.support-close-btn {
    color: rgba(255, 255, 255, 0.8) !important;
    z-index: 10;
    background: rgba(0, 0, 0, 0.2) !important;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    top: 20px !important;
    right: 16px !important;
}
.support-close-btn:hover {
    color: #ffffff !important;
    background: rgba(0, 0, 0, 0.4) !important;
}

/* Painted Header Section */
.support-premium-header {
    background: linear-gradient(135deg, var(--auth-primary) 60%, var(--auth-secondary) 100%);
    height: 80px;
    position: relative;
    display: flex;
    justify-content: center;
}

/* Overlapping Floating Icon */
.support-icon-glow {
    position: absolute;
    bottom: -35px; /* Pulls it down to overlap the white body */
    width: 70px;
    height: 70px;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--auth-secondary);
    box-shadow: 0 8px 24px rgba(21, 152, 156, 0.25);
    border: 4px solid #ffffff;
    z-index: 2;
}

/* Body Section */
.support-premium-body {
    padding: 50px 32px 32px; /* Top padding accommodates the overlapping icon */
    text-align: center;
}

.support-premium-body h3 {
    font-size: 1.4rem;
    color: var(--auth-text-main);
    font-weight: 700;
    margin-bottom: 8px;
}

.support-premium-body p {
    font-size: 0.9rem;
    color: var(--auth-text-sub);
    line-height: 1.5;
    margin-bottom: 28px;
}

/* Action Cards (The Buttons) */
.support-action-cards {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.support-action-card {
    display: flex;
    align-items: center;
    padding: 16px;
    background: #ffffff;
    border: 1px solid var(--auth-border);
    border-radius: 14px;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Animation setup */
    opacity: 0;
    transform: translateY(15px);
}

/* Trigger animation when modal opens */
.auth-modal-overlay.active .support-action-card {
    animation: slideUpFade 0.5s forwards;
    animation-delay: calc(0.1s * var(--animation-order));
}

@keyframes slideUpFade {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hover Effects */
.support-action-card:hover {
    border-color: transparent;
    box-shadow: 0 12px 24px rgba(1, 58, 112, 0.08);
    transform: translateY(-3px);
}

.card-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-right: 16px;
    flex-shrink: 0;
}

.bg-blue {
    background: rgba(1, 58, 112, 0.1);
    color: var(--auth-primary);
}

.bg-teal {
    background: rgba(21, 152, 156, 0.1);
    color: var(--auth-secondary);
}

/* Switch colors to solid on card hover */
.support-action-card:hover .bg-blue {
    background: var(--auth-primary);
    color: #ffffff;
}
.support-action-card:hover .bg-teal {
    background: var(--auth-secondary);
    color: #ffffff;
}

.card-content {
    text-align: left;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--auth-text-main);
    margin-bottom: 2px;
}

.card-detail {
    font-size: 0.8rem;
    color: var(--auth-text-sub);
    font-weight: 500;
}

/* Arrow indicator */
.card-arrow {
    color: var(--auth-text-muted);
    font-size: 1rem;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateX(-10px);
}

.support-action-card:hover .card-arrow {
    opacity: 1;
    transform: translateX(0);
    color: var(--auth-primary);
}

/* =========================================
   RESPONSIVE DESIGN (Mobile Adaptations)
========================================= */
@media (max-width: 991px) {
    .auth-brand-panel { padding: 40px; }
    .auth-brand-text h1 { font-size: 2.2rem; }
    .auth-form-panel { padding: 32px; }
}

@media (max-width: 768px) {
    .auth-body {
        background-color: #f1f5f9; 
    }
    
    .auth-split-wrapper {
        display: block; 
        min-height: 100vh;
    }
    
    .auth-brand-panel {
        display: flex; 
        flex-direction: column;
        justify-content: center;
        padding: 40px 24px 120px; 
        text-align: center;
        border-radius: 0 0 32px 32px; 
    }

    .auth-brand-content {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .auth-logo-desktop {
        margin-bottom: 16px;
        height: 32px;
    }

    .auth-brand-text h1 {
        font-size: 1.2rem;
        margin-bottom: 0;
        line-height: 1.3;
    }

    .auth-brand-text p, .auth-brand-footer, .auth-mobile-header {
        display: none; 
    }

    .auth-form-panel {
        display: block;
        width: 100%;
        padding: 0 20px 40px;
        background: transparent;
        margin-top: -80px; 
        position: relative;
        z-index: 10; 
    }

    .auth-form-container {
        background: #ffffff;
        padding: 32px 20px;
        border-radius: 16px;
        box-shadow: 0 8px 20px rgba(1, 58, 112, 0.12); 
        margin: 0 auto;
        width: 100%;
    }

    .auth-form-header {
        margin-bottom: 24px;
        text-align: center;
    }

    .auth-form-header h2 { font-size: 1.4rem; }
    .auth-form-header p { font-size: 0.85rem; }

    .auth-input-wrapper input {
        padding: 14px 40px 14px 44px;
        font-size: 16px; 
    }
    
    .auth-btn-submit {
        padding: 16px;
        font-size: 1.05rem;
        border-radius: 12px;
    }
}

@media (max-width: 380px) {
    .auth-brand-panel {
        padding: 30px 16px 100px;
    }
    .auth-brand-text h1 {
        font-size: 1.4rem;
    }
    .auth-form-panel {
        padding: 0 16px 30px;
        margin-top: -70px;
    }
    .auth-form-container {
        padding: 24px 16px;
    }
}