/* ==============================================================================
   EduMi Enterprise Authentication Stylesheet
   Modern, compact, responsive, accessible split-view layout.
   ============================================================================== */

@import url('design_tokens.css');

/* Hide global navbar on auth pages */
body:has(.auth-split-container) nav,
body:has(.auth-split-container) header.global-nav {
    display: none !important;
}

/* Page Background & Viewport Centering */
body:has(.auth-split-container) {
    margin: 0;
    padding: clamp(0.75rem, 2vh, 1.5rem) 1rem;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f3f0fb;
    background-image: 
        radial-gradient(circle at 10% 12%, rgba(139, 92, 246, 0.12) 0%, transparent 42%),
        radial-gradient(circle at 92% 88%, rgba(99, 102, 241, 0.10) 0%, transparent 45%),
        radial-gradient(circle at 50% 50%, rgba(245, 243, 255, 0.6) 0%, transparent 100%),
        radial-gradient(rgba(167, 139, 250, 0.28) 1.2px, transparent 1.2px);
    background-size: 100% 100%, 100% 100%, 100% 100%, 22px 22px;
    background-attachment: fixed;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1e293b;
    box-sizing: border-box;
}

/* Dual-Panel Elevated Container - Reference Match */
.auth-split-container {
    width: 100%;
    max-width: 1060px;
    min-height: 600px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.14fr 1fr;
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 
        0 25px 50px -15px rgba(99, 102, 241, 0.12),
        0 0 1px 1px rgba(15, 23, 42, 0.04);
    overflow: hidden;
    position: relative;
    align-items: stretch;
}

/* ─────────────────────────────────────────────────────────────
   LEFT PANEL - Product Showcase & 3D Laptop Showcase
   ───────────────────────────────────────────────────────────── */
.auth-left-panel {
    background: 
        radial-gradient(ellipse 70% 60% at 70% 55%, rgba(196, 181, 253, 0.42) 0%, rgba(224, 231, 255, 0.28) 45%, transparent 75%),
        radial-gradient(circle at 15% 85%, rgba(224, 231, 255, 0.35) 0%, transparent 55%),
        linear-gradient(160deg, #fafbfe 0%, #f3f6fd 55%, #edf2fe 100%);
    border-right: 1px solid #f1f5f9;
    padding: 1.75rem 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

/* Ambient Backdrop Curve (Full 100% Inset Coverage - Zero Edge Cutoffs) */
.auth-showcase-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.auth-showcase-backdrop svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Brand Bar */
.auth-brand-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
}

.auth-brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.auth-brand-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #4f46e5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.28);
    flex-shrink: 0;
}

.auth-brand-icon svg {
    width: 20px;
    height: 20px;
}

.auth-brand-name {
    font-size: 21px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.025em;
    font-family: inherit;
    line-height: 1;
}

.auth-brand-logo--center {
    justify-content: center;
}

/* Hero Text */
.auth-showcase-hero {
    margin-top: 0.5rem;
    margin-bottom: 0.75rem;
    position: relative;
    z-index: 2;
}

.auth-showcase-title {
    font-size: 1.65rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.25;
    margin: 0 0 0.35rem 0;
    letter-spacing: -0.025em;
}

.auth-showcase-subtitle {
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.45;
    margin: 0;
    max-width: 440px;
}

/* 3D Laptop Visual Showcase Area */
.auth-showcase-visual {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0.25rem 0 0.85rem;
    flex: 1;
    min-height: 280px;
    user-select: none;
    -webkit-user-select: none;
}

.auth-showcase-visual img {
    width: 100%;
    max-width: 475px;
    max-height: 340px;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 18px 30px rgba(30, 27, 75, 0.15));
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
    outline: none;
}

body.dark-mode .auth-showcase-visual img {
    filter: drop-shadow(0 22px 38px rgba(0, 0, 0, 0.55));
}

/* Bottom Feature Badges / Pills */
.auth-feature-pills {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.55rem 0.85rem;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03);
}

.auth-pill-item {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 11.5px;
    font-weight: 600;
    color: #334155;
    white-space: nowrap;
}

