:root {
    --login-primary: #1e40af;
    --login-primary-gradient: linear-gradient(135deg, #1e3a8a 0%, #2563eb 50%, #38bdf8 100%);
    --login-btn-gradient: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    --login-btn-gradient-hover: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
}

body, html {
    font-family: 'Prompt', 'Sarabun', sans-serif !important;
    height: 100%;
    margin: 0;
    background-color: #f1f5f9;
}

.login-bg-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    background: radial-gradient(circle at 10% 20%, rgba(37, 99, 235, 0.08) 0%, transparent 40%),
                radial-gradient(circle at 90% 80%, rgba(56, 189, 248, 0.12) 0%, transparent 45%),
                linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
    overflow-x: hidden;
}

/* Decorative Background Floating Shapes */
.bg-shape-1 {
    position: absolute;
    top: -120px;
    right: -100px;
    width: 450px;
    height: 450px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.15), rgba(56, 189, 248, 0.08));
    border-radius: 50%;
    filter: blur(60px);
    z-index: 0;
    pointer-events: none;
}

.bg-shape-2 {
    position: absolute;
    bottom: -150px;
    left: -120px;
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.12), rgba(99, 102, 241, 0.1));
    border-radius: 50%;
    filter: blur(80px);
    z-index: 0;
    pointer-events: none;
}

.login-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    position: relative;
    z-index: 1;
}

/* Modern Split Card Container */
.modern-login-card {
    width: 100%;
    max-width: 1020px;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.15), 0 0 0 1px rgba(226, 232, 240, 0.8);
    overflow: hidden;
    display: flex;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Left Hero Panel */
.login-hero-panel {
    flex: 1.1;
    background: var(--login-primary-gradient);
    color: #ffffff;
    padding: 48px 44px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.login-hero-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.15) 0%, transparent 60%),
                radial-gradient(circle at 20% 80%, rgba(0, 0, 0, 0.15) 0%, transparent 50%);
    pointer-events: none;
}

.hero-brand-box {
    position: relative;
    z-index: 2;
}

.hero-logo-card {
    display: inline-block;
    background: rgba(255, 255, 255, 0.95);
    padding: 12px 24px;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(8px);
    margin-bottom: 24px;
}

.hero-logo-card img {
    height: 38px;
    max-width: 220px;
    width: auto;
    object-fit: contain;
    display: block;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.3px;
    backdrop-filter: blur(10px);
    margin-bottom: 16px;
}

.hero-title {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 14px;
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.hero-desc {
    font-size: 0.95rem;
    font-weight: 300;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 28px;
}

/* Feature Highlights */
.hero-features {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 30px;
    position: relative;
    z-index: 2;
}

.hero-feature-item {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    padding: 10px 16px;
    border-radius: 12px;
    backdrop-filter: blur(6px);
    transition: transform 0.2s ease, background 0.2s ease;
}

.hero-feature-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(4px);
}

.hero-feature-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 0.9rem;
    color: #ffffff;
    flex-shrink: 0;
}

.hero-feature-text {
    font-size: 0.88rem;
    font-weight: 400;
    color: #ffffff;
}

.hero-footer-note {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.75);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 16px;
    position: relative;
    z-index: 2;
}

/* Right Form Panel */
.login-form-panel {
    flex: 1;
    padding: 48px 44px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #ffffff;
}

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

.form-header-badge {
    display: inline-block;
    color: #2563eb;
    background: #eff6ff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.form-header h2 {
    font-size: 1.65rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 6px;
}

.form-header p {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 0;
}

/* Modern Input Fields */
.custom-form-group {
    margin-bottom: 22px;
    position: relative;
}

.custom-form-group label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 8px;
}

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

.input-icon-left {
    position: absolute;
    left: 16px;
    color: #94a3b8;
    font-size: 1rem;
    pointer-events: none;
    transition: color 0.2s ease;
    z-index: 3;
}

.custom-input {
    width: 100%;
    height: 52px;
    padding: 12px 16px 12px 46px;
    font-size: 0.95rem;
    font-family: inherit;
    color: #1e293b;
    background-color: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

.custom-input:focus {
    background-color: #ffffff;
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.custom-input:focus + .input-icon-left,
.custom-form-group:focus-within .input-icon-left {
    color: #2563eb;
}

.custom-input::placeholder {
    color: #94a3b8;
    font-weight: 300;
    font-size: 0.9rem;
}

/* Password Toggle Eye */
.btn-toggle-pass {
    position: absolute;
    right: 12px;
    background: transparent;
    border: none;
    color: #94a3b8;
    padding: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    z-index: 4;
}

.btn-toggle-pass:hover {
    color: #2563eb;
    background: #f1f5f9;
}

/* Error Text Box */
.error-box {
    display: none;
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.82rem;
    margin-top: 6px;
    animation: fadeIn 0.3s ease;
}

.error-box::before {
    content: '\f06a';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    margin-right: 6px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Submit Button */
.btn-login-submit {
    width: 100%;
    height: 52px;
    background: var(--login-btn-gradient);
    border: none;
    border-radius: 12px;
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 600;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 10px 20px -5px rgba(37, 99, 235, 0.4);
    transition: all 0.25s ease;
    margin-top: 10px;
}

.btn-login-submit:hover {
    background: var(--login-btn-gradient-hover);
    box-shadow: 0 14px 24px -5px rgba(37, 99, 235, 0.5);
    transform: translateY(-2px);
    color: #ffffff;
}

.btn-login-submit:active {
    transform: translateY(1px);
    box-shadow: 0 6px 14px -3px rgba(37, 99, 235, 0.4);
}

.btn-login-submit i {
    transition: transform 0.2s ease;
}

.btn-login-submit:hover i {
    transform: translateX(4px);
}

/* Security Badge */
.security-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 24px;
    font-size: 0.8rem;
    color: #64748b;
}

.security-badge i {
    color: #10b981;
}

/* Mobile Logo (hidden on desktop) */
.mobile-brand-header {
    display: none;
    text-align: center;
    margin-bottom: 24px;
}

.mobile-brand-header img {
    height: 36px;
    margin-bottom: 12px;
}

/* Footer Styling */
.login-footer-section {
    padding: 24px 20px 30px;
    text-align: center;
    color: #64748b;
    font-size: 0.82rem;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

.login-footer-section .footer-title {
    font-weight: 600;
    color: #334155;
}

.login-footer-section .footer-contact {
    color: #94a3b8;
    font-size: 0.78rem;
    margin-top: 4px;
}

/* Responsive Adjustments */
@media (max-width: 991.98px) {
    .modern-login-card {
        max-width: 580px;
        flex-direction: column;
    }

    .login-hero-panel {
        padding: 36px 30px;
    }

    .hero-features {
        display: none;
    }

    .login-form-panel {
        padding: 36px 30px;
    }
}

@media (max-width: 575.98px) {
    .login-wrapper {
        padding: 20px 14px;
    }

    .modern-login-card {
        border-radius: 18px;
    }

    .login-hero-panel {
        display: none;
    }

    .mobile-brand-header {
        display: block;
    }

    .login-form-panel {
        padding: 32px 20px;
    }

    .form-header h2 {
        font-size: 1.45rem;
    }

    .custom-input {
        height: 48px;
        font-size: 0.9rem;
    }

    .btn-login-submit {
        height: 48px;
        font-size: 0.95rem;
    }
}
