:root {
            --primary: #003d8f;
            --primary-light: #005baa;
            --accent: #005baa;
            --accent-hover: #003d8f;
            --text-main: #1a2b3c;
            --text-muted: #4a607a;
            --bg-light: #f5f8fc;
        }

        body {
            font-family: 'Inter', 'Noto Sans Thai', sans-serif;
            margin: 0;
            padding: 0;
            min-height: 100vh;
            background-color: #ffffff;
            color: var(--text-main);
        }

        /* Split Layout Container */
        .split-layout {
            display: flex;
            min-height: 100vh;
            width: 100%;
        }

        /* Left Side: Hero Image & Branding */
        .split-left {
            flex: 1;
            position: relative;
            background-image: url('https://images.unsplash.com/photo-1497366216548-37526070297c?auto=format&fit=crop&q=80&w=1600');
            background-size: cover;
            background-position: center;
            display: none;
            /* Hidden on mobile */
        }

        @media (min-width: 992px) {
            .split-left {
                display: flex;
                flex-direction: column;
                justify-content: space-between;
                padding: 60px;
            }
        }

        .split-left::before {
            content: '';
            position: absolute;
            inset: 0;
            background: linear-gradient(180deg, rgba(15, 23, 42, 0.4) 0%, rgba(15, 23, 42, 0.9) 100%);
            z-index: 1;
        }

        .brand-content {
            position: relative;
            z-index: 2;
            color: #ffffff;
        }

        .login-brand {
            display: flex;
            align-items: center;
            gap: 16px;
            margin-bottom: auto;
            position: relative;
            z-index: 1;
        }

        .login-brand-icon {
            width: 52px;
            height: 52px;
            background: linear-gradient(135deg, rgba(255, 255, 255, .2), rgba(255, 255, 255, .05));
            border: 1px solid rgba(255, 255, 255, .15);
            border-radius: 14px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 22px;
            color: #fff;
            backdrop-filter: blur(8px);
        }

        .login-brand-name {
            font-size: 1.2rem;
            font-weight: 800;
            color: #fff;
            display: block;
            letter-spacing: -.01em;
        }

        .login-brand-sub {
            font-size: .78rem;
            color: rgba(255, 255, 255, .5);
            display: block;
            margin-top: 1px;
        }

        .hero-text {
            position: relative;
            z-index: 2;
            color: #ffffff;
            margin-top: auto;
            max-width: 500px;
        }

        .hero-text h1 {
            font-size: 48px;
            font-weight: 800;
            line-height: 1.1;
            margin-bottom: 24px;
            letter-spacing: -1px;
        }

        .hero-text p {
            font-size: 18px;
            color: #cbd5e1;
            line-height: 1.6;
        }

        .login-features {
            list-style: none;
            margin: 40px 0 0 0;
            text-align: left;
            display: flex;
            flex-direction: column;
            gap: 20px;
        }

        .login-features li {
            display: flex;
            align-items: center;
            gap: 16px;
            color: rgba(255, 255, 255, 0.9);
            font-size: 16px;
            font-weight: 500;
        }

        .login-features li .fi {
            width: 40px;
            height: 40px;
            background: rgba(255, 255, 255, 0.15);
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 16px;
            color: #ffffff;
            flex-shrink: 0;
            backdrop-filter: blur(4px);
        }

        /* Right Side: Login Form */
        .split-right {
            flex: 1;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            padding: 40px 24px;
            background-color: #ffffff;
        }

        .form-container {
            width: 100%;
            max-width: 440px;
        }

        .form-header {
            margin-bottom: 40px;
        }

        .form-header h2 {
            font-size: 32px;
            font-weight: 800;
            color: var(--text-main);
            margin-bottom: 8px;
            letter-spacing: -1px;
        }

        .form-header p {
            font-size: 16px;
            color: var(--text-muted);
        }

        /* Minimalist Inputs */
        .form-group {
            margin-bottom: 24px;
            position: relative;
        }

        .form-label {
            display: block;
            font-size: 14px;
            font-weight: 600;
            color: var(--text-main);
            margin-bottom: 8px;
        }

        .input-wrapper {
            position: relative;
        }

        .input-wrapper input {
            width: 100%;
            height: 56px;
            padding: 12px 16px 12px 48px;
            background-color: var(--bg-light);
            border: 1px solid #e2e8f0;
            border-radius: 12px;
            font-size: 16px;
            color: var(--text-main);
            transition: all 0.2s ease;
        }

        .input-wrapper input:focus {
            outline: none;
            background-color: #ffffff;
            border-color: var(--accent);
            box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
        }

        .input-wrapper .input-icon {
            position: absolute;
            left: 18px;
            top: 28px;
            transform: translateY(-50%);
            color: #94a3b8;
            font-size: 18px;
            transition: color 0.2s ease;
        }

        .input-wrapper input:focus~.input-icon {
            color: var(--accent);
        }

        .toggle-password {
            position: absolute;
            right: 16px;
            top: 28px;
            transform: translateY(-50%);
            background: none;
            border: none;
            color: #94a3b8;
            cursor: pointer;
            padding: 0;
            font-size: 18px;
        }

        .toggle-password:hover {
            color: var(--text-main);
        }

        /* Custom Checkbox */
        .form-options {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 32px;
        }

        .custom-checkbox {
            display: flex;
            align-items: center;
            gap: 10px;
            cursor: pointer;
            user-select: none;
        }

        .custom-checkbox input {
            display: none;
        }

        .checkbox-box {
            width: 22px;
            height: 22px;
            border-radius: 6px;
            border: 2px solid #cbd5e1;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s;
        }

        .checkbox-box i {
            color: white;
            font-size: 12px;
            opacity: 0;
            transform: scale(0.5);
            transition: all 0.2s;
        }

        .custom-checkbox input:checked+.checkbox-box {
            background-color: var(--primary);
            border-color: var(--primary);
        }

        .custom-checkbox input:checked+.checkbox-box i {
            opacity: 1;
            transform: scale(1);
        }

        .custom-checkbox span {
            font-size: 14px;
            font-weight: 500;
            color: var(--text-muted);
        }

        .custom-checkbox input:checked~span {
            color: var(--text-main);
        }

        /* Login Button */
        .btn-login {
            width: 100%;
            height: 56px;
            background-color: var(--primary);
            color: #ffffff;
            border: none;
            border-radius: 12px;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 12px;
            transition: all 0.2s ease;
        }

        .btn-login:hover {
            background-color: var(--primary-light);
            transform: translateY(-2px);
            box-shadow: 0 10px 20px -10px rgba(15, 23, 42, 0.5);
        }

        .btn-login:active {
            transform: translateY(0);
        }

        /* Validation fixes */
        .input-wrapper input.is-invalid,
        .was-validated .input-wrapper input:invalid {
            border-color: #ef4444;
            background-image: none !important;
        }

        .input-wrapper input.is-invalid:focus,
        .was-validated .input-wrapper input:invalid:focus {
            box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
        }

        .input-wrapper input.is-invalid~.input-icon,
        .was-validated .input-wrapper input:invalid~.input-icon,
        .input-wrapper input.is-invalid~.toggle-password,
        .was-validated .input-wrapper input:invalid~.toggle-password {
            color: #ef4444;
        }

        .invalid-feedback {
            font-size: 13px;
            margin-top: 6px;
        }

        /* Mobile Brand Overrides */
        .mobile-brand .login-brand-name {
            color: var(--text-main);
        }

        .mobile-brand .login-brand-sub {
            color: var(--text-muted);
        }

        .mobile-brand .login-brand-icon {
            background: var(--primary);
            border: none;
            box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
        }

        @media (max-width: 991.98px) {
            .split-right {
                padding: 40px 24px;
                background-color: #f8fafc;
            }

            .form-container {
                background: #ffffff;
                padding: 40px 24px;
                border-radius: 24px;
                box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.05);
            }
        }
    
/* --- Alert Custom --- */
.alert-custom { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 12px; margin-bottom: 20px; font-size: 0.9rem; font-weight: 500; }
.alert-custom.alert-danger { background-color: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }
.alert-custom.alert-success { background-color: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