.auth-pill-item .pill-icon {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.auth-pill-item .pill-icon svg {
    width: 13px;
    height: 13px;
}

.auth-pill-item .pill-icon.pill-purple {
    background: #f5f3ff;
    color: #6366f1;
}

.auth-pill-item .pill-icon.pill-green {
    background: #ecfdf5;
    color: #10b981;
}

.auth-pill-item .pill-icon.pill-blue {
    background: #eff6ff;
    color: #3b82f6;
}

.auth-pill-divider {
    width: 1px;
    height: 16px;
    background: #e2e8f0;
    flex-shrink: 0;
}

/* ─────────────────────────────────────────────────────────────
   RIGHT PANEL - Form Container & Controls
   ───────────────────────────────────────────────────────────── */
.auth-right-panel {
    background: #ffffff;
    padding: 1.75rem 2.25rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-form-container {
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
}

/* Mobile brand logo (visible only on <= 900px) */
.auth-mobile-logo {
    display: none;
    text-align: center;
    margin-bottom: 1rem;
}

.auth-mobile-logo img {
    height: 32px;
    width: auto;
}

/* Form Header */
.auth-header {
    text-align: center;
    margin-bottom: 0.85rem;
}

.auth-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.02em;
    margin: 0 0 0.2rem 0;
    line-height: 1.25;
}

.auth-header .auth-subtitle {
    font-size: 12px;
    color: #64748b;
    margin: 0;
    line-height: 1.35;
}

/* Form Fields */
.auth-form {
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
}

.form-field {
    margin-bottom: 0.65rem;
    position: relative;
}

/* Two-Column Form Field Grid */
.form-row-2col {
    display: grid;
    grid-template-columns: 1.08fr 0.92fr;
    gap: 10px;
    align-items: start;
    margin-bottom: 0.65rem;
}

.form-row-2col .form-field {
    margin-bottom: 0;
}

.form-field label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.25rem;
    line-height: 1.25;
}

/* Modern Rounded Box Inputs - 42px Height & Icons */
.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="password"],
.form-field select {
    width: 100%;
    height: 42px;
    padding: 0 0.85rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.875rem;
    color: #0f172a;
    background: #ffffff;
    outline: none;
    transition: border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s ease;
    box-sizing: border-box;
}

.form-field input::placeholder {
    color: #94a3b8;
}

.form-field input:focus,
.form-field select:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.14);
}

/* Leading Icon Input Wrapper */
.input-icon-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

.input-leading-icon {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    pointer-events: none;
    z-index: 2;
    transition: color 0.2s ease;
}

.input-leading-icon svg {
    width: 17px;
    height: 17px;
}

.input-icon-wrapper:focus-within .input-leading-icon {
    color: #4f46e5;
}

.input-icon-wrapper input[type="text"],
.input-icon-wrapper input[type="email"],
.input-icon-wrapper input[type="password"] {
    padding-left: 40px !important;
}

/* Autofill Fix - Overrides Chrome/Edge Solid Blue Box */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px #f8fafc inset !important;
    -webkit-text-fill-color: #0f172a !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 10px !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* Select dropdown styling */
.form-field select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 0.95rem;
    padding-right: 2rem;
}

/* Password field with toggle button */
.password-field {
    position: relative;
    width: 100%;
}

.password-field input {
    padding-right: 2.35rem !important;
}

