﻿/* ================================
   1) پالت رنگ و تم‌ها
   استفاده: روی ریشه‌ی اپ Blazor
   <div class="app-root" data-theme="dark">  // دارک دیفالت
   ================================ */

:root {
    /* LIGHT (Soft) */
    --color-bg: #eef1f5;
    --color-surface: #ffffff;
    --color-surface-soft: #f3f5f9;
    --color-primary: #0ea5b6;
    --color-primary-soft: rgba(14, 165, 182, 0.16);
    --color-secondary: #8b5cf6;
    --color-text: #1e2535;
    --color-text-muted: #64748b;
    --color-border: #d3d8e0;
    --color-border-soft: rgba(148, 163, 184, 0.45);
    --color-success: #0d9d73;
    --color-error: #ef4444;
    --color-warning: #f97316;
    --shadow-soft: 0 10px 35px rgba(15, 23, 42, 0.08);
    --shadow-strong: 0 18px 60px rgba(15, 23, 42, 0.12);
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --transition-fast: 0.16s ease-out;
    --transition-med: 0.22s ease;
    /* نئونی قرمز و زرد */
    --neon-red: #ff004f;
    --neon-red-glow: rgba(255, 0, 79, 0.55);
    --neon-yellow: #ffe400;
    --neon-yellow-glow: rgba(255, 228, 0, 0.55);
    /* فیلتر آیکن در لایت تم */
    --icon-filter-base: none;
}


/* تم دارک – با data-theme="dark" روی root */

[data-theme="dark"] {
    --color-bg: #0f172a;
    /* بیس دارک که خودت دادی */
    --color-surface: rgba(15, 23, 42, 0.96);
    --color-surface-soft: rgba(15, 23, 42, 0.85);
    --color-primary: #22d3ee;
    /* سیان نئونی */
    --color-primary-soft: rgba(34, 211, 238, 0.14);
    --color-secondary: #a855f7;
    /* بنفش نئونی */
    --color-text: #e2e8f0;
    --color-text-muted: #94a3b8;
    --color-border: rgba(148, 163, 184, 0.55);
    --color-border-soft: rgba(148, 163, 184, 0.35);
    --color-success: #10b981;
    --color-error: #ef4444;
    --color-warning: #fb923c;
    --shadow-soft: 0 10px 35px rgba(15, 23, 42, 0.75);
    --shadow-strong: 0 18px 70px rgba(15, 23, 42, 0.95);
    /* نئونی قرمز و زرد */
    --neon-red: #ff2b6e;
    --neon-red-glow: rgba(255, 43, 110, 0.75);
    --neon-yellow: #fff066;
    --neon-yellow-glow: rgba(255, 240, 102, 0.75);
    /* در دارک تم، آیکن از سیاه → سفید */
    --icon-filter-base: invert(1);
}


/* ================================
   2) پایه‌ی کلی برای اپ (اختیاری)
   ================================ */

html,
body {
    margin: 0;
    padding: 0;
    font-family: "Vazirmatn", system-ui, -apple-system, "Segoe UI", sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    -webkit-font-smoothing: antialiased;
}

.app-root {
    min-height: 100vh;
    background: radial-gradient(circle at top left, rgba(148, 163, 184, 0.15), transparent 55%), radial-gradient(circle at bottom right, rgba(56, 189, 248, 0.18), transparent 55%), var(--color-bg);
    display: flex;
    flex-direction: column;
}


/* فریم عمومی کارت‌ها */

.ui-card {
    background: var(--color-surface-soft);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border-soft);
    box-shadow: var(--shadow-soft);
    padding: 1.25rem;
    backdrop-filter: blur(12px);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast), background-color var(--transition-fast);
}

    .ui-card:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-strong);
    }


/* برای نمایش روی موبایل */

@media (max-width: 480px) {
    .ui-card {
        padding: 1rem;
        border-radius: var(--radius-md);
    }
}


/* =========================================
   3) کلاس بوردر عمومی برای ورودی و باکس‌ها
   (استفاده برای input, wrapper, small cards)
   ========================================= */

.ui-border-main {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background-color: var(--color-surface);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast);
}

    .ui-border-main:focus-within {
        border-color: var(--color-primary);
        box-shadow: 0 0 0 3px var(--color-primary-soft);
    }


/* خود input داخل این کادر */

.ui-input {
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    color: var(--color-text);
    font-size: 0.95rem;
    padding: 0.7rem 0.9rem;
}

    .ui-input::placeholder {
        color: var(--color-text-muted);
    }


/* برای موبایل – سایز مناسب لمس */

@media (max-width: 480px) {
    .ui-input {
        font-size: 0.9rem;
        padding: 0.65rem 0.8rem;
    }
}


/* =========================================
   4) کلاس دکمه‌ها (ورود، ارسال کد، انصراف)
   ========================================= */


/* base */

.ui-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.6rem 1.2rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}


/* دکمه اصلی – مثلا "ورود" ، "ارسال کد" */

.ui-btn-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: #ffffff;
    border-color: rgba(15, 23, 42, 0.35);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.35);
}

    .ui-btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 16px 40px rgba(15, 23, 42, 0.55);
    }


/* دکمه فرعی – "انصراف" ، "بازگشت" */

.ui-btn-ghost {
    background: transparent;
    color: var(--color-text);
    border-color: var(--color-border-soft);
}

    .ui-btn-ghost:hover {
        background-color: var(--color-primary-soft);
        border-color: var(--color-primary);
    }


/* حالت غیر فعال */

.ui-btn:disabled,
.ui-btn[disabled] {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}


/* دکمه تمام عرض برای موبایل */

@media (max-width: 480px) {
    .ui-btn {
        width: 100%;
        justify-content: center;
        font-size: 0.9rem;
        padding: 0.65rem 1rem;
    }
}


/* =========================================
   5) کارت داشبورد کاربر
   آواتار دایره‌ای + نام + تاریخ عضویت + امتیاز
   ========================================= */

.user-card {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-xl);
    background: radial-gradient(circle at top left, rgba(34, 211, 238, 0.15), transparent 55%), var(--color-surface-soft);
    border: 1px solid var(--color-border-soft);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast);
    /*align-items:;*/ /* بالای همه در یک خط */
    direction: rtl;
    text-align: right;
}


/* آواتار دایره‌ای */

.user-card__avatar {
    flex: 0 0 auto;
    width: clamp(52px, 10vw, 72px);
    height: clamp(52px, 10vw, 72px);
    margin-top: 25px;
    border-radius: 999px;
    border: 2px solid var(--color-primary);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, var(--color-primary-soft), transparent 60%);
}

    .user-card__avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }


/* متن‌ها */

.user-card__meta {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
    margin-top: 15px;
}

.user-card__name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-text);
}

.user-card__since {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}


/* امتیاز */

.user-card__points {
    margin-inline-start: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.15rem;
    text-align: right;
}

.user-card__points-label {
    font-size: 0.78rem;
    color: var(--color-text-muted);
}

.user-card__points-value {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-secondary);
}


/* چینش در موبایل: آواتار بالا، متن زیرش */

@media (max-width: 640px) {
    .user-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .user-card__points {
        margin-inline-start: 0;
        align-items: flex-start;
    }
}


/* =========================================
   6) افکت هاور: بوردر انیمیشنی که دور کارت بپیچد
   (روی همان user-card اعمال کن با یک کلاس اضافه)
   ========================================= */

/*.user-card--glow {
    position: relative;
    z-index: 0;
}
*/
/*.user-card--glow::before {
        content: "";
        position: absolute;
        inset: -2px;*/
/* فاصله‌ی بین حاشیه انیمیشنی و کارت */
/*border-radius: inherit;
        background: conic-gradient( from 0deg, var(--color-primary), var(--color-secondary), var(--color-warning), var(--color-primary));
        opacity: 0;
        z-index: -1;
        filter: blur(0.5px);
        transition: opacity var(--transition-med);
        animation: usercard-glow-rotate 4.5s linear infinite;
    }*/


/* برای ایجاد فاصله بین کارت و حاشیه انیمیشنی، خود کارت پس‌زمینه‌ی داخلی دارد */

.user-card--glow {
    background-clip: padding-box;
}


    /* فقط وقتی هاور می‌شود، حاشیه زنده شود */

    .user-card--glow:hover::before {
        opacity: 0.9;
    }


/* انیمیشن حرکت رنگ‌ها دور کارت */

/*@keyframes usercard-glow-rotate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}
*/

/* =========================================
   7) کمک برای چینش فرم ورود / ثبت نام
   (اختیاری، برای اینکه راحت از کلاس‌ها استفاده کنی)
   ========================================= */

.auth-layout {
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
}

.auth-layout__title {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 0.15rem;
}

