﻿
/* جلوگیری از فلش تم: پنل تا اعمال تم از localStorage مخفی است، بعد با تم درست نمایش داده می‌شود */
.profile-panel.theme-pending { opacity: 0; }
.profile-panel { transition: opacity 0.15s ease-out; }

/* بج/پس‌زمینه قرمز: فقط داخل پنل (تا مودال/فوتر اصلی تحت تأثیر نباشند) */
.profile-panel .bg-danger { color: #fff !important; }
.profile-panel .bg-danger a { color: #fff !important; }

/* Core backgrounds and text in dark */
.profile-panel[data-bs-theme="dark"] { background-color: var(--C0); color: var(--C6); }

.profile-panel[data-bs-theme="dark"] .bg-light { background-color: var(--C8) !important; }
.profile-panel[data-bs-theme="dark"] .navbar,
.profile-panel[data-bs-theme="dark"] .navbar-light { background-color: var(--C8) !important; }
/* نوار موبایل پروفایل — لایت: سطح روشن‌تر از بدنه تا از پس‌زمینهٔ صفحه جدا باشد */
.profile-panel[data-bs-theme="light"] .navbar-profile-mobile,
.profile-panel[data-bs-theme="light"] .navbar.d-lg-none { background: linear-gradient(180deg, var(--C0, #fff) 0%, var(--C8) 100%) !important; color: var(--C6); border-bottom: 1px solid rgba(5, 42, 20, 0.1); box-shadow: 0 2px 8px rgba(5, 42, 20, 0.06); padding: 0.5rem 1rem; min-height: 50px; }
.profile-panel[data-bs-theme="light"] .navbar-profile-mobile .navbar-brand,
.profile-panel[data-bs-theme="light"] .navbar.d-lg-none .navbar-brand { color: var(--C1) !important; font-weight: 600; padding: 0.5rem 0; }
.profile-panel[data-bs-theme="light"] .navbar-profile-mobile .navbar-toggler,
.profile-panel[data-bs-theme="light"] .navbar.d-lg-none .navbar-toggler { color: var(--C1); border-color: rgba(5, 42, 20, 0.15); }

/* نوار موبایل پروفایل — دارک: کمی روشن‌تر از پس‌زمینهٔ پنل */
.profile-panel[data-bs-theme="dark"] .navbar-profile-mobile,
.profile-panel[data-bs-theme="dark"] .navbar.d-lg-none { background: linear-gradient(180deg, var(--C4) 0%, color-mix(in srgb, var(--C4) 70%, var(--C2) 30%) 100%) !important; color: var(--C6); border-bottom: 1px solid rgba(255, 255, 255, 0.08); box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35); padding: 0.5rem 1rem; min-height: 50px; }
@supports not (background: color-mix(in srgb, red, blue)) {
    .profile-panel[data-bs-theme="dark"] .navbar-profile-mobile,
    .profile-panel[data-bs-theme="dark"] .navbar.d-lg-none { background: var(--C4) !important; }
}
.profile-panel[data-bs-theme="dark"] .navbar-profile-mobile .navbar-brand,
.profile-panel[data-bs-theme="dark"] .navbar.d-lg-none .navbar-brand { color: var(--C6) !important; }
.profile-panel[data-bs-theme="dark"] .navbar-profile-mobile .navbar-toggler,
.profile-panel[data-bs-theme="dark"] .navbar.d-lg-none .navbar-toggler { color: var(--C6); border-color: rgba(255, 255, 255, 0.12); }
.profile-panel[data-bs-theme="dark"] .sidebar { background-color: var(--C8) !important; color: var(--C6); }
.profile-panel[data-bs-theme="dark"] .card { background-color: var(--C8); color: var(--C6); border-color: var(--C4); }
.profile-panel[data-bs-theme="dark"] .text-muted { color: var(--C5) !important; }
/* کارت پرداخت انتخاب‌شده — پس‌زمینه رنگی، متن کم‌رنگ باید خوانا باشد */
.profile-panel[data-bs-theme="dark"] .payment-method.selected .text-muted { color: rgba(11, 18, 32, 0.9) !important; }
.profile-panel[data-bs-theme="dark"] .text-primary { color: var(--C6) !important; }
.profile-panel[data-bs-theme="dark"] .remove-item { color: var(--C6) !important; }
.profile-panel[data-bs-theme="dark"] .remove-item:hover { color: #f87171 !important; }
.profile-panel[data-bs-theme="dark"] .cart-summary h5 { color: var(--C6) !important; }
/* کارت پرداخت انتخاب‌شده — لایت مود: بک تیره، متن روشن */
.profile-panel .payment-method.selected .text-muted,
.profile-panel .payment-method-orders.selected .text-muted { color: rgba(255, 255, 255, 0.9) !important; }
.profile-panel[data-bs-theme="dark"] .payment-method { border-color: var(--C3); color: var(--C6); }
.profile-panel[data-bs-theme="dark"] .payment-method.selected { background: var(--C3) !important; border-color: var(--C3) !important; color: #0b1220 !important; }
.profile-panel[data-bs-theme="dark"] .payment-method.selected i { color: #0b1220 !important; }
/* مودال انتخاب روش پرداخت در صفحه سفارشات (دارک) — خوانایی و انتخاب واضح */
.profile-panel[data-bs-theme="dark"] .payment-method-orders { border-color: var(--C4); color: var(--C6); background-color: var(--C8); }
.profile-panel[data-bs-theme="dark"] .payment-method-orders:hover:not(.disabled) { border-color: var(--C3); background-color: rgba(235, 158, 50, 0.08); }
.profile-panel[data-bs-theme="dark"] .payment-method-orders.selected { background: var(--C3) !important; border-color: var(--C3) !important; color: #0b1220 !important; }
.profile-panel[data-bs-theme="dark"] .payment-method-orders.selected i { color: #0b1220 !important; }
.profile-panel[data-bs-theme="dark"] .payment-method-orders .text-muted { color: rgba(229, 231, 235, 0.85) !important; }
.profile-panel[data-bs-theme="dark"] .payment-method-orders.selected .text-muted { color: rgba(11, 18, 32, 0.9) !important; }
.profile-panel[data-bs-theme="dark"] .payment-method-orders.disabled { opacity: 0.5; color: var(--C5) !important; }
.profile-panel[data-bs-theme="dark"] .payment-method-orders.disabled .text-muted { color: var(--C5) !important; }
.profile-panel[data-bs-theme="dark"] .btn-checkout { background: var(--C3) !important; color: var(--C6) !important; }
.profile-panel[data-bs-theme="dark"] .btn-checkout:hover { background: var(--C2) !important; color: var(--C6) !important; }
.profile-panel[data-bs-theme="dark"] .order-detail .value { color: var(--C6) !important; }
.profile-panel[data-bs-theme="dark"] .table { --bs-table-bg: transparent; --bs-table-striped-bg: rgba(255,255,255,.04); --bs-table-color: var(--C6); }
.profile-panel[data-bs-theme="dark"] .form-control,
.profile-panel[data-bs-theme="dark"] .form-select { background-color: var(--C2); color: var(--C6); border-color: var(--C1); }
.profile-panel[data-bs-theme="dark"] .form-control:focus { border-color: var(--C3) !important; box-shadow: 0 0 0 0.2rem rgba(var(--bs-secondary-rgb), 0.25) !important; }

/* فیلدهای غیرفعال در دارک مد */
.profile-panel[data-bs-theme="dark"] .form-control[readonly],
.profile-panel[data-bs-theme="dark"] .form-control[disabled] { background-color: #1f2937 !important; color: #9ca3af !important; border-color: #374151 !important; cursor: not-allowed; }
.profile-panel[data-bs-theme="dark"] .form-select[readonly],
.profile-panel[data-bs-theme="dark"] .form-select[disabled] { background-color: #1f2937 !important; color: #9ca3af !important; border-color: #374151 !important; cursor: not-allowed; }

/* ========== لودر یکسان پروفایل (مثل پنل ادمین: بلر + اسپینر، دارک‌مود) ========== */
.panel-loader-wrap { position: relative; min-height: 60px; scroll-margin-top: 200px; }
.panel-loader-wrap.loading { pointer-events: none; }
.panel-loader-wrap.loading::before { content: ''; position: absolute; inset: 0; background: rgb(196 247 229 / 85%); z-index: 10; border-radius: inherit; display: block; backdrop-filter: blur(2px); }
.panel-loader-spinner { position: absolute; inset: 0; margin: auto; z-index: 11; display: none; width: 36px; height: 36px; border: 3px solid rgba(0,0,0,0.08); border-left-color: var(--C1); border-radius: 50%; animation: spin 0.75s linear infinite; }
.panel-loader-wrap.loading .panel-loader-spinner { display: block; }
.panel-loader-spinner-sm { width: 22px; height: 22px; border-width: 2px; }
.panel-loader-wrap.loading .panel-loader-spinner-sm { display: block; }
.panel-loader-wrap-inline { min-height: 0; }
.panel-loader-wrap-inline.loading::before { display: none !important; }
.panel-loader-wrap-inline .panel-loader-spinner, .panel-loader-wrap-inline .panel-loader-spinner-sm { position: static; transform: none; margin: 0; }
.profile-panel[data-bs-theme="dark"] .panel-loader-wrap.loading::before { background: rgb(11 32 25 / 82%); }
.profile-panel[data-bs-theme="dark"] .panel-loader-spinner { border-color: rgba(255,255,255,0.1); border-left-color: var(--C3); }
.panel-ajax-overlay { position: fixed; inset: 0; background: rgb(196 247 229 / 85%); z-index: 99990; display: none; align-items: center; justify-content: center; backdrop-filter: blur(3px); }
.panel-ajax-overlay.show { display: flex; }
.panel-ajax-overlay .panel-loader-spinner { position: static; transform: none; display: block; }
.profile-panel[data-bs-theme="dark"] .panel-ajax-overlay { background: rgb(11 32 25 / 82%); }
/* overlay روی مودال (داخل .modal-content) — همان اسپینر یکسان */
.panel-loader-overlay { position: absolute; inset: 0; background: rgb(196 247 229 / 85%); z-index: 1050; display: none; align-items: center; justify-content: center; border-radius: 0 0 var(--bs-modal-border-radius, 0.5rem) var(--bs-modal-border-radius, 0.5rem); backdrop-filter: blur(2px); }
.panel-loader-overlay.show { display: flex; }
.panel-loader-overlay .panel-loader-spinner { position: static; transform: none; display: block; }
.profile-panel[data-bs-theme="dark"] .panel-loader-overlay { background: rgb(11 32 25 / 82%); }
/* اسپینر داخل دکمه (inline) */
.panel-loader-wrap-inline.loading .panel-loader-spinner-sm { display: inline-block; }
.panel-loader-wrap-inline .panel-loader-spinner-sm { display: none; }

/* لینک و کد دعوت — همان کارت «اشتراک دعوت» صفحهٔ همکاری در فروش (داشبورد و …) */
.referral-trio-label { display: block; font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--C5); margin-bottom: .45rem; }
.referral-trio-input-group { border-radius: .85rem; overflow: hidden; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--C5) 22%, transparent); transition: box-shadow .15s ease; }
.referral-trio-input-group:focus-within { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--C3) 42%, transparent), 0 0 0 3px color-mix(in srgb, var(--C3) 14%, transparent); }
.referral-trio-input-group .form-control.referral-trio-input { border: none; border-radius: 0; background: color-mix(in srgb, var(--C6) 5%, var(--C8)); font-size: .82rem; padding: .65rem .85rem; min-width: 0; }
.profile-panel[data-bs-theme="dark"] .referral-trio-input-group .form-control.referral-trio-input { background: color-mix(in srgb, #000 22%, var(--C8)); color: var(--C6); }
.referral-trio-input-group .form-control.referral-trio-input:focus { box-shadow: none; background: color-mix(in srgb, var(--C3) 6%, var(--C8)); }
.referral-trio-input-group .btn { border-radius: 0; font-weight: 700; padding-left: .85rem; padding-right: .85rem; border-top: none; border-bottom: none; }
.referral-trio-input-group .btn:last-child { border-right: none; }
.referral-trio-input-group .btn:first-of-type { border-left: none; }
.referral-trio-code-input { font-family: ui-monospace, 'Cascadia Mono', 'Segoe UI Mono', monospace; letter-spacing: .12em; font-weight: 700; text-align: center; }
.referral-trio-divider { height: 1px; margin: .35rem 0 1rem; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--C5) 35%, transparent), transparent); }

/* Loader صفحه اولیه (قبل از لود محتوا) — همان استایل یکسان */
#pageLoader { min-height: 200px; display: flex; flex-direction: column; justify-content: center; align-items: center; position: relative; }
#pageLoader::before { content: ''; position: absolute; inset: 0; background: rgb(196 247 229 / 85%); backdrop-filter: blur(2px); border-radius: inherit; }
#pageLoader .panel-loader-spinner { position: relative; top: auto; left: auto; transform: none; display: block; margin-bottom: 0.75rem; }
.profile-panel[data-bs-theme="dark"] #pageLoader::before { background: rgb(11 32 25 / 82%); }
.profile-panel[data-bs-theme="dark"] #pageLoader .panel-loader-spinner { border-color: rgba(255,255,255,0.1); border-left-color: var(--C3); }
#pageLoader .spinner-border { width: 3rem; height: 3rem; border-color: rgba(0,0,0,0.08); border-left-color: var(--C1); animation: spin 0.75s linear infinite; }
.profile-panel[data-bs-theme="dark"] #pageLoader .spinner-border { color: var(--C3) !important; border-color: rgba(255,255,255,0.1); border-left-color: var(--C3); }

#mainContent { transition: opacity 0.3s ease-in-out; }

/* Dark mode loader */
.profile-panel[data-bs-theme="dark"] #pageLoader { background-color: var(--C8); color: var(--C6); }
.profile-panel[data-bs-theme="dark"] .nav-link { color: #cbd5e1; }
.profile-panel[data-bs-theme="dark"] .nav-link.active { background-color: rgba(var(--bs-secondary-rgb), 0.12); color: var(--C3) !important; }


/* Alert styles for login page */
.mk-auth-card #mkAlert { border-radius: 8px; padding: 1rem; margin-bottom: 1rem; border: 1px solid; animation: slideDown 0.3s ease-out; }

.mk-auth-card #mkAlert.alert-warning { background-color: rgba(255, 193, 7, 0.1); border-color: rgba(255, 193, 7, 0.3); color: #856404; }

.mk-auth-card #mkAlert.alert-danger { background-color: rgba(220, 53, 69, 0.1); border-color: rgba(220, 53, 69, 0.3); color: #721c24; }

.mk-auth-card #mkAlert.alert-success { background-color: rgba(40, 167, 69, 0.1); border-color: rgba(40, 167, 69, 0.3); color: #155724; }

.mk-auth-card #mkAlert.alert-info { background-color: rgba(23, 162, 184, 0.1); border-color: rgba(23, 162, 184, 0.3); color: #0c5460; }

.mk-auth-card #mkAlert strong { display: block; margin-bottom: 0.5rem; font-size: 1rem; }

.mk-auth-card #mkAlert .small { display: block; margin-bottom: 0.75rem; line-height: 1.5; }

.mk-auth-card #mkAlert .btn { margin-top: 0.5rem; }

.profile-panel[data-bs-theme="dark"] .mk-auth-card #mkAlert.alert-warning { background-color: rgba(255, 193, 7, 0.15); border-color: rgba(255, 193, 7, 0.4); color: #ffc107; }

.profile-panel[data-bs-theme="dark"] .mk-auth-card #mkAlert.alert-danger { background-color: rgba(220, 53, 69, 0.15); border-color: rgba(220, 53, 69, 0.4); color: #f5c6cb; }

.profile-panel[data-bs-theme="dark"] .mk-auth-card #mkAlert.alert-success { background-color: rgba(40, 167, 69, 0.15); border-color: rgba(40, 167, 69, 0.4); color: #c3e6cb; }

.profile-panel[data-bs-theme="dark"] .mk-auth-card #mkAlert.alert-info { background-color: rgba(23, 162, 184, 0.15); border-color: rgba(23, 162, 184, 0.4); color: #bee5eb; }

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* OTP — autofill iOS روی اولین باکس */
@keyframes mkOtpAutofill {
    from { opacity: 1; }
    to { opacity: 1; }
}
.mk-otp-wrap .mk-otp-autofill-target:-webkit-autofill {
    animation-name: mkOtpAutofill;
    animation-duration: 0.01s;
}
.mk-otp-wrap .mk-otp-digit {
    width: 2.75rem;
    max-width: 2.75rem;
    padding-left: 0.25rem;
    padding-right: 0.25rem;
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: 0;
}
@media (max-width: 400px) {
    .mk-otp-wrap .mk-otp-digit {
        width: 2.35rem;
        max-width: 2.35rem;
        margin-left: 0.15rem !important;
        margin-right: 0.15rem !important;
        font-size: 1rem;
    }
}

/* Toggle button */
#themeToggle { position: absolute; top: 8px; left: 20px; z-index: 999; }
/* Adjusted z-index */
.profile-panel[data-bs-theme="dark"] #themeToggle { border-color: #334155; color: #cbd5e1; }
.profile-panel .navbar-toggler:focus { box-shadow: unset !important }
#preloader { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: var(--C2); z-index: 99999999; display: flex; justify-content: center; align-items: center; transition: opacity 0.5s ease, visibility 0.5s ease; }

/* بالاتر از .mobile-bottom-menu (1050) تا در landscape نوار عمودی راست، نوار پروفایل پنهان نشود */
.profile-panel .navbar-profile-mobile.sticky-top,
.profile-panel .navbar.sticky-top { z-index: 999; top: 0 !important; }
.mk-toggle { border: 1px solid rgba(0,0,0,0.12); outline: none; padding: 4px; border-radius: 8px; background: rgba(255,255,255,0.05); transition: all 0.2s ease; }
.profile-panel[data-bs-theme="light"] .mk-toggle { border-color: rgba(5, 42, 20, 0.15); }
.profile-panel[data-bs-theme="dark"] .mk-toggle { border-color: rgba(255, 255, 255, 0.12); }

.mk-hamburger { display: flex; flex-direction: column; justify-content: center; align-items: center; width: 24px; height: 24px; cursor: pointer; }
.mk-hamburger .bar { width: 20px; height: 2px; margin: 2.5px 0; transition: transform 0.35s ease, opacity 0.2s ease; border-radius: 2px; }

/* Colors for bars - matched with theme */
.profile-panel[data-bs-theme="light"] .mk-hamburger .bar { background-color: var(--C1); }
.profile-panel[data-bs-theme="dark"] .mk-hamburger .bar { background-color: var(--C6); }

/* Expanded (X) state driven by aria-expanded (Bootstrap offcanvas updates this) */
.mk-toggle[aria-expanded="true"] .mk-hamburger .bar:nth-child(1) { transform: rotate(-45deg) translate(-4.5px, 5.5px); }
.mk-toggle[aria-expanded="true"] .mk-hamburger .bar:nth-child(2) { opacity: 0; }
.mk-toggle[aria-expanded="true"] .mk-hamburger .bar:nth-child(3) { transform: rotate(45deg) translate(-4.5px, -5.5px); }


.offcanvas-lg .offcanvas-body { display: block }
.offcanvas-header .btn-close { position: absolute; left: 20px; top: 25px; }

/* سایدبار تا 992px: منوی موبایل مثل منوی اصلی سایت، فقط زیر نوبار حساب کاربری و هم‌عرض profile-panel */
@media (max-width: 992px) {
    .profile-panel #sidebarMenu.profile-sidebar-col { flex: 0 0 0 !important; max-width: 0 !important; width: 0 !important; padding: 0 !important; overflow: visible; margin: 0 !important; }
    .profile-panel .row > main { flex: 0 0 100% !important; max-width: 100% !important; width: 100% !important; }

    .profile-panel .navbar.navbar-profile-mobile { display: flex !important; z-index: 1050 !important; }
    .profile-panel .navbar-profile-mobile.sticky-top,
    .profile-panel .navbar.sticky-top.d-lg-none { top: calc(var(--mk-header-h, 0px) - 1px) !important; z-index: 1040 !important; }

    /* کشو موبایل: fixed زیر نوبار — از راست (RTL) مثل قبل */
    .profile-panel #sidebarCollapse.offcanvas-lg.offcanvas-start {
        position: fixed !important;
        top: calc(var(--mk-header-h, 0px) + var(--mk-nav-h, 50px) - (3px)) !important;
        left: auto !important;
        right: calc(var(--mk-panel-right, 0) + (var(--bs-gutter-x) * .53)) !important;
        height: calc(100dvh - var(--mk-header-h, 0px) - var(--mk-nav-h, 50px)) !important;
        max-height: calc(100dvh - var(--mk-header-h, 0px) - var(--mk-nav-h, 50px)) !important;
        bottom: auto !important;
        z-index: 1039;
        display: flex !important;
        flex-direction: column;
        margin: 0;
        padding: 0;
        overflow: hidden;
        background-color: var(--C8);
        border: 0;
        box-shadow: 10px 0 36px rgba(0, 0, 0, 0.35);
        visibility: hidden !important;
        pointer-events: none;
        opacity: 0;
        transform: translate3d(100%, 0, 0) !important;
        -webkit-transform: translate3d(100%, 0, 0) !important;
        transition: transform 0.42s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.38s cubic-bezier(0.32, 0.72, 0, 1), visibility 0s linear 0.42s !important;
        will-change: transform, opacity;
        backface-visibility: hidden;
    }
    .profile-panel #sidebarCollapse.offcanvas-lg.offcanvas-start.mk-menu-opening {
        visibility: visible !important;
        pointer-events: none;
        opacity: 0 !important;
        transform: translate3d(100%, 0, 0) !important;
        -webkit-transform: translate3d(100%, 0, 0) !important;
        transition: none !important;
    }
    .profile-panel #sidebarCollapse.offcanvas-lg.offcanvas-start.mk-menu-open {
        visibility: visible !important;
        pointer-events: auto;
        opacity: 1 !important;
        transform: translate3d(0, 0, 0) !important;
        -webkit-transform: translate3d(0, 0, 0) !important;
        transition: transform 0.42s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.38s cubic-bezier(0.32, 0.72, 0, 1), visibility 0s linear 0s !important;
    }
    .profile-panel #sidebarCollapse.offcanvas-lg.offcanvas-start.mk-menu-open.mk-menu-closing {
        visibility: visible !important;
        pointer-events: none;
        opacity: 0 !important;
        transform: translate3d(100%, 0, 0) !important;
        -webkit-transform: translate3d(100%, 0, 0) !important;
        transition: transform 0.42s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.38s cubic-bezier(0.32, 0.72, 0, 1), visibility 0s linear 0.42s !important;
    }
    .profile-panel #sidebarCollapse.offcanvas-lg .offcanvas-header { display: none !important; }
    .profile-panel #sidebarCollapse.offcanvas-lg .offcanvas-body {
        display: block !important;
        flex-grow: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        background-color: var(--C8) !important;
        padding: 12px 0 max(24px, env(safe-area-inset-bottom)) !important;
        margin-left: calc(var(--bs-gutter-x) * .5);
        margin-right: calc(var(--bs-gutter-x) * .5);
    }

    .profile-panel[data-bs-theme="dark"] #sidebarCollapse.offcanvas { background-color: var(--C8); }

    #themeToggle { top: 15px; left: 20px; z-index: 999; }

    /* بک‌دراپ مثل منوی اصلی — فقط ناحیه زیر نوبار پروفایل */
    .profile-menu-mobile-backdrop {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1035;
        background-color: #000000a3;
        opacity: 0;
        backdrop-filter: blur(0);
        -webkit-backdrop-filter: blur(0);
        pointer-events: none;
        transition: opacity 0.42s ease-in-out, backdrop-filter 0.42s ease-in-out, -webkit-backdrop-filter 0.42s ease-in-out;
    }
    .profile-menu-mobile-backdrop.is-open { display: block; }
    .profile-menu-mobile-backdrop.is-visible { opacity: 1; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); pointer-events: auto; }

    /* منوی کشویی پروفایل — موبایل: آیتم‌های مرتب‌تر و مدرن‌تر */
    .profile-panel #sidebarCollapse .offcanvas-body .sidebar-sticky ul.nav.flex-column { gap: 0.2rem; padding-left: 0.65rem !important; padding-right: 0.65rem !important; }
    .profile-panel #sidebarCollapse .offcanvas-body .nav.flex-column > .nav-item > .nav-link { border-radius: 12px; padding: 0.62rem 0.85rem !important; min-height: 48px; align-items: center; font-size: 0.92rem; letter-spacing: -0.01em; transition: background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease; }
    .profile-panel #sidebarCollapse .offcanvas-body .nav.flex-column > .nav-item > .nav-link > .ti { font-size: 1.2rem; opacity: 0.92; margin: 0 !important; margin-inline-end: 0.45rem !important; }
    .profile-panel #sidebarCollapse .offcanvas-body .nav.flex-column > .nav-item:not(.active) > .nav-link:hover { box-shadow: 0 1px 0 rgba(5, 42, 20, 0.04); }
    .profile-panel[data-bs-theme="dark"] #sidebarCollapse .offcanvas-body .nav.flex-column > .nav-item:not(.active) > .nav-link:hover { box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); }
    .profile-panel #sidebarCollapse .offcanvas-body .nav-item.active .nav-link { border-right: none !important; padding-right: 0.85rem !important; border-inline-start: 3px solid var(--C3) !important; padding-inline-start: calc(0.85rem - 3px) !important; box-shadow: inset 0 0 0 1px rgba(var(--bs-secondary-rgb), 0.12); }
    .profile-panel[data-bs-theme="dark"] #sidebarCollapse .offcanvas-body .nav-item.active .nav-link { border-right: none !important; padding-right: 0.85rem !important; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06); }
}

