/**
 * DesineXpress - Premium Authentication System Design System
 * 3D Flip Transitions, Glassmorphism, Responsive SaaS Aesthetics
 */

/* ==========================================================================
   1. Auth Container & Ambient Mesh Background
   ========================================================================== */
html {
    max-width: 100%;
    overflow-x: clip;
}

body {
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    padding: 0;
    background-color: #f8fafc;
    overflow-x: clip;
}

/* Ensure Sticky Header remains firmly visible during scroll on all auth pages */
.navbar-custom.sticky-top {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 1050 !important;
    background: #ffffff !important;
}

.auth-page-wrapper {
    min-height: calc(100dvh - 75px);
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 1rem calc(60px + env(safe-area-inset-bottom, 0px) + 8px);
    box-sizing: border-box;
    position: relative;
    overflow-x: clip;
    overflow-y: visible;
    background: 
        radial-gradient(circle at 15% 20%, rgba(99, 102, 241, 0.09) 0%, transparent 45%),
        radial-gradient(circle at 85% 75%, rgba(139, 92, 246, 0.09) 0%, transparent 45%),
        radial-gradient(circle at 50% 50%, rgba(238, 242, 255, 0.6) 0%, transparent 60%),
        #f8fafc;
}

.auth-trust-strip {
    margin-top: auto;
    margin-bottom: 0;
    padding: 6px 0 2px;
    width: 100%;
    text-align: center;
    z-index: 3;
    position: relative;
}

/* Standalone Auth Wrapper (for pages without site navbar/bottom nav, e.g. seller login) */
.auth-page-standalone {
    min-height: 100dvh !important;
    padding: 1.5rem 1rem !important;
}

/* Dedicated Back to Home Button Pill */
.btn-home-return {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.42rem 1.15rem;
    background: #ffffff;
    border: 1.5px solid #6366f1;
    border-radius: 9999px;
    font-size: 0.84rem;
    font-weight: 600;
    color: #4f46e5 !important;
    text-decoration: none !important;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 1px 4px rgba(99, 102, 241, 0.1);
    cursor: pointer;
    user-select: none;
}
.btn-home-return:hover {
    background: #f5f3ff;
    border-color: #4f46e5;
    color: #4338ca !important;
    transform: translateY(-1.5px);
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.2);
}
.btn-home-return:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}
.btn-home-return i {
    color: #4f46e5;
    font-size: 1rem;
    line-height: 1;
    transition: transform 0.2s ease;
}
.btn-home-return:hover i {
    transform: translateX(-2.5px);
}