.auth-layout__subtitle {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin-bottom: 1rem;
}

.auth-layout__row {
    margin-bottom: 0.75rem;
}


/* در موبایل حاشیه‌ها کم‌تر */

@media (max-width: 480px) {
    .auth-layout {
        padding: 1.25rem 0.75rem;
        max-width: 96vw;
    }
}


/* #region auth.css */


/* =========================================================
   AUTH PAGE (Login / Register) – مخصوص Auth.razor
   ========================================================= */


/* روت صفحه auth (روی کل صفحه) */

.page-root {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}


/* بک‌گراند گیمینگ نئونی */

.bg-layer {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.bg-pattern {
    background-image: radial-gradient(ellipse 60% 40% at 15% 30%, rgba(34, 211, 238, 0.18) 0%, transparent 50%), radial-gradient(ellipse 50% 30% at 85% 70%, rgba(139, 92, 246, 0.18) 0%, transparent 50%), radial-gradient(ellipse 70% 50% at 50% 50%, rgba(14, 165, 182, 0.2) 0%, transparent 60%), radial-gradient(ellipse 40% 60% at 30% 80%, rgba(251, 146, 60, 0.18) 0%, transparent 50%);
    filter: blur(60px) saturate(1.05);
    opacity: 0.8;
}

[data-theme="dark"] .bg-pattern {
    background-image: radial-gradient(ellipse 60% 40% at 15% 30%, rgba(34, 211, 238, 0.22) 0%, transparent 50%), radial-gradient(ellipse 50% 30% at 85% 70%, rgba(168, 85, 247, 0.2) 0%, transparent 50%), radial-gradient(ellipse 70% 50% at 50% 50%, rgba(14, 165, 182, 0.22) 0%, transparent 60%), radial-gradient(ellipse 40% 60% at 30% 80%, rgba(251, 146, 60, 0.18) 0%, transparent 50%);
    opacity: 0.7;
}


/* کارت اصلی auth که از ui-card ارث می‌برد */

.auth-card {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 460px;
}


/* هدر */

.auth-header {
    margin-bottom: 0.9rem;
}

.auth-title {
    margin: 0;
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--color-primary);
}

.auth-subtitle {
    margin: 0.25rem 0 0;
    font-size: 0.95rem;
    color: var(--color-text-muted);
}


/* تب‌ها */

.auth-tabs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 1rem 0;
    padding: 4px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    position: relative;
}

.auth-tabs__tab {
    flex: 1;
    position: relative;
    z-index: 1;
    border: none;
    background: transparent;
    border-radius: 999px;
    padding: 0.5rem 0.7rem;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: color var(--transition-fast);
}

    .auth-tabs__tab.is-active {
        color: var(--color-primary);
    }

.auth-tabs__indicator {
    position: absolute;
    top: 4px;
    bottom: 4px;
    width: 50%;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(14px);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.18);
    transition: transform var(--transition-med);
}


/* جا‌به‌جایی indicator بین دو تب، بدون JS */

.auth-tabs.auth-tabs--login .auth-tabs__indicator {
    transform: translateX(0%);
}

.auth-tabs.auth-tabs--register .auth-tabs__indicator {
    transform: translateX(100%);
}


/* در دارک تم indicator کمی تیره‌تر */

[data-theme="dark"] .auth-tabs__indicator {
    background: rgba(15, 23, 42, 0.85);
}


/* پنل‌ها */

.auth-panel {
    display: none;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.2s ease-out, transform 0.2s ease-out;
}

.auth-panel--active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}


/* ردیف‌های فرم */

.auth-row {
    margin-bottom: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.auth-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text);
}

.auth-help {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}


/* اینپوت‌های خاص */

.ui-input--ltr {
    direction: ltr;
    text-align: left;
}

.ui-input--center {
    text-align: center;
    letter-spacing: 0.3rem;
}


/* چیدمان افقی آیتم‌ها (مثلاً remember + لینک) */

.auth-inline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 0.35rem;
}


/* ردیف دکمه‌ها – به صورت پیش‌فرض ستونی و تمام‌عرض */

.auth-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.9rem;
}


    /* همه دکمه‌ها در حالت عادی تمام عرض کادر */

    .auth-actions .ui-btn {
        width: 100%;
    }


/* حالت خاص مرحله‌ی کد تأیید: دکمه‌ها کنار هم، هر دو نصف فضا */

.auth-actions--code {
    flex-direction: row;
}

    .auth-actions--code .ui-btn {
        width: auto;
        flex: 1 1 0;
    }


/* در موبایل هم همین رفتار برای مرحلهٔ کد (کنار هم) */

@media (max-width: 480px) {
    .auth-actions--code {
        flex-direction: row;
    }

        .auth-actions--code .ui-btn {
            width: auto;
            flex: 1 1 0;
        }
}


/* ردیف‌های step در ثبت‌نام */

.auth-step {
    margin-top: 0.25rem;
}


/* چشم رمز عبور */

.password-wrapper {
    position: relative;
}

.password-eye {
    position: absolute;
    top: 50%;
    left: 0.55rem;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 0.85rem;
    opacity: 0.75;
    transition: opacity var(--transition-fast), transform var(--transition-fast);
}

    .password-eye:hover {
        opacity: 1;
        transform: translateY(-50%) scale(1.05);
    }


/* کد تأیید */

.code-wrapper .ui-input {
    font-weight: 700;
}


/* لینک فراموشی رمز */

.forgot-link {
    font-size: 0.8rem;
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

    .forgot-link:hover {
        color: var(--color-secondary);
    }


/* آیکن خانه (بالای کارت) – از Auth قدیمی */

.home-icon {
    position: absolute;
    top: 16px;
    left: 16px;
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.15s ease, transform 0.12s ease;
}

    .home-icon:hover {
        color: var(--color-secondary);
        transform: scale(1.05);
    }


/* چک‌باکس‌ها */

.checkbox-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    color: var(--color-text-muted);
}

    .checkbox-wrapper input[type="checkbox"] {
        width: 16px;
        height: 16px;
        accent-color: var(--color-primary);
    }


/* آلرت داخلی (به جای Swal / alert JS) */

.auth-alert {
    margin-bottom: 0.8rem;
    padding: 0.6rem 0.8rem;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    line-height: 1.5;
    border: 1px solid transparent;
}

.auth-alert--success {
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.4);
    color: #047857;
}

.auth-alert--error {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.45);
    color: #b91c1c;
}

.auth-alert--info {
    background: rgba(59, 130, 246, 0.08);
    border-color: rgba(59, 130, 246, 0.45);
    color: #1d4ed8;
}


/* ریسپانسیو کارت روی موبایل */

@media (max-width: 480px) {
    .page-root {
        padding: 1rem;
    }

    .auth-card {
        padding: 1rem;
        border-radius: var(--radius-md);
    }

    .auth-title {
        font-size: 1.4rem;
    }
}


/* ================================
   RTL FIX برای صفحه Auth
   ================================ */


/* کل صفحه و کارت و استپ‌ها راست‌چین و RTL */


/* ================================
   RTL FIX برای صفحه Auth
   ================================ */

.page-root,
.auth-card,
.auth-panel,
.auth-step {
    direction: rtl;
    text-align: right;
}


/* پیش‌فرض همه‌ی اینپوت‌ها راست‌چین */

.ui-input {
    text-align: right;
}


/* فقط تلفن و کد از چپ به راست */

.ui-input--ltr {
    direction: ltr;
    text-align: left;
}


/* چشم رمز عبور برود سمت راست فیلد (اگه بعداً فعالش کنی) */

.password-wrapper {
    position: relative;
}

.password-eye {
    position: absolute;
    top: 50%;
    right: 0.55rem;
    /* 👈 به‌جای left */
    left: auto;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 0.85rem;
    opacity: 0.75;
    transition: opacity var(--transition-fast), transform var(--transition-fast);
}

    .password-eye:hover {
        opacity: 1;
        transform: translateY(-50%) scale(1.05);
    }


/* اگر بعداً آیکن خانه را فعال کنی، بهتره RTL باشه */

.home-icon {
    right: 16px;
    left: auto;
}


/* در موبایل، دکمه‌ها تمام‌عرض بمونن (همون قبلی، فقط تأکید) */

@media (max-width: 480px) {
    .auth-actions .ui-btn {
        width: 100%;
    }
}


/* کادر کد تأیید وسط صفحه و متن وسط */

.code-wrapper {
    max-width: 230px;
    margin-inline: auto;
    /* وسط‌چین شدن خود باکس */
}

    .code-wrapper .ui-input {
        text-align: center;
        letter-spacing: 0.35rem;
        font-weight: 700;
        direction: ltr;
        /* چپ به راست برای اعداد */
    }

