/* Elima auth entry v5 */
/*
 * Elima CSS Architecture v1.0
 * Module: 01-settings/tokens.css
 * Generated from the verified production stylesheet set.
 * Keep page-specific rules in 05-pages and shared UI in 03-components.
 */


:root {
    /* لایت مود - بازطراحی شده: چشم‌نواز، ملایم، دارای عمق و کاملاً حرفه‌ای */
    --bg-main: #f8fafc; 
    --bg-cards: rgba(255, 255, 255, 0.95); 
    --border-glass: rgba(15, 23, 42, 0.08); 
    --text-title: #0f172a; 
    --text-body: #334155; 
    --text-muted: #64748b;
    --primary: #4338ca; 
    --primary-light: #e0e7ff; 
    --accent: #059669; 
    --shape-1: rgba(67, 56, 202, 0.06); 

    --header-bg: rgba(255, 255, 255, 0.82); 
    --header-bg-scrolled: rgba(255, 255, 255, 0.94);
    --input-bg: #ffffff; 
    --glass-shadow: 0 12px 36px -8px rgba(15, 23, 42, 0.06), 0 4px 10px -2px rgba(15, 23, 42, 0.03); 
    
    /* اسکلتون شیمر */
    --skeleton-base: rgba(226, 232, 240, 0.7);
    --skeleton-shine: rgba(255, 255, 255, 0.85);
    
    /* تایپوگرافی ریتمیک */
    --leading-relaxed: 1.85;
    --leading-tight: 1.35;
    --tracking-tight: -0.015em;
    --tracking-loose: 0.015em;
}

html.dark-theme,
body.dark-theme {
    /* دارک مود - دست‌نخورده و بهینه‌شده */
    --bg-main: #0b1120;
    --bg-cards: rgba(30, 41, 59, 0.4);
    --border-glass: rgba(255, 255, 255, 0.06);
    --text-title: #f8fafc;
    --text-body: #94a3b8;
    --text-muted: #64748b;
    --primary: #6366f1;
    --primary-light: #1e1b4b;
    --accent: #34d399;
    --shape-1: rgba(99, 102, 241, 0.12);
    --header-bg: rgba(11, 17, 32, 0.65);
    --header-bg-scrolled: rgba(11, 17, 32, 0.88);
    --input-bg: rgba(15, 23, 42, 0.8);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.03);
    
    /* اسکلتون شیمر دارک */
    --skeleton-base: rgba(30, 41, 59, 0.6);
    --skeleton-shine: rgba(51, 65, 85, 0.8);
}

/* ================= آیکون سبد خرید SVG و تعویض تم بدون لگ ================= */
.cart-svg-icon {
    display: inline-block;
    width: 1.25em;
    height: 1.25em;
    fill: currentColor;
    vertical-align: middle;
    flex-shrink: 0;
}

span.cart-svg-icon {
    background-color: currentColor;
    -webkit-mask: url('/icon/cart.svg') no-repeat center / contain;
    mask: url('/icon/cart.svg') no-repeat center / contain;
}

/* View Transitions API: Symmetric silky smooth cross-fade for both directions */
::view-transition-image-pair(root) {
    isolation: isolate;
}

::view-transition-old(root),
::view-transition-new(root) {
    animation-duration: 0.28s;
    animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
    mix-blend-mode: normal !important;
}

::view-transition-old(root) {
    animation-name: themeFadeOut;
}

::view-transition-new(root) {
    animation-name: themeFadeIn;
}