@media (max-width: 576px) {
    [dir="rtl"] .profile-panel #sidebarCollapse.offcanvas-lg {
        width: calc(var(--mk-panel-width, 100%) * 0.85) !important;
        max-width: calc(var(--mk-panel-width, 100%) * 0.85) !important;
    }
}


@media (prefers-reduced-motion: reduce) {
    .profile-panel #sidebarCollapse.offcanvas-lg,
    .profile-menu-mobile-backdrop { transition: none !important; }
}

.loader-content { text-align: center; font-size: 1.2em; color: var(--C1); display: flex; flex-direction: column; align-items: center; }

.spinner { border: 4px solid var(--C2); border-left-color: var(--C1); border-radius: 50%; width: 30px; height: 30px; animation: spin 1s linear infinite; margin-top: 10px; }

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#preloader.hide { opacity: 0; visibility: hidden; }

.sidebar-sticky { position: sticky; top: 0; /* Stick to the top */ height: calc(100vh - 56px); /* Adjust 56px if your mobile navbar height is different */ padding-top: .5rem; overflow-x: hidden; overflow-y: auto; /* Scrollable sidebar */ }

@media (max-width: 992px) {
    .sidebar-sticky { /* تا 992px: sticky توسط offcanvas/نوار موبایل مدیریت می‌شود */ position: static; height: auto; }
    .profile-panel main { /* فاصله از بالا تا زیر نوار موبایل */ padding-top: 56px; }
}

