#kt_app_root, 
#kt_app_page, 
#kt_app_wrapper, 
#kt_app_main {
    min-height: 100vh !important;
    height: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow-x: hidden;
}

/* --- Split Layout Container --- */
.auth-split-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
    background: #f8fafc url('../images/background_login.png') no-repeat center center;
    background-size: cover;
    background-attachment: fixed;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    position: relative;
}

/* ==========================================
   LEFT COLUMN: BRAND & MARKETING SHOWCASE
   ========================================== */
.auth-split-left {
    flex: 1;
    max-width: 52%;
    min-width: 500px;
    background: transparent;
    color: #1e293b;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 4rem 10rem;
    position: relative;
    overflow-y: auto;
    z-index: 1;
}

/* Ambient glow disabled for image background */
.auth-split-left::before {
    display: none;
}

/* Top Brand Header with Real Logo & Live Pill */
.auth-left-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    z-index: 2;
    margin-bottom: 1.5rem;
}

.auth-left-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    text-decoration: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.auth-left-brand:hover {
    opacity: 0.95;
    transform: translateY(-1px);
}

.auth-brand-logo-img {
    height: 48px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
    filter: drop-shadow(0 4px 14px rgba(31, 111, 210, 0.12));
}

.auth-live-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.775rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #0f172a;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(226, 232, 240, 0.9);
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.auth-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: livePulse 2s infinite;
}

@keyframes livePulse {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

/* Content Showcase */
.auth-left-content {
    max-width: 530px;
    margin: auto 0;
    z-index: 2;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.95);
    border-radius: 1.5rem;
    padding: 2.25rem 2.5rem;
    box-shadow: 0 20px 50px -15px rgba(15, 23, 42, 0.08), 0 0 0 1px rgba(255, 255, 255, 0.8) inset;
}

/* Supertag */
.auth-hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #1f6fd2;
    background: rgba(31, 111, 210, 0.08);
    border: 1px solid rgba(31, 111, 210, 0.22);
    padding: 0.35rem 0.8rem;
    border-radius: 9999px;
    margin-bottom: 1.15rem;
}

.auth-hero-headline {
    font-size: 2.15rem;
    font-weight: 800;
    line-height: 1.25;
    color: #0f172a;
    margin-bottom: 0.85rem;
    letter-spacing: -0.025em;
}

.auth-hero-headline .highlight {
    background: linear-gradient(135deg, #1f6fd2 0%, #0284c7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.auth-hero-subtitle {
    font-size: 0.925rem;
    color: #475569;
    line-height: 1.55;
    margin-bottom: 1.5rem;
}

/* Features Deck */
.auth-features-deck {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-bottom: 1.5rem;
}

.auth-feature-card {
    display: flex;
    align-items: flex-start;
    gap: 0.95rem;
    padding: 0.85rem 1rem;
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 0.95rem;
    transition: all 0.2s ease;
}

.auth-feature-card:hover {
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px -4px rgba(31, 111, 210, 0.08);
}

.auth-feat-icon-box {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.auth-feat-icon-box svg {
    width: 20px;
    height: 20px;
}

.auth-feat-icon-box.feat-blue {
    background: linear-gradient(135deg, rgba(31, 111, 210, 0.15) 0%, rgba(2, 132, 199, 0.12) 100%);
    color: #1f6fd2;
    border: 1px solid rgba(31, 111, 210, 0.22);
}

.auth-feat-icon-box.feat-orange {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(234, 88, 12, 0.12) 100%);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.auth-feat-icon-box.feat-green {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(5, 150, 105, 0.12) 100%);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.auth-feat-info {
    flex: 1;
}

.auth-feat-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.35;
    margin-bottom: 0.2rem;
}

.auth-feat-desc {
    font-size: 0.825rem;
    color: #64748b;
    line-height: 1.45;
}

/* Stats Strip */
.auth-stats-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.88) 0%, rgba(248, 250, 252, 0.88) 100%);
    border: 1px solid rgba(226, 232, 240, 0.85);
    border-radius: 1rem;
    padding: 0.9rem 1.25rem;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.03);
}

.auth-stat-col {
    text-align: center;
    flex: 1;
}