@keyframes themeFadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes themeFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.theme-transitioning body,
.theme-transitioning header,
.theme-transitioning footer,
.theme-transitioning main,
.theme-transitioning .site-wrapper,
.theme-transitioning .glass-effect,
.theme-transitioning .card,
.theme-transitioning .cat-card,
.theme-transitioning .book-item,
.theme-transitioning .book-visual-card,
.theme-transitioning .book-detail-surface,
.theme-transitioning .pro-book-page,
.theme-transitioning .pro-buy-section,
.theme-transitioning .related-books-section,
.theme-transitioning .cats-container a,
.theme-transitioning .theme-switch,
.theme-transitioning .social-icon-btn,
.theme-transitioning .cart-nav-btn,
.theme-transitioning .cart-drawer,
.theme-transitioning .mobile-nav,
.theme-transitioning .auth-shell,
.theme-transitioning .profile-card,
.theme-transitioning .contact-info-card,
.theme-transitioning .contact-form-card,
.theme-transitioning .news-card,
.theme-transitioning .trust-badge-card,
.theme-transitioning input,
.theme-transitioning textarea,
.theme-transitioning select {
    transition: background-color 0.22s cubic-bezier(0.22, 1, 0.36, 1),
                border-color 0.22s cubic-bezier(0.22, 1, 0.36, 1),
                color 0.18s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.22s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

/*
 * Elima CSS Architecture v1.0
 * Module: 02-base/fonts.css
 * Generated from the verified production stylesheet set.
 * Keep page-specific rules in 05-pages and shared UI in 03-components.
 */


@font-face {
    font-family: 'Farhang';
    src: url('../../fonts/Farhang-Regular.woff2') format('woff2');
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: 'Farhang';
    src: url('../../fonts/Farhang-Bold.woff2') format('woff2');
    font-weight: 700;
    font-display: swap;
}
@font-face {
    font-family: 'Farhang';
    src: url('../../fonts/Farhang-Black.woff2') format('woff2');
    font-weight: 900;
    font-display: swap;
}

/*
 * Elima CSS Architecture v1.0
 * Module: 02-base/global.css
 * Generated from the verified production stylesheet set.
 * Keep page-specific rules in 05-pages and shared UI in 03-components.
 */



html {
    scroll-behavior: smooth;
    background-color: var(--bg-main);
    scrollbar-width: thin;
    scrollbar-color: rgba(99, 102, 241, 0.35) transparent;
    transition: background-color 0.22s ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Farhang', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-main);
    color: var(--text-body);
    padding-top: 85px;
    overflow-x: hidden;
    min-height: 100vh;
    line-height: var(--leading-relaxed, 1.85);
    letter-spacing: var(--tracking-tight, -0.015em);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.22s ease, color 0.22s ease;
}

p {
    line-height: var(--leading-relaxed, 1.85);
    letter-spacing: -0.01em;
}

h1, h2, h3, h4, h5, h6 {
    line-height: var(--leading-tight, 1.35);
    letter-spacing: -0.02em;
}

body.no-scroll {
    overflow: hidden;
    touch-action: none;
}

img { max-width: 100%; height: auto; display: block; }

.site-wrapper { position: relative; width: 100%; min-height: 100vh; z-index: 1; }

main, site-footer {
    animation: fadeInPage 0.26s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    opacity: 0.001;
}

.glass-effect {
    backdrop-filter: blur(12px) saturate(160%);
    -webkit-backdrop-filter: blur(12px) saturate(160%);
    background: var(--bg-cards);
    border: 1px solid var(--border-glass);
    box-shadow: var(--glass-shadow);
}

/* ==========================================================================
   Sleek Minimal Glass Scrollbar (Idea 5)
   ========================================================================== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.28);
    border-radius: 999px;
    transition: background-color 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

html.dark-theme ::-webkit-scrollbar-thumb,
body.dark-theme ::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.16);
}

html.dark-theme ::-webkit-scrollbar-thumb:hover,
body.dark-theme ::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.35);
}

/* ==========================================================================
   Tactile Button Press Feedback (Idea 8)
   ========================================================================== */
button, 
.btn-primary, 
.btn-secondary, 
.square-action-btn, 
.btn-action, 
.filter-btn, 
.theme-switch {
    transition: transform 0.16s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

button:active:not(:disabled),
.btn-primary:active:not(:disabled),
.btn-secondary:active:not(:disabled),
.square-action-btn:active:not(:disabled),
.btn-action:active:not(:disabled),
.filter-btn:active:not(:disabled),
.theme-switch:active {
    transform: scale(0.962) !important;
    transition: transform 0.08s ease !important;
}

::selection { background: var(--primary-light); color: var(--primary); }

::-moz-selection { background: var(--primary-light); color: var(--primary); }

.delay-100 { transition-delay: 70ms; }

.delay-200 { transition-delay: 140ms; }

.delay-300 { transition-delay: 210ms; }

.delay-400 { transition-delay: 280ms; }

@media (max-width: 768px) {
    .delay-100 { transition-delay: 20ms; }
    .delay-200 { transition-delay: 40ms; }
    .delay-300 { transition-delay: 60ms; }
    .delay-400 { transition-delay: 80ms; }
}

.book-details-body main,
.book-details-body site-footer {
    animation: none;
    opacity: 1;
}

.book-details-body {
    --detail-surface: rgba(255, 255, 255, 0.88);
    --detail-surface-strong: rgba(255, 255, 255, 0.94);
    --detail-shadow: 0 8px 26px rgba(15, 23, 42, 0.05);
}

html.dark-theme .book-details-body,
body.dark-theme.book-details-body {
    --detail-surface: rgba(15, 23, 42, 0.82);
    --detail-surface-strong: rgba(15, 23, 42, 0.92);
    --detail-shadow: 0 10px 28px rgba(2, 6, 23, 0.22);
}



/* Long text readability and typography */
p {
    line-height: 1.95;
    letter-spacing: -0.01em;
}
h1, h2, h3, h4, h5, h6 {
    letter-spacing: -0.02em;
}
/*
 * Elima CSS Architecture v1.0
 * Module: 02-base/accessibility.css
 * Generated from the verified production stylesheet set.
 * Keep page-specific rules in 05-pages and shared UI in 03-components.
 */



:where(a, button, input, select, textarea):focus-visible {
    outline: 3px solid color-mix(in srgb, var(--primary) 55%, transparent);
    outline-offset: 3px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
/*
 * Elima CSS Architecture v1.0
 * Module: 02-base/motion.css
 * Generated from the verified production stylesheet set.
 * Keep page-specific rules in 05-pages and shared UI in 03-components.
 */


.reveal-on-scroll {
    opacity: 0;
    transform: translate3d(0, 20px, 0) scale(0.988);
    transition:
        opacity 0.44s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.44s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal-zoom {
    opacity: 0;
    transform: scale3d(0.97, 0.97, 1);
    transition:
        opacity 0.40s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.40s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
}
.reveal-zoom.is-visible {
    opacity: 1;
    transform: scale3d(1, 1, 1);
}
body.fade-out { animation: fadeOutPage 0.24s ease-in forwards; }
@keyframes fadeInPage {
    0% { opacity: 0; transform: translate3d(0, 10px, 0); }
    100% { opacity: 1; transform: translate3d(0, 0, 0); }
}
@keyframes fadeOutPage {
    0% { opacity: 1; transform: translate3d(0, 0, 0); }
    100% { opacity: 0; transform: translate3d(0, -8px, 0); }
}
@media (max-width: 768px) {
    .reveal-on-scroll { transform: translate3d(0, 14px, 0) scale(0.992); }
}
@keyframes pulseLogo {
    0% { transform: scale(0.96); opacity: 0.85; }
    100% { transform: scale(1.03); opacity: 1; }
}
@keyframes loadingBar {
    0% { left: -40%; }
    100% { left: 100%; }
}
html.theme-switching body,
html.theme-switching header,
html.theme-switching footer,
html.theme-switching nav.mobile-nav {
    transition-duration: .24s !important;
    transition-timing-function: cubic-bezier(.22,1,.36,1) !important;
}
@keyframes blinkDot { 0% { opacity: 0.5; transform: scale(0.8); } 100% { opacity: 1; transform: scale(1.2); } }
@keyframes sweepLight { 0% { left: -100%; } 20%, 100% { left: 200%; } }
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes floatAnim {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}
@keyframes accountCardIn{from{opacity:0;transform:translateY(18px) scale(.985)}to{opacity:1;transform:none}}
@keyframes profileCardIn{from{opacity:0;transform:translateY(14px) scale(.992)}to{opacity:1;transform:none}}
@keyframes panelIn{from{opacity:0;transform:translateY(9px)}to{opacity:1;transform:none}}
@keyframes dialogIn{from{opacity:0;transform:translateY(10px) scale(.97)}to{opacity:1;transform:none}}
@keyframes auroraDrift{from{transform:translate3d(-2%,0,0) scale(.96)}to{transform:translate3d(4%,3%,0) scale(1.06)}}
@keyframes orbDrift{from{transform:translate3d(-2%,0,0) scale(.97)}to{transform:translate3d(3%,3%,0) scale(1.05)}}
@keyframes iconBreathe{0%,100%{transform:translateY(0) rotate(0)}50%{transform:translateY(-3px) rotate(-2deg)}}
@keyframes avatarFloat{0%,100%{transform:translateY(0)}50%{transform:translateY(-4px)}}
@keyframes securePulse{0%,100%{opacity:.65}50%{opacity:1}}
@keyframes minimalCardIn{from{opacity:0;transform:translate3d(0,14px,0) scale(.988)}to{opacity:1;transform:translate3d(0,0,0) scale(1)}}
@keyframes minimalPanelIn{from{opacity:0;transform:translate3d(0,7px,0)}to{opacity:1;transform:translate3d(0,0,0)}}
@keyframes minimalProfileIn{from{opacity:0;transform:translate3d(0,10px,0)}to{opacity:1;transform:translate3d(0,0,0)}}
@keyframes minimalFavoriteIn{from{opacity:0;transform:translate3d(0,6px,0)}to{opacity:1;transform:translate3d(0,0,0)}}
@keyframes lightIconFloat{0%,100%{transform:translate3d(0,0,0)}50%{transform:translate3d(0,-2px,0)}}
@keyframes lightAvatarFloat{0%,100%{transform:translate3d(0,0,0)}50%{transform:translate3d(0,-3px,0)}}
@keyframes gentleBounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes simpleFade { to { opacity: 1; } }

/* ==========================================================================
   Micro-Interactions & Modern Shimmer Animations
   ========================================================================== */
@keyframes cleanHeartScale {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

@keyframes shimmerWave {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.fade-in-img {
    opacity: 0;
    filter: blur(6px);
    transform: scale(0.985);
    transition: opacity 0.38s cubic-bezier(0.16, 1, 0.3, 1), filter 0.38s cubic-bezier(0.16, 1, 0.3, 1), transform 0.38s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, filter, transform;
}

.fade-in-img.loaded {
    opacity: 1;
    filter: blur(0px);
    transform: scale(1);
}

:root {
    --auth-primary: #4f46e5;
    --auth-primary-hover: #4338ca;
    --auth-primary-light: rgba(79, 70, 229, 0.08);
    --auth-text-title: #0f172a;
    --auth-text-body: #334155;
    --auth-text-muted: #64748b;
    --auth-border: rgba(15, 23, 42, 0.08);
    --auth-border-focus: rgba(79, 70, 229, 0.65);
    --auth-surface: #ffffff;
    --auth-input-bg: #f8fafc;
    --auth-input-border: #e2e8f0;
    --auth-shadow: 0 20px 48px -12px rgba(15, 23, 42, 0.08), 0 4px 12px -2px rgba(15, 23, 42, 0.03);
}

html.dark-theme {
    --auth-primary: #6366f1;
    --auth-primary-hover: #818cf8;
    --auth-primary-light: rgba(99, 102, 241, 0.14);
    --auth-text-title: #f8fafc;
    --auth-text-body: #cbd5e1;
    --auth-text-muted: #94a3b8;
    --auth-border: rgba(255, 255, 255, 0.08);
    --auth-border-focus: rgba(99, 102, 241, 0.75);
    --auth-surface: #0f172a;
    --auth-input-bg: rgba(30, 41, 59, 0.7);
    --auth-input-border: rgba(255, 255, 255, 0.1);
    --auth-shadow: 0 24px 64px -12px rgba(0, 0, 0, 0.6), 0 4px 16px -2px rgba(0, 0, 0, 0.4);
}

/* Document & Body */
.auth-document {
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    padding: 0;
    color: var(--auth-text-body);
    background-color: var(--bg-main, #f8fafc);
    font-family: "Farhang", system-ui, -apple-system, sans-serif;
    position: relative;
    overflow-x: hidden;
}

/* Main Container */
.auth-page {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: max(28px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(28px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
    box-sizing: border-box;
}

/* Card Shell */
.auth-shell {
    position: relative;
    width: 100%;
    max-width: 460px;
    border-radius: 24px;
    background: var(--auth-surface);
    border: 1px solid var(--auth-border);
    box-shadow: var(--auth-shadow);
    overflow: hidden;
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.28s ease;
}

.auth-workspace {
    position: relative;
    padding: 32px 32px 28px;
    display: flex;
    flex-direction: column;
}

/* Top Bar: Back, Brand, Theme Toggle */
.auth-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.auth-page-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 12px;
    background: var(--auth-primary-light);
    border: 1px solid var(--auth-border);
    color: var(--auth-primary);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 700;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.2s ease, border-color 0.2s ease;
}
.auth-page-back:hover {
    transform: translateX(3px);
    border-color: var(--auth-primary);
}
.auth-page-back .auth-icon {
    width: 16px;
    height: 16px;
}

.auth-brand-link {
    text-decoration: none;
}
.auth-brand-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--auth-primary-light);
    border: 1px solid var(--auth-border);
    color: var(--auth-text-title);
    font-size: 0.88rem;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.auth-theme-toggle {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--auth-primary-light);
    border: 1px solid var(--auth-border);
    color: var(--auth-primary);
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.2s ease;
    padding: 0;
}
.auth-theme-toggle:hover {
    transform: scale(1.08);
    border-color: var(--auth-primary);
}
.auth-theme-toggle .theme-icon {
    width: 18px;
    height: 18px;
}
.auth-theme-toggle .icon-sun { display: none; }
.auth-theme-toggle .icon-moon { display: block; }
html.dark-theme .auth-theme-toggle .icon-sun { display: block; }
html.dark-theme .auth-theme-toggle .icon-moon { display: none; }

/* Tabs */
.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding: 5px;
    margin-bottom: 24px;
    border-radius: 16px;
    background: var(--auth-primary-light);
    border: 1px solid var(--auth-border);
}
.auth-tabs button {
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--auth-text-muted);
    font-size: 0.86rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.auth-tabs button.is-active {
    background: var(--auth-surface);
    color: var(--auth-primary);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

/* Headings */
.auth-form-heading {
    text-align: center;
    margin-bottom: 22px;
}
.auth-form-heading h1,
.auth-form-heading h2 {
    margin: 0 0 6px;
    font-size: 1.45rem;
    font-weight: 900;
    color: var(--auth-text-title);
    letter-spacing: -0.025em;
}
.auth-form-heading p {
    margin: 0;
    font-size: 0.82rem;
    color: var(--auth-text-muted);
    line-height: 1.65;
}

/* Forms */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.auth-form[hidden] {
    display: none !important;
}

/* Field */
.auth-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--auth-text-title);
}

.auth-input-container {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}
.auth-input-container input,
.auth-field input {
    width: 100%;
    height: 48px;
    border-radius: 14px;
    border: 1px solid var(--auth-input-border);
    background: var(--auth-input-bg);
    color: var(--auth-text-title);
    font-size: 0.88rem;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

/* RTL Input (e.g. #registerName) */
.auth-input-container input:not([dir="ltr"]),
.auth-input-container input[dir="rtl"] {
    padding-right: 44px !important;
    padding-left: 14px !important;
    text-align: right;
    direction: rtl;
}

.auth-input-container input:not([dir="ltr"]) ~ .input-accent-icon,
.auth-input-container input[dir="rtl"] ~ .input-accent-icon {
    right: 14px !important;
    left: auto !important;
}

/* LTR Input (email, URLs) */
.auth-input-container input[dir="ltr"] {
    padding-left: 44px !important;
    padding-right: 14px !important;
    text-align: left;
    direction: ltr;
}

.auth-input-container input[dir="ltr"] ~ .input-accent-icon {
    left: 14px !important;
    right: auto !important;
}

.input-accent-icon {
    position: absolute;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--auth-text-muted);
    pointer-events: none;
    z-index: 2;
}
.input-accent-icon svg {
    width: 18px;
    height: 18px;
}

.auth-input-container input:hover,
.auth-field input:hover,
.password-wrap:hover {
    border-color: rgba(79, 70, 229, 0.4);
}

.auth-input-container input:focus,
.auth-field input:focus,
.password-wrap:focus-within {
    outline: none;
    border-color: var(--auth-border-focus);
    box-shadow: 0 0 0 3.5px rgba(99, 102, 241, 0.16);
    background: var(--auth-surface);
}

/* Password Wrap */
.password-wrap {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    border-radius: 14px;
    border: 1px solid var(--auth-input-border);
    background: var(--auth-input-bg);
    box-sizing: border-box;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}
.password-wrap input {
    width: 100%;
    height: 48px;
    padding-left: 72px !important;
    padding-right: 14px !important;
    border: 0 !important;
    background: transparent !important;
    color: var(--auth-text-title);
    font-size: 0.88rem;
    font-family: inherit;
    box-shadow: none !important;
    box-sizing: border-box;
    text-align: left;
    direction: ltr;
}
.password-wrap input:focus {
    outline: none;
}
.password-wrap button {
    position: absolute;
    left: 8px !important;
    right: auto !important;
    top: 50%;
    transform: translateY(-50%);
    padding: 6px 11px;
    border-radius: 8px;
    border: 0;
    background: var(--auth-primary-light);
    color: var(--auth-primary);
    font-size: 0.74rem;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    line-height: 1;
    transition: background-color 0.18s ease, transform 0.15s ease;
    z-index: 2;
}
.password-wrap button:hover {
    background: rgba(99, 102, 241, 0.2);
}
.password-wrap button:active {
    transform: translateY(-50%) scale(0.96);
}

/* Password Strength Meter */
.password-strength-wrap {
    min-height: 16px;
    margin-top: 3px;
    display: flex;
    align-items: center;
}
.password-strength {
    font-size: 0.72rem;
    font-weight: 800;
    transition: color 0.2s ease;
}
.password-strength[data-score='0'],
.password-strength[data-score='1'] { color: #ef4444; }
.password-strength[data-score='2'] { color: #f59e0b; }
.password-strength[data-score='3'] { color: #10b981; }
.password-strength[data-score='4'] { color: #059669; }

/* Rules Checkbox */
.auth-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.76rem;
    color: var(--auth-text-muted);
    line-height: 1.6;
    cursor: pointer;
}
.auth-check input {
    width: 17px;
    height: 17px;
    margin-top: 2px;
    border-radius: 5px;
    accent-color: var(--auth-primary);
    cursor: pointer;
}

/* Text Buttons */
.auth-actions-row {
    display: flex;
    justify-content: flex-end;
}
.auth-text-btn,
.auth-back-btn {
    border: 0;
    background: transparent;
    color: var(--auth-primary);
    font-size: 0.76rem;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    padding: 4px 0;
    transition: opacity 0.18s ease;
}
.auth-text-btn:hover,
.auth-back-btn:hover {
    text-decoration: underline;
    opacity: 0.88;
}

/* Primary CTA Button */
.auth-primary-btn {
    position: relative;
    width: 100%;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--auth-primary) 0%, #6366f1 55%, #3b82f6 100%);
    color: #ffffff;
    font-size: 0.92rem;
    font-weight: 900;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.28);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease, opacity 0.2s ease;
}
.auth-primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(79, 70, 229, 0.36);
}
.auth-primary-btn:active {
    transform: scale(0.98);
}
.auth-primary-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}
.auth-primary-btn .btn-arrow {
    width: 18px;
    height: 18px;
    transition: transform 0.2s ease;
}
.auth-primary-btn:hover .btn-arrow {
    transform: translateX(-3px);
}

.auth-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: authSpin 0.7s linear infinite;
}
@keyframes authSpin {
    to { transform: rotate(360deg); }
}

/* Feedback & Alerts */
.auth-feedback {
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.6;
    text-align: center;
    box-sizing: border-box;
}
.auth-feedback.is-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}
.auth-feedback.is-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #10b981;
}