@media (min-width: 993px) {
    /* از 992px به بالا: سایدبار ثابت کنار صفحه */
    .sidebar { position: sticky; top: var(--mk-header-h); align-self: flex-start; height: calc(100vh - var(--mk-header-h)); overflow: auto; }

    /* بدنهٔ offcanvas روی دسکتاپ کل ارتفاع ستون را بگیرد تا اسکرول داخلی روی منو کار کند */
    #sidebarMenu .offcanvas-body { height: 100%; max-height: 100%; overflow: hidden; /* اسکرول داخل .sidebar-sticky مدیریت می‌شود */ }

    .sidebar-sticky { position: static; height: 100%; max-height: 100%; overflow-y: auto; overflow-x: hidden; }
}

.sidebar .nav-link { font-weight: 500; color: #333; padding: .5rem 1rem; /* Adjust padding */ display: flex; /* Align icon and text */ align-items: center; /* Vertically center icon and text */ cursor: pointer; }

/* Adjust icon margin for RTL */
.sidebar .nav-link .bi { margin-left: .5rem; /* Add space between icon and text */ margin-right: 0; /* Reset LTR margin */ font-size: 1.1rem; /* Optional: Adjust icon size */ width: 20px; /* Ensure consistent icon spacing */ text-align: center; }

.sidebar .nav-link.active { color: var(--bs-primary); background-color: rgba(var(--bs-primary-rgb), 0.1); border-right: 3px solid var(--bs-primary); padding-right: calc(1rem - 3px); }

/* Active menu item - فقط سایدبار پروفایل (منوی اصلی هدر تحت تأثیر نباشد) */
.profile-panel .nav-item.active .nav-link { color: var(--C3) !important; background-color: rgba(var(--bs-secondary-rgb), 0.15) !important; border-right: 3px solid var(--C3) !important; padding-right: calc(1rem - 3px) !important; font-weight: 600; }

/* Dark theme active menu item */
.profile-panel[data-bs-theme="dark"] .nav-item.active .nav-link { color: var(--C3) !important; background-color: var(--C2) !important; border-right: 3px solid var(--C3) !important; }

.profile-panel .nav-item:not(.active) .nav-link:hover { transition: all 0.2s ease; }

/* Grouped profile menu */
.profile-menu-root { gap: 0.25rem; }
.profile-menu-group { margin-bottom: 0.15rem; }
.profile-group-toggle { width: 100%; border: 0; background: transparent; color: inherit; text-align: start; padding: 0.72rem 1rem 0.72rem 4rem; border-radius: 12px; display: flex; align-items: center; justify-content: flex-start; transition: background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease; position: relative; }
.profile-group-toggle:hover,
.profile-group-toggle:focus-visible,
.profile-menu-group.is-open > .profile-group-toggle { background-color: rgba(var(--bs-secondary-rgb), 0.08); color: var(--C3); }
.profile-menu-group.is-open > .profile-group-toggle { box-shadow: inset 0 0 0 1px rgba(var(--bs-secondary-rgb), 0.15); }
.profile-group-title { display: inline-flex; align-items: center; gap: 0.5rem; min-width: 0; flex: 1 1 auto; text-align: right; }
.profile-group-badge,
.profile-group-chevron { position: absolute; top: 50%; transform: translateY(-50%); flex: 0 0 auto; }
.profile-group-chevron { left: 0.95rem; opacity: 0.75; transition: transform 0.18s ease, opacity 0.18s ease; transform-origin: center; }
.profile-group-badge { left: 2.55rem; width: 1.4rem; height: 1.4rem; display: inline-flex; align-items: center; justify-content: center; padding: 0.6rem 0 0.45rem; direction: ltr; }
.profile-group-toggle[aria-expanded="true"] .profile-group-chevron { transform: translateY(-50%) rotate(180deg); }
.profile-group-collapse { padding: 0.28rem 0.25rem 0.18rem; margin: 0.15rem 0 0.2rem; border-radius: 14px; background: rgba(var(--bs-secondary-rgb), 0.04); box-shadow: inset 0 0 0 1px rgba(var(--bs-secondary-rgb), 0.08); }
.profile-submenu { background: transparent !important; padding: 0.1rem 0 0.3rem !important; margin: 0 !important; }
.profile-submenu .nav-item { margin: 0; }
.profile-submenu .nav-link { padding-inline-start: 1.8rem; border-radius: 10px; }
.profile-panel[data-bs-theme="dark"] .profile-group-toggle:hover,
.profile-panel[data-bs-theme="dark"] .profile-menu-group.is-open > .profile-group-toggle { background-color: rgba(255, 255, 255, 0.06); color: var(--C6); }
.profile-panel[data-bs-theme="dark"] .profile-menu-group.is-open > .profile-group-toggle { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06); }
.profile-panel[data-bs-theme="dark"] .profile-group-chevron { opacity: 0.9; }
.profile-panel[data-bs-theme="dark"] .profile-group-collapse { background: rgba(255, 255, 255, 0.035); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06); }
.profile-group-collapse .badge { width: 1.2rem; height: 1.2rem; display: inline-flex; align-items: center; justify-content: center; padding: 0.6rem 0 0.45rem; direction: ltr; }