.privacy-sheet {
    position: fixed;
    inset: 0;
    z-index: 1000;
    pointer-events: auto;
    opacity: 1;
    visibility: visible;
}

.sheet-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    cursor: pointer;
}

.sheet-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 85vh;
    background: var(--color-surface-soft);
    border-radius: 24px 24px 0 0;
    border: 1px solid var(--color-border-soft);
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sheet-header,
.sheet-footer {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--color-border-soft);
}

.sheet-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.5rem;
}


/* دسکتاپ: مودال وسط صفحه به‌جای bottom sheet */

@media (min-width: 768px) {
    .sheet-content {
        top: 50%;
        left: 50%;
        right: auto;
        bottom: auto;
        transform: translate(-50%, -50%);
        max-width: 540px;
        /* عرض مناسب دسکتاپ */
        width: 100%;
        border-radius: 24px;
        /* همه گوشه‌ها گرد */
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    }

    .sheet-body {
        max-height: 60vh;
        /* زیاد بلند نشه، داخلش اسکرول بشه */
    }
}

/* ردیف مرحله کد تأیید: 60% اینپوت / 40% تایمر + دکمه */
.code-row-inner {
    display: flex;
    align-items: stretch;
    gap: 0.75rem;
}

/* 60% سمت راست (در RTL) */
.code-input-wrapper {
    flex: 0 0 60%;
}

/* 40% سمت چپ: تایمر + دکمه در یک ردیف */
.code-timer-wrapper {
    flex: 0 0 40%;
    display: flex;
    align-items: center;
    justify-content: center; /* وسط همون ۴۰٪ */
    direction: rtl;
}


.code-timer__value {
    min-width: 3.4rem;
    text-align: center;
    font-weight: 700;
    letter-spacing: 0.12rem;
}

/* دکمه ارسال مجدد فضای باقی‌مانده را پر کند */
.code-resend-btn {
    flex: 1 1 auto;
    width: auto; /* اجازه بده با flex تنظیم شود */
    padding-inline: 0.6rem; /* کمی جمع‌وجورتر که با تایمر جا شود */
}

/* بدون شکستن در موبایل – فقط همون ردیف می‌ماند */
@media (max-width: 480px) {
    .code-row-inner {
        /* همچنان افقی */
    }

    .code-input-wrapper {
        flex: 0 0 60%;
    }

    .code-timer-wrapper {
        flex: 0 0 40%;
        gap: 0.4rem;
    }
}

/* تنظیم مجدد کادر کد – از وسط صفحه نجاتش دادیم */
.code-wrapper {
    max-width: 100%;
    margin-inline: 0;
}


/* دکمه تایمر: ظاهر دکمه را کامل نگه دار، فقط هاور را خنثی کن */

/* #endregion auth.css */


/* #region Dashboard.css */


/* ================================
   Dashboard Layout
   ================================ */


/*.dashboard-root {
    min-height: 100vh;
    display: flex;
    justify-content: center;  دسکتاپ → وسط افقی 
    align-items: flex-start;
    padding: 1.5rem 1rem 2.5rem;
}*/


/*.dashboard-card {
    width: 100%;
    max-width: 880px;*/


/* در ویندوز کمی باریک‌تر از قبل */


/*text-align: right;
    direction: rtl;
    margin: 0 auto;*/


/* بودر وسط چین */


/*}*/

.dashboard-root {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 1.5rem 1rem 2.5rem;
}

.dashboard-card {
    width: 100%;
    max-width: 880px;
    direction: rtl;
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}


/*.dashboard-root {
    min-height: 100vh;
    display: flex;
    justify-content: center;*/


/* وسط افقی */


/*align-items: stretch;*/


/* کارت ارتفاع صفحه رو پر کنه */


/*padding: 1.5rem 1rem 2.5rem;
}

.dashboard-card {
    width: 100%;
    max-width: 880px;
    text-align: right;
    direction: rtl;
    margin: 0 auto;
    display: flex;
    flex-direction: column;*/


/* عمودی: پروفایل + ورودی + لیست + دکمه‌ها */


/*min-height: calc(100vh - 3rem);*/


/* تقریبا تمام ارتفاع صفحه، بعد از padding */


/*}*/


/* فاصله‌ی کارت پروفایل از لیست تیکت‌ها */

.dashboard-user-card {
    margin-bottom: 0.55rem;
}


/* ================================
   User Card – چیدمان جدید
   دسکتاپ:
     - آواتار سمت راست
     - اطلاعات کنار آواتار
     - باکس‌های آماری سمت چپ
   موبایل:
     - آواتار وسط
     - اطلاعات راست‌چین زیرش
     - دو باکس گرادیانتی در یک ردیف، از راست primary بعد secondary
   ================================ */

.user-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
    direction: rtl;
    text-align: right;
}


/* بخش آماری – انتهای ردیف (سمت چپ در RTL) */

.user-card__stats {
    margin-inline-start: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.35rem;
    margin-top: 35px;
}

.user-card__stats-row {
    display: flex;
    gap: 0.5rem;
    flex-direction: row-reverse;
    /* اولین باکس در HTML → سمت راست دیده شود */
}


/* باکس‌های گرادیانتی */

.user-card__stat-box {
    min-width: 150px;
    padding: 0.55rem 0.8rem;
    border-radius: var(--radius-md);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: right;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.45);
}

.user-card__stat-box--primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
}

.user-card__stat-box--secondary {
    background: linear-gradient(135deg, var(--color-secondary), var(--color-primary));
}

.user-card__stat-label {
    font-size: 0.8rem;
    opacity: 0.9;
}

.user-card__stat-value {
    font-size: 1.05rem;
    font-weight: 800;
    margin-top: 0.25rem;
    font-family: "Vazirmatn", system-ui, -apple-system, "Segoe UI", sans-serif;
    word-break: break-all;
    /* برای اعداد خیلی بزرگ مثل 100000000000000 */
}


/* متن روزهایی که با ما بودید */

