body {
    overflow-x: hidden;
    min-height: 100vh;
    color: var(--text-main);
    background-color: var(--bg-body);
}

/* Header Styles */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 10px;
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--white);
    border-bottom: 1px solid var(--border);
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-box {
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    color: var(--white);
}

.logo-box img {
    max-height: 30px;
    object-fit: contain;
}

.brand-name {
    font-size: 1.125rem;
    font-weight: 700;
}

.header-nav {
    display: flex;
    gap: 10px;
}

.header-nav a {
    text-decoration: none;
    color: var(--text-light);
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
    padding: 1px 8px 4px 8px;
}

.header-nav a:hover {
    color: var(--primary);
    background: var(--primary-light);
}

/* Main Layout */
.main-container {
    flex-grow: 1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 900px) {
    .main-container {
        display: flex;
        flex-direction: column-reverse;
    }
}

/* Left Panel */
.info-panel {
    padding: 3rem 2rem;
    position: relative;
    overflow: hidden;
    background: var(--white);
}

@media (min-width: 768px) {
    .info-panel {
        display: flex;
        flex-direction: column;
    }
}

.hero-image-wrapper {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    margin-bottom: 2.5rem;
    height: 300px;
}

.hero-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}

.hero-image-wrapper:hover img {
    transform: scale(1.05);
}

.carousel-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(31, 58, 138, 0.9) 0%, rgba(31, 58, 138, 0.2) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
}