/* Disable native Microsoft Edge / IE password reveal and clear icons */
.password-field input::-ms-reveal,
.password-field input::-ms-clear,
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear,
input::-ms-reveal,
input::-ms-clear {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.toggle-password {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    padding: 6px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    transition: color 0.15s ease, transform 0.12s ease;
    z-index: 2;
}

.toggle-password:hover {
    color: #334155;
}

.toggle-password:active {
    transform: translateY(-50%) scale(0.92);
}

.toggle-password svg {
    width: 17px;
    height: 17px;
    stroke: currentColor;
    pointer-events: none;
}

.toggle-password .eye-off {
    display: none;
}

.toggle-password.is-revealed .eye-open {
    display: none;
}

.toggle-password.is-revealed .eye-off {
    display: block;
}

.toggle-password.is-revealed {
    color: #4f46e5;
}

body.dark-mode .toggle-password {
    color: #64748b;
}

body.dark-mode .toggle-password:hover {
    color: #cbd5e1;
}

body.dark-mode .toggle-password.is-revealed {
    color: #818cf8;
}

/* Checkbox & Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    font-size: 12.5px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #475569;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #4f46e5;
    border-radius: 4px;
    cursor: pointer;
    margin: 0;
}

.forgot-link {
    color: #4f46e5;
    font-weight: 600;
    font-size: 12.5px;
    text-decoration: none;
    transition: color 0.15s ease;
}

.forgot-link:hover {
    color: #3730a3;
    text-decoration: underline;
}

/* Primary Action Button - 42px Height Reference Style */
.btn-login,
.btn-auth-primary {
    width: 100%;
    height: 42px;
    background: #4f46e5;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 0.925rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px 0 rgba(79, 70, 229, 0.35);
    margin-top: 0.35rem;
}

.btn-login:hover,
.btn-auth-primary:hover {
    background: #4338ca;
    box-shadow: 0 6px 18px 0 rgba(79, 70, 229, 0.45);
    transform: translateY(-1px);
}

.btn-login:active,
.btn-auth-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.25);
}

.btn-login:disabled,
.btn-auth-primary:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Bottom Links */
.signup-link {
    text-align: center;
    font-size: 12px;
    color: #64748b;
    margin-top: 0.75rem;
    margin-bottom: 0;
}

.signup-link a {
    color: #4f46e5;
    font-weight: 600;
    text-decoration: none;
}

.signup-link a:hover {
    text-decoration: underline;
}

/* Alerts */
.error-alert {
    padding: 0.55rem 0.75rem;
    background: #fef2f2;
    border: 1px solid #fee2e2;
    border-radius: 8px;
    color: #b91c1c;
    font-size: 12px;
    margin-bottom: 0.75rem;
    line-height: 1.35;
}

.success-alert {
    padding: 0.55rem 0.75rem;
    background: #ecfdf5;
    border: 1px solid #d1fae5;
    border-radius: 8px;
    color: #047857;
    font-size: 12px;
    margin-bottom: 0.75rem;
    line-height: 1.35;
}

/* ─────────────────────────────────────────────────────────────
   INDUSTRIAL AUTH & REAL-TIME VALIDATION
   ───────────────────────────────────────────────────────────── */
.field-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}

.field-header label {
    margin-bottom: 0 !important;
}

.field-badge {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 1px 6px;
    border-radius: 9999px;
    display: none;
    transition: all 0.2s ease;
}

.field-badge.badge-success {
    display: inline-block;
    background-color: #d1fae5;
    color: #065f46;
}

.field-badge.badge-error {
    display: inline-block;
    background-color: #fee2e2;
    color: #991b1b;
}

.input-with-icon {
    position: relative;
    width: 100%;
}

.input-with-icon input {
    padding-right: 2.25rem !important;
}

.input-status-icon {
    position: absolute;
    right: 9px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.status-icon {
    font-size: 0.8rem;
    font-weight: 800;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.status-icon.icon-success {
    color: #10b981;
}

.status-icon.icon-error {
    color: #ef4444;
}

.status-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(79, 70, 229, 0.2);
    border-top-color: #4f46e5;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.form-field.has-error input,
.form-field.has-error select {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12) !important;
}

.form-field.is-valid input {
    border-color: #10b981 !important;
}

.field-error {
    color: #dc2626;
    font-size: 11.5px;
    font-weight: 500;
    margin-top: 2px;
    line-height: 1.3;
}

.field-error:empty {
    display: none;
    margin: 0;
}

.field-hint {
    color: #64748b;
    font-size: 11.5px;
    margin-top: 2px;
    line-height: 1.3;
}

/* Password Strength Meter */
.password-strength-container {
    margin-top: 4px;
    margin-bottom: 4px;
}

.strength-meter-bar {
    width: 100%;
    height: 3px;
    background: #e2e8f0;
    border-radius: 9999px;
    overflow: hidden;
}

.strength-meter-fill {
    height: 100%;
    width: 0%;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s ease;
    border-radius: 9999px;
}

.strength-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2px;
    font-size: 11.5px;
}