.user-card__days {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

    .user-card__days span {
        font-weight: 600;
        color: var(--color-text);
    }


/* موبایل */
@media (max-width: 640px) {
    .user-card {
        flex-direction: column;
        align-items: center; /* آواتار وسط */
    }

    /* آواتار بزرگ‌تر در موبایل */
    .user-card__avatar {
        width: 88px;
        height: 88px;
        margin-top: 20px;
    }

    /* اطلاعات کاربری زیر عکس، وسط‌چین */
    .user-card__meta {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        width: 100%;
        margin-top: -5px;
    }

    .user-card__stats {
        margin-inline-start: 0;
        align-items: flex-start;
        width: 100%;
        margin-top: 0.6rem;
    }

    .user-card__stats-row {
        justify-content: flex-start; /* از راست شروع شود */
    }

    .user-card__stat-box {
        align-items: flex-start;
        text-align: right;
    }
}



/* ================================
   لیست تیکت‌ها – باکس اسکرولی 500px
   ================================ */


/*.dashboard-list-card {
    margin-top: 1rem;
    height: 500px;*/


/* ارتفاع ثابت */


/*overflow-y: auto;*/


/* اسکرول داخل باکس */


/*direction: rtl;
    text-align: right;
}*/


/* ================================
   لیست تیکت‌ها – پر کردن ارتفاع خالی
   ================================ */

.dashboard-list-card {
    margin-top: 1rem;
    flex: 1 1 auto;
    /* بقیه ارتفاع کارت را پر کن */
    min-height: 220px;
    /* یک حداقل ارتفاع منطقی */
    overflow-y: auto;
    /* اسکرول فقط اینجا */
    direction: rtl;
    text-align: right;
    display: flex;
    flex-direction: column;
}


/* هدر لیست ثابت بالای باکس */


/*.dashboard-list-header {
    flex: 0 0 auto;
}
*/


/* خود لیست، پرکنندهٔ باقی فضا */


/*.ticket-list {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}*/


/* حالت خالی – متن وسط باکس */


/*.ticket-empty {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}*/


/* دکمه "بارگذاری بیشتر" زیر لیست، ولی داخل همان باکس */

.ticket-load-more {
    flex: 0 0 auto;
    margin-top: 0.9rem;
    display: flex;
    justify-content: center;
}


/* دیگر نیازی به height در media query نیست */

@media (max-width: 640px) {
    .dashboard-list-card {
        /* flex:1 و min-height به کار خودش ادامه می‌دهد */
    }
}


/* هدر لیست */


/*.dashboard-list-header h2 {
    margin: 0 0 0.25rem 0;
    font-size: 1rem;
    font-weight: 700;
}

.dashboard-list-header p {
    margin: 0 0 0.75rem 0;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}*/


/* خود لیست */


/*.ticket-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}*/


/* هر تیکت یک ردیف */

.ticket-item {
    display: flex;
    align-items: center;
    /* قبلاً اگر flex-start بود، عوضش کن */
    justify-content: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    background-color: var(--color-surface);
    direction: rtl;
    text-align: right;
}


/* اکشن‌ها – گوشهٔ راست آیتم */

.ticket-item__actions {
    display: flex;
    flex-direction: column;
    /* ویرایش بالا، حذف پایین */
    gap: 0.3rem;
    flex-shrink: 0;
    align-items: center;
    /* دکمه‌ها وسط ستون */
}


/* متن اصلی تیکت */

.ticket-item__main {
    flex: 1;
}

.ticket-item__title {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.ticket-item__row {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-top: 0.15rem;
}

    .ticket-item__row span {
        color: var(--color-text);
        font-weight: 600;
    }


/* دکمه آیکنی کوچک‌تر */


/* دکمه آیکنی مربع با گوشه گرد */

.ui-btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

    .ui-btn-icon i {
        font-size: 0.9rem;
    }


/* حذف – قرمز نئونی */

.ui-btn-delete svg path {
    fill: var(--neon-red);
    filter: drop-shadow(0 0 6px var(--neon-red-glow));
}

.ui-btn-delete:hover svg path {
    filter: drop-shadow(0 0 12px var(--neon-red-glow));
}


/* ویرایش – زرد نئونی */

.ui-btn-edit svg path {
    fill: var(--neon-yellow);
    filter: drop-shadow(0 0 6px var(--neon-yellow-glow));
}

.ui-btn-edit:hover svg path {
    filter: drop-shadow(0 0 12px var(--neon-yellow-glow));
}


/* دکمه "بارگذاری بیشتر" */


/*.ticket-load-more {
    margin-top: 0.9rem;
    display: flex;
    justify-content: center;
}*/


/* ریسپانسیو موبایل برای تیکت‌ها */


/*@media (max-width: 640px) {
    .dashboard-list-card {
        height: 500px;*/


/* همون ارتفاع، فقط عرض کمتر می‌شود */


/*}

    .ticket-item {
        gap: 0.5rem;
    }

    .ticket-item__actions {
        flex-direction: row;
        align-items: center;
    }
}*/


/* ================================
    55
   Dashboard Vertical Tiles (5 buttons)
   ================================ */


/* ================================
   Dashboard Vertical Tiles (5 buttons like Telegram game)
   ================================ */

.dashboard-tiles {
    margin-top: 0.55rem;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}


/* باکس/دکمه پایه – تمام عرض dashboard-card */

.dash-tile {
    width: 100%;
    border-radius: 24px;
    border: 1px solid var(--color-border-soft);
    background: var(--color-surface-soft);
    cursor: pointer;
    padding: 0.9rem 1.1rem;
    text-align: right;
    direction: rtl;
    color: var(--color-text);
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.22);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background-color 0.2s ease, opacity 0.18s ease;
}


/* محتوای داخلی: متن سمت راست، تصویر سمت چپ */

.dash-tile__content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}


/* متن دکمه */

.dash-tile__text {
    flex: 1 1 auto;
    min-width: 0;
}

    .dash-tile__text h3 {
        margin: 0 0 0.2rem 0;
        font-size: 1rem;
        font-weight: 800;
    }

    .dash-tile__text p {
        margin: 0;
        font-size: 0.82rem;
        color: var(--color-text-muted);
    }


/* مدیای سمت چپ: عکس / آیکن / انیمیشن */

.dash-tile__media {
    flex: 0 0 auto;
    position: relative;
    width: 90px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    /* کلیک روی خود تصویر دکمه رو خراب نکند */
}



/* خود تصویر، با انیمیشن شناور ملایم */

.dash-tile__img.dash-tile__img {
    /*    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    animation: tile-float 3s ease-in-out infinite;*/
    width: 200px !important;
    height: 200px !important;
    object-fit: contain;
    position: relative;
}


/* حالت دو دسته + VS وسط */

.dash-tile__media--versus {
    width: 100px;
}

.dash-tile__img--left {
    transform: translateX(6px) rotate(-8deg);
}

.dash-tile__img--right {
    transform: translateX(-6px) rotate(8deg);
}

.dash-tile__vs {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -55%);
    font-size: 0.8rem;
    font-weight: 900;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.6);
}


/* انیمیشن شناور آیکن‌ها */

@keyframes tile-float {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-6px);
    }
}


/* هاور روی دکمه‌های فعال */

.dash-tile:not(.dash-tile--disabled):hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 55px rgba(15, 23, 42, 0.32);
    border-color: var(--color-primary);
}


/* وضعیت غیرفعال (به‌زودی) */

.dash-tile--disabled {
    opacity: 0.38;
    cursor: not-allowed;
    filter: grayscale(45%);
}


/* ---------- رنگ‌ها، هماهنگ با تم ---------- */

.dash-tile--primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: #ffffff;
}

.dash-tile--secondary {
    background: linear-gradient(135deg, var(--color-secondary), var(--color-primary));
    color: #ffffff;
}

