/* =============================================================
   auth.css — Enterprise Authentication & Single Sign-On Styling
   Styles for /login, /register, /forgot-password, /reset-password
   ============================================================= */

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
    background-color: var(--bg-base, #0b0f1a);
    color: var(--text-primary, #f1f5f9);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Background Ambient Glow */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 50% at 20% 10%, var(--body-grad-1, rgba(59, 130, 246, 0.12)) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 80% 90%, var(--body-grad-2, rgba(16, 185, 129, 0.08)) 0%, transparent 55%);
    pointer-events: none;
    z-index: 0;
}

/* ---------- Skip link for accessibility ---------- */
.auth-skip-link,
.skip-link {
    position: absolute !important;
    top: -9999px !important;
    left: 1rem;
    z-index: 10000;
    background: var(--accent, #3b82f6);
    color: #fff;
    padding: 0.6rem 1.25rem;
    border-radius: 0 0 8px 8px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
    transition: top 0.2s ease;
}

.auth-skip-link:focus,
.skip-link:focus {
    top: 0 !important;
}

/* ---------- SITE HEADER ---------- */
.site-header {
    border-bottom: 1px solid var(--border, rgba(51, 65, 85, 0.6));
    background: var(--bg-header, rgba(11, 15, 26, 0.85));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    position: relative;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.brand:hover {
    opacity: 0.88;
}

.brand-logo {
    width: 32px;
    height: 32px;
}

[data-theme="dark"] .brand-logo {
    filter: invert(1) brightness(1.2) drop-shadow(0 0 8px rgba(96, 165, 250, 0.5));
}

[data-theme="light"] .brand-logo {
    filter: drop-shadow(0 1px 3px rgba(37, 99, 235, 0.25));
}

.brand-text {
    font-size: 1.05rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    color: var(--text-primary, #f1f5f9);
}

.brand-accent {
    color: var(--accent, #3b82f6);
}

.brand-sub {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted, #64748b);
    padding: 2px 6px;
    border: 1px solid var(--border, rgba(51, 65, 85, 0.6));
    border-radius: 4px;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

@media (max-width: 768px) {
    #topHeaderNav:not(.is-open),
    .header-nav:not(.is-open) {
        display: none !important;
    }
    #topHeaderNav.is-open,
    .header-nav.is-open {
        display: flex !important;
    }
}

.nav-btn {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.nav-btn-primary {
    color: #fff;
    background: var(--accent, #3b82f6);
}

.nav-btn-primary:hover {
    background: var(--accent-hover, #2563eb);
    transform: translateY(-1px);
}

.nav-btn-ghost {
    background: var(--bg-surface, #111827);
    color: var(--text-primary, #f1f5f9);
    border-color: var(--border, rgba(51, 65, 85, 0.6));
}

.nav-btn-ghost:hover {
    border-color: var(--accent, #3b82f6);
    background: var(--bg-card-hover, rgba(30, 41, 59, 0.9));
}

.global-theme-btn,
.global-lang-btn {
    background: var(--bg-surface, #111827);
    border: 1px solid var(--border, rgba(51, 65, 85, 0.6));
    border-radius: 0.5rem;
    padding: 6px 12px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-primary, #f1f5f9);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.global-theme-btn:hover,
.global-lang-btn:hover {
    border-color: var(--accent, #3b82f6);
    background: var(--bg-card-hover, rgba(30, 41, 59, 0.9));
}

/* ---------- MAIN AUTH CONTAINER ---------- */
.main-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    position: relative;
    z-index: 1;
}

.auth-card {
    background: var(--bg-card, rgba(17, 24, 39, 0.85));
    border: 1px solid var(--border, rgba(51, 65, 85, 0.7));
    border-radius: 1.25rem;
    padding: 2.5rem;
    width: 100%;
    max-width: 520px;
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    animation: authCardEnter 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes authCardEnter {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.auth-title {
    font-size: 1.65rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-primary, #f1f5f9);
    margin-bottom: 0.35rem;
}

.auth-subtitle {
    color: var(--text-secondary, #94a3b8);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* ---------- FORM ELEMENTS ---------- */
.auth-form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    position: relative;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1.2rem;
}

.form-group label {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-secondary, #94a3b8);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-input, rgba(15, 23, 42, 0.8));
    border: 1px solid var(--border, rgba(51, 65, 85, 0.7));
    border-radius: 0.6rem;
    color: var(--text-primary, #f1f5f9);
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent, #3b82f6);
    box-shadow: 0 0 0 3px var(--accent-light, rgba(59, 130, 246, 0.2));
    background: var(--bg-surface, #111827);
}

.form-group input::placeholder {
    color: var(--text-muted, #64748b);
}

/* Checkbox */
.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
    user-select: none;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: var(--accent, #3b82f6);
}

.checkbox-group label {
    font-size: 0.85rem;
    color: var(--text-secondary, #94a3b8);
    cursor: pointer;
    line-height: 1.4;
}

/* Button */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    border-radius: 0.625rem;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    text-decoration: none;
}

.btn-primary {
    background: var(--accent, #3b82f6);
    color: #fff;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
}

.btn-primary:hover:not(:disabled) {
    background: var(--accent-hover, #2563eb);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.45);
}

.btn-primary:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

.btn-block {
    width: 100%;
}

/* Hidden attribute guarantee */
[hidden] {
    display: none !important;
}

/* Error Alert */
.auth-error {
    display: block;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
    border-radius: 0.6rem;
    padding: 0.75rem 1rem;
    color: #f87171;
    font-size: 0.88rem;
    line-height: 1.5;
    animation: authShake 0.3s ease-in-out both;
    margin-top: 1rem;
    box-sizing: border-box;
    width: 100%;
}

.auth-error:empty,
.auth-error[hidden],
#login-error:empty,
#mfa-error:empty,
#result:empty {
    display: none !important;
}

.auth-success {
    display: block;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.35);
    border-radius: 0.6rem;
    padding: 0.75rem 1rem;
    color: #34d399;
    font-size: 0.88rem;
    line-height: 1.5;
    margin-top: 1rem;
    box-sizing: border-box;
    width: 100%;
}
.auth-success:empty,
.auth-success[hidden] {
    display: none !important;
}

/* Result container for register */
.auth-result-container {
    margin-top: 1.25rem;
    margin-bottom: 0.75rem;
    width: 100%;
    clear: both;
}
.auth-result-container:empty {
    display: none !important;
}

.auth-note {
    margin-top: 1.75rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-secondary, #94a3b8);
}

/* Step 2 2FA Screen */
#step-mfa {
    animation: authCardEnter 0.25s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.mfa-account-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-surface, #111827);
    border: 1px solid var(--border, rgba(51, 65, 85, 0.7));
    padding: 0.35rem 0.85rem;
    border-radius: 2rem;
    font-size: 0.82rem;
    color: var(--text-secondary, #94a3b8);
    margin-bottom: 1.25rem;
}
.mfa-account-badge .badge-email {
    color: var(--text-primary, #f1f5f9);
    font-weight: 600;
}
.mfa-code-input {
    font-size: 1.4rem !important;
    letter-spacing: 0.2em !important;
    text-align: center !important;
    font-weight: 700 !important;
    padding: 0.75rem !important;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
}

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

/* Links */
.link {
    color: var(--accent, #3b82f6);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.15s ease;
}

.link:hover {
    text-decoration: underline;
    color: var(--accent-hover, #2563eb);
}

.auth-footer {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.88rem;
    color: var(--text-secondary, #94a3b8);
}

/* ---------- SITE FOOTER ---------- */
.site-footer {
    border-top: 1px solid var(--border, rgba(51, 65, 85, 0.6));
    text-align: center;
    padding: 1.5rem;
    font-size: 0.82rem;
    color: var(--text-muted, #64748b);
    background: var(--bg-footer, rgba(11, 15, 26, 0.7));
}

/* ---------- OAuth Divider & Google Button ---------- */
.auth-oauth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.5rem 0 1.25rem;
    color: var(--text-muted, #64748b);
    font-size: 0.85rem;
    text-transform: lowercase;
}
.auth-oauth-divider::before,
.auth-oauth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border, rgba(51, 65, 85, 0.5));
}
.auth-oauth-divider span {
    padding: 0 0.85rem;
    font-weight: 500;
}

.btn-google {
    background: #ffffff !important;
    color: #1f2937 !important;
    border: 1px solid #dadce0 !important;
    font-weight: 600 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.75rem !important;
    padding: 0.75rem 1.25rem !important;
    border-radius: var(--radius-md, 8px) !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08) !important;
    transition: background-color 0.2s, box-shadow 0.2s, transform 0.1s !important;
    min-height: 46px !important;
    cursor: pointer;
    font-size: 0.95rem;
    width: 100%;
}
.btn-google:hover {
    background-color: #f8fafc !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.12) !important;
}
.btn-google:active {
    background-color: #f1f5f9 !important;
    transform: scale(0.99);
}
.btn-google .google-icon {
    flex-shrink: 0;
}

/* Responsive */
@media (max-width: 600px) {
    .auth-card {
        padding: 1.75rem 1.25rem;
    }

    .auth-form-grid-2 {
        grid-template-columns: 1fr;
    }

    .header-inner {
        padding: 0 1rem;
    }

    .brand-sub {
        display: none;
    }
}

/* =============================================================
   FIREBASE SOCIAL & PHONE AUTHENTICATION GATEKEEPER EXTENSIONS
   ============================================================= */

/* Auth Tabs */
.auth-nav-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    background: var(--bg-surface-secondary, rgba(30, 41, 59, 0.5));
    padding: 0.35rem;
    border-radius: var(--radius-md, 8px);
    border: 1px solid var(--border, rgba(51, 65, 85, 0.6));
}

.auth-nav-tab {
    flex: 1;
    padding: 0.6rem 0.75rem;
    background: transparent;
    border: none;
    color: var(--text-secondary, #94a3b8);
    font-size: 0.88rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.auth-nav-tab.active {
    background: var(--accent, #3b82f6);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.35);
}

.auth-nav-tab:hover:not(.active) {
    color: var(--text-primary, #f1f5f9);
    background: rgba(255, 255, 255, 0.05);
}

/* Password input wrapper & toggle */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}
.password-input-wrapper input {
    padding-right: 2.75rem !important;
    width: 100%;
}
.password-toggle-btn {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-muted, #94a3b8);
    padding: 0.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: color 0.15s ease, background 0.15s ease;
}
.password-toggle-btn:hover,
.password-toggle-btn:focus {
    color: var(--text-primary, #f1f5f9);
    background: rgba(255, 255, 255, 0.08);
    outline: none;
}
.password-toggle-btn:focus-visible {
    box-shadow: 0 0 0 2px var(--accent, #3b82f6);
}

/* Phone input container */
.phone-input-row {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
    width: 100%;
}

.phone-country-select {
    width: 95px !important;
    min-width: 85px !important;
    max-width: 105px !important;
    flex-shrink: 0;
    padding: 0.75rem 0.4rem !important;
    border: 1px solid var(--border, rgba(51, 65, 85, 0.6));
    border-radius: var(--radius-md, 8px);
    background: var(--bg-surface-secondary, rgba(15, 23, 42, 0.7));
    color: var(--text-primary, #f1f5f9);
    font-size: 0.9rem;
    font-family: inherit;
    cursor: pointer;
    height: 46px;
    box-sizing: border-box;
}

.phone-country-select:focus,
.phone-number-input:focus {
    outline: none;
    border-color: var(--accent, #3b82f6);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

.phone-number-input {
    flex: 1;
    min-width: 0;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border, rgba(51, 65, 85, 0.6));
    border-radius: var(--radius-md, 8px);
    background: var(--bg-surface-secondary, rgba(15, 23, 42, 0.7));
    color: var(--text-primary, #f1f5f9);
    font-size: 0.95rem;
    font-family: inherit;
    height: 46px;
    box-sizing: border-box;
}

/* Social Buttons Grid */
.social-auth-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.6rem;
    margin-top: 0.75rem;
}

@media (max-width: 480px) {
    .social-auth-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.unrecognized-account-card {
    animation: fadeInPrompt 0.25s ease-out;
}
@keyframes fadeInPrompt {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.btn-social {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 0.5rem;
    border-radius: var(--radius-md, 8px);
    border: 1px solid var(--border, rgba(51, 65, 85, 0.6));
    background: var(--bg-surface-secondary, rgba(30, 41, 59, 0.6));
    color: var(--text-primary, #f1f5f9);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 42px;
}

.btn-social:hover {
    background: var(--bg-surface-hover, rgba(51, 65, 85, 0.8));
    border-color: var(--accent, #3b82f6);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-social:active {
    transform: translateY(0);
}

.btn-social svg {
    flex-shrink: 0;
}

/* Branded subtle hover accents */
.btn-social-google:hover   { border-color: #4285f4; }
.btn-social-github:hover   { border-color: #f0f6fc; }
.btn-social-apple:hover    { border-color: #ffffff; }
.btn-social-microsoft:hover{ border-color: #00a4ef; }
.btn-social-facebook:hover { border-color: #1877f2; }
.btn-social-twitter:hover  { border-color: #1d9bf0; }
.btn-social-yahoo:hover    { border-color: #6001d2; }

/* =============================================================
   TWO-COLUMN RESPONSIVE LAYOUT (Part 1 - Industry-Standard)
   ============================================================= */
.auth-card-two-col {
    max-width: 960px;
    padding: 2.5rem 3rem;
    transition: max-width 0.25s ease;
}

.auth-two-col-layout {
    display: grid;
    grid-template-columns: 1fr 32px 1fr;
    gap: 1.75rem;
    align-items: stretch;
    margin-top: 1rem;
}

.auth-col-social,
.auth-col-email {
    display: flex;
    flex-direction: column;
}

.auth-col-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary, #f1f5f9);
    margin-bottom: 1.25rem;
    letter-spacing: -0.01em;
}

.social-auth-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.btn-social-full {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.85rem;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-md, 8px);
    border: 1px solid var(--border, rgba(51, 65, 85, 0.6));
    background: var(--bg-surface-secondary, rgba(30, 41, 59, 0.6));
    color: var(--text-primary, #f1f5f9);
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 48px;
    width: 100%;
    box-sizing: border-box;
    text-align: left;
    user-select: none;
}

.btn-social-full:hover:not(.is-disabled-badge) {
    background: var(--bg-surface-hover, rgba(51, 65, 85, 0.85));
    border-color: var(--accent, #3b82f6);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-social-full:active:not(.is-disabled-badge) {
    transform: translateY(0);
}

.btn-social-full:focus-visible,
.btn-social:focus-visible,
.btn-primary:focus-visible,
.btn:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 2px solid var(--accent, #3b82f6) !important;
    outline-offset: 2px !important;
}

.btn-social-full.is-disabled-badge {
    opacity: 0.7;
    cursor: not-allowed;
    background: rgba(30, 41, 59, 0.4);
}

.btn-social-full .social-icon {
    flex-shrink: 0;
}

.btn-social-full .social-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(148, 163, 184, 0.2);
    color: var(--text-secondary, #94a3b8);
    margin-left: auto;
}

.auth-col-divider {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
}

.auth-col-divider::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 1px;
    background: var(--border, rgba(51, 65, 85, 0.6));
    transform: translateX(-50%);
}

.auth-col-divider-text {
    position: relative;
    z-index: 2;
    background: var(--bg-card, #111827);
    color: var(--text-muted, #64748b);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.35rem 0.5rem;
    text-transform: lowercase;
    border-radius: 50%;
    border: 1px solid var(--border, rgba(51, 65, 85, 0.6));
    line-height: 1;
}

.email-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.35rem;
}

.btn-link-action {
    background: none;
    border: none;
    color: var(--accent, #3b82f6);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}

.btn-link-action:hover {
    color: var(--accent-hover, #2563eb);
}

.password-progressive-section {
    display: none;
}

.password-progressive-section.is-visible {
    display: block;
    animation: fadeInSection 0.25s ease-out forwards;
}

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

.provider-required-card {
    animation: fadeInSection 0.25s ease-out forwards;
}

/* Medium Breakpoint (768px - 1023px): Stacked */
@media (min-width: 768px) and (max-width: 1023px) {
    .auth-card-two-col {
        max-width: 580px;
        padding: 2.25rem 2rem;
    }
    .auth-two-col-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .auth-col-divider {
        width: 100%;
        height: 28px;
        margin: 0.5rem 0;
    }
    .auth-col-divider::before {
        top: 50%;
        left: 0;
        right: 0;
        bottom: auto;
        width: 100%;
        height: 1px;
        transform: translateY(-50%);
    }
    .auth-col-divider-text {
        padding: 0.25rem 0.75rem;
        border-radius: 12px;
    }
}

/* Small Breakpoint (<768px): Stacked Compact */
@media (max-width: 767px) {
    .auth-card-two-col {
        max-width: 100%;
        padding: 1.75rem 1.25rem;
        border-radius: 1rem;
    }
    .auth-two-col-layout {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    .auth-col-divider {
        width: 100%;
        height: 24px;
        margin: 0.25rem 0;
    }
    .auth-col-divider::before {
        top: 50%;
        left: 0;
        right: 0;
        bottom: auto;
        width: 100%;
        height: 1px;
        transform: translateY(-50%);
    }
    .auth-col-divider-text {
        padding: 0.2rem 0.65rem;
        border-radius: 12px;
    }
    .btn-social-full,
    .btn-primary,
    .form-group input,
    .phone-number-input,
    .phone-country-select {
        min-height: 48px !important;
    }
}

/* Phone OTP Modal */
.auth-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 1rem;
    animation: authFadeIn 0.2s ease-out;
}

@keyframes authFadeIn {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

.auth-modal-card {
    background: var(--bg-surface, #1e293b);
    border: 1px solid var(--border, rgba(51, 65, 85, 0.8));
    border-radius: var(--radius-lg, 14px);
    max-width: 440px;
    width: 100%;
    padding: 2rem;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
    position: relative;
    color: var(--text-primary, #f1f5f9);
}

.auth-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    color: var(--text-secondary, #94a3b8);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: color 0.15s;
}

.auth-modal-close:hover {
    color: #ffffff;
}

/* 6-Digit OTP inputs */
.otp-inputs-wrapper {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin: 1.5rem 0 0.5rem;
}

.otp-digit {
    width: 48px;
    height: 54px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    border-radius: 8px;
    border: 1px solid var(--border, rgba(51, 65, 85, 0.7));
    background: var(--bg-surface-secondary, rgba(15, 23, 42, 0.8));
    color: var(--text-primary, #f1f5f9);
    transition: all 0.2s;
}

.otp-digit:focus {
    outline: none;
    border-color: var(--accent, #3b82f6);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.35);
    background: rgba(15, 23, 42, 1);
}