/* بج مجموع منوی پروفایل (هم‌سبک total هدر — قرمز؛ شامل سفارش در انتظار پرداخت) */
.profile-sidebar-total-badge {
    position: absolute;
    top: -6px;
    inset-inline-start: -8px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 50%;
    background: var(--bs-danger);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 14px;
    text-align: center;
    border: 2px solid var(--C8);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    pointer-events: none;
}
.profile-panel[data-bs-theme="dark"] .profile-sidebar-total-badge { border-color: var(--C2); }
.mk-userbox .profile-sidebar-total-badge { top: 8px; inset-inline-end: 10px; }
.navbar-profile-mobile .mk-toggle .profile-sidebar-total-badge { top: -3px; }

@media (max-width: 992px) {
    .profile-menu-root { gap: 0.2rem; }
    .profile-group-toggle { padding: 0.68rem 0.85rem 0.68rem 3.65rem; }
    .profile-group-collapse { padding-top: 0.1rem; }
    .profile-submenu .nav-link { padding-inline-start: 1.45rem; }
    .profile-group-chevron { left: 0.8rem; }
    .profile-group-badge { left: 3.0rem; }
}

@media (min-width: 993px) {
    .profile-submenu .nav-link { padding-inline-start: 1.65rem; }
    /* بج مجموع فقط موبایل/تبلت — در سایدبار دسکتاپ بج‌های هر آیتم کافی است */
    .mk-userbox .profile-sidebar-total-badge { display: none !important; }
}