.dash-tile--info {
    background: linear-gradient(135deg, #38bdf8, #0ea5e9);
    color: #ffffff;
}

.dash-tile--warning {
    background: linear-gradient(135deg, var(--color-warning), #facc15);
    color: #ffffff;
}

.dash-tile--danger {
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    color: #ffffff;
}

.dash-tile--settings {
    background: linear-gradient(135deg,#74cf8c, #39ad58 );
    color: #ffffff;
}


    /* متن توضیحی روی گرادیانت‌های تیره کمی روشن‌تر شود */

    .dash-tile--primary .dash-tile__text p,
    .dash-tile--secondary .dash-tile__text p,
    .dash-tile--info .dash-tile__text p,
    .dash-tile--warning .dash-tile__text p,
    .dash-tile--settings .dash-tile__text p,
    .dash-tile--danger .dash-tile__text p {
        color: rgba(255, 255, 255, 0.9);
    }

.dash-tile__img__pvp {
    width: 120px !important;
    height: 120px !important;
    object-fit: contain;
    position: relative;
}

/* موبایل – کمی فشرده‌تر اما همچنان تمام‌عرض و زیر هم */

@media (max-width: 640px) {
    .dashboard-tiles {
        gap: 0.7rem;
    }

    .dash-tile {
        padding: 0.75rem 0.85rem;
        border-radius: 20px;
    }

    .dash-tile__media {
        width: 75px;
        height: 75px;
    }

    .dash-tile__media--versus {
        width: 90px;
    }

    .dash-tile__img {
        width: 120px !important;
        height: 120px !important;
        object-fit: contain;
        position: relative;
    }

    .dash-tile__img__pvp {
        width: 100px !important;
        height: 100px !important;
        object-fit: contain;
        margin-left: 10px;
        margin: 1px;
        position: relative;
    }
}


/* ============================
   Circle Icon Buttons (Edit/Delete)
   ============================ */

.circle-icon-btn {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    /* دایره کامل */
    border: 1px solid var(--color-border-soft);
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    cursor: pointer;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease, background-color 0.18s ease;
}


    /* خود svg که به‌صورت img وارد شده */

    .circle-icon-btn img {
        width: 18px;
        /* کمی کوچک، که تو گوشه شیک باشه */
        height: 18px;
        display: block;
        filter: var(--icon-filter-base);
        /* در لایت: none | در دارک: invert(1) */
    }


    /* هاور عمومی – کمی بلند شدن */

    .circle-icon-btn:hover {
        transform: translateY(-2px);
    }


/* دکمه ویرایش – زرد نئونی */

/*.circle-icon-btn--edit:hover {
    border-color: var(--neon-yellow);
    box-shadow: 0 0 8px var(--neon-yellow-glow);
}*/


/* دکمه حذف – قرمز نئونی */

/*.circle-icon-btn--delete:hover {
    border-color: var(--neon-red);
    box-shadow: 0 0 8px var(--neon-red-glow);
}*/


/* اگر خواستی روی موبایل حتی کوچیک‌تر بشن: */

@media (max-width: 640px) {
    .circle-icon-btn {
        width: 32px;
        height: 32px;
        padding: 3px;
    }

        .circle-icon-btn img {
            width: 16px;
            height: 16px;
        }
}


/* ================================
   Ticket Input Row (ثبت تیکت)
   دسکتاپ:
      - اینپوت و دکمه در یک ردیف
      - 60% اینپوت / 40% دکمه
   موبایل (<=640px):
      - اینپوت بالا، دکمه زیرش
      - اینپوت 90% عرض، دکمه 65% عرض
   ================================ */

.dashboard-ticket-input {
    margin-bottom: 1.25rem;
    direction: rtl;
    text-align: right;
}

.ticket-input-row {
    display: flex;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0.75rem;
    direction: rtl;
    /* همه‌چیز از راست شروع شود */
}


/* ویندوز / دسکتاپ: 60% اینپوت - 40% دکمه */

.ticket-input-wrapper {
    flex: 0 0 60%;
}

.ticket-submit-btn {
    flex: 0 0 40%;
    justify-content: center;
    /* متن دکمه وسط */
}


/* موبایل: استک عمودی و وسط‌چین شدن */

@media (max-width: 640px) {
    .ticket-input-row {
        flex-direction: column;
        align-items: center;
        /* وسط از نظر عرضی */
    }

    .ticket-input-wrapper {
        flex: none;
        width: 90%;
        max-width: 90%;
    }

    .ticket-submit-btn {
        flex: none;
        width: 65%;
        max-width: 65%;
    }
}


/* فضای لیست، بعد از کادر ثبت تیکت
   - آن‌قدر رشد می‌کند تا بقیه ارتفاع صفحه را پر کند
   - اگر محتوا بیشتر شد، فقط داخل خودش اسکرول می‌خورد
*/

.dashboard-list-area {
    flex: 1 1 auto;
    /* از بین المنت‌های داخل dashboard-card، این یکی فیلر ارتفاع است */
    min-height: 220px;
    max-height: calc(100vh - 230px);
    /* باقی ارتفاع بعد از input + فاصله‌ها (عدد را اگر لازم بود تنظیم کن) */
    display: flex;
    flex-direction: column;
    background: var(--color-surface-soft);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border-soft);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    /* اسکرول فقط روی فرزند ticket-list */
}


/* هدر لیست بالا */

.dashboard-list-header {
    flex: 0 0 auto;
    padding: 0.85rem 1rem 0.5rem 1rem;
    border-bottom: 1px solid var(--color-border-soft);
}

    .dashboard-list-header h2 {
        margin: 0;
        font-size: 1rem;
        font-weight: 700;
    }

    .dashboard-list-header p {
        margin: 0.25rem 0 0;
        font-size: 0.82rem;
        color: var(--color-text-muted);
    }


/* لیست تیکت‌ها – اسکرول فقط اینجا */

.ticket-list {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 0.75rem 0.9rem 1rem 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}


/* وقتی هیچ تیکتی نیست */

.ticket-empty {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.95rem;
    padding: 1.5rem;
}





/* دکمه تغییر تم در داشبورد */
.dashboard-theme-toggle {
    display: flex;
    justify-content: flex-end; /* دسکتاپ: سمت راست */
    margin-bottom: 0.6rem;
}

.dashboard-theme-toggle__btn {
    font-size: 0.85rem;
    padding-inline: 0.9rem;
}

/* موبایل – دکمه بره سمت چپ */
@media (max-width: 640px) {
    .dashboard-theme-toggle {
        justify-content: flex-start; /* بالا گوشه سمت چپ در موبایل */
    }
}


/* دکمه خروج حساب کاربری */
.logout-btn {
    position: absolute;
    left: 0; /* گوشه بالا سمت چپ */
    right: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 5px;
    margin-top: -80px;
    margin-left: 20px;
    background: linear-gradient(135deg, var(--color-error), #b91c1c);
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.15);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    z-index: 5;
    box-shadow: 0 8px 25px rgba(0,0,0,0.35);
    transition: 0.18s ease;
}

    .logout-btn img {
        width: 16px;
        height: 16px;
        filter: invert(1);
    }

    .logout-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 14px 40px rgba(239,68,68,0.55);
    }

/* موبایل */
@media (max-width: 640px) {
    .logout-btn {
        top: 10px; /* کمی نزدیک‌تر به کارت که تو موبایل تو ذوق نزنه */
        left: 10px;
        margin-top: 0px;
        margin-left: 0px;
        right: auto;
        padding: 0.3rem 0.75rem;
        font-size: 0.78rem; /* فونت کوچیک‌تر */
    }

        .logout-btn img {
            width: 14px;
            height: 14px;
        }
}


@media (max-width: 640px) {
    .user-card__avatar-block {
        align-items: center;
    }
}

.ui-btn-edituser {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    padding: 0.3rem 0.6rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.95rem;
    font-weight: 200;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

@media (max-width: 640px) {
    .ui-btn-edituser {
        font-size: 0.85rem; /* کوچکتر در اندروید/موبایل */
        padding: 0.28rem 0.5rem; /* کمی جمع‌وجورتر */
    }
}


/* #region user-edit button */

/* ستون آواتار + دکمه ویرایش – مشترک دسکتاپ و موبایل */
.user-card__avatar-column {
    display: flex;
    flex-direction: column;
    align-items: center; /* وسط از نظر افقی در هر دو حالت */
    gap: 0.35rem; /* فاصله کم بین آواتار و دکمه */
}

/* رپر دکمه – فقط برای کنترل فاصله */
.user-edit-btn-wrap {
    margin-top: 0.35rem; /* فاصله از آواتار */
    margin-bottom: 0.35rem; /* فاصله از متای پایین */
}

/* خود دکمه ویرایش اطلاعات کاربری */
.user-edit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.28rem 0.9rem;
    border-radius: 999px;
    border: 1px solid var(--color-border-soft);
    background: transparent;
    color: var(--color-text);
    font-size: 0.9rem; /* کمی کوچیک‌تر از ui-btn (0.95rem) */
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

    .user-edit-btn:hover {
        background-color: var(--color-primary-soft);
        border-color: var(--color-primary);
        color: var(--color-text);
        transform: translateY(-1px);
        box-shadow: 0 8px 20px rgba(15, 23, 42, 0.35);
    }

/* موبایل / اندروید – کوچیک‌تر و بدون داغون‌کردن ارتفاع */
@media (max-width: 640px) {
    .user-edit-btn {
        font-size: 0.8rem; /* ریزتر از دسکتاپ */
        padding: 0.24rem 0.8rem;
    }


    .user-edit-btn-wrap {
        margin-top: 0.6rem;
        margin-bottom: 0.3rem;
    }
}

/* #endregion user-edit button */



/* #endregion Dashboard.css */




/* #region LotteryTicket.css */
/* ================================
   LotteryTicket Layout – جایگزین Dashboard
   ================================ */
.lotteryticket-root {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 1.5rem 1rem 2.5rem;
    background: var(--color-bg);
}

.lotteryticket-card {
    width: 100%;
    max-width: 880px;
    direction: rtl;
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    height: calc(100vh - 3rem);
}

/* کادر ثبت تیکت */
.lotteryticket-input {
    flex: 0 0 auto;
}

.lotteryticket-input-row {
    display: flex;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0.75rem;
    direction: rtl;
}

/*.lotteryticket-input-wrapper {
    flex: 0 0 60%;
}

.lotteryticket-submit-btn {
    flex: 0 0 40%;
    justify-content: center;
}*/

.lotteryticket-input-wrapper {
    flex: 0 0 60%;
}

/* ظرف دکمه‌ها (لغو + ثبت) */
.lotteryticket-actions {
    flex: 0 0 40%;
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
}

    /* هر دو دکمه داخلش اندازه مساوی بگیرند */
    .lotteryticket-actions .ui-btn {
        flex: 1 1 0;
    }

/* خود دکمه ثبت همچنان برای هوک‌های قبلی */
.lotteryticket-submit-btn {
    justify-content: center;
}


/*@media (max-width: 640px) {
    .lotteryticket-input-row {
        flex-direction: column;
        align-items: center;
    }

    .lotteryticket-input-wrapper {
        width: 90%;
    }

    .lotteryticket-submit-btn {
        width: 65%;
    }
}*/

/* موبایل */
@media (max-width: 640px) {
    .lotteryticket-input-row {
        flex-direction: column;
        align-items: center;
    }

    .lotteryticket-input-wrapper {
        width: 90%;
    }

    /* ظرف دکمه‌ها در موبایل هم وسط، تمام‌عرض نسبی */
    .lotteryticket-actions {
        width: 90%;
        justify-content: center;
    }
}

/* لیست تیکت‌ها */
.lotteryticket-list-area {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: var(--color-surface-soft);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border-soft);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.lotteryticket-list-header {
    flex: 0 0 auto;
    padding: 0.85rem 1rem 0.5rem;
    border-bottom: 1px solid var(--color-border-soft);
}

    .lotteryticket-list-header h2 {
        margin: 0;
        font-size: 1rem;
        font-weight: 700;
    }

    .lotteryticket-list-header p {
        margin: 0.25rem 0 0;
        font-size: 0.82rem;
        color: var(--color-text-muted);
    }

.lotteryticket-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 0.75rem 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.lotteryticket-empty {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.95rem;
    padding: 1.5rem;
}

/*.lotteryticket-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    background-color: var(--color-surface);
    direction: rtl;
    text-align: right;
}*/
.lotteryticket-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    background-color: var(--color-surface);
    direction: rtl;
    text-align: right;
    flex-direction: row-reverse; /* 👈 متن سمت راست، دکمه‌ها سمت چپ کارت */
}


.lotteryticket-item__actions {
    display: flex;
    flex-direction: column; /* عمودی در دسکتاپ */
    gap: 0.75rem;
    flex-shrink: 0;
    align-items: center;
    justify-content: center; /* وسط عمودی */
}

.lotteryticket-item__main {
    flex: 1;
}

.lotteryticket-item__title {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.lotteryticket-item__row {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-top: 0.15rem;
}

    .lotteryticket-item__row span {
        color: var(--color-text);
        font-weight: 600;
    }

/* لودر انتهایی */
.lotteryticket-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.5rem 1rem;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

/* اسپینر لیزی‌لود انتهای لیست */
.lotteryticket-spinner {
    width: 40px;
    height: 40px;
    margin-bottom: 0.35rem;
    /* کمی نرم‌تر از اسپینر اصلی، ولی از همون استایل استفاده می‌کند */
}


/* تغییرات جدید: ریسپانسیو برای دکمه‌های actions */
@media (max-width: 640px) {
    .lotteryticket-item__actions {
        flex-direction: row; /* افقی در موبایل */
        gap: 0.6rem; /* فاصله افقی بیشتر برای لمس بهتر */
        align-items: center;
        justify-content: flex-end; /* سمت چپ در RTL (یعنی سمت راست صفحه، اما اگر منظورت سمت چپ کاربر باشه، flex-start بذار) */
    }

    .lotteryticket-spinner {
        width: 32px;
        height: 32px;
    }

    .lotteryticket-loader {
        padding: 1.1rem 0.75rem;
        font-size: 0.85rem;
    }
}

/* تغییرات جدید: رنگ هاور دکمه‌ها (background تغییر کنه) */
.circle-icon-btn--edit {
    background-color: var(--color-primary-soft); /* رنگ پس‌زمینه نرم در هاور */
    border-color: var(--neon-yellow);
    box-shadow: 0 0 8px var(--neon-yellow-glow);
}

.circle-icon-btn--delete {
    background-color: var(--color-primary-soft); /* رنگ پس‌زمینه نرم در هاور */
    border-color: var(--neon-red);
    box-shadow: 0 0 8px var(--neon-red-glow);
}

.circle-icon-btn--edit:hover {
    background-color: var(--neon-yellow); /* رنگ پس‌زمینه نرم در هاور */
    border-color: var(--neon-yellow);
    box-shadow: 0 0 8px var(--neon-yellow-glow);
}

.circle-icon-btn--delete:hover {
    background-color: var(--neon-red); /* رنگ پس‌زمینه نرم در هاور */
    border-color: var(--neon-red);
    box-shadow: 0 0 8px var(--neon-red-glow);
}


/* استال برای دکمه لغو اپدیت در اپدیت تیکنت ها  */
.lotteryticket-cancel-btn {
    background: linear-gradient(135deg, var(--color-error), #b91c1c);
    color: #fff;
    border: 1px solid rgba(248, 113, 113, 0.6);
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.55);
}

    .lotteryticket-cancel-btn:hover:enabled {
        transform: translateY(-1px);
        box-shadow: 0 14px 35px rgba(248, 113, 113, 0.75);
    }



/* #endregion LotteryTicket.css */


/* #region Global App Splash Loader */

/* تمام صفحه قبل از بالا آمدن بلیزور */
.app-splash {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at top left, rgba(148, 163, 184, 0.18), transparent 60%), radial-gradient(circle at bottom right, rgba(56, 189, 248, 0.22), transparent 60%), var(--color-bg);
}



/* لایه‌ی نور نئونی پشت کارت */
.app-splash__glow {
    position: absolute;
    inset: -20%;
    background: radial-gradient(circle at 20% 20%, rgba(34, 211, 238, 0.32), transparent 60%), radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.32), transparent 60%);
    filter: blur(40px);
    opacity: 0.9;
    pointer-events: none;
}