.badge {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    color: var(--white);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    padding: 0.25rem 0.75rem;
    border-radius: 99px;
    width: fit-content;
    margin-bottom: 0.30rem;
    text-transform: uppercase;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.hero-title {
    color: var(--white);
    font-size: 1.875rem;
    font-weight: 700;
    line-height: 1.2;
}

.intro-text h2 {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 2rem;
}

.intro-text h2 span {
    color: var(--primary);
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.stats-card {
    background: var(--white);
    border: 1px solid var(--border);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    position: relative;
    transition: var(--transition);
    overflow: hidden;
    z-index: 2;
}

.stats-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 20%;
    height: 60%;
    width: 4px;
    border-radius: 0 4px 4px 0;
    transition: var(--transition);
}

.card-blue::before { background: var(--primary); }
.card-indigo::before { background: var(--secondary); }
.card-green::before { background: var(--accent); }

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.stats-card:hover::before {
    top: 0;
    height: 100%;
}

.stats-card.full-width {
    grid-column: span 2;
    display: flex;
    gap: 1rem;
    align-items: center;
}

.icon-box {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.stats-card.full-width .icon-box {
    margin-bottom: 0;
}

.bg-blue-light { background: #eff6ff; color: var(--primary); }
.bg-indigo-light { background: #eef2ff; color: var(--secondary); }
.bg-green-light { background: #ecfdf5; color: var(--accent); }

.stats-val {
    font-size: 1.5rem;
    font-weight: 700;
}

.stats-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 0.25rem;
}

.full-width {
    grid-column: span 2;
}

/* --- LOGIN PANEL (RIGHT) --- */
/* The entire right panel acts as the unified design background without any nested floating card borders or card shadows */
.login-panel {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2.5rem 1.5rem;
    background-color: var(--bg-panel-right);
    transition: var(--transition-smooth);
    position: relative;
}

.login-form-wrapper {
    width: 100%;
    max-width: 420px;
    transition: var(--transition-smooth);
}

/* Title Header */
.login-header-group {
    margin-bottom: 2rem;
    text-align: left;
}

.mobile-brand-row {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

@media (min-width: 1024px) {
    .portal-inner-container.split-layout .mobile-brand-row {
        display: none;
    }
}

.mobile-logo-box {
    width: 32px;
    height: 32px;
    background-color: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    overflow: hidden;
}

.mobile-logo-box i {
    font-size: 0.875rem;
}

.login-heading {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

.login-subheading {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 0.375rem;
    line-height: 1.4;
}

/* OAuth Integrations (Social Row) */
.social-login-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.875rem;
    margin-bottom: 1.75rem;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    padding: 0.75rem 1rem;
    background-color: var(--bg-panel-right);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-main);
    font-size: 0.8125rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.social-btn:hover {
    background-color: var(--bg-input);
    border-color: var(--primary);
    transform: translateY(-1px);
}

.social-btn:active {
    transform: scale(0.98);
}

.social-btn svg {
    width: 16px;
    height: 16px;
}

/* Decorative separator */
.form-separator {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.75rem;
}

.form-separator-line {
    width: 100%;
    height: 1px;
    background-color: var(--border);
}

.form-separator-text {
    position: absolute;
    background-color: white;
    padding: 0 0.75rem;
    font-size: 0.625rem;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    transition: var(--transition-smooth);
}

/* --- FORM STRUCTURE --- */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    width: 100%;
}

.form-field-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-field-labels {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.form-label {
    font-size: 0.625rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    transition: var(--transition-smooth);
}

.form-label-link {
    font-size: 0.6875rem;
    font-weight: 700;
    color: var(--text-accent);
    text-decoration: none;
    transition: var(--transition-smooth);
}

.form-label-link:hover {
    text-decoration: underline;
}

.input-wrapper {
    display: flex;
    align-items: center;
    background-color: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    height: 48px;
    width: 100%;
    transition: var(--transition-smooth);
    overflow: hidden;
}

.input-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--glow-1);
}

.input-prefix-icon {
    padding-left: 1rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    font-size: 0.8125rem;
}

.input-element {
    flex-grow: 1;
    height: 100%;
    border: none;
    outline: none;
    padding: 0 0.875rem;
    font-size: 0.8125rem;
    font-family: var(--font-sans);
    color: var(--text-main);
    background-color: transparent;
}

.input-element::placeholder {
    color: var(--text-muted);
    opacity: 0.75;
}

.input-suffix-action {
    height: 100%;
    padding-right: 1rem;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.input-suffix-action:hover {
    color: var(--text-main);
}

/* Unified Grid alignment for Captcha Row */
.captcha-row-grid {
    display: flex;
    flex-direction: row;
    gap: 10px;
    align-items: stretch;
}

/* Left Column: Canvas display (height matches input field wrapper exactly) */
.captcha-canvas-container {
    display: flex;
    align-items: center;
    background-color: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    height: 48px;
    width: 100%;
    padding: 0.25rem;
    position: relative;
    overflow: hidden;
    transition: var(--transition-smooth);
}

.captcha-canvas-element {
    width: 100%;
    height: 100%;
    background-color: var(--bg-panel-right);
    border-radius: calc(8px * 0.75);
    transition: var(--transition-smooth);
}

.captcha-reload-btn {
    cursor: pointer;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
    gap: 5px;
}

.captcha-reload-btn:hover {
    color: var(--primary);
    background-color: var(--bg-input);
}

/* --- INTERACTIVE SWITCH & CORE SUBMIT BUTTON --- */
.remember-device-row {
    display: flex;
    align-items: center;
    padding: 0.25rem 0;
}

.switch-label-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    user-select: none;
}

.native-checkbox-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.switch-pill-track {
    position: relative;
    width: 37px;
    height: 21px;
    background-color: var(--border);
    border-radius: 9999px;
    transition: 0.3s;
}

.switch-handle-slider {
    position: absolute;
    top: 2px;
    left: 3px;
    width: 16px;
    height: 16px;
    background-color: #ffffff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: 0.3s;
}

.native-checkbox-hidden:checked + .switch-pill-track {
    background-color: var(--primary);
}

.native-checkbox-hidden:checked + .switch-pill-track .switch-handle-slider {
    transform: translateX(16px);
}

.remember-caption {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: var(--transition-smooth);
}

/* Shimmer primary submission button */
.portal-submit-btn {
    width: 100%;
    height: 50px;
    border: none;
    outline: none;
    border-radius: 8px;
    color: white;
    font-size: 0.8125rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    box-shadow: var(--shadow-subtle);
    transform: translateY(0);
    transition: var(--transition-smooth);
}

.portal-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px var(--glow-1);
}

.portal-submit-btn:active {
    transform: scale(0.98);
}

.portal-submit-btn i {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

.portal-submit-btn:hover i {
    transform: translateX(3px);
}

/* Legal notes footer */
.portal-legal-footer {
    margin-top: 1.75rem;
    border-top: 1px solid var(--border);
    padding-top: 1.25rem;
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.5;
    transition: var(--transition-smooth);
}

.portal-legal-footer a {
    color: var(--text-accent);
    font-weight: 700;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: var(--transition-smooth);
}

.portal-legal-footer a:hover {
    border-color: var(--text-accent);
}

/* --- POPUP TOAST SYSTEM --- */
.toast-holder {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 380px;
    pointer-events: none;
}

.toast-item {
    background-color: var(--bg-panel-right);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 1rem 1.25rem;
    border-radius: 8px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transform: translateY(20px);
    opacity: 0;
    animation: toast-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    pointer-events: auto;
    transition: var(--transition-smooth);
}

@keyframes toast-in {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.toast-success-accent { border-left: 4px solid #10b981; }
.toast-error-accent { border-left: 4px solid #ef4444; }
.toast-info-accent { border-left: 4px solid var(--primary); }

.toast-success-accent i { color: #10b981; }
.toast-error-accent i { color: #ef4444; }
.toast-info-accent i { color: var(--primary); }

/* --- UTILITY DRAWER SYSTEM --- */
.floating-controls-trigger {
    position: fixed;
    bottom: 1.5rem;
    left: 1.5rem;
    z-index: 900;
}

.trigger-btn {
    background-color: var(--bg-panel-right);
    border: 1px solid var(--border);
    color: var(--text-muted);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 20px rgba(0,0,0,0.06);
    transition: var(--transition-smooth);
}

.trigger-btn:hover {
    color: var(--text-main);
    box-shadow: 0 10px 20px rgba(0,0,0,0.12);
}

.trigger-btn i {
    font-size: 0.875rem;
    animation: spin-slow 20s linear infinite;
}

.config-drawer-container {
    display: none;
    position: absolute;
    bottom: 3.5rem;
    left: 0;
    width: 300px;
    background-color: var(--bg-panel-right);
    border: 1px solid var(--border);
    padding: 1.25rem;
    border-radius: var(--radius-box);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    transform: translateY(10px);
    opacity: 0;
    transition: var(--transition-smooth);
    z-index: 1000;
}

.config-drawer-container.visible {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transform: translateY(0);
    opacity: 1;
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
}

.drawer-header h4 {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-main);
}

.drawer-close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.75rem;
}

.drawer-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.drawer-section-label {
    font-size: 0.625rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-accent);
}

.drawer-btn-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.drawer-action-btn {
    padding: 0.5rem;
    font-size: 0.6875rem;
    font-weight: 700;
    background-color: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-main);
    cursor: pointer;
    transition: var(--transition-smooth);
    text-align: left;
}

.drawer-action-btn.active {
    background-color: var(--primary);
    color: var(--btn-text);
    border-color: var(--primary);
}

.drawer-input {
    width: 100%;
    background-color: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.5rem;
    font-size: 0.6875rem;
    color: var(--text-main);
    outline: none;
}

/* Dynamic Keyframes */
@keyframes pulse-slow {
    0%, 100% { opacity: 0.45; }
    50% { opacity: 0.9; }
}

@keyframes float-slow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes spin-slow {
    to { transform: rotate(360deg); }
}
/* Footer */
.footer {
    padding: 0.5rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 11px;
    text-transform: uppercase;
    background: var(--white);
    border-top: 1px solid var(--border);
    color: var(--text-light);
}

@media (min-width: 768px) {
    .footer {
        flex-direction: row;
        justify-content: space-between;
    }
}

/* Decorations */
.bg-blob {
    position: absolute;
    bottom: -80px;
    left: -80px;
    width: 256px;
    height: 256px;
    background: #b9d7ff73;
    border-radius: 50%;
    opacity: 0.5;
    z-index: 0;
}

.captcha-image-cntnr {
    display: flex;
    border-radius: 8px;
    overflow: hidden;
    align-items: stretch;
}