/* Floating ambient glowing orbs (Fixed positioned so they never cause scroll overflow or bottom gaps) */
.auth-ambient-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(60px);
    pointer-events: none;
    z-index: 0;
    opacity: 0.6;
    animation: authFloatOrb 12s ease-in-out infinite alternate;
}
.auth-ambient-orb-1 {
    width: 320px;
    height: 320px;
    top: -40px;
    left: -60px;
    background: linear-gradient(135deg, #818cf8, #c084fc);
}
.auth-ambient-orb-2 {
    width: 380px;
    height: 380px;
    bottom: -60px;
    right: -80px;
    background: linear-gradient(135deg, #6366f1, #38bdf8);
    animation-delay: -5s;
}

@keyframes authFloatOrb {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(25px, 20px) scale(1.08); }
    100% { transform: translate(-20px, -25px) scale(0.95); }
}

/* ==========================================================================
   2. 3D Flip Card Architecture
   ========================================================================== */
.auth-3d-scene {
    perspective: 1400px;
    width: 100%;
    max-width: 860px;
    margin: auto auto 1rem auto;
    position: relative;
    z-index: 2;
    transition: max-width 0.3s ease;
}

@media (max-width: 991px) {
    .auth-3d-scene {
        max-width: 480px;
    }
}

.auth-flip-flipper {
    width: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.75s cubic-bezier(0.34, 1.35, 0.64, 1);
}

.auth-flip-flipper.is-flipped {
    transform: rotateY(180deg);
}

.auth-card-face {
    width: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 
        0 25px 50px -12px rgba(15, 23, 42, 0.12),
        0 0 0 1px rgba(255, 255, 255, 0.8) inset;
    padding: 2.5rem 2.75rem;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.auth-card-front {
    position: relative;
    z-index: 2;
    transform: rotateY(0deg);
    transition: visibility 0.4s ease;
}

.auth-card-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    transform: rotateY(180deg);
    z-index: 1;
    visibility: hidden;
    pointer-events: none;
    transition: visibility 0.4s ease;
}

/* When flipped, back face dictates document flow and height, front face is removed from flow */
.auth-flip-flipper.is-flipped .auth-card-front {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1;
    pointer-events: none;
    visibility: hidden;
}
.auth-flip-flipper.is-flipped .auth-card-back {
    position: relative !important;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 2;
    pointer-events: auto;
    visibility: visible;
}
.auth-flip-flipper:not(.is-flipped) .auth-card-front {
    position: relative !important;
    z-index: 2;
    pointer-events: auto;
    visibility: visible;
}
.auth-flip-flipper:not(.is-flipped) .auth-card-back {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1;
    pointer-events: none;
    visibility: hidden;
}

/* Standalone Auth Card (for verify, forgot, reset, change) */
.auth-card-standalone {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 
        0 25px 50px -12px rgba(15, 23, 42, 0.12),
        0 0 0 1px rgba(255, 255, 255, 0.8) inset;
    padding: 2.5rem 2.25rem;
    position: relative;
    z-index: 2;
    animation: authCardFadeIn 0.5s ease-out;
}

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

/* ==========================================================================
   3. Card Header, Badges & Typography
   ========================================================================== */
.auth-header {
    text-align: center;
    margin-bottom: 1.75rem;
}

.auth-brand-logo {
    display: inline-block;
    max-height: 42px;
    width: auto;
    margin-bottom: 1rem;
    transition: transform 0.25s ease;
}
.auth-brand-logo:hover {
    transform: scale(1.03);
}

.auth-icon-badge {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.12), rgba(124, 58, 237, 0.15));
    color: #4f46e5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 1rem;
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.15);
}
.auth-icon-badge.badge-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(5, 150, 105, 0.15));
    color: #059669;
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.15);
}
.auth-icon-badge.badge-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(217, 119, 6, 0.15));
    color: #d97706;
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.15);
}
.auth-icon-badge.badge-danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.12), rgba(220, 38, 38, 0.15));
    color: #dc2626;
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.15);
}

.auth-title {
    font-size: 1.55rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
    margin-bottom: 0.35rem;
}

.auth-subtitle {
    font-size: 0.875rem;
    color: #64748b;
    line-height: 1.45;
    margin: 0;
}

/* ==========================================================================
   4. Form Controls, Input Groups & Focus States
   ========================================================================== */
.auth-form-group {
    margin-bottom: 1.15rem;
}

.auth-label {
    display: block;
    font-size: 0.815rem;
    font-weight: 700;
    color: #334155;
    margin-bottom: 0.4rem;
    letter-spacing: 0.01em;
}

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

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

.auth-input {
    width: 100%;
    height: 48px;
    padding: 0.65rem 1rem 0.65rem 42px;
    font-size: 0.925rem;
    color: #0f172a;
    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;
}

.auth-input:hover {
    background-color: #ffffff;
    border-color: #cbd5e1;
}

.auth-input:focus {
    background-color: #ffffff;
    border-color: #4f46e5;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.14);
}

.auth-input:focus + .auth-input-icon,
.auth-input-wrapper:focus-within .auth-input-icon {
    color: #4f46e5;
}

/* Hide Windows/Edge native password reveal and clear buttons */
input::-ms-reveal,
input::-ms-clear {
    display: none !important;
}

.auth-input-has-toggle {
    padding-right: 46px !important;
}