/* کارت وسط صفحه (از ui-card استفاده می‌کند) */
.app-splash__card {
    position: relative;
    z-index: 1;
    max-width: 320px;
    width: 100%;
    text-align: center;
    padding: 1.6rem 1.25rem;
}

/* اسپینر نئونی */
.app-splash__spinner {
    width: 56px;
    height: 56px;
    border-radius: 999px;
    border: 3px solid rgba(148, 163, 184, 0.35);
    border-top-color: var(--color-primary);
    border-right-color: var(--color-secondary);
    animation: app-splash-spin 0.9s linear infinite;
    margin: 0 auto 1rem;
    box-shadow: 0 0 18px rgba(34, 211, 238, 0.55);
}

/* عنوان */
.app-splash__title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--color-primary);
    margin-bottom: 0.35rem;
}

/* زیرعنوان */
.app-splash__subtitle {
    font-size: 0.86rem;
    color: var(--color-text-muted);
}

/* انیمیشن اسپینر */
@keyframes app-splash-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* موبایل */
@media (max-width: 480px) {
    .app-splash__card {
        max-width: 280px;
        padding: 1.3rem 1.1rem;
    }

    .app-splash__spinner {
        width: 48px;
        height: 48px;
    }
}

/* #endregion Global App Splash Loader */


/* #region Page Loading Overlay */

/* اوورلی تمام صفحه برای زمان لود دیتای داخلی صفحات */
.page-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    background: rgba(15, 23, 42, 0.65);
}

/* در لایت تم، بک‌گراند کمی روشن‌تر شود */
[data-theme="light"] .page-loading-overlay {
    background: rgba(15, 23, 42, 0.18);
}

/* کارت کوچک داخل اوورلی */
.page-loading-box {
    background: var(--color-surface-soft);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border-soft);
    box-shadow: var(--shadow-strong);
    padding: 1.1rem 1.4rem;
    min-width: 230px;
    text-align: center;
}

/* اسپینر داخلی – کوچک‌تر */
.page-loading-spinner {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: 3px solid rgba(148, 163, 184, 0.35);
    border-top-color: var(--color-primary);
    border-right-color: var(--color-secondary);
    animation: app-splash-spin 0.9s linear infinite; /* از همون keyframes بالا */
    margin: 0 auto 0.75rem;
    box-shadow: 0 0 14px rgba(34, 211, 238, 0.55);
}

.page-loading-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.page-loading-subtitle {
    font-size: 0.82rem;
    color: var(--color-text-muted);
}




/* Icon in splash screen */
.app-splash__icon {
    width: 92px;
    height: 92px;
    object-fit: contain;
    margin: 0 auto 1.2rem;
    display: block;
    filter: drop-shadow(0 0 14px rgba(34, 211, 238, 0.55));
}

/* Mobile */
@media (max-width: 480px) {
    .app-splash__icon {
        width: 78px;
        height: 78px;
        margin-bottom: 1rem;
    }
}
/* #endregion Page Loading Overlay */






/* #region Edit User – Big Avatar Preview */

.edit-avatar-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.2rem;
}

.edit-avatar-preview__circle {
    width: 120px;
    height: 120px;
    border-radius: 999px;
    border: 3px solid var(--color-primary);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, var(--color-primary-soft), transparent 60%);
    box-shadow: 0 0 18px rgba(34, 211, 238, 0.55);
}

    .edit-avatar-preview__circle img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.edit-avatar-preview__label {
    margin-top: 0.6rem;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

/* در موبایل کمی کوچک‌تر اگر خواستی */
@media (max-width: 480px) {
    .edit-avatar-preview__circle {
        width: 100px;
        height: 100px;
    }
}

/* #endregion Edit User – Big Avatar Preview */

/* #region  profile.css */
/* #region Profile Picker (Edit User) */

.profile-picker-card {
    margin-bottom: 1rem;
    direction: rtl;
    text-align: right;
}

.profile-picker__header h2 {
    margin: 0 0 0.25rem 0;
    font-size: 1rem;
    font-weight: 800;
    color: var(--color-primary);
}

.profile-picker__header p {
    margin: 0 0 0.75rem 0;
    font-size: 0.82rem;
    color: var(--color-text-muted);
}

/* گرید 15 تایی – 1 یا 2 ردیف بسته به عرض صفحه */
.profile-picker__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
    gap: 0.6rem;
}

/* هر آیتم مثل دکمه مربع کوچک */
.profile-picker__item {
    position: relative;
    width: 96px;
    height: 96px;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border-soft);
    background: var(--color-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast), background-color var(--transition-fast);
}

    .profile-picker__item:hover {
        transform: translateY(-2px);
        border-color: var(--color-primary);
        box-shadow: 0 10px 28px rgba(15, 23, 42, 0.35);
    }