.auth-stat-num {
    font-size: 1.35rem;
    font-weight: 800;
    color: #1f6fd2;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.auth-stat-txt {
    font-size: 0.725rem;
    font-weight: 600;
    color: #64748b;
    margin-top: 0.2rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.auth-stat-sep {
    width: 1px;
    height: 30px;
    background: #e2e8f0;
}

/* Footer Copyright */
.auth-left-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.8125rem;
    color: #64748b;
    font-weight: 500;
    z-index: 2;
    margin-top: 1.5rem;
}

.auth-footer-brand {
    font-weight: 600;
    color: #475569;
    letter-spacing: 0.02em;
}

.auth-footer-links {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
}

.auth-footer-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: #64748b;
}

.auth-footer-dot {
    color: #cbd5e1;
}

/* ==========================================
   RIGHT COLUMN: INTERACTIVE FORM CONTAINER
   ========================================== */
.auth-split-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 2rem;
    background: transparent;
    overflow-y: auto;
    position: relative;
    z-index: 2;
}

.auth-card-wrapper {
    width: 100%;
    max-width: 440px;
}

/* Mobile Brand Header */
.auth-mobile-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1.5rem;
    text-align: center;
}

.auth-mobile-logo-img {
    height: 44px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(31, 111, 210, 0.1));
}

/* Top Action Bar (Back Link) */
.auth-top-action-bar {
    width: 100%;
    display: flex;
    justify-content: flex-start;
    margin-bottom: 1rem;
}

.auth-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #475569;
    text-decoration: none;
    padding: 0.45rem 0.95rem;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(226, 232, 240, 0.85);
    border-radius: 9999px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
    transition: all 0.2s ease;
}

.auth-back-link:hover {
    color: #1f6fd2;
    background: #ffffff;
    box-shadow: 0 4px 14px rgba(31, 111, 210, 0.16);
    transform: translateX(-2px);
}

/* Auth Card - Frosted Glass */
.auth-main-card {
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.95);
    border-radius: 1.35rem;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.08), 0 0 0 1px rgba(226, 232, 240, 0.7);
    padding: 2rem;
}

/* Top Segmented Pill (Đăng nhập / Đăng ký) */
.auth-tab-pill {
    display: flex;
    background: rgba(241, 245, 249, 0.85);
    border-radius: 0.75rem;
    padding: 0.3rem;
    margin-bottom: 1.5rem;
    user-select: none;
    border: 1px solid rgba(226, 232, 240, 0.6);
}

.auth-tab-btn {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.6rem 1rem;
    font-size: 0.925rem;
    font-weight: 600;
    color: #64748b;
    border-radius: 0.55rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
}

.auth-tab-btn.active {
    background: #ffffff;
    color: #1f6fd2;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
}

/* Google Button */
.btn-google-auth {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    width: 100%;
    height: 44px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    color: #1e293b;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s ease;
}

.btn-google-auth:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #0f172a;
}

.google-icon-svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Separator */
.auth-or-separator {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.25rem 0;
    color: #94a3b8;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.08em;
}

.auth-or-separator::before,
.auth-or-separator::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e2e8f0;
}

.auth-or-separator span {
    padding: 0 0.75rem;
}

/* Login Method Sub-Toggle (Email vs Số điện thoại) */
.auth-method-subtoggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.method-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.4rem 1.15rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #64748b;
    border: none;
    background: transparent;
    border-radius: 0.45rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.method-toggle-btn.active {
    background: #edf2f7;
    color: #1e293b;
    font-weight: 600;
}

.method-toggle-btn svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    stroke-width: 1.8;
    fill: none;
}

/* Form Groups & Controls */
.auth-tab-pill .auth-tab-btn {
    font-size: 1rem;
}
.auth-form-group {
    margin-bottom: 1.1rem;
}

.auth-label {
    display: block;
    font-size: 1.05rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.4rem;
}

.auth-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.4rem;
}

.auth-forgot-link {
    font-size: 0.8rem;
    color: #1f6fd2;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.15s ease;
}

.auth-forgot-link:hover {
    color: #1557a6;
    text-decoration: underline;
}