.strength-label-text {
    color: #64748b;
}

.strength-text {
    font-weight: 700;
}

/* Password Requirements Checklist */
.password-requirements {
    background: #f8fafc;
    border-radius: 6px;
    padding: 5px 8px;
    margin-top: 4px;
    margin-bottom: 4px;
    border: 1px solid #e2e8f0;
    font-size: 11px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3px 6px;
    line-height: 1.25;
}

.req-item {
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.2s ease;
}

.req-item .req-icon {
    font-weight: 800;
    font-size: 11px;
    color: #ef4444;
}

.req-item.valid {
    color: #065f46;
    font-weight: 500;
}

.req-item.valid .req-icon {
    color: #10b981;
}

/* Email Delivery / Spam Notice */
.email-spam-notice {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    background: rgba(99, 102, 241, 0.05);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-left: 3px solid #4f46e5;
    padding: 6px 9px;
    border-radius: 6px;
    margin: 0.5rem 0 0.35rem 0;
    font-size: 11.5px;
    color: #4b5563;
    line-height: 1.35;
}

.email-spam-notice svg {
    width: 14px;
    height: 14px;
    stroke: #4f46e5;
    flex-shrink: 0;
    margin-top: 1px;
}

/* Bottom notice divider (Forgot password & Email verification screens) */
.auth-bottom-notice {
    margin-top: 14px;
    text-align: center;
    border-top: 1px solid #e2e8f0;
    padding-top: 10px;
}

.auth-bottom-notice p {
    color: #64748b;
    font-size: 11.5px;
    margin-bottom: 0;
    line-height: 1.4;
}

body.dark-mode .auth-bottom-notice {
    border-top-color: #334155;
}

body.dark-mode .auth-bottom-notice p {
    color: #94a3b8;
}

/* ─────────────────────────────────────────────────────────────
   SEGMENTED OTP INPUTS (Google / Zoom Style)
   ───────────────────────────────────────────────────────────── */
.otp-container {
    margin: 1rem 0 0.85rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.otp-boxes-wrapper {
    display: flex;
    justify-content: center;
    gap: 7px;
    width: 100%;
    max-width: 340px;
    margin: 0 auto;
}

.otp-digit-box {
    width: 42px;
    height: 46px;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    font-size: 1.35rem;
    font-weight: 700;
    text-align: center;
    color: #0f172a;
    background: #ffffff;
    outline: none;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.otp-digit-box:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
    transform: translateY(-1px);
}

.otp-digit-box.filled {
    border-color: #6366f1;
    background: #f5f3ff;
    color: #4338ca;
}

.otp-boxes-wrapper.shake {
    animation: otp-shake 0.45s ease-in-out;
}

.otp-boxes-wrapper.is-invalid .otp-digit-box {
    border-color: #ef4444 !important;
    background: #fef2f2 !important;
    color: #991b1b !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.otp-boxes-wrapper.is-success .otp-digit-box {
    border-color: #10b981 !important;
    background: #ecfdf5 !important;
    color: #065f46 !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

@keyframes otp-shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

.otp-badge-alert {
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 0.85rem;
    display: flex;
    align-items: center;
    gap: 7px;
    line-height: 1.35;
}

.otp-badge-alert.error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.otp-badge-alert.success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.otp-badge-alert.info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

.email-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f1f5f9;
    padding: 3px 10px;
    border-radius: 9999px;
    font-size: 12px;
    color: #334155;
    font-weight: 600;
    margin-top: 2px;
    border: 1px solid #e2e8f0;
}

.email-chip .change-email-btn {
    color: #4f46e5;
    font-size: 11px;
    text-decoration: underline;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    margin-left: 4px;
}

/* ─────────────────────────────────────────────────────────────
   DARK MODE SUPPORT
   ───────────────────────────────────────────────────────────── */
body.dark-mode:has(.auth-split-container) {
    background-color: #090d16;
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.12) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(139, 92, 246, 0.1) 0px, transparent 50%);
    color: #f1f5f9;
}