.auth-pw-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    width: 34px;
    height: 34px;
    padding: 0;
    color: #94a3b8;
    cursor: pointer;
    border-radius: 8px;
    transition: color 0.2s ease, background 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    z-index: 5;
    user-select: none;
}
.auth-pw-toggle:hover {
    color: #4f46e5;
    background: rgba(79, 70, 229, 0.08);
}
.auth-pw-toggle:focus {
    outline: none;
    color: #4f46e5;
}

/* ==========================================================================
   5. Password Strength Meter Bar & Checklist
   ========================================================================== */
.password-meter-wrap {
    margin-top: 0.5rem;
}

.password-meter-track {
    height: 5px;
    background-color: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
    position: relative;
    display: flex;
    gap: 3px;
}

.password-meter-segment {
    flex: 1;
    height: 100%;
    border-radius: 999px;
    background-color: #e2e8f0;
    transition: background-color 0.3s ease;
}

.password-meter-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    margin-top: 0.35rem;
}

.password-meter-text {
    font-weight: 700;
}

/* Strength Colors */
.strength-weak .seg-1 { background-color: #ef4444; }
.strength-weak .password-meter-text { color: #ef4444; }

.strength-fair .seg-1,
.strength-fair .seg-2 { background-color: #f59e0b; }
.strength-fair .password-meter-text { color: #f59e0b; }

.strength-good .seg-1,
.strength-good .seg-2,
.strength-good .seg-3 { background-color: #10b981; }
.strength-good .password-meter-text { color: #10b981; }

.strength-strong .seg-1,
.strength-strong .seg-2,
.strength-strong .seg-3,
.strength-strong .seg-4 { background-color: #059669; }
.strength-strong .password-meter-text { color: #059669; }

/* Strength Rules Checklist */
.password-rules-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.3rem 0.5rem;
    margin-top: 0.5rem;
    font-size: 0.72rem;
    color: #64748b;
    list-style: none;
    padding: 0;
}
.password-rule-item {
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.2s ease;
}
.password-rule-item i {
    font-size: 0.75rem;
}
.password-rule-item.valid {
    color: #059669;
    font-weight: 600;
}
.password-rule-item.valid i {
    color: #059669;
}

/* ==========================================================================
   6. Primary Buttons & Submit Actions
   ========================================================================== */
.btn-auth-primary {
    width: 100%;
    height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 1.5rem;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.2px;
    color: #ffffff !important;
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 50%, #7c3aed 100%);
    background-size: 200% 200%;
    border: none;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(79, 70, 229, 0.35);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn-auth-primary:hover {
    background-position: right center;
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(79, 70, 229, 0.45);
    color: #ffffff !important;
}

.btn-auth-primary:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.btn-auth-primary:disabled,
.btn-auth-primary.is-loading {
    opacity: 0.8;
    cursor: not-allowed;
    transform: none !important;
}

/* Spinner inside button */
.btn-auth-spinner {
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(255, 255, 255, 0.35);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: btnSpin 0.7s linear infinite;
    display: none;
}
.btn-auth-primary.is-loading .btn-auth-spinner {
    display: inline-block;
}
.btn-auth-primary.is-loading .btn-auth-text {
    opacity: 0.9;
}

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

/* Secondary outline button */
.btn-auth-outline {
    width: 100%;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #334155 !important;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s ease;
}
.btn-auth-outline:hover {
    border-color: #4f46e5;
    color: #4f46e5 !important;
    background: rgba(79, 70, 229, 0.04);
    transform: translateY(-1px);
}

/* ==========================================================================
   7. Social Login Grid & Dividers
   ========================================================================== */
.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.35rem 0;
    color: #94a3b8;
    font-size: 0.785rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e2e8f0;
}
.auth-divider::before {
    margin-right: 0.85rem;
}
.auth-divider::after {
    margin-left: 0.85rem;
}

/* ==========================================================================
   7. Google Social Login Button & Divider
   ========================================================================== */
.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.35rem 0;
    color: #94a3b8;
    font-size: 0.785rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e2e8f0;
}
.auth-divider::before {
    margin-right: 0.85rem;
}
.auth-divider::after {
    margin-left: 0.85rem;
}

/* Official Google Sign-In Button */
.btn-google-login {
    width: 100%;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: #ffffff;
    border: 1.5px solid #dadce0;
    border-radius: 12px;
    padding: 0 1rem;
    font-size: 0.925rem;
    font-weight: 600;
    color: #3c4043;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(60, 64, 67, 0.08);
    cursor: pointer;
}
.btn-google-login svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}
.btn-google-login:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(60, 64, 67, 0.12);
    transform: translateY(-1.5px);
    color: #202124;
}
.btn-google-login:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(60, 64, 67, 0.08);
}

/* Legacy social grid fallback if needed */
.social-auth-grid {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-bottom: 1.25rem;
}

/* ==========================================================================
   7.1 Two-Look System: Desktop Landscape Grid & Mobile Portrait Architecture
   ========================================================================== */

/* Login 2-column landscape layout (Desktop) / 1-column (Mobile) */
.auth-landscape-login-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 992px) {
    .auth-landscape-login-grid {
        grid-template-columns: 360px 1fr;
        gap: 2.25rem;
        align-items: stretch;
    }
    .auth-landscape-login-grid.auth-landscape-wizard-grid {
        grid-template-columns: 360px 1fr;
        gap: 2.25rem;
        align-items: stretch;
    }
}

/* Right Form Column: Perfectly Vertically Centered with No Bottom Gap */
.auth-form-column {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100%;
}

/* Desktop Showcase Panel (Left Side of Landscape Login) */
.auth-showcase-panel {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.35rem 1.35rem;
    background: linear-gradient(145deg, rgba(79, 70, 229, 0.05) 0%, rgba(124, 58, 237, 0.08) 100%);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 18px;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}

@media (min-width: 992px) {
    .auth-showcase-panel {
        display: flex;
    }
}

.auth-showcase-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.3rem 0.7rem;
    background: #ffffff;
    border: 1px solid #e0e7ff;
    border-radius: 999px;
    font-size: 0.725rem;
    font-weight: 700;
    color: #4f46e5;
    margin-bottom: 1rem;
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.08);
}