.auth-control {
    width: 100%;
    height: 46px;
    padding: 0.65rem 1rem;
    color: #0f172a;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.65rem;
    outline: none;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.auth-control:focus {
    background: #ffffff;
    border-color: #1f6fd2;
    box-shadow: 0 0 0 3.5px rgba(31, 111, 210, 0.15);
}

.auth-control::placeholder {
    color: #94a3b8;
}

/* Password Input with eye toggle */
.auth-password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-password-wrapper .auth-control {
    padding-right: 2.75rem;
}

.auth-pw-toggle {
    position: absolute;
    right: 0.6rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: #94a3b8;
    border-radius: 0.45rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.auth-pw-toggle:hover {
    color: #1f6fd2;
    background: rgba(31, 111, 210, 0.08);
}

.auth-pw-toggle svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 1.8;
    fill: none;
}

/* Primary Submit Button */
.btn-auth-main {
    width: 100%;
    height: 48px;
    background: linear-gradient(135deg, #1f6fd2 0%, #1557a6 100%);
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    border: none;
    border-radius: 0.65rem;
    cursor: pointer;
    margin-top: 0.5rem;
    box-shadow: 0 8px 20px -3px rgba(31, 111, 210, 0.38);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-auth-main:hover:not(:disabled) {
    background: linear-gradient(135deg, #2b7ae0 0%, #175eb3 100%);
    box-shadow: 0 10px 24px -3px rgba(31, 111, 210, 0.48);
    transform: translateY(-1px);
}

.btn-auth-main:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 4px 12px -2px rgba(31, 111, 210, 0.35);
}

.btn-auth-main:active:not(:disabled) {
    transform: translateY(1px);
}

.btn-auth-main:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Bottom Legal Disclaimer */
.auth-bottom-terms {
    font-size: 0.9rem;
    color: #64748b;
    text-align: center;
    line-height: 1.5;
    margin-top: 1rem;
    padding: 0 0.5rem;
}

.auth-bottom-terms a {
    color: #334155;
    text-decoration: underline;
}

/* Form Visibility Panes */
.auth-pane {
    display: none;
}

.auth-pane.active {
    display: block;
}

/* Alert Notification Box */
.auth-alert-box {
    display: none;
    padding: 0.65rem 0.85rem;
    border-radius: 0.45rem;
    font-size: 0.8125rem;
    margin-bottom: 1rem;
}

.auth-alert-box.is-visible {
    display: block;
}

.auth-alert-box.alert-danger {
    background-color: #fef2f2;
    border: 1px solid #fee2e2;
    color: #b91c1c;
}

.auth-alert-box.alert-success {
    background-color: #f0fdf4;
    border: 1px solid #dcfce7;
    color: #15803d;
}

/* Two-column grid for Name fields */
.auth-row-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

/* ==========================================
   RESPONSIVE DESIGN (TABLET & MOBILE)
   ========================================== */
@media (max-width: 991.98px) {
    .auth-split-left {
        display: none !important;
    }

    .auth-split-container {
        flex-direction: column;
        min-height: 100vh;
        width: 100%;
        background: #f8fafc url('../images/background_login.png') no-repeat center center;
        background-size: cover;
    }

    .auth-split-right {
        flex: 1;
        width: 100%;
        min-height: 100vh;
        padding: 2rem 1.25rem;
        display: flex;
        align-items: center;
        justify-content: center;
        background: transparent;
    }

    .auth-card-wrapper {
        max-width: 440px;
        width: 100%;
        margin: auto 0;
    }
}

@media (max-width: 575.98px) {
    .auth-split-right {
        padding: 1.5rem 1rem;
    }

    .auth-card-wrapper {
        max-width: 100%;
    }

    .auth-main-card {
        padding: 1.5rem 1.15rem;
        border-radius: 0.875rem;
    }

    .auth-control {
        font-size: 16px !important; /* Prevents auto-zoom on iOS Safari */
    }

    .auth-row-2col {
        grid-template-columns: 1fr;
    }

    .auth-method-subtoggle {
        gap: 0.35rem;
    }

    .method-toggle-btn {
        padding: 0.4rem 0.85rem;
        font-size: 0.8rem;
    }

    .auth-bottom-terms {
        font-size: 0.75rem;
        margin-top: 1rem;
        padding: 0 0.25rem;
    }
}
