:root {
            --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            --primary-gradient: linear-gradient(135deg, #3b82f6 0%, #2563eb 50%, #1d4ed8 100%);
            --primary-gradient-hover: linear-gradient(135deg, #60a5fa 0%, #3b82f6 50%, #2563eb 100%);
            --card-bg: rgba(255, 255, 255, 0.08);
            --card-border: rgba(255, 255, 255, 0.16);
            --card-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.45), 0 0 40px rgba(99, 102, 241, 0.15);
            --input-bg: rgba(255, 255, 255, 0.07);
            --input-border: rgba(255, 255, 255, 0.18);
            --input-focus-border: #60a5fa;
            --input-focus-glow: rgba(96, 165, 250, 0.35);
            --text-primary: #f8fafc;
            --text-secondary: #cbd5e1;
            --text-muted: #94a3b8;
            --danger-bg: rgba(239, 68, 68, 0.15);
            --danger-border: rgba(239, 68, 68, 0.35);
            --danger-text: #fca5a5;
            --success-bg: rgba(16, 185, 129, 0.15);
            --success-border: rgba(16, 185, 129, 0.35);
            --success-text: #6ee7b7;
            --warning-bg: rgba(245, 158, 11, 0.15);
            --warning-border: rgba(245, 158, 11, 0.35);
            --warning-text: #fcd34d;
            --info-bg: rgba(59, 130, 246, 0.15);
            --info-border: rgba(59, 130, 246, 0.35);
            --info-text: #93c5fd;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            -webkit-tap-highlight-color: transparent;
        }

        html {
            background-color: #0f172a !important;
            background: radial-gradient(circle at 50% 20%, #1e1b4b 0%, #0f172a 100%) fixed !important;
            min-height: 100%;
            width: 100%;
            overflow-x: hidden;
            -webkit-text-size-adjust: 100%;
            touch-action: manipulation;
        }

        body {
            font-family: var(--font-family);
            min-height: 100vh;
            min-height: -webkit-fill-available;
            width: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            background-color: #0f172a !important;
            background: radial-gradient(circle at 50% 20%, #1e1b4b 0%, #0f172a 100%) fixed !important;
            color: var(--text-primary);
            padding: max(20px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
            position: relative;
            overflow-x: hidden;
            touch-action: manipulation;
        }

        @keyframes gradientShift {
            0% { background-position: 0% 50%; }
            50% { background-position: 100% 50%; }
            100% { background-position: 0% 50%; }
        }

        /* Ambient glowing background blobs */
        .ambient-sphere {
            position: absolute;
            border-radius: 50%;
            filter: blur(80px);
            z-index: 0;
            pointer-events: none;
            opacity: 0.6;
            animation: floatOrb 10s ease-in-out infinite alternate;
        }

        .ambient-sphere-1 {
            width: 320px;
            height: 320px;
            background: rgba(99, 102, 241, 0.45);
            top: 10%;
            left: 15%;
        }

        .ambient-sphere-2 {
            width: 380px;
            height: 380px;
            background: rgba(168, 85, 247, 0.35);
            bottom: 10%;
            right: 15%;
            animation-duration: 14s;
            animation-direction: alternate-reverse;
        }

        .ambient-sphere-3 {
            width: 260px;
            height: 260px;
            background: rgba(59, 130, 246, 0.35);
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            animation-duration: 12s;
        }

        @keyframes floatOrb {
            0% { transform: translate(0, 0) scale(1); }
            100% { transform: translate(30px, -30px) scale(1.1); }
        }

        /* Main Container */
        .login-wrapper {
            position: relative;
            z-index: 1;
            width: 100%;
            max-width: 440px;
            animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
        }

        @keyframes fadeInUp {
            0% {
                opacity: 0;
                transform: translateY(30px) scale(0.97);
            }
            100% {
                opacity: 1;
                transform: translateY(0) scale(1);
            }
        }

        /* Glassmorphism Card */
        .login-card {
            background: var(--card-bg);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border: 1px solid var(--card-border);
            border-radius: 24px;
            padding: 2.5rem 2.25rem;
            box-shadow: var(--card-shadow);
            transition: border-color 0.3s ease, box-shadow 0.3s ease;
        }

        .login-card:hover {
            border-color: rgba(255, 255, 255, 0.25);
            box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.5), 0 0 50px rgba(99, 102, 241, 0.2);
        }

        /* Logo and Header */
        .card-header {
            text-align: center;
            margin-bottom: 2rem;
        }

        .logo-badge {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 72px;
            height: 72px;
            border-radius: 20px;
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 100%);
            border: 1px solid rgba(255, 255, 255, 0.2);
            font-size: 2.25rem;
            margin-bottom: 1.25rem;
            box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.4);
            transition: transform 0.3s ease;
        }

        .logo-badge:hover {
            transform: scale(1.06) rotate(4deg);
        }

        .app-title {
            font-size: 1.85rem;
            font-weight: 800;
            letter-spacing: -0.025em;
            background: linear-gradient(135deg, #ffffff 30%, #cbd5e1 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            margin-bottom: 0.5rem;
        }

        .app-subtitle {
            font-size: 0.925rem;
            font-weight: 400;
            color: var(--text-secondary);
            line-height: 1.4;
        }

        /* Flash Message Alerts */
        .alert-container {
            margin-bottom: 1.5rem;
        }

        .alert {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0.9rem 1.1rem;
            border-radius: 12px;
            font-size: 0.885rem;
            font-weight: 500;
            margin-bottom: 0.75rem;
            animation: fadeInAlert 0.4s cubic-bezier(0.16, 1, 0.3, 1);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
        }

        .alert:last-child {
            margin-bottom: 0;
        }

        @keyframes fadeInAlert {
            from {
                opacity: 0;
                transform: translateY(-8px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .alert-danger, .alert-error {
            background: var(--danger-bg);
            border: 1px solid var(--danger-border);
            color: var(--danger-text);
        }

        .alert-success {
            background: var(--success-bg);
            border: 1px solid var(--success-border);
            color: var(--success-text);
        }

        .alert-warning {
            background: var(--warning-bg);
            border: 1px solid var(--warning-border);
            color: var(--warning-text);
        }

        .alert-info {
            background: var(--info-bg);
            border: 1px solid var(--info-border);
            color: var(--info-text);
        }

        /* Form Controls */
        .form-group {
            margin-bottom: 1.4rem;
        }

        .form-label {
            display: block;
            font-size: 0.875rem;
            font-weight: 500;
            color: var(--text-secondary);
            margin-bottom: 0.55rem;
        }

        .input-wrapper {
            position: relative;
            display: flex;
            align-items: center;
        }

        .input-icon {
            position: absolute;
            left: 1.1rem;
            color: var(--text-muted);
            font-size: 1.05rem;
            pointer-events: none;
            transition: color 0.25s ease;
            z-index: 2;
        }

        .form-input {
            width: 100%;
            height: 50px;
            padding: 0.75rem 1rem 0.75rem 2.85rem;
            background: var(--input-bg);
            border: 1px solid var(--input-border);
            border-radius: 14px;
            font-family: var(--font-family);
            font-size: 0.95rem;
            color: var(--text-primary);
            outline: none;
            transition: all 0.25s ease;
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
        }

        .form-input::placeholder {
            color: rgba(148, 163, 184, 0.7);
        }

        .form-input:focus {
            background: rgba(255, 255, 255, 0.12);
            border-color: var(--input-focus-border);
            box-shadow: 0 0 0 4px var(--input-focus-glow);
        }

        .form-input:focus + .input-icon,
        .input-wrapper:focus-within .input-icon {
            color: #93c5fd;
        }

        /* Password toggle button */
        .password-toggle {
            position: absolute;
            right: 0.9rem;
            background: transparent;
            border: none;
            color: var(--text-muted);
            font-size: 1rem;
            cursor: pointer;
            padding: 0.35rem;
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: color 0.2s ease;
            z-index: 2;
        }

        .password-toggle:hover {
            color: var(--text-primary);
        }

        /* Submit Button */
        .submit-btn {
            width: 100%;
            height: 52px;
            margin-top: 1rem;
            background: var(--primary-gradient);
            border: 1px solid rgba(255, 255, 255, 0.2);
            border-radius: 14px;
            font-family: var(--font-family);
            font-size: 1rem;
            font-weight: 600;
            color: #ffffff;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.6rem;
            box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.3);
            transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
            position: relative;
            overflow: hidden;
        }

        .submit-btn::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
            transition: 0.5s;
        }

        .submit-btn:hover {
            background: var(--primary-gradient-hover);
            transform: translateY(-2px);
            box-shadow: 0 15px 30px -5px rgba(37, 99, 235, 0.65), inset 0 1px 1px rgba(255, 255, 255, 0.4);
        }

        .submit-btn:hover::before {
            left: 100%;
        }

        .submit-btn:active {
            transform: translateY(0);
            box-shadow: 0 5px 15px -3px rgba(37, 99, 235, 0.5);
        }

        /* Footer */
        .card-footer {
            margin-top: 2rem;
            text-align: center;
            font-size: 0.8rem;
            color: var(--text-muted);
            letter-spacing: 0.02em;
        }

        .card-footer span {
            font-weight: 500;
            color: var(--text-secondary);
        }

        /* Responsive Adjustments */
        @media (max-width: 480px) {
            body {
                padding: 1rem;
            }

            .login-card {
                padding: 2rem 1.5rem;
                border-radius: 20px;
            }

            .logo-badge {
                width: 64px;
                height: 64px;
                font-size: 2rem;
                border-radius: 16px;
                margin-bottom: 1rem;
            }

            .app-title {
                font-size: 1.6rem;
            }

            .app-subtitle {
                font-size: 0.875rem;
            }

            .form-input {
                height: 48px;
                font-size: 0.9rem;
            }

            .submit-btn {
                height: 48px;
                font-size: 0.95rem;
            }
        }

/* ==========================================================================
   PAGE PRELOADER & SCHEDULE LOADERS (100% PERFECTLY CENTERED)
   ========================================================================== */

/* Fullpage Preloader Overlay */
.page-loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at center, #1e1b4b 0%, #070a13 100%);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.4s ease;
}

.page-loader-overlay.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.loader-ring-box {
    position: relative;
    width: 84px;
    height: 84px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loader-spinner-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3.5px solid rgba(255, 255, 255, 0.08);
    border-top: 3.5px solid #60a5fa;
    border-right: 3.5px solid #a855f7;
    animation: spinLoader 0.9s linear infinite;
    box-shadow: 0 0 25px rgba(96, 165, 250, 0.4);
    box-sizing: border-box;
}

@keyframes spinLoader {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loader-logo {
    position: relative;
    z-index: 2;
    font-size: 2.1rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    animation: pulseLogo 1.4s ease-in-out infinite;
    user-select: none;
}

@keyframes pulseLogo {
    0%, 100% { transform: scale(0.92); opacity: 0.85; }
    50% { transform: scale(1.1); opacity: 1; filter: drop-shadow(0 0 10px rgba(96, 165, 250, 0.8)); }
}

.loader-text {
    margin-top: 20px;
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: 0.6px;
    background: linear-gradient(135deg, #ffffff 0%, #93c5fd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: textGlow 1.4s ease-in-out infinite alternate;
}

@keyframes textGlow {
    from { opacity: 0.7; }
    to { opacity: 1; filter: drop-shadow(0 0 6px rgba(96, 165, 250, 0.6)); }
}

/* Modern Schedule Loader Box */
.schedule-loader-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    animation: fadeInLoader 0.3s ease;
}

@keyframes fadeInLoader {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}