.auth-showcase-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.3;
    letter-spacing: -0.02em;
    margin-bottom: 0.65rem;
}

.auth-showcase-desc {
    font-size: 0.825rem;
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 1.15rem;
}

.auth-feature-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.15rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.auth-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.815rem;
    color: #334155;
    font-weight: 600;
    line-height: 1.35;
}

.auth-feature-icon {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid #e0e7ff;
    color: #4f46e5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
    margin-top: 1px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.auth-showcase-footer {
    padding-top: 1rem;
    border-top: 1px solid rgba(226, 232, 240, 0.8);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.785rem;
    color: #64748b;
    margin-top: auto;
}

.auth-showcase-stat {
    display: flex;
    align-items: center;
    gap: 8px;
}
.auth-showcase-stat strong {
    color: #0f172a;
    font-size: 0.95rem;
}

/* ==========================================================================
   Mobile & Tablet Customer & Buyer Hub Showcase Card
   (Shown under subtitle on <= 991px to eliminate empty bottom gap & showcase perks)
   ========================================================================== */
.auth-mobile-hub-card {
    background: linear-gradient(145deg, rgba(79, 70, 229, 0.05) 0%, rgba(124, 58, 237, 0.08) 100%);
    border: 1px solid rgba(99, 102, 241, 0.16);
    border-radius: 16px;
    padding: 12px 14px;
    margin: 10px 0 16px;
    text-align: left;
    box-shadow: 0 4px 14px -3px rgba(79, 70, 229, 0.07);
}

.auth-mobile-hub-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    background: #ffffff;
    border: 1px solid #e0e7ff;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #4f46e5;
    margin-bottom: 8px;
    box-shadow: 0 1px 3px rgba(79, 70, 229, 0.08);
}

.auth-mobile-perks-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.auth-mobile-perk-item {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 0.775rem;
    color: #334155;
    font-weight: 500;
    line-height: 1.35;
}