/* دایره‌ی پروفایل داخل مربع */
.profile-picker__avatar-circle {
    width: 72px;
    height: 72px;
    border-radius: 999px;
    border: 2px solid var(--color-border-soft);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, var(--color-primary-soft), transparent 60%);
}

    .profile-picker__avatar-circle img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

/* حالت انتخاب‌شده: بوردر پریمیوم (گرادیانت سایت) */
.profile-picker__item.is-selected {
    border-width: 2px;
    border-color: transparent;
    background: linear-gradient(var(--color-surface), var(--color-surface)) padding-box, linear-gradient(135deg, var(--color-primary), var(--color-secondary)) border-box;
    box-shadow: 0 0 16px rgba(56, 189, 248, 0.55);
    transform: translateY(-2px);
}

    /* وقتی انتخاب شده، خود دایره هم رنگ پریمیوم بگیرد */
    .profile-picker__item.is-selected .profile-picker__avatar-circle {
        border-color: var(--color-secondary);
        box-shadow: 0 0 10px rgba(168, 85, 247, 0.7);
    }
/* Desktop */
.profile-picker__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 1.2rem; /* فاصله مناسب بین آواتارها */
    padding: 0.4rem;
}

/* موبایل: کمی فشرده‌تر */
@media (max-width: 480px) {
    .profile-picker__grid {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
        gap: 0.9rem;
    }

    .profile-picker__item {
        width: 87px;
        height: 87px;
    }

    .profile-picker__avatar-circle {
        width: 66px;
        height: 66px;
    }
}

/* نمایش دکنه انتخاب کاربر */
.edit-avatar-preview__actions {
    margin-top: 0.7rem;
    display: flex;
    justify-content: center;
}


/* #endregion Profile Picker */


/* Center Modal for Avatar Picker */
.avatar-sheet .sheet-content {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 90%;
    max-width: 480px;
    border-radius: 20px;
    background: var(--color-surface-soft);
    border: 1px solid var(--color-border-soft);
    box-shadow: 0 0 40px rgba(0,0,0,0.45);
    display: flex;
    flex-direction: column;
    max-height: none !important; /* ⬅ FULL HEIGHT */
    height: auto !important; /* ⬅ رشد بر اساس محتوا */
}

.avatar-sheet .sheet-body {
    overflow-y: auto;
}

/* بک‌دراپ تاریک */
.avatar-sheet .sheet-backdrop {
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(4px);
}

/* Center Modal for Avatar Picker */

.avatar-sheet .sheet-content {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 90%;
    max-width: 480px;
    border-radius: 20px;
    background: var(--color-surface-soft);
    border: 1px solid var(--color-border-soft);
    box-shadow: 0 0 40px rgba(0,0,0,0.45);
    display: flex;
    flex-direction: column;
    /* ارتفاع کلی مودال – بزرگ‌تر ولی محدود */
    max-height: 80vh; /* سقف ارتفاع */
    height: auto;
}

/* بدنه‌ی آواتارها – اسکرول داخلی اگر زیاد شد */
.avatar-sheet .sheet-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 1rem 1.25rem 1.25rem;
}

/* بک‌دراپ تاریک */
.avatar-sheet .sheet-backdrop {
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(4px);
}

/* هدر مودال + جا برای دکمه × */
.avatar-sheet__header {
    position: relative;
    padding: 1rem 1.25rem 0.75rem 3rem; /* سمت چپ جا برای دکمه */
    border-bottom: 1px solid var(--color-border-soft);
}

/* دکمه × دایره‌ای با گرادیانت پریمیوم */
.avatar-sheet__close-btn {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem; /* گوشه چپ بالا (در هر دو تم) */
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.65);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), opacity var(--transition-fast);
}

    .avatar-sheet__close-btn:hover {
        transform: translateY(-1px) scale(1.03);
        box-shadow: 0 16px 40px rgba(15, 23, 42, 0.85);
    }

    .avatar-sheet__close-btn:active {
        transform: scale(0.96);
        box-shadow: 0 8px 20px rgba(15, 23, 42, 0.6);
    }

/* موبایل – ارتفاع کنترل‌شده، اسکرول اگر آواتارها زیاد شدند */
/*@media (max-width: 480px) {
    .avatar-sheet .sheet-content {
        width: 94%;
        max-width: 94%;
        max-height: 90vh;*/ /* روی موبایل کمی کوتاه‌تر، تا جا برای بک‌دراپ بماند */
/*}

    .avatar-sheet .sheet-body {
        padding: 0.8rem 0.9rem 1rem;
    }

    .avatar-sheet__close-btn {
        width: 30px;
        height: 30px;
        font-size: 1rem;
    }
}*/
/* MOBILE — Avatar Modal bigger (about 1.7x) */
@media (max-width: 480px) {

    .avatar-sheet .sheet-content {
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        width: 94%;
        max-width: 94%;
        /* ارتفاع واقعی مودال – خیلی بلندتر از قبلی */
        min-height: 77vh !important; /* حداقل حدود 1.7× حالت‌های قبلی */
        max-height: 87vh !important; /* سقف، تا از صفحه نزنه بیرون */

        display: flex;
        flex-direction: column;
    }

    .avatar-sheet .sheet-body {
        flex: 1 1 auto;
        overflow-y: auto;
        padding: 1rem 0.9rem 1.2rem;
    }

    .avatar-sheet__close-btn {
        width: 30px;
        height: 30px;
        font-size: 1rem;
    }
}
/* MOBILE — Avatar Modal larger height */
/*@media (max-width: 480px) {

    .avatar-sheet .sheet-content {
        position: fixed !important; 
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        width: 94%;
        max-width: 94%;*/
/* افزایش ارتفاع واقعی مودال  (1.5×) */
/*max-height: 90vh !important;
        min-height: 70vh !important;*/ /* مودال را مجبور می‌کند بلند شود */

/*display: flex;
        flex-direction: column;
    }*/

/* بخش قابل اسکرول */
/*.avatar-sheet .sheet-body {
        flex: 1 1 auto;
        overflow-y: auto;
        padding: 1rem 0.9rem 1.2rem;
    }
}*/




/* #endregion profile.css */

/* #region jalali-date-picker */

.jalali-picker {
    background: #111827;
    color: #e5e7eb;
    border-radius: 12px;
    padding: 0.75rem 0.85rem 0.7rem;
    min-width: 260px;
    box-shadow: 0 18px 40px rgba(0,0,0,0.4);
    font-size: 0.85rem;
}

.jalali-header-top {
    text-align: center;
    font-weight: 700;
    margin-bottom: 0.35rem;
    color: #38bdf8;
}

.jalali-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #0b1120;
    border-radius: 8px;
    padding: 0.3rem 0.45rem;
    margin-bottom: 0.4rem;
}

.jp-nav-btn {
    background: transparent;
    border: none;
    color: #9ca3af;
    font-size: 1.1rem;
    cursor: pointer;
}

    .jp-nav-btn:hover {
        color: #e5e7eb;
    }

.jp-nav-label {
    background: transparent;
    border: none;
    color: #e5e7eb;
    font-weight: 600;
    cursor: pointer;
}

.jp-sep {
    color: #4b5563;
    font-size: 0.8rem;
}

.jalali-body {
    margin-top: 0.25rem;
}

.jalali-table {
    width: 100%;
    border-collapse: collapse;
}

    .jalali-table th {
        font-weight: 600;
        font-size: 0.75rem;
        padding: 0.25rem 0;
        color: #9ca3af;
        text-align: center;
    }

    .jalali-table td {
        text-align: center;
        padding: 0.15rem 0;
    }

.jp-day {
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    background: transparent;
    color: #e5e7eb;
}

    .jp-day:hover {
        background: #1d4ed8;
    }

    .jp-day.is-selected {
        background: #3b82f6;
        color: #f9fafb;
    }

.jp-empty {
    opacity: 0.2;
}

.jalali-grid {
    display: grid;
    gap: 0.3rem;
}

.jalali-months {
    grid-template-columns: repeat(3, 1fr);
}

.jalali-years {
    grid-template-columns: repeat(3, 1fr);
}

.jp-cell {
    border-radius: 999px;
    border: none;
    padding: 0.35rem 0.4rem;
    background: #020617;
    color: #e5e7eb;
    cursor: pointer;
    font-size: 0.8rem;
}

    .jp-cell:hover {
        background: #1d4ed8;
    }

    .jp-cell.is-current {
        background: #3b82f6;
        color: #f9fafb;
    }

.jalali-footer {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 0.6rem;
}