body.dark-mode .auth-split-container {
    background: #111827;
    border-color: #1f2937;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
}

body.dark-mode .auth-left-panel {
    background: 
        radial-gradient(ellipse 70% 60% at 70% 55%, rgba(99, 102, 241, 0.22) 0%, rgba(139, 92, 246, 0.12) 45%, transparent 75%),
        radial-gradient(circle at 15% 85%, rgba(59, 130, 246, 0.1) 0%, transparent 55%),
        linear-gradient(160deg, #111827 0%, #151e2e 55%, #0f172a 100%);
    border-right-color: #1f2937;
}

body.dark-mode .auth-showcase-backdrop {
    opacity: 0.28;
    mix-blend-mode: screen;
}

body.dark-mode .auth-showcase-title {
    color: #f8fafc;
}

body.dark-mode .auth-showcase-subtitle {
    color: #94a3b8;
}

body.dark-mode .auth-brand-name {
    color: #f8fafc;
}

body.dark-mode .auth-feature-pills {
    background: #1e293b;
    border-color: #334155;
    box-shadow: none;
}

body.dark-mode .auth-pill-item {
    color: #cbd5e1;
}

body.dark-mode .auth-pill-divider {
    background: #334155;
}

body.dark-mode .input-leading-icon {
    color: #64748b;
}

body.dark-mode .input-icon-wrapper:focus-within .input-leading-icon {
    color: #818cf8;
}

body.dark-mode .auth-right-panel {
    background: #111827;
}

body.dark-mode .auth-header h1 {
    color: #f8fafc;
}

body.dark-mode .auth-header .auth-subtitle {
    color: #94a3b8;
}

body.dark-mode .form-field label {
    color: #cbd5e1;
}

body.dark-mode .form-field input[type="text"],
body.dark-mode .form-field input[type="email"],
body.dark-mode .form-field input[type="password"],
body.dark-mode .form-field select {
    background: #0f172a;
    border-color: #334155;
    color: #f1f5f9;
}

body.dark-mode .form-field input::placeholder {
    color: #64748b;
}

body.dark-mode .form-field input:focus,
body.dark-mode .form-field select:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

body.dark-mode input:-webkit-autofill,
body.dark-mode input:-webkit-autofill:hover, 
body.dark-mode input:-webkit-autofill:focus,
body.dark-mode input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px #0f172a inset !important;
    -webkit-text-fill-color: #f1f5f9 !important;
    border-color: #334155 !important;
}

body.dark-mode .checkbox-label {
    color: #94a3b8;
}

body.dark-mode .signup-link {
    color: #94a3b8;
}

body.dark-mode .password-requirements {
    background: #0f172a;
    border-color: #1f2937;
}

body.dark-mode .req-item {
    color: #94a3b8;
}

body.dark-mode .email-spam-notice {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.3);
    border-left-color: #6366f1;
    color: #cbd5e1;
}

body.dark-mode .otp-digit-box {
    background: #0f172a;
    border-color: #334155;
    color: #f1f5f9;
}

body.dark-mode .otp-digit-box:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

body.dark-mode .otp-digit-box.filled {
    background: #1e1b4b;
    border-color: #6366f1;
    color: #c7d2fe;
}

body.dark-mode .email-chip {
    background: #1e293b;
    border-color: #334155;
    color: #cbd5e1;
}

/* ─────────────────────────────────────────────────────────────
   RESPONSIVE DESIGN (Tablets & Mobile)
   ───────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
    body:has(.auth-split-container) {
        padding: 1rem 0.75rem;
        align-items: center;
    }

    .auth-split-container {
        grid-template-columns: 1fr;
        max-width: 420px;
        border-radius: 14px;
    }

    .auth-left-panel {
        display: none !important;
    }

    .auth-mobile-logo {
        display: block !important;
        margin-bottom: 0.85rem;
    }

    .auth-mobile-logo img {
        height: 32px;
        width: auto;
    }

    .auth-right-panel {
        padding: 1.5rem 1.25rem;
    }
}

@media (max-width: 480px) {
    body:has(.auth-split-container) {
        padding: 0.5rem;
    }

    .auth-right-panel {
        padding: 1.25rem 1rem;
    }

    .auth-header h1 {
        font-size: 22px;
    }

    .password-requirements {
        grid-template-columns: 1fr;
    }

    .otp-boxes-wrapper {
        gap: 5px;
    }

    .otp-digit-box {
        width: 36px;
        height: 42px;
        font-size: 1.2rem;
    }
}

/* ─────────────────────────────────────────────────────────────
   PAGE & FORM TRANSITIONS (Cross-Document View Transitions & Fallback Motion)
   ───────────────────────────────────────────────────────────── */