/* Security Badge */
.auth-secure {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
    font-size: 0.7rem;
    color: var(--auth-text-muted);
    text-align: center;
}
.auth-secure .secure-icon {
    width: 14px;
    height: 14px;
    color: #10b981;
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
    .auth-page {
        padding: max(16px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
    }
    .auth-shell {
        border-radius: 20px;
        max-width: 100%;
        box-shadow: 0 10px 30px -8px rgba(15, 23, 42, 0.08);
    }
    .auth-workspace {
        padding: 22px 18px 20px;
    }
    .auth-form-heading h1,
    .auth-form-heading h2 {
        font-size: 1.3rem;
    }
    .auth-tabs button {
        height: 42px;
        font-size: 0.82rem;
    }
    .auth-primary-btn {
        height: 48px;
        font-size: 0.88rem;
    }
}

/* OTP & Auth Extensions */
.auth-method-switcher {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 20px;
    padding: 4px;
    background: var(--auth-primary-light);
    border-radius: 12px;
}
.auth-method-btn {
    flex: 1;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--auth-text-muted);
    font-size: 0.8rem;
    font-weight: 800;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.auth-method-btn.is-active {
    background: var(--auth-surface);
    color: var(--auth-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
}
.otp-badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 6px;
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    font-weight: 800;
}
.otp-code-input {
    text-align: center !important;
    letter-spacing: 5px !important;
    font-size: 1.35rem !important;
    font-weight: 900 !important;
    direction: ltr !important;
    font-family: Consolas, 'Courier New', monospace, inherit !important;
}
.otp-info-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: var(--auth-primary-light);
    border: 1px solid var(--auth-border);
    border-radius: 12px;
    font-size: 0.8rem;
    color: var(--auth-text-title);
    gap: 8px;
}
.otp-email-target {
    font-family: inherit;
    direction: ltr;
    font-weight: 700;
}
.otp-change-email-btn {
    border: 0;
    background: transparent;
    color: var(--auth-primary);
    font-size: 0.76rem;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    text-decoration: underline;
    white-space: nowrap;
}
.otp-resend-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.78rem;
    color: var(--auth-text-muted);
    margin-top: 4px;
}
.otp-resend-btn {
    background: none;
    border: 0;
    color: var(--auth-primary);
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}
.otp-resend-btn:disabled {
    color: var(--auth-text-muted);
    cursor: not-allowed;
    text-decoration: none;
    opacity: 0.7;
}