/* موبایل: تمام‌عرض */
@media (max-width: 480px) {
    .jalali-picker {
        width: 100%;
    }

    .jalali-footer {
        flex-direction: row-reverse;
    }

        .jalali-footer .ui-btn {
            flex: 1;
        }
}


/* Center Modal for Jalali DatePicker */
.datepicker-sheet .sheet-content {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 90%;
    max-width: 360px;
    border-radius: 20px;
    background: var(--color-surface-soft);
    border: 1px solid var(--color-border-soft);
    box-shadow: 0 0 40px rgba(0,0,0,0.45);
    display: flex;
    flex-direction: column;
    max-height: 80vh; /* که از صفحه نزنه بیرون */
    height: auto;
}

.datepicker-sheet .sheet-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 1rem 1.25rem 1.25rem;
}

.datepicker-sheet .sheet-header,
.datepicker-sheet .sheet-footer {
    padding: 0.9rem 1.25rem;
}

.datepicker-sheet .sheet-backdrop {
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(4px);
}

/* موبایل – همچنان وسط، فقط کمی عرض و ارتفاع تنظیم شود */
@media (max-width: 480px) {
    .datepicker-sheet .sheet-content {
        width: 94%;
        max-width: 94%;
        min-height: 40vh; /* کمی بلندتر که حس مودال بده */
        max-height: 85vh;
    }
    /* کمی بلندتر که شود مودال در موبایل */
    .desktop-date-picker-wrapper .datepicker-outer {
        min-height: 30px !important;
    }
}


/* ظرف اسکرولی مخصوص سال‌ها */
.jalali-years-scroll {
    max-height: 150px; /* هر عددی که توی UI قشنگ‌تر بود */
    overflow-y: auto;
    padding-right: 2px; /* که اسکرول‌بار نچسبه به متن */
}

/* خود گرید سال‌ها مثل قبل */
.jalali-years {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.3rem;
}

/* فقط برای مودال دیت‌پیکر، نه بقیه مودال‌هایی که از privacy-sheet استفاده می‌کنند */
.privacy-sheet.datepicker-sheet .sheet-content {
    /* هرچی از استایل عمومی روی sheet-content بوده تا حد ممکن خنثی می‌کنیم */
    position: fixed; /* مستقل از اسکرول صفحه */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    /* اندازه‌اش را بسپار به داخل، فقط محدودیت کلی بده */
    width: auto;
    max-height: calc(100vh - 32px); /* کمی فاصله از بالا / پایین */
    padding: 0;
    margin: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    align-items: stretch;
    justify-content: center;
    z-index: 1; /* روی بک‌دراپ بماند */
}

    /* خود دیت‌پیکر را شبیه کارت نگه می‌داریم، اندازه واقعی از همین می‌آید */
    .privacy-sheet.datepicker-sheet .sheet-content > .jalali-picker {
        background: var(--color-surface-soft);
        border-radius: 16px;
        border: 1px solid var(--color-border-soft);
        box-shadow: 0 0 40px rgba(0,0,0,0.45);
        /* اینا را اگر قبلاً برای jalali-picker تعریف کرده‌ای، می‌تونی حذف کنی */
        max-width: 420px;
        /*min-width: 320px;*/
        width: 100%;
        overflow: hidden;
    }

/* موبایل: فقط کمی کنترل اضافه روی ارتفاع */
@media (max-width: 600px) {
    .privacy-sheet.datepicker-sheet .sheet-content {
        width: calc(100vw - 20px); /* فاصله ۱۰px از راست و چپ */
        max-width: calc(100vw - 30px);
        max-height: calc(100vh - 34px);
    }

        .privacy-sheet.datepicker-sheet .sheet-content > .jalali-picker {
            width: 100%;
            max-width: 100%;
            min-width: 0; /* 👈 این خط تضمین می‌کند که حتی اگر یه جایی min-width موند، خنثی شود */
            box-sizing: border-box;
        }
}




/* #endregion jalali-date-picker */


/* #region scroll Bug*/

@supports (height: 100dvh) {
    .page-root,
    .dashboard-root,
    .lotteryticket-root {
        min-height: 100dvh;
    }
}





@media screen and (max-width: 480px) {
    input,
    select,
    textarea,
    .ui-input {
        font-size: 16px !important;
    }
}


/* #endregion scroll Bug*/


/* #region terms */
/*.terms-line {
    display: flex;
    flex-wrap: wrap;*/ /* اجازه بشکنه */
/*gap: 4px;
    align-items: center;
    white-space: normal;*/ /* اجازه خط جدید */
/*}

.terms-link {
    color: var(--color-primary);*/ /* هر رنگی که دوست داری، فعلاً پرایمری */
/*cursor: pointer;
    font-weight: 600;
    white-space: nowrap;
}

    .terms-link:hover {
        opacity: 0.8;
    }*/

.terms-hint {
    font-size: 0.80rem; /* دسکتاپ – کمی کوچک‌تر از لیبل (0.9rem) */
    font-weight: 500;
    color: var(--color-primary);
    padding: 0.35rem 0.6rem;
    border-radius: var(--radius-md);
    line-height: 1.5;
}

/* موبایل / اندروید – ریزتر از دسکتاپ */
@media (max-width: 640px) {
    .terms-hint {
        font-size: 0.70rem; /* کوچیک‌تر روی موبایل */
        padding: 0.3rem 0.55rem; /* کمی جمع‌وجورتر */
    }
}

/* #endregion  terms*/


/* #region  birthdate*/
.birthdate-hint {
    font-size: 0.80rem; /* دسکتاپ – کمی کوچک‌تر از لیبل (0.9rem) */
    font-weight: 500;
    color: var(--color-warning);
    background: rgba(249, 115, 22, 0.12);
    border: 1px solid rgba(249, 115, 22, 0.32);
    padding: 0.35rem 0.6rem;
    border-radius: var(--radius-md);
    line-height: 1.5;
    margin-top: 5px;
    margin-bottom: 5px;
}

/* موبایل / اندروید – ریزتر از دسکتاپ */
@media (max-width: 640px) {
    .birthdate-hint {
        font-size: 0.70rem; /* کوچیک‌تر روی موبایل */
        padding: 0.3rem 0.55rem; /* کمی جمع‌وجورتر */
    }
}

/* #endregion  birthdate*/


/* #region  warning text*/
.warning-hint-title {
    font-size: 1.0rem; /* دسکتاپ – کمی کوچک‌تر از لیبل (0.9rem) */
    font-weight: 500;
    color: var(--color-error);
    line-height: 1.5;
}

.warning-hint {
    font-size: 0.90rem; /* دسکتاپ – کمی کوچک‌تر از لیبل (0.9rem) */
    font-weight: 500;
    color: var(--color-error);
    padding: 0.15rem 0.3rem;
    border-radius: var(--radius-md);
    line-height: 1.5;
}

/* موبایل / اندروید – ریزتر از دسکتاپ */
@media (max-width: 640px) {
    .warning-hint {
        font-size: 0.70rem; /* کوچیک‌تر روی موبایل */
        padding: 0.3rem 0.55rem; /* کمی جمع‌وجورتر */
    }

    .warning-hint-title {
        font-size: 0.80rem; /* کوچیک‌تر روی موبایل */
        padding: 0.3rem 0.55rem; /* کمی جمع‌وجورتر */
    }
}

/* #endregion  irthdate*/




/* #endregion  irthdate*/



/* #region  Foter*/

.global-footer {
    margin-top: auto;
    padding: 0.6rem 0.8rem;
    background: rgba(15, 23, 42, 0.45);
    border-top: 1px solid var(--color-border-soft);
    backdrop-filter: blur(10px);
}

.footer-container {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    direction: rtl;
    flex-direction: row-reverse;
}

.footer-right {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.footer-copy {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--color-text);
}

.footer-mini {
    font-size: 0.65rem;
    color: var(--color-text-muted);
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.footer-icon {
    width: 24px;
    height: 24px;
    padding: 2px;
    border-radius: 8px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--color-border-soft);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s ease;
}

    .footer-icon svg {
        width: 18px;
        height: 18px;
    }

    .footer-icon:hover {
        transform: translateY(-2px);
        border-color: var(--color-primary);
        box-shadow: 0 0 10px rgba(34,211,238,0.45);
    }

@media (max-width: 640px) {
    .footer-icon {
        width: 40px;
        height: 40px;
        padding: 8px;
    }

        .footer-icon svg {
            width: 32px;
            height: 32px;
        }
}

@media (min-width: 641px) {
    .footer-icon {
        width: 50px;
        height: 50px;
        padding: 10px;
    }

        .footer-icon svg {
            width: 42px;
            height: 42px;
        }
}
/* #endregion  irthdate*/