/* Interactive click-feedback on navigation links */
.signup-link a,
.forgot-link {
    transition: color 0.18s ease, text-decoration-color 0.18s ease, transform 0.12s ease;
    display: inline-block;
}

.signup-link a:active,
.forgot-link:active {
    transform: scale(0.97);
}

/* Opt-in to Cross-Document View Transitions for same-origin auth navigation */
@media (prefers-reduced-motion: no-preference) {
    @view-transition {
        navigation: auto;
    }

    /* Stable elements across auth pages */
    .auth-split-container {
        view-transition-name: auth-card;
    }

    .auth-left-panel {
        view-transition-name: auth-showcase;
    }

    .auth-form-container {
        view-transition-name: auth-form;
    }

    /* Smoothly interpolate container dimensions when switching between shorter/longer forms */
    ::view-transition-group(auth-card) {
        animation-duration: 0.32s;
        animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
    }

    ::view-transition-group(auth-showcase) {
        animation-duration: 0.32s;
        animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
    }

    ::view-transition-group(auth-form) {
        animation-duration: 0.28s;
        animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
    }

    /* Outgoing auth form cross-fades and lifts slightly */
    ::view-transition-old(auth-form) {
        animation: 0.16s cubic-bezier(0.4, 0, 1, 1) both authFormSlideOut;
    }

    /* Incoming auth form eases in smoothly */
    ::view-transition-new(auth-form) {
        animation: 0.24s cubic-bezier(0, 0, 0.2, 1) both authFormSlideIn;
    }

    /* Smooth entrance for direct page loads & non-view-transition browsers */
    .auth-form-container {
        animation: authFormEntrance 0.32s cubic-bezier(0.16, 1, 0.3, 1) both;
    }
}

@keyframes authFormSlideOut {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(-8px) scale(0.985);
    }
}

@keyframes authFormSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes authFormEntrance {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Strict accessibility compliance: disable motion if reduced motion requested */
@media (prefers-reduced-motion: reduce) {
    .auth-form-container,
    .auth-form-container.auth-form-exit,
    .auth-form-container.auth-form-enter,
    .auth-form-container.auth-form-enter-active {
        animation: none !important;
        transition: none !important;
        transform: none !important;
    }

    ::view-transition-group(*),
    ::view-transition-old(*),
    ::view-transition-new(*) {
        animation: none !important;
    }
}

/* ─────────────────────────────────────────────────────────────
   RIGHT-PANEL DYNAMIC TRANSITION (Single-Panel Morphing)
   ───────────────────────────────────────────────────────────── */
.auth-right-panel {
    position: relative;
    overflow: hidden;
}

.auth-form-container {
    transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

/* Exit state: smoothly lifts and fades out */
.auth-form-container.auth-form-exit {
    opacity: 0 !important;
    transform: translateY(-10px) scale(0.985) !important;
    pointer-events: none;
}

/* Enter initial state: starts below resting position with zero opacity */
.auth-form-container.auth-form-enter {
    opacity: 0 !important;
    transform: translateY(14px) scale(0.985) !important;
    pointer-events: none;
}

/* Enter active state: eases smoothly into rest */
.auth-form-container.auth-form-enter-active {
    opacity: 1 !important;
    transform: translateY(0) scale(1) !important;
    transition: opacity 0.26s cubic-bezier(0.16, 1, 0.3, 1), transform 0.26s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* Container smooth height adaptation */
.auth-split-container {
    transition: min-height 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