/* 6-Digit Luxury OTP Box Styles */
.otp-boxes-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 14px 0 8px;
    direction: ltr !important;
}

.otp-box {
    width: 48px;
    height: 56px;
    border-radius: 14px;
    border: 1.5px solid var(--auth-input-border, rgba(15, 23, 42, 0.12));
    background: var(--auth-input-bg, #ffffff);
    color: var(--auth-text-title, #0f172a);
    font-size: 1.65rem;
    font-weight: 900;
    font-family: Consolas, 'SF Pro Display', -apple-system, sans-serif;
    text-align: center;
    line-height: 56px;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
    -webkit-appearance: none;
    -moz-appearance: textfield;
}

.otp-box::-webkit-outer-spin-button,
.otp-box::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.otp-box:hover {
    border-color: rgba(99, 102, 241, 0.45);
    transform: translateY(-2px);
}

.otp-box:focus {
    outline: none;
    border-color: var(--auth-primary, #4f46e5);
    background: var(--auth-surface, #ffffff);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.18), 0 4px 12px rgba(79, 70, 229, 0.15);
    transform: translateY(-2px) scale(1.05);
}

.otp-box.is-filled {
    border-color: var(--auth-primary, #4f46e5);
    background: var(--auth-primary-light, #e0e7ff);
    color: var(--auth-primary, #4338ca);
    animation: otpPop 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

html.dark-theme .otp-box.is-filled {
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
}

@keyframes otpPop {
    0% { transform: scale(0.9); }
    50% { transform: scale(1.12); }
    100% { transform: scale(1); }
}

@keyframes otpShake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

.otp-boxes-wrapper.is-invalid .otp-box {
    border-color: #ef4444;
    animation: otpShake 0.4s ease;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

@media (max-width: 420px) {
    .otp-boxes-wrapper {
        gap: 6px;
    }
    .otp-box {
        width: 42px;
        height: 50px;
        font-size: 1.45rem;
        border-radius: 12px;
    }
}

@media (max-width: 350px) {
    .otp-boxes-wrapper {
        gap: 4px;
    }
    .otp-box {
        width: 37px;
        height: 46px;
        font-size: 1.3rem;
        border-radius: 10px;
    }
}

/* Rules Links & Peek Modal */
.auth-rules-link{color:var(--auth-primary,#4f46e5);text-decoration:underline;text-underline-offset:3px;font-weight:800;transition:color .18s ease}
.auth-rules-link:hover{color:#4338ca}
.dark-theme .auth-rules-link{color:#a5b4fc}
.auth-rules-peek-row{display:flex;justify-content:flex-start;margin-top:-2px}
.auth-rules-peek-btn{display:inline-flex;align-items:center;gap:6px;background:transparent;border:none;color:var(--auth-text-muted,#64748b);font-size:.72rem;font-weight:700;cursor:pointer;padding:0;transition:color .18s ease}
.auth-rules-peek-btn svg{color:var(--auth-primary,#4f46e5)}
.auth-rules-peek-btn:hover{color:var(--auth-primary,#4f46e5)}
.rules-quick-modal-backdrop{position:fixed;inset:0;z-index:99999;background:rgba(15,23,42,.65);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);display:grid;place-items:center;padding:16px;animation:fadeInModal .22s ease-out}
.rules-quick-modal-backdrop[hidden]{display:none!important}
.rules-quick-modal-card{position:relative;width:min(100%,480px);border-radius:24px;background:var(--auth-surface,#ffffff);border:1px solid var(--auth-border,rgba(15,23,42,.1));box-shadow:0 24px 60px rgba(15,23,42,.25);display:flex;flex-direction:column;max-height:90vh;overflow:hidden;animation:zoomInModal .26s cubic-bezier(.16,1,.3,1)}
.dark-theme .rules-quick-modal-card{background:#0f172a;border-color:rgba(255,255,255,.1);box-shadow:0 24px 60px rgba(0,0,0,.55)}
.rules-quick-modal-header{display:flex;align-items:center;justify-content:space-between;padding:18px 22px;border-bottom:1px solid var(--auth-border,rgba(15,23,42,.08))}
.dark-theme .rules-quick-modal-header{border-bottom-color:rgba(255,255,255,.08)}
.rules-quick-modal-title-box{display:flex;align-items:center;gap:12px}
.rules-quick-modal-icon{font-size:1.5rem}
.rules-quick-modal-title-box h3{font-size:1.05rem;font-weight:900;color:var(--auth-text-title,#0f172a);margin:0}
.dark-theme .rules-quick-modal-title-box h3{color:#f8fafc}
.rules-quick-modal-title-box small{display:block;font-size:.72rem;color:var(--auth-text-muted,#64748b);margin-top:2px}
.rules-quick-modal-close{width:32px;height:32px;border-radius:50%;border:none;background:rgba(15,23,42,.06);color:var(--auth-text-muted,#64748b);cursor:pointer;display:grid;place-items:center;font-size:.9rem;transition:background-color .18s ease}
.dark-theme .rules-quick-modal-close{background:rgba(255,255,255,.08);color:#cbd5e1}
.rules-quick-modal-close:hover{background:rgba(239,68,68,.15);color:#ef4444}
.rules-quick-modal-body{padding:18px 22px;overflow-y:auto;max-height:55vh}
.rules-peek-list{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:12px}
.rules-peek-list li{display:flex;flex-direction:column;gap:3px;padding:10px 14px;border-radius:14px;background:rgba(15,23,42,.025);border:1px solid rgba(15,23,42,.04);font-size:.8rem;line-height:1.7}
.dark-theme .rules-peek-list li{background:rgba(255,255,255,.035);border-color:rgba(255,255,255,.05)}
.rules-peek-list li strong{color:var(--auth-text-title,#0f172a);font-size:.84rem}
.dark-theme .rules-peek-list li strong{color:#f1f5f9}
.rules-peek-list li span{color:var(--auth-text-muted,#475569)}
.dark-theme .rules-peek-list li span{color:#94a3b8}
.rules-quick-modal-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 22px;border-top:1px solid var(--auth-border,rgba(15,23,42,.08));background:rgba(15,23,42,.02)}
.dark-theme .rules-quick-modal-footer{border-top-color:rgba(255,255,255,.08);background:rgba(0,0,0,.2)}
.rules-peek-full-link{display:inline-flex;align-items:center;gap:6px;color:var(--auth-primary,#4f46e5);font-size:.78rem;font-weight:800;text-decoration:none;transition:transform .18s ease}
.rules-peek-full-link:hover{transform:translateX(-3px)}
.rules-peek-accept-btn{padding:9px 18px;border-radius:12px;background:linear-gradient(135deg,var(--auth-primary,#4f46e5) 0%,#3730a3 100%);color:#fff;border:none;font-size:.82rem;font-weight:800;cursor:pointer;box-shadow:0 4px 14px rgba(79,70,229,.25);transition:transform .18s ease}
.rules-peek-accept-btn:hover{transform:scale(1.03)}
@keyframes fadeInModal{from{opacity:0}to{opacity:1}}
@keyframes zoomInModal{from{opacity:0;transform:scale(.94)}to{opacity:1;transform:scale(1)}}