.auth-mobile-perk-icon {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: #ffffff;
    color: #4f46e5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    flex-shrink: 0;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.auth-mobile-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.725rem;
    color: #64748b;
    margin-top: 8px;
    padding-top: 7px;
    border-top: 1px dashed rgba(99, 102, 241, 0.18);
}

/* Balanced 2-Column Registration Grid Layout (Zero wasted space / no awkward gaps) */
.auth-reg-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
}

.auth-reg-col {
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .auth-reg-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
        align-items: start;
    }
}

/* Two-column form row for Landscape Registration (Desktop) */
.auth-form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
}

@media (min-width: 768px) {
    .auth-form-row {
        grid-template-columns: 1fr 1fr;
        gap: 1.25rem;
    }
}

/* 6-Digit OTP Monospace Input System */
.otp-input-wrap {
    margin: 1.25rem 0;
}

.auth-otp-input {
    width: 100%;
    height: 56px;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
    font-size: 1.85rem;
    font-weight: 800;
    text-align: center;
    letter-spacing: 12px;
    color: #0f172a;
    background-color: #f8fafc;
    border: 2px solid #cbd5e1;
    border-radius: 14px;
    outline: none;
    transition: all 0.25s ease;
}

.auth-otp-input:focus {
    background-color: #ffffff;
    border-color: #4f46e5;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.16);
}

.auth-otp-input::placeholder {
    color: #cbd5e1;
    letter-spacing: 10px;
    font-weight: 500;
}

/* ==========================================================================
   8. Alert Banners, Flash Messages & Verification Cards
   ========================================================================== */
.auth-alert {
    padding: 0.85rem 1rem;
    border-radius: 12px;
    font-size: 0.865rem;
    line-height: 1.45;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border: 1px solid transparent;
}
.auth-alert i {
    font-size: 1.1rem;
    margin-top: 1px;
    flex-shrink: 0;
}
.auth-alert-danger {
    background: #fef2f2;
    border-color: #fee2e2;
    color: #991b1b;
}
.auth-alert-danger i {
    color: #ef4444;
}
.auth-alert-success {
    background: #f0fdf4;
    border-color: #dcfce7;
    color: #166534;
}
.auth-alert-success i {
    color: #10b981;
}
.auth-alert-warning {
    background: #fffbeb;
    border-color: #fef3c7;
    color: #92400e;
}
.auth-alert-warning i {
    color: #f59e0b;
}
.auth-alert-info {
    background: #eff6ff;
    border-color: #dbeafe;
    color: #1e40af;
}
.auth-alert-info i {
    color: #3b82f6;
}

/* ==========================================================================
   9. Switch Links (Login <-> Register 3D Trigger)
   ========================================================================== */
.auth-switch-text {
    text-align: center;
    font-size: 0.865rem;
    color: #64748b;
    margin-top: 1.4rem;
    margin-bottom: 0;
}

.auth-switch-link {
    font-weight: 700;
    color: #4f46e5;
    text-decoration: none;
    transition: color 0.2s ease, text-decoration 0.2s ease;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    display: inline;
}
.auth-switch-link:hover {
    color: #4338ca;
    text-decoration: underline;
}

/* Remember Me & Terms Checkbox */
.auth-check-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.15rem;
    font-size: 0.835rem;
}
.auth-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #475569;
    cursor: pointer;
    user-select: none;
    margin: 0;
}
.auth-checkbox-input {
    width: 17px;
    height: 17px;
    border-radius: 5px;
    border: 1.5px solid #cbd5e1;
    accent-color: #4f46e5;
    cursor: pointer;
}

/* ==========================================================================
   10. Responsive Breakpoints (Two-Look System)
   ========================================================================== */