.sidebar .nav-link:hover:not(.active) { background-color: rgba(var(--bs-primary-rgb), 0.06); }


.sidebar-heading { font-size: .85rem; text-transform: uppercase; padding: .5rem 1rem; margin-top: 1rem; color: #6c757d; /* Muted color */ }

/* Style the mobile offcanvas width if needed */
.offcanvas-end { width: 280px; /* Adjust as needed */ }

#menuInner { padding: 0 }

.profile-panel .badge { color: unset }

.profile-panel h1, .profile-panel h2, .profile-panel h3, .profile-panel h4, .profile-panel h5, .profile-panel h6 { margin: 0 }

.profile-panel .card-header { align-items: center }

/* User box in sidebar */
.mk-userbox { background: var(--C8); border: 1px solid var(--C4); border-radius: 10px; }
.mk-userbox .mk-avatar { width: 36px; height: 36px; background: rgba(var(--bs-secondary-rgb), 0.15); color: var(--C3); }
.mk-userbox .mk-phone.ltr { direction: ltr; text-align: right; unicode-bidi: plaintext; }

.uploadimgbox { margin: 2px 5px 20px; display: grid; min-height: 50px; min-width: 50px }
.uploadimgbox img { color: transparent; font-size: 1px }
.uploadimgdiv { min-height: 50px; text-align: center; background: #f1f1f1 url(/assets/images/main/loader-main.gif) center center no-repeat }
.uploadimg { width: 100% !important; width: auto; }
.uploadimgalt { padding: 1%; background-color: #f9f9f9; border-bottom: 1px solid silver; float: right; direction: rtl; text-align: center; font-size: 75%; font-weight: bold }
.uploadimgbox320 { display: inline-grid; float: right; margin: 1%; width: 100% }

.hide { display: none; visibility: hidden }
.vhide { visibility: hidden }


.profile-panel .nav-item ul { background-color: var(--C2); padding: 10px; }

/* فقط پنل (مودال جستجو/ورود و ... تحت تأثیر نباشند) */
.profile-panel .input-group > :not(:first-child):not(.dropdown-menu):not(.valid-tooltip):not(.valid-feedback):not(.invalid-tooltip):not(.invalid-feedback) { margin-right: calc(var(--bs-border-width) * -1); border-top-right-radius: 0; border-bottom-right-radius: 0; }


/* ==========================================
   Bootstrap Variables & Component Overrides
   (btn-primary / btn-secondary در style.css — تکرار حذف شد)
   ========================================== */
.profile-panel .btn-outline-primary { --bs-btn-color: var(--C1) !important; --bs-btn-border-color: var(--C1) !important; --bs-btn-hover-color: var(--C2) !important; --bs-btn-hover-bg: var(--C1) !important; --bs-btn-hover-border-color: var(--C1) !important; --bs-btn-focus-shadow-rgb: var(--bs-primary-rgb) !important; --bs-btn-active-color: var(--C2) !important; --bs-btn-active-bg: var(--C1) !important; --bs-btn-active-border-color: var(--C1) !important; --bs-btn-disabled-color: var(--C1) !important; --bs-btn-disabled-bg: transparent !important; --bs-btn-disabled-border-color: var(--C1) !important; color: var(--C1) !important; border-color: var(--C1) !important; background-color: transparent !important; }
.profile-panel .btn-outline-primary:hover { color: var(--C2) !important; background-color: var(--C1) !important; border-color: var(--C1) !important; }
.profile-panel .btn-outline-primary:active, .profile-panel .btn-outline-primary.active { color: var(--C2) !important; background-color: var(--C1) !important; border-color: var(--C1) !important; }
.profile-panel .btn-outline-primary:disabled, .profile-panel .btn-outline-primary.disabled { color: var(--C1) !important; background-color: transparent !important; border-color: var(--C1) !important; }
.profile-panel .btn-outline-secondary { --bs-btn-color: var(--C3) !important; --bs-btn-border-color: var(--C3) !important; --bs-btn-hover-color: var(--C2) !important; --bs-btn-hover-bg: var(--C3) !important; --bs-btn-hover-border-color: var(--C3) !important; --bs-btn-focus-shadow-rgb: var(--bs-secondary-rgb) !important; --bs-btn-active-color: var(--C2) !important; --bs-btn-active-bg: var(--C3) !important; --bs-btn-active-border-color: var(--C3) !important; --bs-btn-disabled-color: var(--C3) !important; --bs-btn-disabled-bg: transparent !important; --bs-btn-disabled-border-color: var(--C3) !important; color: var(--C3) !important; border-color: var(--C3) !important; background-color: transparent !important; }
.profile-panel .btn-outline-secondary:hover { color: var(--C2) !important; background-color: var(--C3) !important; border-color: var(--C3) !important; }
.profile-panel .btn-outline-secondary:active, .profile-panel .btn-outline-secondary.active { color: var(--C2) !important; background-color: var(--C3) !important; border-color: var(--C3) !important; }
.profile-panel .btn-outline-secondary:disabled, .profile-panel .btn-outline-secondary.disabled { color: var(--C3) !important; background-color: transparent !important; border-color: var(--C3) !important; }

/* Alerts - فقط پنل (مودال/هدر/فوتر تحت تأثیر نباشند) */
.profile-panel .alert-primary { --bs-alert-color: var(--C1); --bs-alert-bg: #cfe2ff; --bs-alert-border-color: #b6d4fe; }
.profile-panel .alert-secondary { --bs-alert-color: var(--C3); --bs-alert-bg: #e2e3e5; --bs-alert-border-color: #d3d6d8; }

/* Text & Backgrounds */
.profile-panel .text-secondary { color: var(--C3) !important; }
.profile-panel .bg-secondary { background-color: var(--C3) !important; }
.profile-panel .border-primary { border-color: var(--C1) !important; }
.profile-panel .border-secondary { border-color: var(--C3) !important; }

/* Forms */
.profile-panel .form-check-input:checked { background-color: var(--C1) !important; border-color: var(--C1) !important; }
.profile-panel .form-control:focus { border-color: var(--C3) !important; box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.25) !important; }

/* List Group — پس‌زمینهٔ پیش‌فرض شفاف تا با کارت تم یکی شود */
.profile-panel .list-group-item { background-color: transparent !important; }
.profile-panel .list-group-item.active { background-color: var(--C1) !important; border-color: var(--C1) !important; }
.profile-panel .list-group-item-action:hover, .profile-panel .list-group-item-action:focus { background-color: var(--C4) !important; color: var(--C6); }

.profile-panel .bg-body { background-color: transparent !important; }

/* هدر مودال‌های هم‌سبک مستر (bg-primary + عنوان تمام‌عرض) */
.profile-panel .modal-header.bg-primary { border-bottom-color: transparent; }
.profile-panel .modal-header.bg-primary .modal-title { color: inherit; }
/* Badges */
.profile-panel .badge.bg-primary { background-color: var(--C1) !important; color: var(--C2) !important; }
.profile-panel .badge.bg-secondary { background-color: var(--C3) !important; color: var(--C2) !important; }
/* Badges در دارک مد حساب کاربری — تضمین کنتراست و خوانایی */
.profile-panel[data-bs-theme="dark"] .badge { color: #fff; }
.profile-panel[data-bs-theme="dark"] .badge:not([class*="bg-"]) { background-color: var(--C4); color: var(--C6); }
.profile-panel[data-bs-theme="dark"] .badge.bg-primary { background-color: var(--C3) !important; color: #fff !important; }
.profile-panel[data-bs-theme="dark"] .badge.bg-secondary { background-color: var(--C4) !important; color: var(--C6) !important; }
.profile-panel[data-bs-theme="dark"] .badge.bg-success { background-color: #198754 !important; color: #fff !important; }
.profile-panel[data-bs-theme="dark"] .badge.bg-danger { background-color: #dc3545 !important; color: #fff !important; }
.profile-panel[data-bs-theme="dark"] .badge.bg-warning { background-color: #ffc107 !important; color: #000 !important; }
.profile-panel[data-bs-theme="dark"] .badge.bg-info { background-color: #0dcaf0 !important; color: #000 !important; }
.profile-panel[data-bs-theme="dark"] .badge.bg-light { background-color: #e9ecef !important; color: #212529 !important; }
.profile-panel[data-bs-theme="dark"] .badge.bg-dark { background-color: #495057 !important; color: #fff !important; }

/* Dropdowns - منوی مگا/هدر تحت تأثیر نباشد */
.profile-panel .dropdown-item:hover, .profile-panel .dropdown-item:focus { background-color: var(--C1); color: var(--C2) !important; }
.profile-panel .dropdown-item.active, .profile-panel .dropdown-item:active { background-color: var(--C1); color: var(--C2) !important; }

/* Navs & Tabs */
.profile-panel .nav-pills .nav-link.active, .profile-panel .nav-pills .show > .nav-link { background-color: var(--C1); color: var(--C2); }
/* فقط داخل پنل تا منوی اصلی هدر (که nav-link دارد) رنگش عوض نشود */
.profile-panel .nav-link:hover, .profile-panel .nav-link:focus { color: var(--C3); }
.profile-panel .nav-tabs .nav-link.active, .profile-panel .nav-tabs .nav-item.show .nav-link { border-color: var(--C5) var(--C5) var(--C0); color: var(--C1); }

/* تب‌های روش ورود (صفحه لاگین) — دسکتاپ و موبایل حرفه‌ای */
.mk-auth-card .login-method-tabs { display: flex; gap: 8px; border: none; padding: 4px; background: rgba(0,0,0,.06); border-radius: 12px; }
.profile-panel[data-bs-theme="dark"] .mk-auth-card .login-method-tabs { background: rgba(255,255,255,.06); }
.mk-auth-card .login-method-tabs .nav-item { margin: 0; }
.mk-auth-card .login-method-tabs .nav-link { border: none; border-radius: 10px; font-weight: 600; font-size: 0.8rem; color: var(--mk-muted, #6c757d); background: transparent; transition: background .2s, color .2s; min-height: 48px; display: inline-flex; align-items: center; justify-content: center; }
.mk-auth-card .login-method-tabs .nav-link:hover { color: var(--C2); background: var(--C1); }
.mk-auth-card .login-method-tabs .nav-link.active { background: var(--C1); color: var(--C2) !important; box-shadow: 0 2px 8px rgba(11, 47, 91, .35); }
.profile-panel[data-bs-theme="dark"] .mk-auth-card .login-method-tabs .nav-link.active { color: var(--C6) !important; box-shadow: 0 2px 12px rgba(0,0,0,.3); }

.profile-panel[data-bs-theme="dark"] .mk-auth-card .login-method-tabs .nav-link:hover { color: var(--C6); background: var(--C1); }

@media (max-width: 767px) {
    .mk-auth-card .login-method-tabs .nav-link { font-size: 0.55rem; }
    .mk-auth-card .login-method-tabs .nav-link i.ti { display: none; }
    .mk-auth-card .mk-header { padding: 0 !important; }
}

/* فوتر کارت ورود/ثبت‌نام — چیدمان تمیز و خوانا */
.mk-footer .mk-bottom-links { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px 20px; }
.mk-footer .mk-footer-row { display: flex; align-items: center; justify-content: center; }
.mk-footer .mk-footer-register { width: 100%; }
.mk-footer .mk-footer-rules { width: 100%; padding-top: 8px; border-top: 1px solid rgba(255,255,255,.08); }
.profile-panel[data-bs-theme="dark"] .mk-footer .mk-footer-rules { border-top-color: rgba(255,255,255,.06); }
.mk-footer .mk-footer-link { padding: 6px 10px; border-radius: 8px; transition: background .2s, color .2s; }
.mk-footer .mk-footer-link:hover { background: rgba(0,0,0,.06); }
.profile-panel[data-bs-theme="dark"] .mk-footer .mk-footer-link:hover { background: rgba(255,255,255,.08); }

@media (min-width: 576px) {
    .mk-footer .mk-bottom-links { flex-direction: row; justify-content: space-between; }
    .mk-footer .mk-footer-register { width: auto; }
    .mk-footer .mk-footer-rules { width: auto; padding-top: 0; border-top: none; padding-right: 12px; border-right: 1px solid rgba(255,255,255,.12); }
    .profile-panel[data-bs-theme="dark"] .mk-footer .mk-footer-rules { border-right-color: rgba(255,255,255,.08); }
}

/* Progress Bar */
.profile-panel .progress-bar { background-color: var(--C1); }

.mk-auth-wrap { min-height: 500px; display: flex; align-items: center; justify-content: center; padding: 0 32px }
.mk-auth-card { width: 100%; max-width: 440px; background: var(--mk-card); border-radius: 16px; border: 1px solid rgba(255,255,255,.06); box-shadow: 0 10px 30px rgba(0,0,0,.25) }
.mk-auth-card .mk-header { padding: 24px 24px 8px; text-align: center }
.mk-auth-card .mk-header img { max-width: 120px; opacity: .95 }
.mk-auth-card .mk-header h1 { font-size: 18px; margin: 12px 0 0; color: var(--mk-text) }
.mk-auth-card .mk-body { padding: 24px }

.mk-footer { padding: 16px 24px; border-top: 1px solid rgba(255,255,255,.06); display: flex; justify-content: space-between; align-items: center; color: var(--mk-muted) }
.mk-bottom-links { gap: 12px }

/* Login/Register (mk-auth-wrap): لینک‌ها و btn-link با رنگ ثانویه */
.mk-auth-wrap a:not(.btn),
.mk-auth-wrap .btn-link { color: var(--C3); }
.mk-auth-wrap a:not(.btn):hover,
.mk-auth-wrap .btn-link:hover,
.mk-auth-wrap a:not(.btn):focus,
.mk-auth-wrap .btn-link:focus { color: var(--C3); text-decoration: underline; }

/* loader */
.mk-spinner { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.25); border-top-color: #fff; border-radius: 50%; animation: mkspin 1s linear infinite }

@keyframes mkspin {
    to { transform: rotate(360deg) }
}

.small, small { color: var(--mk-muted) }

.profile-panel[data-bs-theme="dark"] .btn-outline-primary { color: var(--C3) !important; border-color: var(--C3) !important; background-color: transparent !important; }

.profile-panel[data-bs-theme="dark"] .btn-outline-primary:hover { color: var(--C6) !important; background-color: var(--C3) !important; border-color: var(--C3) !important; }

.profile-panel[data-bs-theme="dark"] .btn-outline-secondary { color: var(--C6) !important; border-color: var(--C3) !important; background-color: transparent !important; }

.profile-panel[data-bs-theme="dark"] .btn-outline-secondary:hover { color: var(--C6) !important; background-color: var(--C3) !important; border-color: var(--C3) !important; }

/* دکمه ارسال کد تایید (ورود با موبایل) — رنگ نارنجی فقط در دارک‌مود */
.profile-panel[data-bs-theme="dark"] .btn-send-code { background-color: var(--C3) !important; border-color: var(--C3) !important; color: var(--C1) !important; }
.profile-panel[data-bs-theme="dark"] .btn-send-code:hover:not(:disabled),
.profile-panel[data-bs-theme="dark"] .btn-send-code:focus { background-color: var(--C5) !important; border-color: var(--C5) !important; color: var(--C1) !important; box-shadow: 0 0 0 0.2rem rgb(50 235 156 / 35%); }

/* دکمه تایید و ورود — رنگ نارنجی فقط در دارک‌مود */
.profile-panel[data-bs-theme="dark"] .btn-login-verify { background-color: var(--C3) !important; border-color: var(--C3) !important; color: var(--C1) !important; }
.profile-panel[data-bs-theme="dark"] .btn-login-verify:hover:not(:disabled),
.profile-panel[data-bs-theme="dark"] .btn-login-verify:focus { background-color: var(--C5) !important; border-color: var(--C5) !important; color: var(--C1) !important; box-shadow: 0 0 0 0.2rem rgb(50 235 156 / 35%); }

/* placeholder کم‌رنگ در حساب کاربری */
.profile-panel .form-control::placeholder,
.profile-panel input::placeholder,
.profile-panel textarea::placeholder { color: rgba(0,0,0,0.22) !important; opacity: 1; }
.profile-panel .form-control::-moz-placeholder,
.profile-panel input::-moz-placeholder,
.profile-panel textarea::-moz-placeholder { color: rgba(0,0,0,0.22) !important; opacity: 1; }
.profile-panel[data-bs-theme="dark"] .form-control::placeholder,
.profile-panel[data-bs-theme="dark"] input::placeholder,
.profile-panel[data-bs-theme="dark"] textarea::placeholder { color: rgba(255,255,255,0.22) !important; opacity: 1; }
.profile-panel[data-bs-theme="dark"] .form-control::-moz-placeholder,
.profile-panel[data-bs-theme="dark"] input::-moz-placeholder,
.profile-panel[data-bs-theme="dark"] textarea::-moz-placeholder { color: rgba(255,255,255,0.22) !important; opacity: 1; }

/* form-floating: پلیس‌هولدر شفاف */
.profile-panel .form-floating .form-control::placeholder,
.profile-panel .form-floating .form-control-plaintext::placeholder,
.profile-panel .form-floating input::placeholder,
.profile-panel .form-floating textarea::placeholder { color: transparent !important; opacity: 1; }
.profile-panel .form-floating .form-control::-moz-placeholder,
.profile-panel .form-floating .form-control-plaintext::-moz-placeholder,
.profile-panel .form-floating input::-moz-placeholder,
.profile-panel .form-floating textarea::-moz-placeholder { color: transparent !important; opacity: 1; }
.profile-panel .form-floating .form-control::-ms-input-placeholder,
.profile-panel .form-floating input::-ms-input-placeholder,
.profile-panel .form-floating textarea::-ms-input-placeholder { color: transparent !important; }
.profile-panel .form-floating .form-control::-webkit-input-placeholder,
.profile-panel .form-floating input::-webkit-input-placeholder,
.profile-panel .form-floating textarea::-webkit-input-placeholder { color: transparent !important; }

/* لیست کارتی — حساب‌های بانکی و آدرس‌ها */
.profile-panel .profile-list-page { padding: 0; }
.profile-panel .profile-list-loader,
.profile-panel .profile-list-empty { min-height: 120px; }
.profile-panel .profile-list-card { border-radius: 12px; transition: box-shadow 0.2s ease, transform 0.2s ease; }
.profile-panel .profile-list-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.1) !important; }
.profile-panel[data-bs-theme="dark"] .profile-list-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.35) !important; }
.profile-panel .profile-list-dl { display: grid; gap: 0.5rem 1rem; }
.profile-panel .profile-list-dl > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.35rem 0.5rem; }
.profile-panel .profile-list-dl dt { font-size: 0.75rem; color: var(--mk-muted, #6c757d); font-weight: 600; margin: 0; flex-shrink: 0; }
.profile-panel .profile-list-dl dd { margin: 0; font-size: 0.9rem; word-break: break-word; }
.profile-panel .profile-list-card .card-footer { padding: 0.75rem 1rem; }
.profile-panel .profile-list-card-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }

/* اسکرول‌بار نازک — سایدبار و بدنهٔ پروفایل (هماهنگ با style.css) */
.profile-panel,
.profile-panel main,
.profile-panel .sidebar,
.profile-panel .sidebar-sticky,
.profile-panel #sidebarCollapse .offcanvas-body {
    scrollbar-width: thin;
    scrollbar-color: var(--C5) var(--C4);
}

.profile-panel::-webkit-scrollbar,
.profile-panel main::-webkit-scrollbar,
.profile-panel .sidebar::-webkit-scrollbar,
.profile-panel .sidebar-sticky::-webkit-scrollbar,
.profile-panel #sidebarCollapse .offcanvas-body::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

.profile-panel::-webkit-scrollbar-thumb,
.profile-panel main::-webkit-scrollbar-thumb,
.profile-panel .sidebar::-webkit-scrollbar-thumb,
.profile-panel .sidebar-sticky::-webkit-scrollbar-thumb,
.profile-panel #sidebarCollapse .offcanvas-body::-webkit-scrollbar-thumb {
    background: var(--C5);
    border-radius: 4px;
}

.profile-panel::-webkit-scrollbar-track,
.profile-panel main::-webkit-scrollbar-track,
.profile-panel .sidebar::-webkit-scrollbar-track,
.profile-panel .sidebar-sticky::-webkit-scrollbar-track,
.profile-panel #sidebarCollapse .offcanvas-body::-webkit-scrollbar-track {
    background: var(--C4);
}

.profile-panel[data-bs-theme="dark"] .sidebar::-webkit-scrollbar-thumb,
.profile-panel[data-bs-theme="dark"] .sidebar-sticky::-webkit-scrollbar-thumb,
.profile-panel[data-bs-theme="dark"] #sidebarCollapse .offcanvas-body::-webkit-scrollbar-thumb {
    background: color-mix(in srgb, var(--C5) 88%, var(--C6) 12%);
}

.profile-panel[data-bs-theme="dark"] .sidebar::-webkit-scrollbar-track,
.profile-panel[data-bs-theme="dark"] .sidebar-sticky::-webkit-scrollbar-track,
.profile-panel[data-bs-theme="dark"] #sidebarCollapse .offcanvas-body::-webkit-scrollbar-track {
    background: color-mix(in srgb, var(--C4) 55%, var(--C8) 45%);
}