@media (max-width: 991px) {
    .auth-page-wrapper {
        min-height: calc(100dvh - 75px);
        padding: 1.25rem 1rem calc(60px + env(safe-area-inset-bottom, 0px) + 8px);
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        align-items: center;
        box-sizing: border-box;
    }
    .auth-page-wrapper.auth-page-standalone {
        min-height: 100dvh !important;
        padding: 1.5rem 1rem !important;
        justify-content: center;
    }
    .auth-3d-scene {
        max-width: 520px;
        width: 100%;
        margin: auto auto 0.75rem auto;
    }
    .auth-card-face {
        padding: 1.75rem 1.5rem;
        border-radius: 22px;
    }
    .auth-header {
        margin-bottom: 1.15rem;
    }
    .auth-title {
        font-size: 1.45rem;
        margin-bottom: 0.25rem;
    }
    .auth-subtitle {
        font-size: 0.825rem;
        line-height: 1.4;
    }
    .btn-google-login {
        height: 44px;
        font-size: 0.885rem;
        border-radius: 10px;
    }
    .auth-divider {
        margin: 0.95rem 0;
        font-size: 0.78rem;
    }
    .auth-form-group {
        margin-bottom: 0.85rem;
    }
    .auth-input {
        height: 44px;
        font-size: 0.9rem;
    }
    .btn-auth-primary {
        height: 46px;
        font-size: 0.925rem;
    }
    .auth-check-wrap {
        margin-bottom: 0.85rem;
    }
    .auth-trust-strip {
        margin-top: auto !important;
        margin-bottom: 0 !important;
        padding-top: 6px !important;
        padding-bottom: 0 !important;
    }
}

@media (max-width: 576px) {
    .auth-page-wrapper {
        min-height: calc(100dvh - 70px);
        padding: 0.85rem 0.75rem calc(60px + env(safe-area-inset-bottom, 0px) + 6px);
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        align-items: center;
        box-sizing: border-box;
    }
    .auth-page-wrapper.auth-page-standalone {
        min-height: 100dvh !important;
        padding: 1rem 0.75rem !important;
        justify-content: center;
    }
    .auth-3d-scene {
        max-width: 100%;
        width: 100%;
        margin: auto auto 0.5rem auto;
    }
    .auth-card-face,
    .auth-card-standalone {
        padding: 1.15rem 1rem;
        border-radius: 18px;
    }
    .auth-header {
        margin-bottom: 0.75rem;
    }
    .auth-title {
        font-size: 1.25rem;
        margin-bottom: 0.15rem;
    }
    .auth-subtitle {
        font-size: 0.76rem;
        line-height: 1.35;
    }
    .btn-google-login {
        height: 40px;
        font-size: 0.825rem;
        gap: 8px;
        border-radius: 10px;
    }
    .btn-google-login svg {
        width: 18px;
        height: 18px;
    }
    .auth-divider {
        margin: 0.65rem 0;
        font-size: 0.72rem;
    }
    .auth-form-group {
        margin-bottom: 0.65rem;
    }
    .auth-label {
        font-size: 0.76rem;
        margin-bottom: 0.2rem;
    }
    .auth-input {
        height: 40px;
        font-size: 0.85rem;
        padding-left: 36px;
        border-radius: 9px;
    }
    .auth-input-icon {
        font-size: 0.85rem;
        left: 11px;
    }
    .auth-pw-toggle {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
    .auth-check-wrap {
        margin-bottom: 0.65rem;
        font-size: 0.76rem;
    }
    .auth-checkbox-input {
        width: 15px;
        height: 15px;
    }
    .btn-auth-primary {
        height: 42px;
        font-size: 0.875rem;
        border-radius: 10px;
        margin-top: 0.15rem;
    }
    .auth-switch-text {
        margin-top: 0.65rem;
        font-size: 0.78rem;
    }
    .auth-trust-strip {
        margin-top: auto !important;
        margin-bottom: 0 !important;
        padding-top: 4px !important;
        padding-bottom: 0 !important;
        font-size: 0.72rem !important;
    }
    .auth-otp-input {
        height: 46px;
        font-size: 1.35rem;
        letter-spacing: 6px;
    }
    .password-rules-list {
        grid-template-columns: 1fr;
        gap: 0.25rem;
        font-size: 0.72rem;
    }
    .auth-reg-grid {
        gap: 0.75rem;
    }
}
