/* Fix table appearance - standardized accounting table */
table.g td {
    height: var(--ctrl-h-sm, 30px) !important;
    padding: 2px 6px !important;
    font-size: 12px !important;
    line-height: var(--ctrl-line-height, 1.4) !important;
    vertical-align: middle !important;
}

table.g thead tr:first-child th {
    height: var(--ctrl-h-sm, 30px) !important;
    padding: 2px 6px !important;
    font-size: 11.5px !important;
    line-height: var(--ctrl-line-height, 1.4) !important;
    vertical-align: middle !important;
}

table.g thead tr.frow th {
    height: var(--ctrl-h-sm, 30px) !important;
    padding: 2px 4px !important;
    vertical-align: middle !important;
}

table.g thead tr.frow input,
table.g thead tr.frow select {
    height: calc(var(--ctrl-h-sm, 30px) - 4px) !important;
    min-height: 0 !important;
    padding: 0 6px !important;
    font-size: 11px !important;
    border-radius: var(--ctrl-radius, 6px) !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    line-height: var(--ctrl-line-height, 1.4) !important;
    vertical-align: middle !important;
}

html.compact table.g td {
    height: 26px !important;
}

/* Match main site column widths */
table.g td.rn { width: 35px !important; }
table.g td.ck, table.g th.ck { width: 28px !important; }
table.g td.ops { width: 65px !important; }

/* ─── حالت روشن جدول‌ها (Light Mode Tables) ─── */
html[data-theme="light"] table.g thead tr.frow th,
html:not([data-theme="dark"]) table.g thead tr.frow th {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
}
html[data-theme="light"] table.g thead tr.frow input,
html:not([data-theme="dark"]) table.g thead tr.frow input {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #1e293b !important;
}
html[data-theme="light"] table.g tbody tr:nth-child(odd) td,
html:not([data-theme="dark"]) table.g tbody tr:nth-child(odd) td {
    background: #f8f7fc !important;
    color: #1e293b !important;
}
html[data-theme="light"] table.g tbody tr:nth-child(even) td,
html:not([data-theme="dark"]) table.g tbody tr:nth-child(even) td {
    background: #ffffff !important;
    color: #1e293b !important;
}
html[data-theme="light"] table.g tbody tr:hover td,
html:not([data-theme="dark"]) table.g tbody tr:hover td {
    background: #eef0ff !important;
}

/* ─── حالت شب و تیره جدول‌ها (Dark Mode / Shab Tables) ─── */
html[data-theme="dark"] table.g,
html[data-skin="shab"] table.g,
[data-theme="dark"] table.g {
    border-color: var(--line, #24324d) !important;
}

html[data-theme="dark"] table.g thead tr.frow th,
html[data-skin="shab"] table.g thead tr.frow th,
[data-theme="dark"] table.g thead tr.frow th {
    background: var(--panel, #131d31) !important;
    border-color: var(--line, #24324d) !important;
    color: var(--text, #e5eaf3) !important;
}

html[data-theme="dark"] table.g thead tr.frow input,
html[data-skin="shab"] table.g thead tr.frow input,
[data-theme="dark"] table.g thead tr.frow input {
    background: var(--panel2, #172238) !important;
    color: var(--text, #e5eaf3) !important;
    border: 1px solid var(--line2, #2c3b5a) !important;
}

html[data-theme="dark"] table.g thead tr.frow input:focus,
html[data-skin="shab"] table.g thead tr.frow input:focus,
[data-theme="dark"] table.g thead tr.frow input:focus {
    border-color: var(--primary, #3b82f6) !important;
    background: var(--panel3, #1b2740) !important;
}

html[data-theme="dark"] table.g td,
html[data-skin="shab"] table.g td,
[data-theme="dark"] table.g td {
    border-bottom: 1px solid var(--line, #24324d) !important;
    border-left: 1px solid var(--line, #24324d) !important;
    color: var(--text, #e5eaf3) !important;
}

html[data-theme="dark"] table.g tbody tr:nth-child(odd) td,
html[data-skin="shab"] table.g tbody tr:nth-child(odd) td,
[data-theme="dark"] table.g tbody tr:nth-child(odd) td {
    background: var(--panel, #131d31) !important;
    color: var(--text, #e5eaf3) !important;
}

html[data-theme="dark"] table.g tbody tr:nth-child(even) td,
html[data-skin="shab"] table.g tbody tr:nth-child(even) td,
[data-theme="dark"] table.g tbody tr:nth-child(even) td {
    background: var(--panel2, #172238) !important;
    color: var(--text, #e5eaf3) !important;
}

html[data-theme="dark"] table.g tbody tr:hover td,
html[data-skin="shab"] table.g tbody tr:hover td,
[data-theme="dark"] table.g tbody tr:hover td {
    background: var(--panel3, #1e293b) !important;
}

html[data-theme="dark"] table.g tbody tr td.empty,
html[data-theme="dark"] table.g tbody tr.empty td,
html[data-skin="shab"] table.g tbody tr td.empty,
[data-theme="dark"] table.g tbody tr td.empty,
html[data-theme="dark"] table.g td[colspan],
html[data-skin="shab"] table.g td[colspan] {
    background: var(--panel, #131d31) !important;
    color: var(--muted, #8e9bb6) !important;
}

html[data-theme="dark"] table.g tfoot td,
html[data-skin="shab"] table.g tfoot td,
[data-theme="dark"] table.g tfoot td {
    background: var(--panel2, #172238) !important;
    color: var(--text, #e5eaf3) !important;
    border-color: var(--line, #24324d) !important;
    border-top: 2px solid var(--line2, #2c3b5a) !important;
}

html[data-theme="dark"] table.g tbody a,
html[data-skin="shab"] table.g tbody a,
[data-theme="dark"] table.g tbody a {
    color: var(--link, #60a5fa) !important;
}

html[data-theme="dark"] table.g .ib,
html[data-skin="shab"] table.g .ib,
[data-theme="dark"] table.g .ib {
    background: var(--panel2, #172238) !important;
    border-color: var(--line2, #2c3b5a) !important;
}

/* ─── SPA Loading Bar ─── */
#spa-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #10b981, #3b82f6, #6366f1);
    z-index: 99999;
    transform: scaleX(0);
    transform-origin: right center;
    transition: transform 0.08s ease, opacity 0.12s ease;
    opacity: 0;
    pointer-events: none;
}
#spa-progress-bar.loading {
    opacity: 1;
    transform: scaleX(0.75);
}
#spa-progress-bar.finishing {
    opacity: 1;
    transform: scaleX(1);
}
#spa-progress-bar.done {
    opacity: 0;
    transform: scaleX(1);
}

/* ─── بازطراحی و حذف ستون خالی: گرید ۲ ستونی مدرن ─── */
.app {
    grid-template-columns: 62px 1fr !important;
}
.app > .tabsbar {
    grid-column: 2 / 3 !important;
}
.app > .main {
    grid-column: 2 / 3 !important;
    grid-row: 2 !important;
    width: 100% !important;
    max-width: 100% !important;
}
.app > .statusbar {
    grid-column: 2 / 3 !important;
    grid-row: 3 !important;
}
.app > .side {
    display: none !important;
}

/* ─── چیپ‌های مدرن واحد اقتصادی و سال مالی در هدر ─── */
.top-ctx-chips {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-inline-end: 8px;
    flex-shrink: 0;
}
.ctx-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--panel2, rgba(255, 255, 255, 0.06));
    border: 1px solid var(--line2, rgba(255, 255, 255, 0.12));
    border-radius: 8px;
    padding: 2px 8px;
    height: 28px;
    font-size: 11px;
    color: var(--text, #334155);
    transition: all 0.15s ease;
}
.ctx-chip:hover {
    border-color: var(--primary, #3b82f6);
    background: var(--hover, rgba(59, 130, 246, 0.08));
}
.ctx-chip .ico {
    color: var(--muted, #64748b);
    opacity: 0.85;
}
.ctx-chip select {
    background: transparent !important;
    border: 0 !important;
    color: inherit !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    cursor: pointer;
    padding: 0 !important;
    margin: 0 !important;
    outline: none !important;
    min-height: auto !important;
    height: auto !important;
    line-height: normal !important;
}
.ctx-chip select option {
    background: var(--panel, #1e293b) !important;
    color: var(--text, #f8fafc) !important;
}

/* ─── منوی عمودی ریل و هاور فلای‌اوت تفکیک‌شده و اصولی (Categorized Flyout Submenu) ─── */
.rail {
    position: relative !important;
    z-index: 100 !important;
    overflow: visible !important;
    padding: 6px 3px !important;
    gap: 1px !important;
}
.rail .logo {
    height: 38px !important;
    margin-bottom: 4px !important;
}
.rail .logo svg, .rail .logo img {
    max-height: 28px !important;
    width: auto !important;
}
.rail-nav-item {
    position: relative;
    width: 100%;
}
.rail-nav-item .rail-btn {
    color: #aab6cc;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 5px 2px;
    border-radius: 8px;
    font-size: 10px;
    line-height: 1.1;
    position: relative;
    width: 100%;
    box-sizing: border-box;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}
.rail-nav-item .rail-btn svg {
    width: 19px !important;
    height: 19px !important;
}
.rail-nav-item .rail-btn:hover,
.rail-nav-item.open .rail-btn,
.rail-nav-item .rail-btn.active {
    background: #1a2742;
    color: #fff;
}
.rail-nav-item .rail-btn.active::before {
    content: "";
    position: absolute;
    right: -3px;
    top: 6px;
    bottom: 6px;
    width: 3px;
    border-radius: 3px;
    background: var(--primary, #3b82f6);
}
.rail .spacer {
    flex: 1 1 auto !important;
    min-height: 4px !important;
}
.rail #look-btn {
    padding: 5px 2px !important;
    font-size: 10px !important;
    gap: 2px !important;
    border-radius: 8px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-decoration: none !important;
}
.rail #look-btn svg {
    width: 19px !important;
    height: 19px !important;
}
.rail .rail-prof {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    max-width: 32px !important;
    max-height: 32px !important;
    border-radius: 50% !important;
    background: #2563eb !important;
    color: #fff !important;
    margin: 4px auto 6px !important;
    padding: 0 !important;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3) !important;
    transition: transform 0.15s ease, background 0.15s ease !important;
    text-decoration: none !important;
}
.rail .rail-prof:hover {
    background: #1d4ed8 !important;
    transform: scale(1.06) !important;
    color: #fff !important;
}
.rail .rail-prof .rail-av {
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    display: block !important;
}
.rail .rail-prof .rail-av-i {
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    display: grid !important;
    place-items: center !important;
    background: transparent !important;
    color: #fff !important;
}
.rail .rail-prof svg {
    width: 18px !important;
    height: 18px !important;
    stroke: #fff !important;
}
@media (max-height: 640px) {
    .rail {
        padding: 3px 2px !important;
        gap: 0px !important;
    }
    .rail .logo {
        height: 26px !important;
        margin-bottom: 2px !important;
    }
    .rail .logo svg, .rail .logo img {
        max-height: 20px !important;
    }
    .rail-nav-item .rail-btn {
        padding: 3px 1px !important;
        font-size: 9px !important;
        gap: 1px !important;
    }
    .rail-nav-item .rail-btn svg {
        width: 16px !important;
        height: 16px !important;
    }
    .rail #look-btn {
        padding: 3px 1px !important;
        font-size: 9px !important;
    }
    .rail .rail-prof {
        width: 26px !important;
        height: 26px !important;
        min-width: 26px !important;
        min-height: 26px !important;
        margin: 2px auto 3px !important;
    }
    .rail .rail-prof .rail-av,
    .rail .rail-prof .rail-av-i {
        width: 26px !important;
        height: 26px !important;
    }
    .rail .rail-prof svg {
        width: 14px !important;
        height: 14px !important;
    }
}

/* ─── دسترسی سریع به تنظیمات و پروفایل کاربر در نوار بالا (TopBar) ─── */
.tb-settings-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    color: var(--muted);
    background: transparent;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
}
.tb-settings-chip:hover {
    background: var(--panel);
    color: var(--text);
}
.tb-user-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 30px;
    padding: 2px 9px 2px 4px;
    border-radius: 20px;
    background: color-mix(in srgb, var(--panel) 85%, transparent);
    border: 1px solid var(--line);
    color: var(--text);
    text-decoration: none;
    font-size: 11.5px;
    font-weight: 500;
    transition: background 0.15s, border-color 0.15s;
    flex-shrink: 0;
    cursor: pointer;
}
.tb-user-chip:hover {
    background: var(--panel);
    border-color: var(--primary);
}
.tb-user-chip .tb-user-av {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
}
.tb-user-chip .tb-user-av-i {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: grid;
    place-items: center;
}
.tb-user-chip .tb-user-name {
    max-width: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════════════
   ایزوله‌سازی قطعی و کامل زیرمنوهای شناور (Flyout) از استایل‌های ریل
   ═══════════════════════════════════════════════════════════════════ */
.rail .flyout-pane,
.rail .flyout-pane * {
    box-sizing: border-box !important;
}

/* خنثی کردن تمام استایل‌های .rail a که باعث ستونی شدن و به‌هم‌ریختگی لینک‌ها می‌شدند */
.rail .flyout-pane a:not(.flyout-add):not(.flyout-gear):not(.flyout-category) {
    all: unset !important;
    box-sizing: border-box !important;
    cursor: pointer !important;
    text-decoration: none !important;
    font-family: inherit !important;
}

/* پل نامرئی جهت جلوگیری از پرش ماوس هنگام حرکت به سمت منو */
/* پل روی خودِ آیتم است نه پنل: overflow:hidden پنل، شبه‌عنصرِ بیرون‌زده را می‌بُرد */
.rail-nav-item::after {
    content: "";
    position: absolute;
    right: 100%;
    top: 0;
    bottom: 0;
    width: 9px;
}

/* کانتینر پنل شناور */
.flyout-pane {
    position: absolute !important;
    right: calc(100% + 7px) !important;
    top: -6px !important;
    width: 320px !important;
    background: var(--panel, #ffffff) !important;
    border: 1px solid var(--line2, #cfd8e6) !important;
    border-radius: 14px !important;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18), 0 2px 10px rgba(0, 0, 0, 0.08) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    z-index: 1000 !important;
    display: flex !important;
    flex-direction: column !important;
    max-height: 0;
    opacity: 0;
    transform: translateX(8px);
    /* باز و بسته شدن فوری و روان منو بدون مکث آزاردهنده */
    visibility: hidden;
    transition: opacity 0.08s ease, transform 0.08s ease, visibility 0s 0.15s !important;
    text-align: right !important;
    direction: rtl !important;
    overflow: hidden !important;
}

/* باز شدن آنی با هاور بدون تاخیر */
.rail-nav-item:hover .flyout-pane,
.rail-nav-item.open .flyout-pane {
    visibility: visible;
    /* پنلِ بسته ارتفاع ندارد؛ وگرنه پنل‌های پنهانِ وسط ریل تا زیر صفحه می‌رفتند و کل صفحه اسکرول عمودی می‌گرفت */
    max-height: calc(100vh - 36px);
    opacity: 1 !important;
    transform: translateX(0) !important;
    z-index: 1001 !important;
    transition-delay: 0s !important;
}

/* موقعیت هوشمند برای آیتم‌های انتهای ریل */
.rail-nav-item:nth-last-child(-n+4) .flyout-pane {
    top: auto !important;
    bottom: -6px !important;
}

/* هدر پنل شناور */
.flyout-head {
    padding: 12px 14px 10px !important;
    border-bottom: 1px solid var(--line, #dfe5ef) !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    background: var(--panel2, #f6f8fc) !important;
    flex-shrink: 0 !important;
}
.flyout-badge {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    color: var(--primary, #2563eb) !important;
}
.flyout-badge span {
    color: var(--text, #1e293b) !important;
}
.flyout-search-wrap {
    position: relative !important;
    width: 100% !important;
}
.flyout-search-wrap .ico {
    position: absolute !important;
    right: 10px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    color: var(--muted, #64748b) !important;
    pointer-events: none !important;
}
.flyout-search-input {
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 6px 30px 6px 10px !important;
    font-size: 11.5px !important;
    border-radius: 8px !important;
    background: var(--panel, #ffffff) !important;
    border: 1px solid var(--line2, #cfd8e6) !important;
    color: var(--text, #1e293b) !important;
    min-height: 30px !important;
    outline: none !important;
    transition: border-color 0.15s, box-shadow 0.15s !important;
}
.flyout-search-input:focus {
    border-color: var(--primary, #2563eb) !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12) !important;
}

/* فهرست اسکرول‌شونده و استاندارد */
.flyout-list {
    padding: 6px 8px 10px !important;
    overflow-y: auto !important;
    max-height: calc(100vh - 120px) !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
    scrollbar-width: thin !important;
    scrollbar-color: var(--line2, #cfd8e6) transparent !important;
}
.flyout-list::-webkit-scrollbar {
    width: 5px !important;
}
.flyout-list::-webkit-scrollbar-track {
    background: transparent !important;
}
.flyout-list::-webkit-scrollbar-thumb {
    background: var(--line2, #cfd8e6) !important;
    border-radius: 4px !important;
}

/* عنوان و سرگروه تفکیک زیرمنوها (Category / Group Divider) */
.flyout-group-header {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 10px 8px 4px 8px !important;
    margin-top: 4px !important;
    user-select: none !important;
}
.flyout-group-header:first-child {
    margin-top: 0 !important;
    padding-top: 4px !important;
}
.flyout-group-label {
    font-size: 11px !important;
    font-weight: 700 !important;
    color: var(--primary, #2563eb) !important;
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
}
.flyout-group-line {
    flex: 1 !important;
    height: 1px !important;
    background: linear-gradient(to left, var(--line2, #cfd8e6), transparent) !important;
}

/* سطر هر آیتم زیرمنو — افقی، شیک و منظم */
.flyout-item {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 6px !important;
    padding: 5px 8px !important;
    border-radius: 8px !important;
    transition: background 0.12s ease !important;
    min-height: 34px !important;
    text-align: right !important;
    direction: rtl !important;
    border: 1px solid transparent !important;
}
.flyout-item:hover {
    background: var(--hover, rgba(59, 130, 246, 0.08)) !important;
    border-color: color-mix(in srgb, var(--primary, #2563eb) 18%, transparent) !important;
}
.flyout-item.active {
    background: var(--primary-soft, rgba(37, 99, 235, 0.1)) !important;
    border-color: color-mix(in srgb, var(--primary, #2563eb) 35%, transparent) !important;
}

/* لینک متنی اصلی درون سطر */
.flyout-link {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 9px !important;
    flex: 1 !important;
    min-width: 0 !important;
    text-decoration: none !important;
    cursor: pointer !important;
    padding: 3px 0 !important;
}
/* «all: unset» بالا flex:1 لینک را می‌برد و فقط روی متن کلیک می‌شد؛ لینک کل سطر را پر کند */
.rail .flyout-pane .flyout-link {
    display: flex !important;
    align-items: center !important;
    gap: 9px !important;
    flex: 1 !important;
    align-self: stretch !important;
    min-width: 0 !important;
    padding: 3px 0 !important;
}
.flyout-icon-box {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 24px !important;
    height: 24px !important;
    border-radius: 6px !important;
    background: var(--panel2, rgba(0, 0, 0, 0.04)) !important;
    color: var(--muted, #64748b) !important;
    flex-shrink: 0 !important;
    transition: all 0.12s ease !important;
}
.flyout-item:hover .flyout-icon-box {
    background: var(--primary-soft, rgba(37, 99, 235, 0.15)) !important;
    color: var(--primary, #2563eb) !important;
}
.flyout-item.active .flyout-icon-box {
    background: var(--primary, #2563eb) !important;
    color: #ffffff !important;
}
.flyout-link-text {
    font-size: 12.5px !important;
    font-weight: 500 !important;
    color: var(--text, #1e293b) !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    text-align: right !important;
    line-height: 1.4 !important;
    transition: color 0.12s ease !important;
}
.flyout-item:hover .flyout-link-text {
    color: var(--primary, #2563eb) !important;
    font-weight: 600 !important;
}
.flyout-item.active .flyout-link-text {
    color: var(--primary, #2563eb) !important;
    font-weight: 700 !important;
}
.flyout-item.soon {
    opacity: 0.65 !important;
}
.flyout-item.soon .flyout-link-text {
    color: var(--muted, #64748b) !important;
}

/* اکشن‌های سمت چپ (دکمه‌های اقدام سریع + و آچار و دسته‌بندی مطابق سایت اصلی کاریا) */
.flyout-actions {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 5px !important;
    flex-shrink: 0 !important;
    opacity: 1 !important;
    transition: opacity 0.14s ease !important;
}

.rail .flyout-pane .flyout-add,
.flyout-add {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    min-height: 24px !important;
    border-radius: 7px !important;
    background-color: #22c55e !important;
    background: #22c55e !important;
    color: #ffffff !important;
    border: none !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
    transition: background 0.15s ease, transform 0.1s ease !important;
    box-shadow: 0 1px 3px rgba(34, 197, 94, 0.35) !important;
}

.rail .flyout-pane .flyout-add svg,
.flyout-add svg {
    stroke: #ffffff !important;
    stroke-width: 3.2 !important;
    width: 14px !important;
    height: 14px !important;
    display: block !important;
}

.rail .flyout-pane .flyout-add:hover,
.flyout-add:hover {
    background-color: #16a34a !important;
    background: #16a34a !important;
    color: #ffffff !important;
    transform: scale(1.06) !important;
}

.rail .flyout-pane .flyout-add:active,
.flyout-add:active {
    transform: scale(0.95) !important;
}

.rail .flyout-pane .flyout-gear,
.flyout-gear {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    min-height: 24px !important;
    border-radius: 7px !important;
    background: transparent !important;
    color: #ff6b3d !important;
    border: none !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
    transition: background 0.15s ease, transform 0.1s ease !important;
}

.rail .flyout-pane .flyout-gear svg,
.flyout-gear svg {
    stroke: #ff6b3d !important;
    stroke-width: 2 !important;
    width: 15px !important;
    height: 15px !important;
    display: block !important;
}

.rail .flyout-pane .flyout-gear:hover,
.flyout-gear:hover {
    background: #fff0ea !important;
    color: #ff6b3d !important;
    transform: scale(1.06) !important;
}

.rail .flyout-pane .flyout-category,
.flyout-category {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    min-height: 24px !important;
    border-radius: 7px !important;
    background: transparent !important;
    color: #2563eb !important;
    border: none !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
    transition: background 0.15s ease, transform 0.1s ease !important;
}

.rail .flyout-pane .flyout-category svg,
.flyout-category svg {
    stroke: #2563eb !important;
    stroke-width: 2 !important;
    width: 15px !important;
    height: 15px !important;
    display: block !important;
}

.rail .flyout-pane .flyout-category:hover,
.flyout-category:hover {
    background: #eff6ff !important;
    color: #2563eb !important;
    transform: scale(1.06) !important;
}

html[data-theme="dark"] .flyout-gear:hover {
    background: rgba(255, 107, 61, 0.18) !important;
}

html[data-theme="dark"] .flyout-category:hover {
    background: rgba(37, 99, 235, 0.2) !important;
}

/* ═══════════════════════════════════════════════════════════════════
   صفحه ورود اختصاصی سامانه مالی موسم (Mowsem Login Redesign)
   ═══════════════════════════════════════════════════════════════════ */
body.mowsem-guest-body {
    background: linear-gradient(135deg, #f8fafc 0%, #edf2f7 100%) !important;
    min-height: 100vh !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 24px 16px !important;
    box-sizing: border-box !important;
    font-family: Vazirmatn, system-ui, -apple-system, sans-serif !important;
    direction: rtl !important;
}

.mowsem-page-wrap {
    width: 100% !important;
    max-width: 450px !important;
    margin: 0 auto !important;
}

.mowsem-auth-card {
    background: #ffffff !important;
    width: 100% !important;
    border-radius: 18px !important;
    box-shadow: 0 14px 38px rgba(0, 0, 0, 0.06), 0 2px 6px rgba(0, 0, 0, 0.02) !important;
    border: 1px solid rgba(226, 232, 240, 0.9) !important;
    padding: 40px 36px 36px !important;
    box-sizing: border-box !important;
    text-align: center !important;
}

.mowsem-logo-wrap {
    display: flex !important;
    justify-content: center !important;
    margin-bottom: 24px !important;
}

.mowsem-subtitle {
    font-size: 13.5px !important;
    color: #64748b !important;
    line-height: 1.6 !important;
    margin: 0 0 24px 0 !important;
    font-weight: 400 !important;
}

.mowsem-form {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
}

.mowsem-field {
    text-align: right !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
}

.mowsem-label {
    font-size: 12px !important;
    color: #64748b !important;
    font-weight: 600 !important;
    margin: 0 !important;
    text-align: right !important;
}

.mowsem-input {
    width: 100% !important;
    height: 48px !important;
    border-radius: 10px !important;
    border: 1.8px solid #3b82f6 !important;
    padding: 0 16px !important;
    font-size: 17px !important;
    font-family: Vazirmatn, monospace, sans-serif !important;
    font-weight: 700 !important;
    text-align: center !important;
    color: #1e293b !important;
    background: #ffffff !important;
    outline: none !important;
    box-sizing: border-box !important;
    transition: all 0.15s ease !important;
}
.mowsem-input:focus {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18) !important;
}

/* شبکه ۴ دکمه ردیف اول: با پیامک، با بله، صوتی، با رمز */
.mowsem-methods-grid-4 {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 10px !important;
    margin-top: 6px !important;
}

.mowsem-method-card {
    all: unset !important;
    cursor: pointer !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px !important;
    padding: 13px 4px 11px !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 11px !important;
    background: #ffffff !important;
    transition: all 0.14s ease !important;
    box-sizing: border-box !important;
    text-decoration: none !important;
    user-select: none !important;
}
.mowsem-method-card:hover {
    border-color: #3b82f6 !important;
    background: #f8faff !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1) !important;
}
.mowsem-method-card:active {
    transform: translateY(0) !important;
}

.mowsem-method-icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}
.mowsem-method-icon.icon-sms { color: #2563eb !important; }
.mowsem-method-icon.icon-bale { color: #10b981 !important; }
.mowsem-method-icon.icon-voice { color: #10b981 !important; }
.mowsem-method-icon.icon-pass { color: #1e293b !important; }

.mowsem-method-card span {
    font-size: 11.5px !important;
    font-weight: 600 !important;
    color: #334155 !important;
}

/* شبکه ۲ دکمه ردیف دوم: با گوگل، با تلگرام */
.mowsem-methods-grid-2 {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
}

.mowsem-wide-card {
    all: unset !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    height: 44px !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 10px !important;
    background: #ffffff !important;
    transition: all 0.14s ease !important;
    box-sizing: border-box !important;
    text-decoration: none !important;
    user-select: none !important;
}
.mowsem-wide-card:hover {
    border-color: #cbd5e1 !important;
    background: #f8fafc !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.04) !important;
}
.mowsem-wide-card span {
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #334155 !important;
}

/* مرحله ۲: تأیید کد و باکس‌های OTP */
.mowsem-change-phone {
    display: inline-block !important;
    font-size: 12.5px !important;
    color: #2563eb !important;
    text-decoration: none !important;
    font-weight: 700 !important;
    margin-bottom: 22px !important;
    transition: color 0.12s !important;
}
.mowsem-change-phone:hover {
    color: #1d4ed8 !important;
    text-decoration: underline !important;
}

.mowsem-otp-boxes-wrap {
    background: #f8fafc !important;
    border-radius: 12px !important;
    padding: 16px 14px !important;
    margin-bottom: 20px !important;
    border: 1px solid #e2e8f0 !important;
}

.mowsem-otp-boxes {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 12px !important;
}

.otp-digit {
    width: 44px !important;
    height: 48px !important;
    border-radius: 8px !important;
    border: 1.5px solid transparent !important;
    border-bottom: 2.5px solid #94a3b8 !important;
    background: #ffffff !important;
    text-align: center !important;
    font-size: 22px !important;
    font-weight: 800 !important;
    font-family: monospace, Vazirmatn !important;
    color: #0f172a !important;
    outline: none !important;
    box-sizing: border-box !important;
    transition: all 0.14s ease !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03) !important;
}
.otp-digit:focus {
    border-color: #3b82f6 !important;
    border-bottom-color: #2563eb !important;
    background: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16) !important;
}

.mowsem-timer-wrap {
    font-size: 13px !important;
    color: #64748b !important;
    margin-bottom: 22px !important;
}

.mowsem-resend-link {
    all: unset !important;
    cursor: pointer !important;
    font-size: 13px !important;
    color: #2563eb !important;
    font-weight: 700 !important;
    text-decoration: underline !important;
}
.mowsem-resend-link:hover {
    color: #1d4ed8 !important;
}

.mowsem-btn-primary {
    all: unset !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 48px !important;
    border-radius: 10px !important;
    background: #2563eb !important;
    color: #ffffff !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    box-sizing: border-box !important;
    transition: background 0.15s, transform 0.1s, box-shadow 0.15s !important;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.28) !important;
}
.mowsem-btn-primary:hover {
    background: #1d4ed8 !important;
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.38) !important;
}
.mowsem-btn-primary:active {
    transform: scale(0.99) !important;
}

.mowsem-row-between {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    font-size: 12px !important;
    color: #64748b !important;
}
.mowsem-check {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    cursor: pointer !important;
}
.mowsem-link {
    color: #2563eb !important;
    text-decoration: none !important;
    font-weight: 600 !important;
}
.mowsem-link:hover {
    text-decoration: underline !important;
}


/* ==========================================================================
   طراحی پیشخوان مدرن و یکپارچه سامانه موسم (Mowsem Dashboard)
   منطبق بر تصاویر ارسالی کاربر و پالت سازمانی بنفش/نارنجی موسم
   ========================================================================== */

.mowsem-dash {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 4px 0 24px 0;
    width: 100%;
    box-sizing: border-box;
    font-family: inherit;
}

/* ۱. بنر بالایی داشبورد */
.dash-banner {
    background: linear-gradient(135deg, #6366f1 0%, #7c3aed 50%, #6d28d9 100%);
    border-radius: 14px;
    padding: 12px 20px;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    box-shadow: 0 4px 16px rgba(109, 40, 217, 0.22);
}

.dash-banner-r {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dash-banner-grid-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    color: #ffffff;
}

.dash-banner-greeting {
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.2px;
}

.dash-banner-l {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.dash-chip-btn {
    all: unset;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    padding: 5px 14px;
    font-size: 12px;
    font-weight: 600;
    color: #ffffff;
    transition: background 0.15s, transform 0.1s;
}
.dash-chip-btn:hover {
    background: rgba(255, 255, 255, 0.26);
}
.dash-chip-btn kbd {
    background: rgba(0, 0, 0, 0.24);
    padding: 2px 7px;
    border-radius: 6px;
    font-size: 11px;
    font-family: inherit;
    font-weight: 700;
    color: #ffffff;
}

.dash-chip-btn.help-chip {
    padding: 5px 12px;
    gap: 6px;
    border-color: rgba(255, 255, 255, 0.25);
}
.dash-chip-btn.help-chip svg {
    color: #fda4af; /* آیکون ویدیو با تناژ قرمز/صورتی شیک و ملایم */
    transition: transform 0.15s;
}
.dash-chip-btn.help-chip:hover svg {
    transform: scale(1.12);
    color: #f43f5e;
}

/* جلوگیری از ایجاد سربرگ اضافه بالای پیشخوان برای جمع و جور شدن سربرگ */
.content:has(.mowsem-dash) > .page-h,
.mowsem-dash ~ .page-h,
.page-h:has(+ .mowsem-dash) {
    display: none !important;
}

.dash-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    padding: 5px 14px;
    font-size: 12px;
    color: #ffffff;
    font-weight: 500;
}

.dash-chip .dot.gold {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fbbf24;
    box-shadow: 0 0 8px rgba(251, 191, 36, 0.8);
    display: inline-block;
}

/* ۲. استوری‌های امکانات برجسته موسم — کاملاً سنتر، تعاملی و چشم‌نواز */
.dash-stories-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 8px 0;
}

.dash-stories-wrap {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: auto;
    padding: 8px 4px;
    scrollbar-width: thin;
}

.dash-stories {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 24px;
    margin: 0 auto;
    flex-wrap: nowrap;
}

.dash-story {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #334155;
    font-size: 11px;
    font-weight: 600;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.15s;
    width: 78px;
    text-align: center;
    cursor: pointer;
    user-select: none;
}
.dash-story:hover {
    transform: translateY(-4px) scale(1.05);
    color: #6d28d9;
}
.dash-story:active {
    transform: scale(0.96);
}

.dash-story span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80px;
}

.story-ring {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    padding: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    background: #e2e8f0;
    transition: box-shadow 0.2s, transform 0.2s;
}
.dash-story:hover .story-ring {
    box-shadow: 0 8px 22px rgba(109, 40, 217, 0.25);
}

.story-ring.ring-purple { background: linear-gradient(135deg, #8b5cf6, #ec4899); }
.story-ring.ring-blue   { background: linear-gradient(135deg, #3b82f6, #06b6d4); }
.story-ring.ring-indigo { background: linear-gradient(135deg, #6366f1, #3b82f6); }
.story-ring.ring-cyan   { background: linear-gradient(135deg, #06b6d4, #10b981); }
.story-ring.ring-teal   { background: linear-gradient(135deg, #14b8a6, #3b82f6); }
.story-ring.ring-gold   { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.story-ring.ring-rose   { background: linear-gradient(135deg, #f43f5e, #8b5cf6); }

.story-ring.ring-dashed {
    background: transparent !important;
    border: 2px dashed #94a3b8;
    padding: 2px;
}
.dash-story:hover .story-ring.ring-dashed {
    border-color: #6366f1;
}

.story-ring.seen {
    filter: grayscale(0.45);
    opacity: 0.8;
}
.dash-story:hover .story-ring.seen {
    filter: none;
    opacity: 1;
}

.story-ring .story-ico {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    border: 2px solid #ffffff;
}

/* ۳. کارت‌های شاخص KPI بالای صفحه — دقیقاً منطبق بر تصویر */
.dash-kpi-grid {
    display: grid !important;
    grid-template-columns: repeat(var(--kpi-cols, 7), minmax(0, 1fr)) !important;
    gap: 12px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

@media (max-width: 1280px) {
    .dash-kpi-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 768px) {
    .dash-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 480px) {
    .dash-kpi-grid {
        grid-template-columns: 1fr !important;
    }
}

.dash-kpi-card {
    border-radius: 12px !important;
    padding: 14px 14px 10px 14px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    min-height: 125px !important;
    box-sizing: border-box !important;
    transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
    text-align: right !important;
    position: relative !important;
}

html[data-theme="light"] .dash-kpi-card,
html:not([data-theme="dark"]) .dash-kpi-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
}

html[data-theme="light"] .dash-kpi-card:hover,
html:not([data-theme="dark"]) .dash-kpi-card:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08) !important;
    border-color: #cbd5e1 !important;
}

.kpi-top {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    margin-bottom: 6px !important;
}

.kpi-title {
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #475569 !important;
    white-space: nowrap !important;
    text-align: right !important;
}

.kpi-ico-wrap {
    width: 32px !important;
    height: 32px !important;
    border-radius: 8px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
}

.kpi-ico-wrap.ico-purple  { background: #ede9fe !important; color: #7c3aed !important; }
.kpi-ico-wrap.ico-coral   { background: #ffedd5 !important; color: #ea580c !important; }
.kpi-ico-wrap.ico-emerald { background: #dcfce7 !important; color: #16a34a !important; }
.kpi-ico-wrap.ico-teal    { background: #ccfbf1 !important; color: #0d9488 !important; }
.kpi-ico-wrap.ico-green   { background: #dcfce7 !important; color: #15803d !important; }
.kpi-ico-wrap.ico-amber   { background: #fef3c7 !important; color: #d97706 !important; }
.kpi-ico-wrap.ico-rose    { background: #ffe4e6 !important; color: #e11d48 !important; }
.kpi-ico-wrap.ico-shield  { background: #ede9fe !important; color: #6d28d9 !important; }

.kpi-val {
    font-size: 18px !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    letter-spacing: -0.3px !important;
    margin: 4px 0 !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    text-align: right !important;
}

.kpi-sub {
    font-size: 11px !important;
    color: #94a3b8 !important;
    line-height: 1.3 !important;
    margin-bottom: 4px !important;
    white-space: nowrap !important;
    text-align: right !important;
}

.kpi-foot {
    border-top: 1px dashed #e2e8f0 !important;
    padding-top: 6px !important;
    margin-top: auto !important;
    width: 100% !important;
    text-align: left !important;
}

.kpi-foot a {
    text-decoration: none !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    color: #64748b !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    transition: color 0.15s !important;
}
.kpi-foot a:hover {
    color: #2563eb !important;
}

/* ۴. بخش دو ستونه میانی (بسته‌ی شما + نمودار و سهمیه‌ها) */
.dash-middle-grid {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 16px;
    width: 100%;
    align-items: start;
}

@media (max-width: 1100px) {
    .dash-middle-grid {
        grid-template-columns: 1fr;
    }
}

.dash-panel {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px 18px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.dash-panel-h {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f1f5f9;
}

.dash-panel-title {
    font-size: 14px;
    font-weight: 800;
    color: #1e293b;
}

.dash-btn-outline {
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 4px 12px;
    transition: all 0.15s;
}
.dash-btn-outline:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #0f172a;
}

/* جزئیات کارت بسته (ستون چپ) */
.dash-plan-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.plan-trial-box {
    background: #fefce8;
    border: 1px solid #fef08a;
    border-radius: 10px;
    padding: 12px 14px;
    color: #713f12;
}

.plan-trial-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 4px;
}

.plan-trial-box p {
    margin: 0;
    font-size: 11px;
    color: #854d0e;
    line-height: 1.4;
}

.plan-countdown-wrap {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 4px 0;
}

.countdown-labels {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
}

.countdown-days {
    font-weight: 800;
    color: #0f172a;
}

.countdown-mode {
    font-size: 11px;
    color: #64748b;
}

.countdown-bar {
    width: 100%;
    height: 8px;
    background: #f1f5f9;
    border-radius: 999px;
    overflow: hidden;
}

.countdown-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #f59e0b, #ea580c);
    border-radius: 999px;
    transition: width 0.3s;
}

.countdown-date {
    font-size: 11px;
    color: #94a3b8;
    text-align: left;
}

.plan-buy-btn {
    all: unset;
    cursor: pointer;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 42px;
    border-radius: 10px;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: #ffffff !important;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(234, 88, 12, 0.3);
    transition: transform 0.1s, box-shadow 0.15s, filter 0.15s;
    text-align: center;
}
.plan-buy-btn:hover {
    filter: brightness(1.05);
    box-shadow: 0 6px 18px rgba(234, 88, 12, 0.4);
    transform: translateY(-1px);
}
.plan-buy-btn:active {
    transform: scale(0.99);
}

.plan-modules-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 6px;
}

.plan-modules-title {
    font-size: 12px;
    font-weight: 700;
    color: #475569;
}

.plan-modules-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.mod-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #334155;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mod-pill.active {
    border-color: #dcfce7;
    background: #f0fdf4;
    color: #166534;
}

.mod-pill.active .check-ico {
    color: #16a34a;
    font-weight: 800;
    font-size: 12px;
}

.mod-pill.inactive {
    border-color: #e2e8f0;
    background: #f8fafc;
    color: #94a3b8;
}

.mod-pill.inactive .plus-ico {
    color: #94a3b8;
    font-size: 12px;
    font-weight: 700;
}

/* جزئیات کارت نمودار و سهمیه‌ها (ستون راست) */
.chart-header-titles {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.chart-unit-label {
    font-size: 11px;
    color: #94a3b8;
}

.chart-tabs {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #f1f5f9;
    padding: 3px;
    border-radius: 8px;
}

.chart-tab {
    all: unset;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    padding: 5px 14px;
    border-radius: 6px;
    transition: all 0.15s;
}
.chart-tab:hover {
    color: #0f172a;
}
.chart-tab.active {
    background: #7c3aed;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(124, 58, 237, 0.28);
}

.dash-chart-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.chart-summary-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 10px;
    padding: 10px 14px;
}

.summary-chip {
    display: flex;
    flex-direction: column;
    gap: 3px;
    text-align: center;
}

.summary-label {
    font-size: 11px;
    color: #64748b;
}

.summary-val {
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
}

/* نمودار ستونی ۱۲ ماهه */
.mowsem-barchart {
    width: 100%;
    padding: 18px 0 10px 0;
    position: relative;
    border-bottom: 1px solid #e2e8f0;
}

.barchart-bars {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 8px;
    height: 180px;
    width: 100%;
    position: relative;
}

.bar-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    height: 100%;
    position: relative;
    cursor: pointer;
}

.bar-fill-wrap {
    flex: 1;
    width: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    position: relative;
}

.bar-fill {
    width: 28px;
    max-width: 80%;
    background: #e2e8f0;
    border-radius: 6px 6px 2px 2px;
    transition: height 0.4s ease, background 0.2s;
    position: relative;
    min-height: 4px;
}

.bar-col:hover .bar-fill {
    background: #cbd5e1;
}

.bar-fill.bar-coral {
    background: linear-gradient(180deg, #f97316 0%, #ea580c 100%) !important;
    box-shadow: 0 4px 12px rgba(234, 88, 12, 0.35);
}

.bar-tip {
    position: absolute;
    top: -26px;
    left: 50%;
    transform: translateX(-50%);
    background: #0f172a;
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s, top 0.15s;
    z-index: 10;
}

.bar-col:hover .bar-tip,
.bar-col.highlight .bar-tip {
    opacity: 1;
    top: -28px;
}

.bar-label {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    white-space: nowrap;
}

.bar-label.text-coral {
    color: #ea580c !important;
    font-weight: 800;
}

/* سهمیه‌ها */
.quotas-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 10px;
}

.quotas-title {
    font-size: 13px;
    font-weight: 800;
    color: #1e293b;
}

.quotas-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 24px;
}

@media (max-width: 768px) {
    .quotas-grid {
        grid-template-columns: 1fr;
    }
}

.quota-row {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.quota-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    color: #475569;
}

.quota-head .num {
    font-weight: 700;
    color: #0f172a;
}

.quota-bar {
    width: 100%;
    height: 6px;
    background: #f1f5f9;
    border-radius: 999px;
    overflow: hidden;
}

.quota-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.3s;
}

.quota-fill.fill-purple  { background: #7c3aed; }
.quota-fill.fill-indigo  { background: #4f46e5; }
.quota-fill.fill-blue    { background: #2563eb; }
.quota-fill.fill-cyan    { background: #0891b2; }
.quota-fill.fill-teal    { background: #0d9488; }
.quota-fill.fill-emerald { background: #059669; }

/* ۵. نوار وضعیت پایینی داشبورد */
.dash-bottom-strip {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.strip-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #64748b;
}

.strip-item b {
    color: #0f172a;
    font-weight: 700;
}

.strip-item svg {
    color: #6366f1;
}

/* بهینه‌سازی تم دارک / شب برای داشبورد */
html[data-theme="dark"] .dash-kpi-card,
html[data-skin="shab"] .dash-kpi-card,
[data-theme="dark"] .dash-kpi-card {
    background: #172238 !important;
    border: 1px solid #24324d !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25) !important;
    color: #f1f5f9 !important;
}

html[data-theme="dark"] .dash-kpi-card:hover,
html[data-skin="shab"] .dash-kpi-card:hover,
[data-theme="dark"] .dash-kpi-card:hover {
    transform: translateY(-2px) !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4) !important;
}

html[data-theme="dark"] .dash-panel,
html[data-skin="shab"] .dash-panel,
[data-theme="dark"] .dash-panel {
    background: #131d31 !important;
    border: 1px solid #24324d !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25) !important;
    color: #f1f5f9 !important;
}

html[data-theme="dark"] .dash-panel-h,
html[data-skin="shab"] .dash-panel-h,
[data-theme="dark"] .dash-panel-h {
    border-bottom: 1px solid #24324d !important;
}

html[data-theme="dark"] .dash-panel-title,
html[data-skin="shab"] .dash-panel-title,
[data-theme="dark"] .dash-panel-title {
    color: #f8fafc !important;
}

html[data-theme="dark"] .dash-btn-outline,
html[data-skin="shab"] .dash-btn-outline,
[data-theme="dark"] .dash-btn-outline {
    background: #1e293b !important;
    color: #e2e8f0 !important;
    border: 1px solid #334155 !important;
}

html[data-theme="dark"] .dash-btn-outline:hover,
html[data-skin="shab"] .dash-btn-outline:hover,
[data-theme="dark"] .dash-btn-outline:hover {
    background: #334155 !important;
    color: #ffffff !important;
    border-color: #475569 !important;
}

html[data-theme="dark"] .kpi-val,
html[data-skin="shab"] .kpi-val,
[data-theme="dark"] .kpi-val {
    color: #f8fafc !important;
}

html[data-theme="dark"] .kpi-val .unit,
html[data-skin="shab"] .kpi-val .unit,
[data-theme="dark"] .kpi-val .unit {
    color: #94a3b8 !important;
}

html[data-theme="dark"] .kpi-title,
html[data-skin="shab"] .kpi-title,
[data-theme="dark"] .kpi-title {
    color: #94a3b8 !important;
}

html[data-theme="dark"] .kpi-sub,
html[data-skin="shab"] .kpi-sub,
[data-theme="dark"] .kpi-sub {
    color: #64748b !important;
}

html[data-theme="dark"] .kpi-foot,
html[data-skin="shab"] .kpi-foot,
[data-theme="dark"] .kpi-foot {
    border-top: 1px dashed #24324d !important;
}

html[data-theme="dark"] .kpi-foot a,
html[data-skin="shab"] .kpi-foot a,
[data-theme="dark"] .kpi-foot a {
    color: #60a5fa !important;
}

html[data-theme="dark"] .card-package .kpi-val,
html[data-skin="shab"] .card-package .kpi-val,
[data-theme="dark"] .card-package .kpi-val {
    color: #a78bfa !important;
}

html[data-theme="dark"] .kpi-ico-wrap.ico-purple,
html[data-skin="shab"] .kpi-ico-wrap.ico-purple { background: rgba(124, 58, 237, 0.2) !important; color: #c084fc !important; }
html[data-theme="dark"] .kpi-ico-wrap.ico-coral,
html[data-skin="shab"] .kpi-ico-wrap.ico-coral { background: rgba(234, 88, 12, 0.2) !important; color: #fb923c !important; }
html[data-theme="dark"] .kpi-ico-wrap.ico-emerald,
html[data-skin="shab"] .kpi-ico-wrap.ico-emerald { background: rgba(22, 163, 74, 0.2) !important; color: #4ade80 !important; }
html[data-theme="dark"] .kpi-ico-wrap.ico-teal,
html[data-skin="shab"] .kpi-ico-wrap.ico-teal { background: rgba(13, 148, 136, 0.2) !important; color: #2dd4bf !important; }
html[data-theme="dark"] .kpi-ico-wrap.ico-green,
html[data-skin="shab"] .kpi-ico-wrap.ico-green { background: rgba(21, 128, 61, 0.2) !important; color: #4ade80 !important; }
html[data-theme="dark"] .kpi-ico-wrap.ico-amber,
html[data-skin="shab"] .kpi-ico-wrap.ico-amber { background: rgba(217, 119, 6, 0.2) !important; color: #fbbf24 !important; }
html[data-theme="dark"] .kpi-ico-wrap.ico-rose,
html[data-skin="shab"] .kpi-ico-wrap.ico-rose { background: rgba(225, 29, 72, 0.2) !important; color: #fb7185 !important; }
html[data-theme="dark"] .kpi-ico-wrap.ico-shield,
html[data-skin="shab"] .kpi-ico-wrap.ico-shield { background: rgba(109, 40, 217, 0.2) !important; color: #c084fc !important; }

html[data-theme="dark"] .story-ring .story-ico,
html[data-skin="shab"] .story-ring .story-ico,
[data-theme="dark"] .story-ring .story-ico {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #f1f5f9 !important;
}

html[data-theme="dark"] .chart-summary-row,
html[data-skin="shab"] .chart-summary-row,
[data-theme="dark"] .chart-summary-row {
    background: #0f172a !important;
    border: 1px solid #24324d !important;
}

html[data-theme="dark"] .chart-tabs,
html[data-skin="shab"] .chart-tabs,
[data-theme="dark"] .chart-tabs {
    background: #0f172a !important;
    border: 1px solid #24324d !important;
}

html[data-theme="dark"] .chart-tab,
html[data-skin="shab"] .chart-tab,
[data-theme="dark"] .chart-tab {
    color: #94a3b8 !important;
}

html[data-theme="dark"] .chart-tab.active,
html[data-skin="shab"] .chart-tab.active,
[data-theme="dark"] .chart-tab.active {
    background: #3b82f6 !important;
    color: #ffffff !important;
}

html[data-theme="dark"] .summary-val,
html[data-skin="shab"] .summary-val,
[data-theme="dark"] .summary-val {
    color: #f8fafc !important;
}

html[data-theme="dark"] .summary-label,
html[data-skin="shab"] .summary-label,
[data-theme="dark"] .summary-label {
    color: #94a3b8 !important;
}

html[data-theme="dark"] .chart-unit-label,
html[data-skin="shab"] .chart-unit-label,
[data-theme="dark"] .chart-unit-label {
    color: #94a3b8 !important;
}

html[data-theme="dark"] .dash-bottom-strip,
html[data-skin="shab"] .dash-bottom-strip,
[data-theme="dark"] .dash-bottom-strip {
    background: #131d31 !important;
    border: 1px solid #24324d !important;
    color: #94a3b8 !important;
}

html[data-theme="dark"] .strip-item b,
html[data-skin="shab"] .strip-item b,
[data-theme="dark"] .strip-item b {
    color: #f8fafc !important;
}

html[data-theme="dark"] .plan-trial-box,
html[data-skin="shab"] .plan-trial-box,
[data-theme="dark"] .plan-trial-box {
    background: rgba(234, 179, 8, 0.12) !important;
    border: 1px solid rgba(234, 179, 8, 0.3) !important;
    color: #fef08a !important;
}
html[data-theme="dark"] .plan-trial-box p,
html[data-skin="shab"] .plan-trial-box p,
[data-theme="dark"] .plan-trial-box p {
    color: #fde047 !important;
}

html[data-theme="dark"] .mod-pill,
html[data-skin="shab"] .mod-pill,
[data-theme="dark"] .mod-pill {
    background: #172238 !important;
    border: 1px solid #24324d !important;
    color: #e2e8f0 !important;
}

html[data-theme="dark"] .mod-pill.active,
html[data-skin="shab"] .mod-pill.active,
[data-theme="dark"] .mod-pill.active {
    background: rgba(34, 197, 94, 0.15) !important;
    border-color: rgba(34, 197, 94, 0.3) !important;
    color: #86efac !important;
}

html[data-theme="dark"] .mod-pill.inactive,
html[data-skin="shab"] .mod-pill.inactive,
[data-theme="dark"] .mod-pill.inactive {
    background: #0f172a !important;
    border-color: #334155 !important;
    color: #64748b !important;
}

html[data-theme="dark"] .countdown-bar,
html[data-skin="shab"] .countdown-bar,
[data-theme="dark"] .countdown-bar,
html[data-theme="dark"] .quota-bar,
html[data-skin="shab"] .quota-bar,
[data-theme="dark"] .quota-bar,
html[data-theme="dark"] .bar-fill-wrap,
html[data-skin="shab"] .bar-fill-wrap,
[data-theme="dark"] .bar-fill-wrap {
    background: #1e293b !important;
}

html[data-theme="dark"] .quota-head,
html[data-skin="shab"] .quota-head,
[data-theme="dark"] .quota-head {
    color: #94a3b8 !important;
}

html[data-theme="dark"] .quota-head .num,
html[data-skin="shab"] .quota-head .num,
[data-theme="dark"] .quota-head .num {
    color: #f8fafc !important;
}

html[data-theme="dark"] .quotas-title,
html[data-skin="shab"] .quotas-title,
[data-theme="dark"] .quotas-title,
html[data-theme="dark"] .plan-modules-title,
html[data-skin="shab"] .plan-modules-title,
[data-theme="dark"] .plan-modules-title {
    color: #e2e8f0 !important;
}

html[data-theme="dark"] .bar-label,
html[data-skin="shab"] .bar-label,
[data-theme="dark"] .bar-label {
    color: #94a3b8 !important;
}

html[data-theme="dark"] .crumbs,
html[data-skin="shab"] .crumbs,
[data-theme="dark"] .crumbs {
    color: #94a3b8 !important;
}

html[data-theme="dark"] .crumbs a,
html[data-skin="shab"] .crumbs a,
[data-theme="dark"] .crumbs a {
    color: #94a3b8 !important;
}

html[data-theme="dark"] .crumbs a:hover,
html[data-skin="shab"] .crumbs a:hover,
[data-theme="dark"] .crumbs a:hover {
    color: #60a5fa !important;
}

html[data-theme="dark"] .crumbs .curr,
html[data-skin="shab"] .crumbs .curr,
[data-theme="dark"] .crumbs .curr {
    color: #f8fafc !important;
}


/* ==========================================================================
   مسیر صفحات استاندارد و مدرن (Breadcrumbs)
   ========================================================================== */

.crumbs {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    padding: 8px 16px 4px 16px !important;
    font-size: 12px !important;
    color: #64748b !important;
    line-height: 1.5 !important;
}

.crumbs a {
    color: #64748b !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    transition: color 0.15s !important;
}

.crumbs a:hover {
    color: #2563eb !important;
    text-decoration: underline !important;
}

.crumbs .crumb-sep {
    color: #cbd5e1 !important;
    font-size: 11px !important;
    user-select: none !important;
    margin: 0 1px !important;
}

.crumbs b {
    color: #0f172a !important;
    font-weight: 700 !important;
}

[data-theme="dark"] .crumbs {
    color: #94a3b8 !important;
}
[data-theme="dark"] .crumbs a {
    color: #94a3b8 !important;
}
[data-theme="dark"] .crumbs a:hover {
    color: #60a5fa !important;
}
[data-theme="dark"] .crumbs b {
    color: #f8fafc !important;
}
[data-theme="dark"] .crumbs .crumb-sep {
    color: #475569 !important;
}


/* ==========================================================================
   پخش‌کننده تمام‌صفحه و تعاملی استوری‌ها (Mowsem Story Viewer Modal)
   ========================================================================== */

.mowsem-story-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 99999 !important;
    background: rgba(15, 23, 42, 0.88) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: opacity 0.25s ease !important;
}
.mowsem-story-modal.open {
    opacity: 1 !important;
    pointer-events: auto !important;
}

.mowsem-story-player {
    width: 100% !important;
    max-width: 400px !important;
    height: 82vh !important;
    max-height: 680px !important;
    background: #0f172a !important;
    border-radius: 24px !important;
    overflow: hidden !important;
    position: relative !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1) !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
}

/* نوارهای پیشرفت بالای استوری */
.story-progress-bars {
    position: absolute !important;
    top: 12px !important;
    left: 12px !important;
    right: 12px !important;
    z-index: 30 !important;
    display: flex !important;
    gap: 4px !important;
}
.story-bar-segment {
    flex: 1 !important;
    height: 3px !important;
    background: rgba(255, 255, 255, 0.35) !important;
    border-radius: 999px !important;
    overflow: hidden !important;
}
.story-bar-fill {
    height: 100% !important;
    width: 0% !important;
    background: #ffffff !important;
    border-radius: 999px !important;
}
.story-bar-segment.seen .story-bar-fill {
    width: 100% !important;
}

/* سربرگ استوری */
.story-header {
    position: absolute !important;
    top: 24px !important;
    left: 14px !important;
    right: 14px !important;
    z-index: 30 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    color: #ffffff !important;
}
.story-head-author {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}
.story-head-ring {
    width: 38px !important;
    height: 38px !important;
    border-radius: 50 !important;
    padding: 2px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
}
.story-head-ring .story-mini-ico {
    width: 100% !important;
    height: 100% !important;
    background: #ffffff !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 16px !important;
}
.story-head-meta {
    display: flex !important;
    flex-direction: column !important;
}
.story-head-title {
    font-size: 13px !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6) !important;
}
.story-head-sub {
    font-size: 11px !important;
    color: rgba(255, 255, 255, 0.75) !important;
}
.story-close-btn {
    all: unset !important;
    cursor: pointer !important;
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    background: rgba(0, 0, 0, 0.4) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 20px !important;
    color: #ffffff !important;
    transition: background 0.15s !important;
}
.story-close-btn:hover {
    background: rgba(255, 255, 255, 0.2) !important;
}

/* محتوای رسانه استوری */
.story-body-content {
    flex: 1 !important;
    width: 100% !important;
    height: 100% !important;
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
}
.story-body-content img,
.story-body-content video {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}
.story-rich-card {
    width: 100% !important;
    height: 100% !important;
    padding: 80px 24px 140px 24px !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    color: #ffffff !important;
    position: relative !important;
    background: linear-gradient(145deg, #1e1b4b 0%, #312e81 40%, #0f172a 100%) !important;
}
.story-card-icon-big {
    font-size: 56px !important;
    margin-bottom: 16px !important;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.3)) !important;
    animation: floatStoryIcon 3s ease-in-out infinite alternate !important;
}
@keyframes floatStoryIcon {
    from { transform: translateY(0); }
    to { transform: translateY(-8px); }
}
.story-card-title {
    font-size: 19px !important;
    font-weight: 800 !important;
    margin-bottom: 12px !important;
    color: #ffffff !important;
    line-height: 1.4 !important;
}
.story-card-desc {
    font-size: 13px !important;
    line-height: 1.7 !important;
    color: #e2e8f0 !important;
    max-width: 320px !important;
}

/* فوتر استوری با دکمه اقدام */
.story-footer-sheet {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 30 !important;
    background: linear-gradient(180deg, transparent 0%, rgba(15, 23, 42, 0.95) 40%, #0f172a 100%) !important;
    padding: 30px 18px 18px 18px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
}
.story-footer-desc {
    font-size: 12px !important;
    color: rgba(255, 255, 255, 0.9) !important;
    line-height: 1.5 !important;
    margin: 0 !important;
}
.story-action-btn {
    all: unset !important;
    cursor: pointer !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    width: 100% !important;
    height: 44px !important;
    border-radius: 12px !important;
    background: linear-gradient(135deg, #6366f1 0%, #7c3aed 100%) !important;
    color: #ffffff !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.4) !important;
    transition: transform 0.1s, filter 0.15s !important;
    text-align: center !important;
    text-decoration: none !important;
}
.story-action-btn:hover {
    filter: brightness(1.1) !important;
    transform: translateY(-1px) !important;
}

/* مناطق کلیک چپ و راست برای جابه‌جایی استوری */
.story-nav-tap {
    position: absolute !important;
    top: 55px !important;
    bottom: 110px !important;
    width: 45% !important;
    z-index: 25 !important;
    cursor: pointer !important;
}
.story-nav-tap.right {
    right: 0 !important;
}
.story-nav-tap.left {
    left: 0 !important;
}

/* دکمه‌های ناوبری چپ و راست روی صفحه */
.story-arrow-btn {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 44px !important;
    height: 44px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    cursor: pointer !important;
    z-index: 40 !important;
    font-size: 20px !important;
    line-height: 1 !important;
    transition: all 0.15s !important;
}
.story-arrow-btn:hover {
    background: rgba(255, 255, 255, 0.3) !important;
    transform: translateY(-50%) scale(1.08) !important;
}
.story-arrow-btn.prev-btn { right: -60px !important; }
.story-arrow-btn.next-btn { left: -60px !important; }

@media (max-width: 580px) {
    .story-arrow-btn { display: none !important; }
}

/* ==========================================================================
   استایل‌های صفحه مدیریت استوری‌ها (Settings Stories Manager)
   ========================================================================== */

.stories-mgr-wrap {
    display: flex !important;
    flex-direction: column !important;
    gap: 18px !important;
    width: 100% !important;
}
.stories-mgr-head {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: wrap !important;
    gap: 14px !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 14px !important;
    padding: 16px 20px !important;
}
.stories-mgr-title {
    margin: 0 0 4px 0 !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    color: #0f172a !important;
}
.stories-mgr-sub {
    margin: 0 !important;
    font-size: 12px !important;
    color: #64748b !important;
}
.stories-mgr-actions {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}
.dash-btn-primary-sm {
    all: unset !important;
    cursor: pointer !important;
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    background: #2563eb !important;
    color: #ffffff !important;
    padding: 7px 16px !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25) !important;
    transition: all 0.15s !important;
    text-decoration: none !important;
}
.dash-btn-primary-sm:hover {
    background: #1d4ed8 !important;
    transform: translateY(-1px) !important;
}

.stories-preview-card,
.stories-table-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 14px !important;
    padding: 18px 20px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}
.preview-card-h {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    margin-bottom: 12px !important;
    flex-wrap: wrap !important;
}
.preview-badge {
    background: #ede9fe !important;
    color: #7c3aed !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    padding: 4px 10px !important;
    border-radius: 6px !important;
}
.preview-hint {
    font-size: 12px !important;
    color: #64748b !important;
}

.mowsem-table {
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    font-size: 12px !important;
}
.mowsem-table th {
    background: #f8fafc !important;
    color: #475569 !important;
    font-weight: 700 !important;
    padding: 12px 14px !important;
    border-bottom: 1px solid #e2e8f0 !important;
}
.mowsem-table td {
    padding: 12px 14px !important;
    border-bottom: 1px solid #f1f5f9 !important;
    vertical-align: middle !important;
}
.story-mini-ring {
    width: 38px !important;
    height: 38px !important;
    border-radius: 50% !important;
    padding: 2px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
}
.story-mini-ico {
    width: 100% !important;
    height: 100% !important;
    background: #ffffff !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 18px !important;
}
.story-cell-title {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
}
.story-cell-sub {
    font-size: 11px !important;
    color: #64748b !important;
}
.story-cell-sub code {
    background: #f1f5f9 !important;
    padding: 1px 5px !important;
    border-radius: 4px !important;
}
.story-cell-link {
    font-size: 11px !important;
    color: #2563eb !important;
}
.color-pill {
    display: inline-block !important;
    padding: 3px 10px !important;
    border-radius: 999px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    color: #ffffff !important;
}
.status-toggle-btn {
    all: unset !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 4px 10px !important;
    border-radius: 999px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    border: 1px solid #e2e8f0 !important;
    transition: all 0.15s !important;
}
.status-toggle-btn.active {
    background: #f0fdf4 !important;
    border-color: #bbf7d0 !important;
    color: #166534 !important;
}
.status-toggle-btn.inactive {
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
    color: #64748b !important;
}
.status-toggle-btn .dot {
    width: 7px !important;
    height: 7px !important;
    border-radius: 50% !important;
    display: inline-block !important;
}
.status-toggle-btn .dot.green { background: #16a34a !important; }
.status-toggle-btn .dot.gray  { background: #94a3b8 !important; }

.table-actions {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
}
.btn-icon {
    all: unset !important;
    cursor: pointer !important;
    width: 30px !important;
    height: 30px !important;
    border-radius: 6px !important;
    border: 1px solid #e2e8f0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #475569 !important;
    transition: all 0.15s !important;
}
.btn-icon:hover {
    background: #f1f5f9 !important;
    color: #0f172a !important;
}
.btn-icon.del:hover {
    background: #fee2e2 !important;
    border-color: #fca5a5 !important;
    color: #dc2626 !important;
}

/* استایل‌های فرم ایجاد و ویرایش استوری */
.story-form-wrap {
    max-width: 760px !important;
    margin: 0 auto !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
}
.story-form-head {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
}
.back-link {
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #2563eb !important;
    text-decoration: none !important;
    margin-bottom: 6px !important;
}
.story-form-title {
    margin: 0 !important;
    font-size: 18px !important;
    font-weight: 800 !important;
    color: #0f172a !important;
}
.story-form-sub {
    margin: 0 !important;
    font-size: 12px !important;
    color: #64748b !important;
}
.story-main-form {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 14px !important;
    padding: 24px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
}
.form-grid-2 {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 16px 20px !important;
}
.form-group {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
}
.form-group.span-2 {
    grid-column: span 2 !important;
}
.form-group label {
    font-size: 12px !important;
    font-weight: 700 !important;
    color: #334155 !important;
}
.form-group .hint {
    font-size: 11px !important;
    color: #94a3b8 !important;
}
.mowsem-input,
.mowsem-file-input {
    width: 100% !important;
    height: var(--ctrl-h, 34px) !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: var(--ctrl-radius, 6px) !important;
    padding: 0 var(--ctrl-pad-x, 10px) !important;
    font-size: var(--ctrl-font-size, 12.5px) !important;
    line-height: var(--ctrl-line-height, 1.4) !important;
    box-sizing: border-box !important;
    font-family: inherit !important;
    transition: border-color 0.15s, box-shadow 0.15s !important;
}
.mowsem-textarea {
    width: 100% !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: var(--ctrl-radius, 6px) !important;
    padding: 6px var(--ctrl-pad-x, 10px) !important;
    font-size: var(--ctrl-font-size, 12.5px) !important;
    line-height: var(--ctrl-line-height, 1.4) !important;
    box-sizing: border-box !important;
    font-family: inherit !important;
    transition: border-color 0.15s, box-shadow 0.15s !important;
}
.mowsem-input:focus,
.mowsem-textarea:focus {
    border-color: #2563eb !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12) !important;
}
.mowsem-input.ltr {
    direction: ltr !important;
    text-align: left !important;
}
.color-picker-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)) !important;
    gap: 10px !important;
}
.color-picker-item {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    cursor: pointer !important;
    padding: 6px 10px !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    transition: border-color 0.15s, background 0.15s !important;
}
.color-picker-item:hover {
    border-color: #94a3b8 !important;
    background: #f8fafc !important;
}
.color-picker-item input:checked + .color-sample {
    outline: 2px solid #0f172a !important;
    outline-offset: 2px !important;
}
.color-sample {
    width: 22px !important;
    height: 22px !important;
    border-radius: 50% !important;
    flex-shrink: 0 !important;
}
.color-name {
    font-size: 11px !important;
    font-weight: 600 !important;
    color: #334155 !important;
}
.media-type-tabs {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    flex-wrap: wrap !important;
}
.media-tab {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    cursor: pointer !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #475569 !important;
    padding: 6px 14px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
}
.media-tab input:checked + span {
    color: #2563eb !important;
    font-weight: 700 !important;
}
.form-footer-actions {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 12px !important;
    padding-top: 14px !important;
    border-top: 1px solid #f1f5f9 !important;
}
.btn-cancel {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #64748b !important;
    text-decoration: none !important;
    padding: 8px 16px !important;
}

/* ==========================================================================
   مودال اختصاصی افزودن و ویرایش حساب کل (Mowsem Account / Kol Modal)
   مطابق با طرح دقیق کاریا حساب
   ========================================================================== */

dialog.modal:has(.acc-modal-form) {
    width: min(720px, 95vw) !important;
    max-width: 720px !important;
    border-radius: 14px !important;
    border: none !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28) !important;
    overflow: hidden !important;
    padding: 0 !important;
}

.acc-modal-header {
    background: #6340bd !important;
    background: linear-gradient(135deg, #5b21b6 0%, #7c3aed 100%) !important;
    padding: 16px 24px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    border-bottom: none !important;
    color: #ffffff !important;
}

.acc-modal-title-box {
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
    text-align: right !important;
}

.acc-modal-kicker {
    font-size: 12px !important;
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 500 !important;
}

.acc-modal-title {
    font-size: 17px !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    margin: 0 !important;
    line-height: 1.3 !important;
}

.acc-modal-close {
    width: 28px !important;
    height: 28px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.22) !important;
    color: #ffffff !important;
    border: none !important;
    font-size: 18px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: background 0.15s ease !important;
    padding: 0 !important;
    line-height: 1 !important;
}

.acc-modal-close:hover {
    background: rgba(255, 255, 255, 0.38) !important;
}

.acc-modal-body {
    padding: 24px 28px !important;
    background: #ffffff !important;
    box-sizing: border-box !important;
}

html[data-theme="dark"] .acc-modal-body,
html[data-skin="shab"] .acc-modal-body {
    background: #131d31 !important;
}

.acc-form-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 18px !important;
}

.acc-form-row {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    width: 100% !important;
}

.acc-form-row.c2 {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 16px !important;
}

@media (max-width: 600px) {
    .acc-form-row.c2 {
        grid-template-columns: 1fr !important;
    }
}

.acc-label-wrap {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    color: #334155 !important;
    user-select: none !important;
}

html[data-theme="dark"] .acc-label-wrap,
html[data-skin="shab"] .acc-label-wrap {
    color: #e2e8f0 !important;
}

.acc-label-title {
    font-weight: 700 !important;
}

.acc-label-wrap .req {
    color: #ef4444 !important;
    font-weight: 800 !important;
    margin-right: 2px !important;
}

.acc-label-wrap .hlp {
    font-size: 11px !important;
    font-weight: 400 !important;
    color: #94a3b8 !important;
}

.acc-input,
.acc-select {
    height: var(--ctrl-h, 34px) !important;
    border-radius: var(--ctrl-radius, 6px) !important;
    border: 1px solid #cbd5e1 !important;
    padding: 0 var(--ctrl-pad-x, 10px) !important;
    font-size: var(--ctrl-font-size, 12.5px) !important;
    line-height: var(--ctrl-line-height, 1.4) !important;
    background: #ffffff !important;
    color: #0f172a !important;
    box-sizing: border-box !important;
    width: 100% !important;
    font-family: inherit !important;
    transition: border-color 0.15s, box-shadow 0.15s !important;
}

.acc-input::placeholder {
    color: #94a3b8 !important;
    font-size: 12.5px !important;
}

html[data-theme="dark"] .acc-input,
html[data-theme="dark"] .acc-select,
html[data-skin="shab"] .acc-input,
html[data-skin="shab"] .acc-select {
    background: #172238 !important;
    border-color: #24324d !important;
    color: #f8fafc !important;
}

html[data-theme="dark"] .acc-input::placeholder,
html[data-skin="shab"] .acc-input::placeholder {
    color: #64748b !important;
}

.acc-input:focus,
.acc-select:focus {
    border-color: #7c3aed !important;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15) !important;
    outline: none !important;
}

.acc-combo-wrap {
    position: relative !important;
    width: 100% !important;
}

.acc-active-box {
    border: 1px solid #e2e8f0 !important;
    border-radius: 10px !important;
    padding: 14px 16px !important;
    background: #fafafb !important;
    margin-top: 4px !important;
    box-sizing: border-box !important;
}

html[data-theme="dark"] .acc-active-box,
html[data-skin="shab"] .acc-active-box {
    background: #131d31 !important;
    border-color: #24324d !important;
}

.acc-check-label {
    display: flex !important;
    align-items: flex-start !important;
    gap: 12px !important;
    cursor: pointer !important;
    user-select: none !important;
}

.acc-check-label input[type="checkbox"] {
    width: 18px !important;
    height: 18px !important;
    margin-top: 2px !important;
    accent-color: #7c3aed !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
}

.acc-check-text {
    display: flex !important;
    flex-direction: column !important;
    gap: 3px !important;
}

.acc-check-title {
    font-size: 13px !important;
    font-weight: 700 !important;
    color: #1e293b !important;
}

html[data-theme="dark"] .acc-check-title,
html[data-skin="shab"] .acc-check-title {
    color: #f8fafc !important;
}

.acc-check-desc {
    font-size: 11px !important;
    color: #64748b !important;
    line-height: 1.5 !important;
}

html[data-theme="dark"] .acc-check-desc,
html[data-skin="shab"] .acc-check-desc {
    color: #94a3b8 !important;
}

.acc-modal-footer {
    padding: 14px 28px !important;
    border-top: 1px solid #e2e8f0 !important;
    background: #ffffff !important;
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    gap: 12px !important;
    box-sizing: border-box !important;
}

html[data-theme="dark"] .acc-modal-footer,
html[data-skin="shab"] .acc-modal-footer {
    background: #131d31 !important;
    border-color: #24324d !important;
}

.btn-cancel-acc {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #475569 !important;
    border-radius: 8px !important;
    padding: 8px 24px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.15s !important;
    text-decoration: none !important;
}

.btn-cancel-acc:hover {
    background: #f1f5f9 !important;
    border-color: #94a3b8 !important;
    color: #0f172a !important;
}

html[data-theme="dark"] .btn-cancel-acc,
html[data-skin="shab"] .btn-cancel-acc {
    background: #172238 !important;
    border-color: #334155 !important;
    color: #e2e8f0 !important;
}

html[data-theme="dark"] .btn-cancel-acc:hover,
html[data-skin="shab"] .btn-cancel-acc:hover {
    background: #1e293b !important;
    border-color: #475569 !important;
    color: #ffffff !important;
}

.btn-save-acc {
    background: #7c3aed !important;
    border: 1px solid #7c3aed !important;
    color: #ffffff !important;
    border-radius: 8px !important;
    padding: 8px 28px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.15s !important;
    box-shadow: 0 2px 6px rgba(124, 58, 237, 0.25) !important;
}

.btn-save-acc:hover {
    background: #6d28d9 !important;
    border-color: #6d28d9 !important;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.35) !important;
}

/* تب کل‌ها با بج نارنجی مثل تصویر کاریا حساب */
.chips .chip.chip-kol.on,
.chips .chip.on[href*="tab=kol"] {
    background: #f97316 !important;
    border-color: #ea580c !important;
    color: #ffffff !important;
}

.chips .chip.chip-kol.on .n,
.chips .chip.on[href*="tab=kol"] .n {
    background: rgba(255, 255, 255, 0.28) !important;
    color: #ffffff !important;
}


/* ══════════════════════════════════════════════════════════════════════════
   نمایش ستونی حساب‌ها (Miller Columns) مطابق طراحی کاریا / موسم
   ══════════════════════════════════════════════════════════════════════════ */

.miller-wrap {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    margin-bottom: 16px !important;
    overflow: hidden !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03) !important;
}

html[data-theme="dark"] .miller-wrap,
html[data-skin="shab"] .miller-wrap {
    background: #111a2e !important;
    border-color: #24324d !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

.miller {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    min-height: 480px !important;
    height: calc(100vh - 250px) !important;
    background: #ffffff !important;
    transition: all 0.2s ease !important;
}

html[data-theme="dark"] .miller,
html[data-skin="shab"] .miller {
    background: #111a2e !important;
}

.miller.expanded {
    grid-template-columns: repeat(4, minmax(290px, 1fr)) !important;
    overflow-x: auto !important;
}

.miller .col {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    min-width: 0 !important;
    border-left: 1px solid #e2e8f0 !important;
    background: #ffffff !important;
}

.miller .col[data-l="4"],
.miller .col:last-child {
    border-left: none !important;
}

html[data-theme="dark"] .miller .col,
html[data-skin="shab"] .miller .col {
    background: #111a2e !important;
    border-left-color: #24324d !important;
}

/* هدر هر ستون */
.miller .col-h {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 10px 14px !important;
    border-bottom: 1px solid #e2e8f0 !important;
    background: #f8fafc !important;
    height: 52px !important;
    box-sizing: border-box !important;
    user-select: none !important;
}

html[data-theme="dark"] .miller .col-h,
html[data-skin="shab"] .miller .col-h {
    background: #152238 !important;
    border-bottom-color: #24324d !important;
}

.miller .col-h-info {
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
    min-width: 0 !important;
}

.miller .col-h-title {
    font-size: 13.5px !important;
    font-weight: 800 !important;
    color: #1e293b !important;
    white-space: nowrap !important;
}

html[data-theme="dark"] .miller .col-h-title,
html[data-skin="shab"] .miller .col-h-title {
    color: #f8fafc !important;
}

.miller .col-h-sub {
    font-size: 11px !important;
    color: #94a3b8 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

html[data-theme="dark"] .miller .col-h-sub,
html[data-skin="shab"] .miller .col-h-sub {
    color: #64748b !important;
}

.miller .col-h-actions {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    margin-right: auto !important;
}

/* دکمه مربع سبز + در هدر */
.miller .col-h-add {
    width: 24px !important;
    height: 24px !important;
    border-radius: 6px !important;
    background: #22c55e !important;
    color: #ffffff !important;
    border: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    padding: 0 !important;
    transition: background 0.15s, opacity 0.15s, transform 0.1s !important;
}

.miller .col-h-add:hover:not(:disabled) {
    background: #16a34a !important;
}

.miller .col-h-add:active:not(:disabled) {
    transform: scale(0.95) !important;
}

.miller .col-h-add:disabled,
.miller .col-h-add.disabled {
    background: #e2e8f0 !important;
    color: #94a3b8 !important;
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

html[data-theme="dark"] .miller .col-h-add:disabled,
html[data-skin="shab"] .miller .col-h-add:disabled {
    background: #24324d !important;
    color: #475569 !important;
}

/* بج دایره‌ای بنفش تعداد */
.miller .col-badge {
    min-width: 20px !important;
    height: 20px !important;
    border-radius: 50% !important;
    padding: 0 5px !important;
    background: #ede9fe !important;
    color: #7c3aed !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    transition: all 0.15s !important;
}

.miller .col-badge.muted {
    background: #f1f5f9 !important;
    color: #94a3b8 !important;
}

html[data-theme="dark"] .miller .col-badge,
html[data-skin="shab"] .miller .col-badge {
    background: rgba(139, 92, 246, 0.25) !important;
    color: #c4b5fd !important;
}

html[data-theme="dark"] .miller .col-badge.muted,
html[data-skin="shab"] .miller .col-badge.muted {
    background: rgba(148, 163, 184, 0.12) !important;
    color: #64748b !important;
}

/* بدنه فهرست ستون */
.miller .list {
    flex: 1 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 0 !important;
    background: #ffffff !important;
}

html[data-theme="dark"] .miller .list,
html[data-skin="shab"] .miller .list {
    background: #111a2e !important;
}

/* سطرهای داخل هر ستون */
.miller .col-item {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 9px 12px !important;
    border-bottom: 1px solid #f1f5f9 !important;
    cursor: pointer !important;
    user-select: none !important;
    transition: background 0.12s !important;
    gap: 8px !important;
}

html[data-theme="dark"] .miller .col-item,
html[data-skin="shab"] .miller .col-item {
    border-bottom-color: #1e293b !important;
}

.miller .col-item:hover {
    background: #f8fafc !important;
}

html[data-theme="dark"] .miller .col-item:hover,
html[data-skin="shab"] .miller .col-item:hover {
    background: #172238 !important;
}

.miller .col-item.on {
    background: #f5f3ff !important;
    border-right: 3px solid #7c3aed !important;
}

html[data-theme="dark"] .miller .col-item.on,
html[data-skin="shab"] .miller .col-item.on {
    background: rgba(124, 58, 237, 0.16) !important;
    border-right-color: #a78bfa !important;
}

.miller .col-item-main {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    min-width: 0 !important;
    flex: 1 !important;
}

.miller .col-item-code {
    font-weight: 800 !important;
    font-size: 12.5px !important;
    color: #0f172a !important;
    white-space: nowrap !important;
}

html[data-theme="dark"] .miller .col-item-code,
html[data-skin="shab"] .miller .col-item-code {
    color: #f1f5f9 !important;
}

.miller .col-item-name {
    font-size: 13px !important;
    color: #334155 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

html[data-theme="dark"] .miller .col-item-name,
html[data-skin="shab"] .miller .col-item-name {
    color: #cbd5e1 !important;
}

.miller .col-item-ops {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    margin-right: auto !important;
    flex-shrink: 0 !important;
}

/* دکمه کوچک سبز + در هر سطر */
.miller .col-item-add {
    width: 20px !important;
    height: 20px !important;
    border-radius: 5px !important;
    background: #22c55e !important;
    color: #ffffff !important;
    border: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    padding: 0 !important;
    transition: background 0.15s !important;
}

.miller .col-item-add:hover {
    background: #16a34a !important;
}

/* دکمه ویرایش مداد در هر سطر */
.miller .col-item-edit {
    width: 22px !important;
    height: 22px !important;
    border-radius: 5px !important;
    background: transparent !important;
    color: #8b5cf6 !important;
    border: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    padding: 0 !important;
    transition: all 0.15s !important;
}

.miller .col-item-edit:hover {
    background: #ede9fe !important;
    color: #6d28d9 !important;
}

html[data-theme="dark"] .miller .col-item-edit:hover,
html[data-skin="shab"] .miller .col-item-edit:hover {
    background: rgba(139, 92, 246, 0.22) !important;
    color: #c4b5fd !important;
}

/* حالت خالی هر ستون */
.miller .empty {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 100% !important;
    min-height: 250px !important;
    color: #94a3b8 !important;
    font-size: 13px !important;
    padding: 20px !important;
    text-align: center !important;
}

html[data-theme="dark"] .miller .empty,
html[data-skin="shab"] .miller .empty {
    color: #64748b !important;
}

.miller .col-item.match-hl {
    background: #fef3c7 !important;
}

html[data-theme="dark"] .miller .col-item.match-hl,
html[data-skin="shab"] .miller .col-item.match-hl {
    background: rgba(245, 158, 11, 0.2) !important;
}

/* راهنماهای پایین صفحه (چیپ‌ها) */
.page .hints {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    margin-top: 14px !important;
    flex-wrap: wrap !important;
    border-top: none !important;
    padding: 0 !important;
}

.page .hint {
    border: 1px solid #cbd5e1 !important;
    border-radius: 9999px !important;
    padding: 6px 16px !important;
    font-size: 12px !important;
    color: #64748b !important;
    background: #ffffff !important;
}

html[data-theme="dark"] .page .hint,
html[data-skin="shab"] .page .hint {
    background: #111a2e !important;
    border-color: #24324d !important;
    color: #94a3b8 !important;
}

.page .hint.blue {
    border-color: #60a5fa !important;
    background: #eff6ff !important;
    color: #1d4ed8 !important;
    font-weight: 600 !important;
}

html[data-theme="dark"] .page .hint.blue,
html[data-skin="shab"] .page .hint.blue {
    border-color: rgba(96, 165, 250, 0.45) !important;
    background: rgba(59, 130, 246, 0.16) !important;
    color: #93c5fd !important;
}

/* چیدمان پیشخوان: پنل «بسته‌ی شما» پنهان ← نمودار تمام‌عرض؛ انواع کارت */
.dash-middle-grid.solo { grid-template-columns: 1fr; }
.dash-kpi-grid.kpi-type-compact .dash-kpi-card { min-height: 0 !important; padding: 10px 12px !important; }
.dash-kpi-grid.kpi-type-compact .kpi-sub, .dash-kpi-grid.kpi-type-compact .kpi-foot { display: none !important; }
.dash-kpi-grid.kpi-type-compact .kpi-ico-wrap { width: 26px !important; height: 26px !important; }
.dash-kpi-grid.kpi-type-tile .dash-kpi-card { background: linear-gradient(160deg, color-mix(in srgb, var(--tile, #7c3aed) 16%, transparent), transparent 75%) !important; border-color: color-mix(in srgb, var(--tile, #7c3aed) 35%, transparent) !important; }
.dash-kpi-grid.kpi-type-tile .kpi-val { color: var(--tile, #7c3aed) !important; }
.dash-kpi-grid.kpi-type-tile .kpi-foot { border-top-color: color-mix(in srgb, var(--tile, #7c3aed) 30%, transparent) !important; }
.kpi-type-tile .card-sales { --tile: #7c3aed; } .kpi-type-tile .card-docs { --tile: #ea580c; } .kpi-type-tile .card-receipts { --tile: #16a34a; } .kpi-type-tile .card-bank { --tile: #0d9488; }
.kpi-type-tile .card-cash { --tile: #15803d; } .kpi-type-tile .card-cheque-in { --tile: #d97706; } .kpi-type-tile .card-cheque-dep { --tile: #e11d48; } .kpi-type-tile .card-package { --tile: #6d28d9; }

/* زیرمنوی قفل در لایسنس */
.rail .flyout-pane .flyout-lock { font-style: normal; font-size: 10px; margin-inline-start: auto; opacity: .8; }

/* انتخابگر ردیف (کالا در فاکتور و…) — مثل acc-picker سایت اصلی */
.cb-drop { position: fixed; z-index: 1200; direction: rtl; background: var(--panel); border: 1px solid var(--line2); border-radius: 8px; max-width: 560px; max-height: 240px; overflow: auto; padding: 4px 0; box-shadow: 0 12px 28px rgba(23, 79, 159, .18); }
.cb-drop .cb-find { display: block; box-sizing: border-box; width: 100%; min-height: 0; padding: 7px 10px; font: inherit; font-size: 11.5px; color: var(--text); background: var(--panel2) !important; border: 0 !important; border-bottom: 1px solid var(--line) !important; border-radius: 0 !important; outline: none; box-shadow: none !important; }
.cb-drop .cb-find:focus { background: var(--panel) !important; border-bottom-color: var(--primary) !important; }
.cb-drop .cb-top { position: sticky; top: 0; z-index: 1; display: flex; align-items: stretch; background: var(--panel); border-bottom: 1px solid var(--line); }
.cb-drop button { font: inherit; cursor: pointer; background: none; border: 0; color: var(--text); }
.cb-drop .cb-add { flex: 1; min-width: 0; display: flex; align-items: center; gap: 7px; padding: 8px 12px; font-size: 12px; font-weight: 700; color: var(--primary); text-align: start; }
.cb-drop .cb-add:hover { background: var(--sel); }
.cb-drop .cb-add i { width: 17px; height: 17px; flex-shrink: 0; display: grid; place-items: center; border-radius: 999px; background: var(--primary); color: #fff; font-style: normal; font-size: 12px; line-height: 1; }
.cb-drop .cb-add span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cb-drop .cb-ref { width: 34px; flex: 0 0 auto; display: grid; place-items: center; margin-inline-start: auto; color: var(--muted); }
.cb-drop .cb-ref:hover:not(:disabled) { background: var(--panel2); color: var(--primary); } .cb-drop .cb-ref:disabled { opacity: .7; cursor: default; }
.cb-drop .cb-row { display: flex; align-items: stretch; gap: 2px; border-bottom: 1px solid var(--line); }
.cb-drop .cb-row:last-child { border-bottom: 0; }
.cb-drop .cb-row.on { background: var(--sel); }
.cb-drop .cb-pick { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 6px 12px; font-size: 12px; text-align: start; }
.cb-drop .cb-pick:hover { background: var(--sel); } .cb-drop .cb-row.on .cb-pick:hover { background: none; }
.cb-drop .cb-pick b { flex-shrink: 0; min-width: 62px; color: var(--primary); font-weight: 700; font-variant-numeric: tabular-nums; }
.cb-drop .cb-pick span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cb-drop .cb-edit { width: 30px; flex: 0 0 auto; display: grid; place-items: center; padding: 0; color: var(--muted); opacity: 0; transition: opacity .12s, color .12s; }
.cb-drop .cb-row.on .cb-edit, .cb-drop .cb-row:hover .cb-edit { opacity: 1; } .cb-drop .cb-edit:hover { color: var(--primary); background: var(--panel); }
@media (hover: none) { .cb-drop .cb-edit { opacity: 1; } }
.cb-drop p { margin: 0; padding: 14px 12px; text-align: center; font-size: 11px; color: var(--muted); }
/* فرم کالا: ردیفِ «خرید و فروش» مثل سایت اصلی */
.it-flags { display: flex; flex-wrap: wrap; gap: 10px; }
.it-flags .it-check { min-height: 40px; padding: 6px 12px; }
.it-flags .it-check:has(input:checked) { border-color: var(--primary-2); background: color-mix(in srgb, var(--primary-2) 9%, #fff); }

/* فرم کالا: دو بخش اصلی «کالا / خدمت» بالای زبانه‌ها (مثل سایت مرجع) */
.it-form .it-kind { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: -12px -14px 0; padding: 10px 14px; background: #fff8f3; }
.it-form .it-kind button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; font: inherit; font-size: 12px; font-weight: 700; color: #6b7a8c; background: #fff; border: 1px solid var(--mline, var(--line)); border-radius: 9px !important; cursor: pointer; transition: background .15s, color .15s; }
.it-form .it-kind button:hover { color: #b4521f; }
.it-form .it-kind button.on { background: #ff6b3d; border-color: #ff6b3d; color: #fff; }
.it-form .it-kind + .m-tabs { margin-top: 0; }
.it-form [data-goods][hidden] { display: none !important; }
.it-disc .it-hint { margin: 4px 0 0; }

/* فرم کالا: عکس‌ها، ویژگی محصول، یادآور، ویترین (مثل دیکاتو) */
.it-photos { display: flex; flex-wrap: wrap; gap: 8px; }
.it-ph { position: relative; width: 92px; height: 92px; border-radius: 10px; overflow: hidden; border: 1px solid var(--mline, var(--line)); background: #f6f8fc; cursor: default; }
.it-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.it-ph.add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 1.5px dashed #ff6b3d; color: #b4521f; cursor: pointer; background: #fff8f3; }
.it-ph.add b { font-size: 22px; line-height: 1; } .it-ph.add small { font-size: 10px; }
.it-ph em { position: absolute; inset-inline-start: 4px; bottom: 4px; font-style: normal; font-size: 9.5px; font-weight: 700; color: #fff; background: rgba(255,107,61,.92); border-radius: 5px; padding: 1px 6px; }
.it-ph-x { position: absolute; top: 3px; inset-inline-end: 3px; width: 22px; height: 22px; border: 0; border-radius: 50% !important; background: rgba(0,0,0,.55); color: #fff; font-size: 14px; line-height: 1; cursor: pointer; }
.it-ph[hidden] { display: none; }
.it-row.v { grid-template-columns: 1.4fr 1fr 1fr .8fr 1fr 30px; }
@media (max-width: 760px) { .it-row.v { grid-template-columns: 1fr 1fr auto; } }
.it-sw { min-height: 44px; margin-bottom: 4px; }
.it-rems { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; } .it-rems:empty { display: none; }
.it-rem { display: flex; align-items: center; gap: 2px; } .it-rem input { width: 120px; min-height: 32px; }
.it-rem-q { display: flex; flex-wrap: wrap; gap: 6px; }
#it-shop-note { width: 100%; margin-top: 6px; resize: vertical; font: inherit; }
.it-due { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: #ffe5df; color: #c2410c; font-weight: 700; }
.it-form .it-f.full { grid-column: 1 / -1; }
.it-row.v { grid-template-columns: 1.4fr 1fr 1fr .8fr 1fr .8fr 30px; }
.it-vstock { text-align: center; font-weight: 700; color: #335474; font-variant-numeric: tabular-nums; }

/* فرم کالا با تب‌های فرم مرجع: سربرگ، جدول‌های بارکد/رویداد/انبار/تامین‌کننده */
.it-form .it-head { display: grid; grid-template-columns: 150px minmax(0, 1fr) 230px; gap: 9px 11px; margin: -12px -14px 0; padding: 12px 14px 8px; background: #fff8f3; border-bottom: 1px solid var(--mline, var(--line)); }
.it-form .it-head + .it-kind { margin-top: 0; }
.it-form .it-state .it-box { display: flex; align-items: center; gap: 8px; height: 34px; }
.it-form .it-state b { flex: 1; text-align: center; padding: 6px 8px; border-radius: 8px; font-size: 12px; background: #e9f8ef; color: #1f8a4c; }
.it-form .it-state b.off { background: #fdecec; color: #c0392b; }
.it-form .it-tw { border: 1px solid var(--mline, var(--line)); border-radius: 9px; overflow: auto; max-height: 340px; background: #fff; }
.it-form .it-tw + .it-tw, .it-form .it-grid + .it-tw { margin-top: 10px; }
.it-form table.it-tbl td, .it-form table.it-tbl th { font-size: 12px; padding: 6px 8px; }
.it-form table.it-tbl tfoot th { background: var(--panel2, #f6f7f9); font-weight: 700; }
.it-form table.it-tbl td.neg { color: #c0392b; }
.it-form table.it-tbl tr.sel td { background: #fff3ec; }
.it-form table.it-tbl input.bc { width: 100%; border: 0; background: transparent; font: inherit; padding: 3px 4px; }
.it-form table.it-tbl input.bc:focus { outline: 1px solid #ff6b3d; border-radius: 5px; background: #fff; }
.it-form .it-tw .it-empty { margin: 0; padding: 14px; text-align: center; }
.it-form .it-bcw { display: grid; grid-template-columns: minmax(0, 1fr) 120px; gap: 10px; align-items: start; }
.it-form .it-side { display: flex; flex-direction: column; gap: 6px; }
.it-form .it-side .btn { width: 100%; justify-content: center; }
.it-form .m-f .it-del { margin-inline-end: auto; }
@media (max-width: 720px) { .it-form .it-head { grid-template-columns: 1fr; } .it-form .it-bcw { grid-template-columns: 1fr; } .it-form .it-side { flex-direction: row; flex-wrap: wrap; } }

/* فرم کالا مطابق فرم ItemInfo مرجع: نوار فرمان، دو ستون اطلاعات کلی، fieldsetها، پنجره‌ی بارکد */
.it-ref .it-menu { display: flex; gap: 2px; padding: 4px 12px; border-bottom: 1px solid var(--mline, var(--line)); background: #fbfbfc; }
.it-ref .it-menu button { font: inherit; font-size: 12px; background: none; border: 0; padding: 4px 10px; border-radius: 6px; cursor: pointer; color: #374151; }
.it-ref .it-menu button:hover { background: #fff1ea; color: #b4521f; }
.it-ref .it-head { grid-template-columns: 150px minmax(0, 1fr) 240px; }
.it-ref #it-hname { background: #f4f5f7; color: #4b5563; }
.it-ref .it-head + .m-tabs { margin-top: 10px; }
.it-ref .it-grid.c1 { grid-template-columns: minmax(0, 1fr); }
.it-ref .it-grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.it-ref .it-grid.c2 .wide { grid-column: 1 / -1; }
.it-ref .it-gen { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.it-ref .it-gen-l { padding-inline-start: 14px; border-inline-start: 1px dashed var(--mline, var(--line)); }
.it-ref .it-box { display: flex; gap: 6px; align-items: center; }
.it-ref .it-box > input { flex: 1; min-width: 0; }
.it-ref .it-fs { border: 1px solid var(--mline, var(--line)); border-radius: 10px; padding: 8px 12px 12px; margin: 0 0 10px; min-width: 0; }
.it-ref .it-fs legend { font-size: 12px; font-weight: 700; color: #b4521f; padding: 0 6px; }
.it-ref .it-pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)) minmax(170px, .8fr); }
.it-ref .it-col { display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.it-ref .it-flags.v { gap: 6px; }
.it-ref .it-flags.v .it-check { margin: 0; }
.it-ref .it-psplit { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 12px; align-items: start; }
.it-ref details.it-sub > summary { cursor: pointer; font-size: 12px; font-weight: 700; color: #6b7a8c; margin-bottom: 6px; }
.it-ref .it-tw.tall { min-height: 260px; }
.it-ref table.it-sel tbody tr { cursor: pointer; }
.it-ref .it-def { color: #1f8a4c; }
.it-ref .it-dlg { position: relative; margin: 10px auto 0; max-width: 420px; padding: 12px 14px; border: 1px solid var(--mline, var(--line)); border-radius: 12px; background: #fff; box-shadow: 0 10px 30px rgba(15, 23, 42, .14); display: grid; gap: 9px; }
.it-ref .it-dlg[hidden] { display: none; }
.it-ref .it-dlg h4 { margin: 0; font-size: 12.5px; }
.it-ref .it-dlg-f { display: flex; gap: 6px; justify-content: flex-start; }
.it-ref .it-row.u { grid-template-columns: 170px 110px minmax(0, 1fr) 150px 90px 110px 30px; }
.it-ref .it-cb { display: flex; justify-content: center; }
.it-ref .pf-alert.ok { background: #e9f8ef; color: #1f8a4c; }
.it-ref .it-res.ok { color: #1f8a4c; }
.it-ref .m-f .it-del { margin-inline-end: auto; color: #c0392b; }
@media (max-width: 860px) { .it-ref .it-gen, .it-ref .it-psplit, .it-ref .it-pgrid { grid-template-columns: 1fr; } .it-ref .it-gen-l { border: 0; padding: 0; } .it-ref .it-row.u { grid-template-columns: 1fr 1fr auto; } }
/* «بارکد جدید کالا» به‌شکل پنجره‌ی بازشو روی فرم، با پس‌زمینه‌ی تیره */
.it-ref .it-dlg { position: fixed; inset: 50% auto auto 50%; transform: translate(-50%, -50%); z-index: 1000; width: min(420px, calc(100vw - 32px)); margin: 0;
    box-shadow: 0 0 0 100vmax rgba(15, 23, 42, .35), 0 18px 40px rgba(15, 23, 42, .25); animation: it-dlg-in .14s ease-out; }
.it-ref .it-dlg h4 { margin: -12px -14px 4px; padding: 10px 14px; border-bottom: 1px solid var(--mline, var(--line)); background: #fbfbfc; border-radius: 12px 12px 0 0; }
.it-ref .it-dlg .it-f { display: grid; grid-template-columns: 80px minmax(0, 1fr); align-items: center; gap: 8px; }
.it-ref .it-dlg-f { justify-content: center; padding-top: 4px; }
@keyframes it-dlg-in { from { opacity: 0; transform: translate(-50%, -48%); } }
@media (prefers-reduced-motion: reduce) { .it-ref .it-dlg { animation: none; } }
/* برچسب کنار خانه (مثل فرم مرجع) و خانه‌ی باریک‌تر */
.it-ref .it-f.it-inl { display: grid; grid-template-columns: 130px minmax(0, 240px); align-items: center; gap: 4px 10px; }
.it-ref .it-f.it-inl.wide { grid-template-columns: 130px minmax(0, 1fr); }
.it-ref .it-f.it-inl > span { margin: 0; white-space: nowrap; }
.it-ref .it-f.it-inl input::placeholder { color: #a0a8b4; font-size: 11.5px; }
.it-ref .it-f.it-inl > .it-inl-box { grid-column: 1 / -1; }
.it-ref .it-gen-l { gap: 8px; }
@media (max-width: 860px) { .it-ref .it-f.it-inl, .it-ref .it-f.it-inl.wide { grid-template-columns: 110px minmax(0, 1fr); } }
/* فرم کالا: سطر چک‌باکس‌ها، نام‌های هم‌اندازه، چهار خانه‌ی انبار در یک سطر، انقضاء */
.it-ref .it-cbrow { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; padding: 4px 2px 10px; }
.it-ref .it-cbx { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.it-ref .it-cbx[hidden] { display: none; }
.it-ref .it-cbx input[type=checkbox] { width: 16px; height: 16px; accent-color: #5b3fd6; margin: 0; }
.it-ref #it-rem-box, .it-ref #it-shop-box { margin-top: 6px; }
.it-ref .it-f.it-fix { grid-template-columns: 130px 340px; }
.it-ref .it-grid.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.it-ref .it-exp { display: flex; flex-wrap: wrap; gap: 6px 22px; align-items: center; padding: 6px 0; }
.it-ref .it-exp .it-hint { flex-basis: 100%; margin: 0; }
.badge.orange { background: #fff1e6; color: #c2410c; border-color: transparent; }
.dash-expiry { border: 1px solid #fed7aa; background: #fffaf5; }
.dash-expiry-list { list-style: none; margin: 0; padding: 0 4px; display: grid; gap: 4px; }
.dash-expiry-list a { display: flex; justify-content: space-between; gap: 10px; padding: 6px 8px; border-radius: 8px; color: inherit; text-decoration: none; font-size: 12.5px; }
.dash-expiry-list a:hover { background: #fff1e6; }
.dash-expiry-list span { color: #c2410c; }
.dash-expiry-list li.x span { color: #b91c1c; font-weight: 700; }
@media (max-width: 860px) { .it-ref .it-f.it-fix { grid-template-columns: 110px minmax(0, 1fr); } .it-ref .it-grid.c4 { grid-template-columns: 1fr 1fr; } }


/* ==============================================================================
   ارتقای گرافیکی و استانداردهای طراحی سطح بالای سامانه موسم (High-End Polish)
   دکمه‌ها، فرم‌ها، اینپوت‌ها، جداول داده و نشان‌های وضعیت
   ============================================================================== */

/* ─── ۱. دکمه‌های مدرن و تعاملی (Modern Buttons & Micro-Interactions) ─── */
.btn, button.btn, .mowsem-btn-primary, .btn-save-acc, .btn-cancel-acc {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    font-family: inherit !important;
    font-size: 12.5px !important;
    font-weight: 600 !important;
    line-height: 1.5 !important;
    padding: 7px 16px !important;
    border-radius: 8px !important;
    border: 1px solid var(--line2, #cfd8e6) !important;
    background-color: var(--panel2, #f6f8fc) !important;
    color: var(--text, #1d2939) !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    text-decoration: none !important;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05) !important;
    transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1) !important;
    user-select: none !important;
    -webkit-font-smoothing: antialiased !important;
}

.btn:hover, button.btn:hover {
    background-color: var(--row-hover, #eef4ff) !important;
    border-color: var(--primary, #3b82f6) !important;
    color: var(--primary, #3b82f6) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 3px 6px -1px rgba(59, 130, 246, 0.15), 0 2px 4px -2px rgba(59, 130, 246, 0.1) !important;
}

.btn:active, button.btn:active {
    transform: translateY(0) !important;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05) !important;
}

/* دکمه‌های اصلی و ویژه (Primary Accent Buttons) */
.btn.primary, button.btn.primary, .mowsem-btn-primary, .btn-save-acc {
    background: linear-gradient(180deg, #4f46e5 0%, #4338ca 100%) !important;
    border-color: #4338ca !important;
    color: #ffffff !important;
    box-shadow: 0 2px 5px rgba(79, 70, 229, 0.25), 0 1px 2px rgba(79, 70, 229, 0.2) !important;
}

.btn.primary:hover, button.btn.primary:hover, .mowsem-btn-primary:hover, .btn-save-acc:hover {
    background: linear-gradient(180deg, #4338ca 0%, #3730a3 100%) !important;
    border-color: #3730a3 !important;
    color: #ffffff !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35) !important;
}

/* دکمه‌های عملیات خطرناک (Danger Buttons) */
.btn.danger, .btn.del, button.btn.danger {
    background: #fef2f2 !important;
    border-color: #fecaca !important;
    color: #dc2626 !important;
}

.btn.danger:hover, .btn.del:hover, button.btn.danger:hover {
    background: #dc2626 !important;
    border-color: #dc2626 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 10px rgba(220, 38, 38, 0.25) !important;
}

/* دکمه‌های آیکونی فشرده (Icon Buttons) */
.tb, .btn-icon, .md-cmd {
    width: var(--btn-icon-size, 34px) !important;
    height: var(--btn-icon-size, 34px) !important;
    border-radius: var(--ctrl-radius, 6px) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    transition: all 0.18s ease !important;
}

.tb:hover, .btn-icon:hover {
    transform: translateY(-1px) !important;
}

/* ─── ۲. فرم‌ها و فیلدهای ورودی پیشرفته (High-End Form Controls) ─── */
input[type="text"], input[type="password"], input[type="email"], input[type="tel"],
input[type="number"], select, .form-control, .mowsem-input {
    font-family: inherit !important;
    font-size: var(--ctrl-font-size, 12.5px) !important;
    line-height: var(--ctrl-line-height, 1.4) !important;
    height: var(--ctrl-h, 34px) !important;
    border-radius: var(--ctrl-radius, 6px) !important;
    border: 1px solid var(--line2, #cfd8e6) !important;
    background-color: var(--panel, #ffffff) !important;
    color: var(--text, #1d2939) !important;
    padding: 0 var(--ctrl-pad-x, 10px) !important;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04) !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease !important;
    outline: none !important;
    box-sizing: border-box !important;
    vertical-align: middle !important;
}

textarea {
    font-family: inherit !important;
    font-size: var(--ctrl-font-size, 12.5px) !important;
    line-height: var(--ctrl-line-height, 1.4) !important;
    min-height: 64px !important;
    border-radius: var(--ctrl-radius, 6px) !important;
    border: 1px solid var(--line2, #cfd8e6) !important;
    background-color: var(--panel, #ffffff) !important;
    color: var(--text, #1d2939) !important;
    padding: 6px var(--ctrl-pad-x, 10px) !important;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04) !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease !important;
    outline: none !important;
    box-sizing: border-box !important;
}

input:focus, select:focus, textarea:focus, .form-control:focus, .mowsem-input:focus {
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18) !important;
}

input::placeholder, textarea::placeholder {
    color: var(--muted2, #94a3b8) !important;
    font-size: 11.5px !important;
    opacity: 0.8 !important;
}

/* چک‌باکس‌ها و رادیوها */
input[type="checkbox"], input[type="radio"] {
    accent-color: #4f46e5 !important;
    width: 15px !important;
    height: 15px !important;
    cursor: pointer !important;
    vertical-align: middle !important;
}

/* ─── ۳. جدول‌های داده، فیلترها و لیست‌ها (Refined Data Tables) ─── */
table.g {
    border-collapse: separate !important;
    border-spacing: 0 !important;
    width: 100% !important;
    border: 1px solid var(--line, #dfe5ef) !important;
    border-radius: var(--ctrl-radius, 6px) !important;
    overflow: hidden !important;
    background-color: var(--panel, #ffffff) !important;
    font-size: 12px !important;
}

table.g thead tr:first-child th {
    background-color: var(--head, #e3ebfa) !important;
    color: var(--head-text, #23395f) !important;
    font-weight: 700 !important;
    font-size: 11.5px !important;
    border-bottom: 1px solid var(--line, #dfe5ef) !important;
    padding: 2px 6px !important;
    height: var(--ctrl-h-sm, 30px) !important;
    line-height: var(--ctrl-line-height, 1.4) !important;
    vertical-align: middle !important;
    letter-spacing: normal !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 5 !important;
}

table.g tbody tr td {
    border-bottom: 1px solid var(--line, #dfe5ef) !important;
    padding: 2px 6px !important;
    height: var(--ctrl-h-sm, 30px) !important;
    line-height: var(--ctrl-line-height, 1.4) !important;
    vertical-align: middle !important;
    font-size: 12px !important;
    transition: background-color 0.12s ease !important;
}

table.g tbody tr:last-child td {
    border-bottom: none !important;
}

table.g tbody tr:hover td {
    background-color: var(--row-hover, #eef4ff) !important;
}

/* اینپوت‌های سطر جستجوی جدول */
table.g thead tr.frow th {
    background-color: var(--panel2, #f6f8fc) !important;
    padding: 3px 4px !important;
}

table.g thead tr.frow input {
    height: 26px !important;
    font-size: 11px !important;
    padding: 2px 8px !important;
    border-radius: 6px !important;
    border: 1px solid var(--line2, #cfd8e6) !important;
    background-color: #ffffff !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* ─── ۴. نشان‌ها و بج‌های وضعیت (Badges & Tags) ─── */
.badge, .tag, .pill {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    font-size: 11.5px !important;
    font-weight: 600 !important;
    padding: 2px 10px !important;
    border-radius: 9999px !important;
    white-space: nowrap !important;
    line-height: 1.5 !important;
}

.badge.ok, .badge.success {
    background-color: #ecfdf5 !important;
    color: #047857 !important;
    border: 1px solid #a7f3d0 !important;
}

.badge.warn, .badge.warning {
    background-color: #fffbeb !important;
    color: #b45309 !important;
    border: 1px solid #fde68a !important;
}

.badge.danger, .badge.err {
    background-color: #fef2f2 !important;
    color: #b91c1c !important;
    border: 1px solid #fecaca !important;
}

.badge.info {
    background-color: #eff6ff !important;
    color: #1d4ed8 !important;
    border: 1px solid #bfdbfe !important;
}

/* ─── ۵. پنجره‌های مدال و دیالوگ‌ها (Modals & Dialogs) ─── */
dialog.modal {
    border: 1px solid var(--line, #dfe5ef) !important;
    border-radius: 14px !important;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25) !important;
    background-color: var(--panel, #ffffff) !important;
    color: var(--text, #1d2939) !important;
    padding: 0 !important;
    overflow: hidden !important;
}

dialog.modal::backdrop {
    background: rgba(15, 23, 42, 0.35) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

dialog.modal:has(.k-modal-wrapper),
dialog.modal:has(.it-form) {
    width: min(760px, 95vw) !important;
    max-width: 760px !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    overflow: visible !important;
}

dialog.modal:has(.k-modal-wrapper)::backdrop,
dialog.modal:has(.it-form)::backdrop {
    background: rgba(15, 23, 42, 0.35) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

dialog.modal:has(.k-modal-wrapper) #modal-body,
dialog.modal:has(.it-form) #modal-body {
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
}

dialog.modal:has(.k-modal-wrapper) .k-modal-wrapper,
dialog.modal:has(.it-form) .k-modal-wrapper {
    margin: 0 auto !important;
    width: 100% !important;
    max-width: 100% !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2) !important;
}

dialog.modal .m-head {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 12px 18px !important;
    background-color: var(--head, #e3ebfa) !important;
    border-bottom: 1px solid var(--line, #dfe5ef) !important;
}

dialog.modal .m-f {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 10px !important;
    padding: 12px 18px !important;
    border-top: 1px solid var(--line, #dfe5ef) !important;
    background-color: var(--panel2, #f6f8fc) !important;
}

/* ─── سازگاری تم تاریک (Dark Mode Perfect Coherence) ─── */
html[data-theme="dark"] input[type="text"],
html[data-theme="dark"] input[type="password"],
html[data-theme="dark"] input[type="email"],
html[data-theme="dark"] input[type="tel"],
html[data-theme="dark"] input[type="number"],
html[data-theme="dark"] select,
html[data-theme="dark"] textarea,
html[data-theme="dark"] table.g thead tr.frow input {
    background-color: var(--panel2, #172238) !important;
    border-color: var(--line, #24324d) !important;
    color: var(--text, #e5eaf3) !important;
}

html[data-theme="dark"] table.g {
    border-color: var(--line, #24324d) !important;
    background-color: var(--panel, #131d31) !important;
}

html[data-theme="dark"] table.g thead tr:first-child th {
    background-color: var(--head, #1f3358) !important;
    color: var(--head-text, #dbe6ff) !important;
    border-color: var(--line, #24324d) !important;
}

html[data-theme="dark"] table.g thead tr.frow th {
    background-color: var(--panel, #131d31) !important;
    border-color: var(--line, #24324d) !important;
}

html[data-theme="dark"] table.g tbody tr td {
    border-color: var(--line, #24324d) !important;
}

html[data-theme="dark"] table.g tbody tr:hover td {
    background-color: var(--row-hover, #1c2a46) !important;
}

/* ─── رفع کادر اضافه ورودی تاریخ فاکتور در .k-date-box و فیلترهای تاریخ و تعداد نمایش ─── */
.k-date-box input,
.k-date-box #inv-date,
.k-date-box input:focus,
.k-date-box #inv-date:focus,
.df-in.date input,
.df-in.date input:focus,
.df-in input,
.df-in input:focus,
.dfilters .df-in.date input,
.dfilters .df-in.date input:focus {
    border: none !important;
    border-width: 0 !important;
    outline: none !important;
    outline-width: 0 !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    background: transparent !important;
    background-color: transparent !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    line-height: inherit !important;
}

.pagesize select,
.toolbar .pagesize select,
.pagesize select:focus,
.toolbar .pagesize select:focus {
    border: none !important;
    border-width: 0 !important;
    outline: none !important;
    outline-width: 0 !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    background: transparent !important;
    background-color: transparent !important;
    border-radius: 0 !important;
    padding: 0 4px !important;
    margin: 0 !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    color: var(--link) !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    font-size: var(--ctrl-font-size, 12.5px) !important;
}

/* ═════════════════════════════════════════════════════════════════════════
   استاندارد سراسری و ریشه‌ای موسم (Global UI Form, Button & Table Tokens)
   ═════════════════════════════════════════════════════════════════════════ */
*, *::before, *::after {
    box-sizing: border-box !important;
}

:root {
    --ctrl-h: 34px !important;
    --ctrl-h-sm: 30px !important;
    --ctrl-font-size: 12.5px !important;
    --ctrl-line-height: 1.4 !important;
    --ctrl-radius: 6px !important;
    --ctrl-pad-x: 10px !important;
    --ctrl-gap: 10px !important;
    --btn-icon-size: 34px !important;
    --btn-icon-sm: 30px !important;
}

/* ۱. یکدست‌سازی کنترلهای فرم و اینپوت‌ها در سراسر برنامه (به استثنای اینپوت‌های داخل جداول داده) */
input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not(.flyout-search-input):not(.k-date-box input):not(.k-stepper-val):not(.k-cell-in):not(table td input):not(table tbody td input):not(td input):not(.df-in input):not(.pill input):not(.combo-wrap input),
select:not(.k-cell-in):not(table td select):not(table tbody td select):not(td select):not(.pagesize select):not(.df-in select):not(.pill select),
.acc-input:not(td *),
.acc-select:not(td *),
.mowsem-input:not(td *),
.mowsem-file-input:not(td *),
.form-control:not(td *) {
    height: var(--ctrl-h, 34px) !important;
    min-height: var(--ctrl-h, 34px) !important;
    max-height: var(--ctrl-h, 34px) !important;
    padding: 0 var(--ctrl-pad-x, 10px) !important;
    font-family: inherit !important;
    font-size: var(--ctrl-font-size, 12.5px) !important;
    line-height: var(--ctrl-line-height, 1.4) !important;
    border-radius: var(--ctrl-radius, 6px) !important;
    border: 1px solid var(--line, #cbd5e1) !important;
    box-sizing: border-box !important;
    vertical-align: middle !important;
}

/* ریست فیلدهای اینپوت و سلکت داخل پیل‌ها (مثل فرم مرور حساب و فیلترها) جهت حذف کادر و بردر اضافی */
.pill input:not([type=checkbox]):not([type=radio]),
.pill select,
.pill.date input,
.pill.sel select,
.pill.psz select,
.rf .pill input,
.rf .pill select,
.rf-grid .pill input,
.rf-grid .pill select,
.rf-side .pill select,
.rv-bar .pill select,
label.pill input:not([type=checkbox]):not([type=radio]),
label.pill select {
    border: none !important;
    border-width: 0 !important;
    border-style: none !important;
    outline: none !important;
    outline-width: 0 !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    background: transparent !important;
    background-color: transparent !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    font-size: inherit !important;
    line-height: inherit !important;
}

.pill input:not([type=checkbox]):not([type=radio]):focus,
.pill select:focus,
.rf .pill input:focus,
.rf .pill select:focus,
label.pill input:focus,
label.pill select:focus {
    border: none !important;
    border-width: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    background: transparent !important;
    background-color: transparent !important;
}

.pill.sel select {
    text-align: left !important;
    direction: rtl !important;
    font-weight: 700 !important;
    flex: 1 1 0 !important;
    width: 0 !important;
    min-width: 0 !important;
    cursor: pointer !important;
}

.pill.psz select {
    flex: none !important;
    width: 64px !important;
    min-width: 0 !important;
}

html[data-theme="dark"] .pill input,
html[data-theme="dark"] .pill select,
html[data-skin="shab"] .pill input,
html[data-skin="shab"] .pill select {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    border-color: transparent !important;
    box-shadow: none !important;
}

/* فیلدهای متنی چندخطی */
textarea,
.mowsem-textarea {
    height: auto !important;
    min-height: 64px !important;
    max-height: none !important;
    padding: 6px var(--ctrl-pad-x, 10px) !important;
    font-family: inherit !important;
    font-size: var(--ctrl-font-size, 12.5px) !important;
    line-height: var(--ctrl-line-height, 1.4) !important;
    border-radius: var(--ctrl-radius, 6px) !important;
    border: 1px solid var(--line, #cbd5e1) !important;
    box-sizing: border-box !important;
}

/* چک‌باکس‌ها و سوئیچ‌های کادردار */
.check,
.it-flags .it-check,
.it-sw,
.it-form .it-state .it-box {
    min-height: var(--ctrl-h, 34px) !important;
    height: var(--ctrl-h, 34px) !important;
    padding: 0 10px !important;
    display: inline-flex !important;
    align-items: center !important;
    font-size: var(--ctrl-font-size, 12.5px) !important;
    border-radius: var(--ctrl-radius, 6px) !important;
    box-sizing: border-box !important;
}

/* ۲. استانداردسازی سراسری دکمه‌ها و کلیدهای آیکونی */
.btn,
button.btn,
a.btn,
.mowsem-btn {
    height: var(--ctrl-h, 34px) !important;
    min-height: var(--ctrl-h, 34px) !important;
    padding: 0 14px !important;
    font-family: inherit !important;
    font-size: var(--ctrl-font-size, 12.5px) !important;
    line-height: var(--ctrl-line-height, 1.4) !important;
    border-radius: var(--ctrl-radius, 6px) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    box-sizing: border-box !important;
    white-space: nowrap !important;
    vertical-align: middle !important;
}

.btn.sm {
    height: var(--ctrl-h-sm, 30px) !important;
    min-height: var(--ctrl-h-sm, 30px) !important;
    padding: 0 9px !important;
    font-size: 11.5px !important;
}

/* دکمه‌های آیکونی مربعی */
.tb,
.btn-icon,
.md-cmd,
.toolbar .tb {
    width: var(--btn-icon-size, 34px) !important;
    height: var(--btn-icon-size, 34px) !important;
    min-width: var(--btn-icon-size, 34px) !important;
    min-height: var(--btn-icon-size, 34px) !important;
    border-radius: var(--ctrl-radius, 6px) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    flex: none !important;
    vertical-align: middle !important;
}
.toolbar .tb.txt {
    width: auto !important;
    padding: 0 12px !important;
    gap: 6px !important;
    white-space: nowrap !important;
}

/* دکمه‌های آیکونی داخل گرید و جداول */
.ib,
table.g .ib {
    width: var(--btn-icon-sm, 30px) !important;
    height: var(--btn-icon-sm, 30px) !important;
    min-width: var(--btn-icon-sm, 30px) !important;
    min-height: var(--btn-icon-sm, 30px) !important;
    border-radius: var(--ctrl-radius, 6px) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    flex: none !important;
    vertical-align: middle !important;
}

/* تولبار جستجو و تعداد نمایش */
.tsearch,
.toolbar .tsearch {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
}
.toolbar .tsearch input,
.tsearch input {
    height: var(--ctrl-h, 34px) !important;
    border-radius: var(--ctrl-radius, 8px) !important;
    border: 1px solid var(--line2, #cbd5e1) !important;
    background: var(--panel, #ffffff) !important;
    box-shadow: none !important;
}
.tsearch input:focus,
.toolbar .tsearch input:focus {
    border-color: var(--primary, #6366f1) !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12) !important;
}
.toolbar .pagesize {
    height: var(--ctrl-h, 34px) !important;
    border-radius: var(--ctrl-radius, 6px) !important;
    display: inline-flex !important;
    align-items: center !important;
    box-sizing: border-box !important;
}

/* ۳. همترازی ردیف‌های فرم در تمام صفحات */
.fgrid,
.form-row,
.acc-form-row,
.acc-form-grid,
.modal-row,
.filters,
.dfilters {
    display: flex !important;
    align-items: flex-end !important;
    gap: 8px 12px !important;
    flex-wrap: wrap !important;
}

.fgrid {
    display: grid !important;
    align-items: flex-end !important;
    gap: 8px 12px !important;
}

.form-group,
.acc-form-row > div,
.filters > div {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-end !important;
}

.form-group label,
.acc-label-wrap,
label {
    margin-bottom: 4px !important;
    font-size: var(--ctrl-font-size, 12.5px) !important;
    line-height: var(--ctrl-line-height, 1.4) !important;
}

/* ۴. استانداردسازی جداول داده به سبک حسابداری منظم */
table.g th,
table.g td {
    height: var(--ctrl-h-sm, 30px) !important;
    line-height: var(--ctrl-line-height, 1.4) !important;
    padding: 2px 6px !important;
    vertical-align: middle !important;
    font-size: 12px !important;
}

table.g thead tr:first-child th {
    height: var(--ctrl-h-sm, 30px) !important;
    font-size: 11.5px !important;
}

table.g thead tr.frow th {
    height: var(--ctrl-h-sm, 30px) !important;
    padding: 2px 4px !important;
}

table.g thead tr.frow input,
table.g thead tr.frow select {
    height: calc(var(--ctrl-h-sm, 30px) - 4px) !important;
    min-height: calc(var(--ctrl-h-sm, 30px) - 4px) !important;
    max-height: calc(var(--ctrl-h-sm, 30px) - 4px) !important;
    padding: 0 6px !important;
    font-size: 11px !important;
    border-radius: var(--ctrl-radius, 6px) !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    line-height: var(--ctrl-line-height, 1.4) !important;
}

/* ۵. استانداردهای اختصاصی صفحه فاکتور (استپر، کادرهای چک‌باکس و تراز افقی لیبل‌ها) */
.k-stepper-val,
#add-count,
input#add-count {
    width: 56px !important;
    min-width: 56px !important;
    max-width: 56px !important;
    flex: 0 0 56px !important;
    height: var(--ctrl-h, 34px) !important;
    min-height: var(--ctrl-h, 34px) !important;
    max-height: var(--ctrl-h, 34px) !important;
    padding: 0 4px !important;
    text-align: center !important;
    box-sizing: border-box !important;
    margin: 0 !important;
}

.k-stepper-wrap {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    flex: 0 0 auto !important;
    width: auto !important;
}

.k-btn-add-row {
    width: var(--btn-icon-size, 34px) !important;
    height: var(--btn-icon-size, 34px) !important;
    min-width: var(--btn-icon-size, 34px) !important;
    min-height: var(--btn-icon-size, 34px) !important;
    flex: 0 0 34px !important;
    border-radius: var(--ctrl-radius, 6px) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    margin: 0 !important;
}

.k-stepper-arrows {
    width: 24px !important;
    height: var(--ctrl-h, 34px) !important;
    min-height: var(--ctrl-h, 34px) !important;
    flex: 0 0 24px !important;
    border-radius: var(--ctrl-radius, 6px) !important;
    box-sizing: border-box !important;
    margin: 0 !important;
}

/* باکس‌های چک‌باکس کادردار: شعبه مشتری، حق‌العمل‌کاری و موضوع ماده ۹ */
.k-branch-pill,
.k-check-pill,
#branch-pill,
#article9-pill,
#commission-pill {
    height: var(--ctrl-h, 34px) !important;
    min-height: var(--ctrl-h, 34px) !important;
    max-height: var(--ctrl-h, 34px) !important;
    margin: 0 !important;
    padding: 0 10px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 1px solid var(--line2, #cfd8e6) !important;
    border-radius: var(--ctrl-radius, 6px) !important;
    background: var(--panel, #ffffff) !important;
    box-sizing: border-box !important;
    vertical-align: middle !important;
    gap: 7px !important;
    line-height: var(--ctrl-line-height, 1.4) !important;
}

html[data-theme="dark"] .k-branch-pill,
html[data-theme="dark"] .k-check-pill,
html[data-skin="shab"] .k-branch-pill,
html[data-skin="shab"] .k-check-pill {
    background: var(--panel2, #172238) !important;
    border-color: var(--line, #24324d) !important;
    color: var(--text, #e5eaf3) !important;
}

.k-branch-pill input,
.k-check-pill input,
.k-branch-chk,
.k-checkbox {
    margin: 0 !important;
    width: 15px !important;
    height: 15px !important;
    min-width: 15px !important;
    min-height: 15px !important;
    flex-shrink: 0 !important;
    vertical-align: middle !important;
    cursor: pointer !important;
}

.k-branch-text,
#article9-text,
#commission-text {
    font-size: var(--ctrl-font-size, 12.5px) !important;
    line-height: 1 !important;
    margin: 0 !important;
    padding: 0 !important;
    white-space: nowrap !important;
}

/* تراز افقی و صاف تمام لیبل‌های بالای فیلدها */
.k-label,
.k-field > .k-label,
.k-label-with-tool,
.k-pattern-label-bar {
    height: 20px !important;
    min-height: 20px !important;
    max-height: 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-bottom: 5px !important;
    margin-top: 0 !important;
    padding: 0 !important;
    font-size: 11.5px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    box-sizing: border-box !important;
    white-space: nowrap !important;
    user-select: none !important;
}

.k-field.k-desc-field .k-label {
    justify-content: flex-start !important;
    padding-right: 4px !important;
}

.k-grid-row-1,
.k-grid-row-2 {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: flex-end !important;
    gap: 8px 10px !important;
}

.k-field {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-end !important;
}

/* ═════════════════════════════════════════════════════════════════════════
   ۶. استایل فشرده و اکسل‌مانند سراسری تمام جداول داده پروژه (Global Spreadsheet Style)
   ═════════════════════════════════════════════════════════════════════════ */

/* ۱-۶. یکپارچه‌سازی ساختار جدول و جلوگیری قطعی از به هم ریختگی یا افتادن ستون‌ها */
table,
table.g,
table.k-table,
#lines,
table.lines,
table.t,
table.ta-tbl,
table.rp-t,
table.mowsem-table,
table.sx-grid,
table.spreadsheet {
    border-collapse: collapse !important;
    width: 100% !important;
}

/* تضمین قطعی مخفی ماندن سطر فیلتر و سطرهای مخفی تا زمان فراخوانی کاربر */
tr.hidden,
tr[hidden],
th.hidden,
td.hidden,
.hidden,
#lines tr.hidden,
#lines tr[hidden],
.k-filter-row.hidden,
#table-filter-row.hidden {
    display: none !important;
}

/* ستون‌های اختصاصی الگوها در جدول فاکتور (الگوهای ۲، ۳، ۷، ۹، ۱۱) به صورت پیش‌فرض کاملاً مخفی هستند */
#lines .col-pat-2, #lines .col-pat-3, #lines .col-pat-7, #lines .col-pat-9, #lines .col-pat-11,
.k-table .col-pat-2, .k-table .col-pat-3, .k-table .col-pat-7, .k-table .col-pat-9, .k-table .col-pat-11,
.col-pat-2, .col-pat-3, .col-pat-7, .col-pat-9, .col-pat-11 {
    display: none !important;
}

/* نمایش فقط ستون‌های مربوط به الگوی انتخاب شده */
#lines[data-pattern="2"] .col-pat-2,
.k-table[data-pattern="2"] .col-pat-2 {
    display: table-cell !important;
}

#lines[data-pattern="3"] .col-pat-3,
.k-table[data-pattern="3"] .col-pat-3 {
    display: table-cell !important;
}
#lines[data-pattern="3"] .col-std-desc,
.k-table[data-pattern="3"] .col-std-desc {
    display: none !important;
}

#lines[data-pattern="7"] .col-pat-7,
.k-table[data-pattern="7"] .col-pat-7 {
    display: table-cell !important;
}

#lines[data-pattern="9"] .col-pat-9,
.k-table[data-pattern="9"] .col-pat-9 {
    display: table-cell !important;
}

#lines[data-pattern="11"] .col-pat-11,
.k-table[data-pattern="11"] .col-pat-11 {
    display: table-cell !important;
}

table tr,
table.g tr,
table.k-table tr,
#lines tr,
table.lines tr,
table.t tr,
table.ta-tbl tr,
table.rp-t tr,
table.mowsem-table tr,
table.sx-grid tr,
table.spreadsheet tr {
    height: 28px !important;
    min-height: 28px !important;
    box-sizing: border-box !important;
}

/* سرستون‌ها (th) - ارتفاع ۳۰ پیکسل و خطوط جداکننده واضح */
table thead th,
table.g thead th,
table.k-table thead th,
#lines thead th,
table.lines thead th,
table.t thead th,
table.ta-tbl thead th,
table.rp-t thead th,
table.mowsem-table thead th,
table.sx-grid thead th,
table.spreadsheet thead th {
    vertical-align: middle !important;
    text-align: center !important;
    height: 30px !important;
    min-height: 30px !important;
    padding: 2px 6px !important;
    font-size: 11.5px !important;
    font-weight: 700 !important;
    border: 1px solid #cbd5e1 !important;
    box-sizing: border-box !important;
    white-space: nowrap !important;
}

/* سلول‌های بدنه جدول (td) - تراز عمودی وسط و ارتفاع ۲۸ پیکسل */
table tbody td,
table.g tbody td,
table.k-table tbody td,
#lines tbody td,
table.lines tbody td,
table.t tbody td,
table.ta-tbl tbody td,
table.rp-t tbody td,
table.mowsem-table tbody td,
table.sx-grid tbody td,
table.spreadsheet tbody td {
    vertical-align: middle !important;
    text-align: center !important;
    height: 28px !important;
    min-height: 28px !important;
    font-size: 12px !important;
    border: 1px solid #cbd5e1 !important;
    box-sizing: border-box !important;
    padding: 2px 6px !important;
}

/* سلول‌های محاسباتی و نمایشی - اکیداً table-cell جهت جلوگیری از افتادن ستون‌ها */
.k-cell-calc,
td.k-cell-calc,
td.c-before,
td.c-vat,
td.c-total {
    display: table-cell !important;
    vertical-align: middle !important;
    text-align: center !important;
    font-weight: 600 !important;
    font-size: 12px !important;
    color: #1e293b !important;
    white-space: nowrap !important;
    padding: 0 6px !important;
    height: 28px !important;
    line-height: 28px !important;
    box-sizing: border-box !important;
    border: 1px solid #cbd5e1 !important;
}

td.c-total {
    font-weight: 700 !important;
    color: #0f172a !important;
}

/* ۲-۶. صفر کردن پدینگ سلول‌های دارای کنترل فرم (اینپوت و سلکت) جهت اتصال دقیق به حاشیه‌ها */
table tbody td:has(input:not([type=checkbox]):not([type=radio])),
table tbody td:has(select),
table.g tbody td:has(input:not([type=checkbox]):not([type=radio])),
table.g tbody td:has(select),
table.k-table tbody td:has(input),
table.k-table tbody td:has(select),
#lines tbody td:has(input),
#lines tbody td:has(select),
table.lines tbody td:has(input),
table.lines tbody td:has(select),
table.t tbody td:has(input),
table.t tbody td:has(select),
table.ta-tbl tbody td:has(input),
table.ta-tbl tbody td:has(select),
table.rp-t tbody td:has(input),
table.rp-t tbody td:has(select),
td:has(.k-cell-in),
td:has(.k-item-cell) {
    padding: 0 !important;
}

/* برای جدول‌هایی که از کلاس .k-table یا #lines استفاده می‌کنند */
#lines tbody td:not(.k-cell-calc):not(.c-before):not(.c-vat):not(.c-total),
.k-table tbody td:not(.k-cell-calc):not(.c-before):not(.c-vat):not(.c-total) {
    padding: 0 !important;
}

/* ۳-۶. رنگ‌آمیزی یک‌درمیان سطرها (خیلی ملایم) و حالت هاور */
table tbody tr:nth-child(even),
table.g tbody tr:nth-child(even),
table.k-table tbody tr:nth-child(even),
#lines tbody tr:nth-child(even),
table.lines tbody tr:nth-child(even),
table.t tbody tr:nth-child(even),
table.ta-tbl tbody tr:nth-child(even),
table.rp-t tbody tr:nth-child(even),
table.mowsem-table tbody tr:nth-child(even),
table.sx-grid tbody tr:nth-child(even) {
    background-color: #f6f5fb !important;
}

table tbody tr:nth-child(odd),
table.g tbody tr:nth-child(odd),
table.k-table tbody tr:nth-child(odd),
#lines tbody tr:nth-child(odd),
table.lines tbody tr:nth-child(odd),
table.t tbody tr:nth-child(odd),
table.ta-tbl tbody tr:nth-child(odd),
table.rp-t tbody tr:nth-child(odd),
table.mowsem-table tbody tr:nth-child(odd),
table.sx-grid tbody tr:nth-child(odd) {
    background-color: #ffffff !important;
}

table tbody tr:hover td,
table.g tbody tr:hover td,
table.k-table tbody tr:hover td,
#lines tbody tr:hover td,
table.lines tbody tr:hover td,
table.t tbody tr:hover td,
table.ta-tbl tbody tr:hover td,
table.rp-t tbody tr:hover td,
table.mowsem-table tbody tr:hover td,
table.sx-grid tbody tr:hover td {
    background-color: #edeafe !important;
}

/* پشتیبانی تم تاریک (Dark Mode / Skin Shab) برای جداول */
html[data-theme="dark"] table thead th,
html[data-theme="dark"] table tbody td,
html[data-theme="dark"] td.k-cell-calc,
html[data-skin="shab"] table thead th,
html[data-skin="shab"] table tbody td,
html[data-skin="shab"] td.k-cell-calc {
    border-color: #24324d !important;
}

html[data-theme="dark"] table tbody tr:nth-child(even),
html[data-skin="shab"] table tbody tr:nth-child(even) {
    background-color: #172238 !important;
}

html[data-theme="dark"] table tbody tr:nth-child(odd),
html[data-skin="shab"] table tbody tr:nth-child(odd) {
    background-color: #111a2d !important;
}

html[data-theme="dark"] table tbody tr:hover td,
html[data-skin="shab"] table tbody tr:hover td {
    background-color: #1e2d4a !important;
}

html[data-theme="dark"] td.k-cell-calc,
html[data-theme="dark"] td.c-before,
html[data-theme="dark"] td.c-vat,
html[data-theme="dark"] td.c-total,
html[data-skin="shab"] td.k-cell-calc,
html[data-skin="shab"] td.c-before,
html[data-skin="shab"] td.c-vat,
html[data-skin="shab"] td.c-total {
    color: #e2e8f0 !important;
}

/* ۴-۶. تبدیل سراسری تمام اینپوت‌ها و سلکت‌های درون جداول به اکسل‌مانند بدون کادر */
table tbody td input:not([type=checkbox]):not([type=radio]):not([type=button]):not([type=submit]),
table tbody td select,
table.g tbody td input:not([type=checkbox]):not([type=radio]),
table.g tbody td select,
table.k-table tbody td input:not([type=checkbox]):not([type=radio]),
table.k-table tbody td select,
#lines tbody td input:not([type=checkbox]):not([type=radio]),
#lines tbody td select,
table.lines tbody td input:not([type=checkbox]):not([type=radio]),
table.lines tbody td select,
table.t tbody td input:not([type=checkbox]):not([type=radio]),
table.t tbody td select,
table.ta-tbl tbody td input:not([type=checkbox]):not([type=radio]),
table.ta-tbl tbody td select,
table.rp-t tbody td input:not([type=checkbox]):not([type=radio]),
table.rp-t tbody td select,
table.mowsem-table tbody td input:not([type=checkbox]):not([type=radio]),
table.mowsem-table tbody td select,
table.sx-grid tbody td input:not([type=checkbox]):not([type=radio]),
table.sx-grid tbody td select,
table tbody td .form-control,
table tbody td .acc-input,
table tbody td .acc-select,
.k-cell-in,
input.k-cell-in,
select.k-cell-in,
.k-item-cell input.combo {
    border: none !important;
    border-width: 0 !important;
    outline: none !important;
    outline-width: 0 !important;
    background: transparent !important;
    background-color: transparent !important;
    border-radius: 0 !important;
    -webkit-border-radius: 0 !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 28px !important;
    min-height: 28px !important;
    max-height: 28px !important;
    line-height: 28px !important;
    padding: 0 6px !important;
    margin: 0 !important;
    font-size: 12px !important;
    font-family: inherit !important;
    color: #1e293b !important;
    text-align: center !important;
    box-sizing: border-box !important;
    vertical-align: middle !important;
    transition: box-shadow 0.12s ease-in-out, background-color 0.12s ease-in-out !important;
}

html[data-theme="dark"] table tbody td input:not([type=checkbox]):not([type=radio]):not([type=button]):not([type=submit]),
html[data-theme="dark"] table tbody td select,
html[data-skin="shab"] table tbody td input:not([type=checkbox]):not([type=radio]):not([type=button]):not([type=submit]),
html[data-skin="shab"] table tbody td select {
    color: #e2e8f0 !important;
}

/* تراز راست فیلدهای متنی و توضیحات در جدول */
table tbody td.t input,
table tbody td.desc input,
table tbody td.k-item-cell input,
table.g tbody td.t input,
table.k-table tbody td.col-std-desc input,
#lines tbody td.col-std-desc input {
    text-align: right !important;
    padding-right: 8px !important;
}

/* چک‌باکس‌های انتخاب سطر در جدول */
table td.ck input[type=checkbox],
table th.ck input[type=checkbox],
table.g td.ck input[type=checkbox],
table.g th.ck input[type=checkbox],
table.k-table td.ck input[type=checkbox] {
    width: 16px !important;
    height: 16px !important;
    min-height: 16px !important;
    margin: 0 auto !important;
    cursor: pointer !important;
    vertical-align: middle !important;
    display: inline-block !important;
}

/* ۵-۶. افکت فوکوس ظریف اکسلی (هایلایت داخلی ظریف با بوردر اینست بنفش/آبی) */
table tbody td input:not([type=checkbox]):not([type=radio]):focus,
table tbody td select:focus,
table.g tbody td input:focus,
table.g tbody td select:focus,
table.k-table tbody td input:focus,
table.k-table tbody td select:focus,
#lines tbody td input:focus,
#lines tbody td select:focus,
table.lines tbody td input:focus,
table.lines tbody td select:focus,
table.t tbody td input:focus,
table.t tbody td select:focus,
table.ta-tbl tbody td input:focus,
table.ta-tbl tbody td select:focus,
table.rp-t tbody td input:focus,
table.rp-t tbody td select:focus,
table.mowsem-table tbody td input:focus,
table.mowsem-table tbody td select:focus,
table.sx-grid tbody td input:focus,
table.sx-grid tbody td select:focus,
table tbody td .form-control:focus,
table tbody td .acc-input:focus,
table tbody td .acc-select:focus,
.k-cell-in:focus,
input.k-cell-in:focus,
select.k-cell-in:focus,
.k-item-cell input.combo:focus {
    border: none !important;
    outline: none !important;
    box-shadow: inset 0 0 0 1.5px #6366f1 !important;
    -webkit-box-shadow: inset 0 0 0 1.5px #6366f1 !important;
    background-color: #ffffff !important;
}

html[data-theme="dark"] table tbody td input:not([type=checkbox]):not([type=radio]):focus,
html[data-theme="dark"] table tbody td select:focus,
html[data-skin="shab"] table tbody td input:not([type=checkbox]):not([type=radio]):focus,
html[data-skin="shab"] table tbody td select:focus {
    background-color: #1e293b !important;
    box-shadow: inset 0 0 0 1.5px #818cf8 !important;
    -webkit-box-shadow: inset 0 0 0 1.5px #818cf8 !important;
}

/* ═════════════════════════════════════════════════════════════════════════
   فاکتور فروش - الگوی ۸ (بارنامه) - کالاهای حمل‌شده
   ═════════════════════════════════════════════════════════════════════════ */
.acc-inv-goods,
#pat-8-goods {
    width: 100% !important;
    flex-basis: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    box-sizing: border-box !important;
}

#pat-8-goods-rows {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    box-sizing: border-box !important;
}

.acc-inv-goods-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 8px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.acc-inv-goods-row input.acc-goods-stuff,
.acc-inv-goods-row .acc-goods-stuff {
    width: 180px !important;
    min-width: 180px !important;
    max-width: 180px !important;
    flex: 0 0 180px !important;
    text-align: left !important;
    box-sizing: border-box !important;
}

.acc-inv-goods-row input.acc-goods-desc,
.acc-inv-goods-row .acc-goods-desc {
    width: auto !important;
    flex: 1 1 0% !important;
    min-width: 0 !important;
    text-align: right !important;
    box-sizing: border-box !important;
}

.acc-inv-goods-row .acc-goods-del-btn,
button.acc-goods-del-btn {
    width: 34px !important;
    min-width: 34px !important;
    max-width: 34px !important;
    height: 34px !important;
    flex: 0 0 34px !important;
    flex-shrink: 0 !important;
    box-sizing: border-box !important;
}

/* ═════════════════════════════════════════════════════════════════════════
   اصلاح چیدمان فیلترهای فاقدین پروانه کسب (Unlicensed Filters & Actions)
   ═════════════════════════════════════════════════════════════════════════ */
.filters > div.filter-actions,
.filters .filter-actions,
form.filters .filter-actions {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    flex-wrap: nowrap !important;
}

.filters.u-filters,
.page form.filters.u-filters {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-end !important;
    gap: 12px 14px !important;
    flex-wrap: wrap !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.filters.u-filters .filter-actions .btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    height: 34px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
}

/* ═════════════════════════════════════════════════════════════════════════
   اصلاح نهایی مرور حساب (Reports Review - Exact Kariya Hesab Matching)
   ═════════════════════════════════════════════════════════════════════════ */

/* ۱. حذف هرگونه کادر یا بردر اضافه داخلی از تمام فیلدهای پیل (Pills) */
.pill input:not([type="checkbox"]):not([type="radio"]),
.pill select,
.pill.date input,
.pill.sel select,
.pill.psz select,
.rf .pill input,
.rf .pill select,
.rf-grid .pill input,
.rf-grid .pill select,
.rf-side .pill select,
.rv-bar .pill select,
label.pill input:not([type="checkbox"]):not([type="radio"]),
label.pill select {
    border: none !important;
    border-width: 0 !important;
    border-style: none !important;
    outline: none !important;
    outline-width: 0 !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    background: transparent !important;
    background-color: transparent !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    font-size: inherit !important;
    line-height: inherit !important;
}

.pill input:not([type="checkbox"]):not([type="radio"]):focus,
.pill select:focus,
.rf .pill input:focus,
.rf .pill select:focus,
label.pill input:focus,
label.pill select:focus {
    border: none !important;
    border-width: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    background: transparent !important;
    background-color: transparent !important;
}

/* ۲. بج تعداد انتخاب روی تب‌های سطوح حساب */
.lvl-tabs {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
}

.lvl-tabs a {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    position: relative !important;
}

.lvl-tabs .lvl-badge {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 18px !important;
    height: 18px !important;
    padding: 0 4px !important;
    font-size: 10.5px !important;
    font-weight: 700 !important;
    border-radius: 999px !important;
    background-color: #6366f1 !important;
    color: #ffffff !important;
    line-height: 1 !important;
}

/* ۳. نوار بریکامپ پیل‌های Drill-Down */
.rv-drilldown {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 8px 12px !important;
    margin-bottom: 10px !important;
    background-color: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
}

html[data-theme="dark"] .rv-drilldown {
    background-color: #1e293b !important;
    border-color: #334155 !important;
}

.rv-drilldown .btn-clear-drill {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    padding: 4px 10px !important;
    font-size: 11.5px !important;
    font-weight: 600 !important;
    color: #ef4444 !important;
    background-color: #fef2f2 !important;
    border: 1px solid #fee2e2 !important;
    border-radius: 6px !important;
    text-decoration: none !important;
    transition: all 0.15s ease !important;
}

.rv-drilldown .btn-clear-drill:hover {
    background-color: #ef4444 !important;
    color: #ffffff !important;
}

.rv-drilldown .drill-pill {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 3px 10px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    background-color: #eff6ff !important;
    color: #1d4ed8 !important;
    border: 1px solid #bfdbfe !important;
    border-radius: 999px !important;
}

html[data-theme="dark"] .rv-drilldown .drill-pill {
    background-color: #1e3a8a !important;
    color: #93c5fd !important;
    border-color: #1d4ed8 !important;
}

.rv-drilldown .drill-pill b {
    color: #2563eb !important;
    font-weight: 700 !important;
}

.rv-drilldown .drill-remove {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 16px !important;
    height: 16px !important;
    font-size: 13px !important;
    line-height: 1 !important;
    border-radius: 50% !important;
    color: #ef4444 !important;
    text-decoration: none !important;
    cursor: pointer !important;
}

.rv-drilldown .drill-remove:hover {
    background-color: #fee2e2 !important;
}

/* ۴. دکمه‌های با برچسب متنی در نوار ابزار */
.btn-rv-action {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    height: 30px !important;
    padding: 0 10px !important;
    font-size: 11.5px !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
    border: 1px solid var(--line2, #cfd8e6) !important;
    background: var(--panel, #ffffff) !important;
    color: var(--text, #1d2939) !important;
    text-decoration: none !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
}

.btn-rv-action:hover {
    background: var(--panel2, #f6f8fc) !important;
    border-color: #6366f1 !important;
    color: #6366f1 !important;
}

/* ۵. استایل اختصاصی جدول گردش (Flow) و آیکون ویرایش */
.doc-link-wrap {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
}

.doc-edit-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 18px !important;
    height: 18px !important;
    font-size: 11px !important;
    border-radius: 4px !important;
    color: #6366f1 !important;
    background-color: #eef2ff !important;
    text-decoration: none !important;
    transition: all 0.15s ease !important;
}

.doc-edit-icon:hover {
    background-color: #6366f1 !important;
    color: #ffffff !important;
}

/* ۶. استاتوس‌بار اکسلی انتهای جدول (Excel-like Status Bar) */
.rv-statusbar {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 8px 14px !important;
    margin-top: 8px !important;
    background-color: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 6px !important;
    font-size: 11.5px !important;
    color: #475569 !important;
}

html[data-theme="dark"] .rv-statusbar {
    background-color: #1e293b !important;
    border-color: #334155 !important;
    color: #94a3b8 !important;
}

.rv-status-stats {
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
    direction: rtl !important;
}

.rv-stat {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
}

.rv-stat .lbl {
    color: #64748b !important;
}

.rv-stat b {
    font-weight: 700 !important;
    color: #1e293b !important;
    font-family: inherit !important;
}

html[data-theme="dark"] .rv-stat b {
    color: #f1f5f9 !important;
}

.rv-status-info {
    font-weight: 600 !important;
    color: #64748b !important;
}

/* ═══════════════ تم بلور (Bolour - Obsidian Liquid Glass) ═══════════════ */

/* آیکون دایره‌ای تم بلور در منوی تنظیمات */
.look-skin[data-skin="bolour"] i {
    box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.85), inset 0 0 0 1.5px rgba(255, 255, 255, 0.45) !important;
}

/* پس‌زمینه پایه و هاله‌های نور زنده در تم بلور (تیره - پیش‌فرض) */
html[data-skin="bolour"] body {
    background-color: #06080f !important;
    position: relative !important;
}

html[data-skin="bolour"] body::before {
    content: "" !important;
    position: fixed !important;
    inset: 0 !important;
    pointer-events: none !important;
    z-index: 0 !important;
    background:
        radial-gradient(circle at 85% 15%, rgba(37, 99, 235, 0.35) 0%, transparent 50%),
        radial-gradient(circle at 15% 85%, rgba(139, 92, 246, 0.28) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(6, 182, 212, 0.16) 0%, transparent 45%),
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px) !important;
    background-size: 100% 100%, 100% 100%, 100% 100%, 36px 36px, 36px 36px !important;
    background-attachment: fixed !important;
}

/* هاله‌های نور در حالت روشن (Frosted Light) */
html[data-skin="bolour"][data-theme="light"] body {
    background-color: #eef2f9 !important;
}
html[data-skin="bolour"][data-theme="light"] body::before {
    background:
        radial-gradient(circle at 85% 15%, rgba(59, 130, 246, 0.25) 0%, transparent 50%),
        radial-gradient(circle at 15% 85%, rgba(139, 92, 246, 0.20) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(6, 182, 212, 0.14) 0%, transparent 45%),
        linear-gradient(rgba(0, 0, 0, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.02) 1px, transparent 1px) !important;
    background-size: 100% 100%, 100% 100%, 100% 100%, 36px 36px, 36px 36px !important;
    background-attachment: fixed !important;
}

/* ۱. شفاف کردن لایه‌های میانی برای عبور آزادانه نور پس‌زمینه */
html[data-skin="bolour"] .app {
    position: relative !important;
    z-index: 1 !important;
    background: transparent !important;
    background-color: transparent !important;
}
html[data-skin="bolour"] main,
html[data-skin="bolour"] .main,
html[data-skin="bolour"] .content,
html[data-skin="bolour"] .app-wrapper,
html[data-skin="bolour"] .content-wrapper,
html[data-skin="bolour"] .crumbs,
html[data-skin="bolour"] #modal-body,
html[data-skin="bolour"] .page-b,
html[data-skin="bolour"] .mowsem-page-wrap {
    background: transparent !important;
    background-color: transparent !important;
}

/* ۲. شیشه‌ای کردن واقعی کارت‌ها، جدول، نوارها و سطوح اصلی */
html[data-skin="bolour"] .page,
html[data-skin="bolour"] .grid-wrap,
html[data-skin="bolour"] .tabsbar,
html[data-skin="bolour"] .statusbar,
html[data-skin="bolour"] .rail,
html[data-skin="bolour"] .side,
html[data-skin="bolour"] .flyout-pane,
html[data-skin="bolour"] .dash-panel,
html[data-skin="bolour"] .dash-kpi-card,
html[data-skin="bolour"] .gstats a,
html[data-skin="bolour"] .gsec,
html[data-skin="bolour"] .gsearch,
html[data-skin="bolour"] form.filters,
html[data-skin="bolour"] .page form.filters,
html[data-skin="bolour"] .mowsem-auth-card,
html[data-skin="bolour"] .balance-card,
html[data-skin="bolour"] .mini-dock,
html[data-skin="bolour"] .notes-pop,
html[data-skin="bolour"] dialog.modal {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.03)) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.45), inset 0 1px 0 0 rgba(255, 255, 255, 0.28) !important;
    color: rgba(255, 255, 255, 0.95) !important;
}

/* سطوح شیشه‌ای حالت روشن (شیشه یخی Frosted Light) */
html[data-skin="bolour"][data-theme="light"] .page,
html[data-skin="bolour"][data-theme="light"] .grid-wrap,
html[data-skin="bolour"][data-theme="light"] .tabsbar,
html[data-skin="bolour"][data-theme="light"] .statusbar,
html[data-skin="bolour"][data-theme="light"] .rail,
html[data-skin="bolour"][data-theme="light"] .side,
html[data-skin="bolour"][data-theme="light"] .flyout-pane,
html[data-skin="bolour"][data-theme="light"] .dash-panel,
html[data-skin="bolour"][data-theme="light"] .dash-kpi-card,
html[data-skin="bolour"][data-theme="light"] .gstats a,
html[data-skin="bolour"][data-theme="light"] .gsec,
html[data-skin="bolour"][data-theme="light"] .gsearch,
html[data-skin="bolour"][data-theme="light"] form.filters,
html[data-skin="bolour"][data-theme="light"] .page form.filters,
html[data-skin="bolour"][data-theme="light"] .mowsem-auth-card,
html[data-skin="bolour"][data-theme="light"] .balance-card,
html[data-skin="bolour"][data-theme="light"] .mini-dock,
html[data-skin="bolour"][data-theme="light"] .notes-pop,
html[data-skin="bolour"][data-theme="light"] dialog.modal {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.68), rgba(255, 255, 255, 0.45)) !important;
    backdrop-filter: blur(16px) saturate(160%) !important;
    -webkit-backdrop-filter: blur(16px) saturate(160%) !important;
    border: 1px solid rgba(255, 255, 255, 0.85) !important;
    box-shadow: 0 10px 35px rgba(15, 23, 42, 0.08), inset 0 1px 0 0 #ffffff !important;
    color: #0f172a !important;
}

/* پاپاور منوی انتخاب تم با پس‌زمینه نیمه‌شفاف و بلور عمیق ۲۴ پیکسل برای دیدن جدول زیر آن */
html[data-skin="bolour"] .look-pop {
    background: rgba(10, 15, 30, 0.65) !important;
    backdrop-filter: blur(24px) saturate(190%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(190%) !important;
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.6), inset 0 1px 0 0 rgba(255, 255, 255, 0.35) !important;
}
html[data-skin="bolour"][data-theme="light"] .look-pop {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(24px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 16px 45px rgba(15, 23, 42, 0.12), inset 0 1px 0 0 #ffffff !important;
}

/* پاپاور تقویم شمسی در تم بلور با شفافیت کنترل‌شده تا نوشته‌های پشت آن خوانا نمانند */
html[data-skin="bolour"] .jdp {
    background: rgba(10, 15, 30, 0.90) !important;
    backdrop-filter: blur(24px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.65), inset 0 1px 0 0 rgba(255, 255, 255, 0.28) !important;
    color: rgba(255, 255, 255, 0.95) !important;
}
html[data-skin="bolour"][data-theme="light"] .jdp {
    background: rgba(255, 255, 255, 0.94) !important;
    backdrop-filter: blur(24px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
    border: 1px solid rgba(203, 213, 225, 0.85) !important;
    box-shadow: 0 16px 45px rgba(15, 23, 42, 0.16), inset 0 1px 0 0 #ffffff !important;
    color: #0f172a !important;
}

/* هدر پنل‌ها و بخش‌ها */
html[data-skin="bolour"] .page-h,
html[data-skin="bolour"] .dash-panel-h,
html[data-skin="bolour"] .gsearch-h {
    background: transparent !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
}
html[data-skin="bolour"][data-theme="light"] .page-h,
html[data-skin="bolour"][data-theme="light"] .dash-panel-h,
html[data-skin="bolour"][data-theme="light"] .gsearch-h {
    border-bottom: 1px solid rgba(203, 213, 225, 0.5) !important;
}

/* کارت‌های KPI در هاور */
html[data-skin="bolour"] .dash-kpi-card:hover,
html[data-skin="bolour"] .gstats a:hover {
    border-color: rgba(96, 165, 250, 0.6) !important;
    box-shadow: 0 12px 36px rgba(37, 99, 235, 0.3), inset 0 1px 0 0 rgba(255, 255, 255, 0.45) !important;
    transform: translateY(-2px) !important;
}

/* ۳. شفاف‌سازی کامل جدول */
html[data-skin="bolour"] table.g,
html[data-skin="bolour"] table.g thead,
html[data-skin="bolour"] table.g tbody,
html[data-skin="bolour"] table.g tfoot,
html[data-skin="bolour"] table.g tr,
html[data-skin="bolour"] table.g td,
html[data-skin="bolour"] table.g th,
html[data-skin="bolour"] table.g thead tr.frow,
html[data-skin="bolour"] table.g thead tr.frow th,
html[data-skin="bolour"] table.g tbody tr:nth-child(odd) td,
html[data-skin="bolour"] table.g tbody tr:nth-child(even) td,
html[data-skin="bolour"] table tbody tr td,
html[data-skin="bolour"] table tbody tr:nth-child(odd) td,
html[data-skin="bolour"] table tbody tr:nth-child(even) td,
html[data-skin="bolour"] table.g tbody tr td.empty,
html[data-skin="bolour"] table.g td[colspan] {
    background: transparent !important;
    background-color: transparent !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: rgba(255, 255, 255, 0.92) !important;
}

/* لایه شیشه‌ای روشن‌تر فقط در هاور ردیف‌های جدول */
html[data-skin="bolour"] table.g tbody tr:hover td,
html[data-skin="bolour"] table tbody tr:hover td {
    background: rgba(255, 255, 255, 0.07) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
}

/* هدر جدول (thead) با گرادیانت شیشه‌ای آبی نیمه‌شفاف و حاشیه پایینی نورانی */
html[data-skin="bolour"] table.g thead tr:first-child th,
html[data-skin="bolour"] table thead tr:first-child th {
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.26), rgba(37, 99, 235, 0.14)) !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
    color: #ffffff !important;
    border-bottom: 1px solid rgba(96, 165, 250, 0.55) !important;
    box-shadow: inset 0 -1px 0 0 rgba(147, 197, 253, 0.4), inset 0 1px 0 0 rgba(255, 255, 255, 0.2) !important;
}

/* اینپوت‌های داخل سطر فیلتر هدر جدول */
html[data-skin="bolour"] table.g thead tr.frow input,
html[data-skin="bolour"] table.g thead tr.frow select {
    background: rgba(255, 255, 255, 0.07) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    color: #ffffff !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    border-radius: 6px !important;
}
html[data-skin="bolour"] table.g thead tr.frow input:focus,
html[data-skin="bolour"] table.g thead tr.frow select:focus {
    background: rgba(255, 255, 255, 0.14) !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.35) !important;
}

/* جدول در حالت روشن */
html[data-skin="bolour"][data-theme="light"] table.g,
html[data-skin="bolour"][data-theme="light"] table.g tbody tr:nth-child(odd) td,
html[data-skin="bolour"][data-theme="light"] table.g tbody tr:nth-child(even) td {
    background: transparent !important;
    border-color: rgba(203, 213, 225, 0.35) !important;
    color: #0f172a !important;
}
html[data-skin="bolour"][data-theme="light"] table.g tbody tr:hover td {
    background: rgba(37, 99, 235, 0.08) !important;
}
html[data-skin="bolour"][data-theme="light"] table.g thead tr:first-child th {
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.16), rgba(37, 99, 235, 0.07)) !important;
    color: #0f172a !important;
    border-bottom: 1px solid rgba(37, 99, 235, 0.45) !important;
    box-shadow: inset 0 -1px 0 0 rgba(37, 99, 235, 0.25) !important;
}

/* دکمه‌های اصلی و CTA با رنگ آبی الکتریک و سایه درخشان */
html[data-skin="bolour"] .btn.primary,
html[data-skin="bolour"] .tb.primary,
html[data-skin="bolour"] button.primary,
html[data-skin="bolour"] .btn-primary,
html[data-skin="bolour"] a.btn.primary {
    background: #2563eb !important;
    border-color: #3b82f6 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.45) !important;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
html[data-skin="bolour"] .btn.primary:hover,
html[data-skin="bolour"] .tb.primary:hover,
html[data-skin="bolour"] button.primary:hover,
html[data-skin="bolour"] .btn-primary:hover,
html[data-skin="bolour"] a.btn.primary:hover {
    background: #1d4ed8 !important;
    border-color: #60a5fa !important;
    box-shadow: 0 6px 26px rgba(37, 99, 235, 0.65) !important;
    transform: translateY(-1px) !important;
}

/* دکمه‌های ثانویه شیشه‌ای کپسولی با حاشیه براق و افکت درخشش هنگام Hover */
html[data-skin="bolour"] .btn:not(.primary):not(.danger),
html[data-skin="bolour"] .tb:not(.primary):not(.danger),
html[data-skin="bolour"] .clear-f,
html[data-skin="bolour"] .dash-btn-outline,
html[data-skin="bolour"] .seg a,
html[data-skin="bolour"] .seg button {
    border-radius: 9999px !important;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04)) !important;
    border: 1px solid rgba(255, 255, 255, 0.24) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2), inset 0 1px 0 0 rgba(255, 255, 255, 0.35) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    color: rgba(255, 255, 255, 0.92) !important;
    position: relative !important;
    overflow: hidden !important;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
html[data-skin="bolour"] .btn:not(.primary):not(.danger):hover,
html[data-skin="bolour"] .tb:not(.primary):not(.danger):hover,
html[data-skin="bolour"] .clear-f:hover,
html[data-skin="bolour"] .dash-btn-outline:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.08)) !important;
    border-color: rgba(255, 255, 255, 0.48) !important;
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35), inset 0 1px 0 0 rgba(255, 255, 255, 0.6) !important;
    transform: translateY(-1px) !important;
    color: #ffffff !important;
}
html[data-skin="bolour"] .btn:not(.primary):not(.danger)::after,
html[data-skin="bolour"] .dash-btn-outline::after {
    content: "" !important;
    position: absolute !important;
    top: 0 !important;
    left: -120% !important;
    width: 70% !important;
    height: 100% !important;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent) !important;
    transform: skewX(-20deg) !important;
    transition: left 0.6s ease !important;
    pointer-events: none !important;
}
html[data-skin="bolour"] .btn:not(.primary):not(.danger):hover::after,
html[data-skin="bolour"] .dash-btn-outline:hover::after {
    left: 160% !important;
}

/* دکمه‌های ثانویه در حالت روشن */
html[data-skin="bolour"][data-theme="light"] .btn:not(.primary):not(.danger),
html[data-skin="bolour"][data-theme="light"] .tb:not(.primary):not(.danger),
html[data-skin="bolour"][data-theme="light"] .clear-f,
html[data-skin="bolour"][data-theme="light"] .dash-btn-outline {
    border-radius: 9999px !important;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.5)) !important;
    border: 1px solid rgba(203, 213, 225, 0.9) !important;
    box-shadow: 0 4px 15px rgba(15, 23, 42, 0.05), inset 0 1px 0 0 #ffffff !important;
    color: #0f172a !important;
}
html[data-skin="bolour"][data-theme="light"] .btn:not(.primary):not(.danger):hover,
html[data-skin="bolour"][data-theme="light"] .tb:not(.primary):not(.danger):hover,
html[data-skin="bolour"][data-theme="light"] .clear-f:hover,
html[data-skin="bolour"][data-theme="light"] .dash-btn-outline:hover {
    background: rgba(255, 255, 255, 0.98) !important;
    border-color: #3b82f6 !important;
    color: #1e40af !important;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.18), inset 0 1px 0 0 #ffffff !important;
}

/* متن‌ها و برچسب‌ها */
html[data-skin="bolour"] {
    --text: rgba(255, 255, 255, 0.95);
    --muted: rgba(203, 213, 225, 0.72);
}
html[data-skin="bolour"][data-theme="light"] {
    --text: #0f172a;
    --muted: #475569;
}
html[data-skin="bolour"] .dash-panel-title,
html[data-skin="bolour"] .kpi-val {
    color: rgba(255, 255, 255, 0.95) !important;
}
html[data-skin="bolour"][data-theme="light"] .dash-panel-title,
html[data-skin="bolour"][data-theme="light"] .kpi-val {
    color: #0f172a !important;
}
html[data-skin="bolour"] .kpi-title,
html[data-skin="bolour"] .kpi-sub,
html[data-skin="bolour"] .muted {
    color: rgba(203, 213, 225, 0.72) !important;
}
html[data-skin="bolour"][data-theme="light"] .kpi-title,
html[data-skin="bolour"][data-theme="light"] .kpi-sub,
html[data-skin="bolour"][data-theme="light"] .muted {
    color: #475569 !important;
}

/* ═══════════════ کنترل‌ها و دکمه‌های نقشه در تم بلور ═══════════════ */
html[data-skin="bolour"] .map-type-pills,
html[data-skin="bolour"] .map-layer-pills,
html[data-skin="bolour"] .color-mode-pills {
    background: rgba(15, 23, 42, 0.85) !important;
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45), inset 0 1px 0 0 rgba(255, 255, 255, 0.18) !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
}
html[data-skin="bolour"] .map-type-pills button,
html[data-skin="bolour"] .map-layer-pills button,
html[data-skin="bolour"] .color-mode-pills button {
    color: rgba(226, 232, 240, 0.88) !important;
    font-weight: 600 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45) !important;
    transition: all 0.2s ease !important;
}
html[data-skin="bolour"] .map-type-pills button:hover,
html[data-skin="bolour"] .map-layer-pills button:hover,
html[data-skin="bolour"] .color-mode-pills button:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.14) !important;
}
html[data-skin="bolour"] .map-type-pills button.active,
html[data-skin="bolour"] .map-layer-pills button.active,
html[data-skin="bolour"] .color-mode-pills button.active {
    background: #2563eb !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.55), inset 0 1px 0 0 rgba(255, 255, 255, 0.35) !important;
}

html[data-skin="bolour"][data-theme="light"] .map-type-pills,
html[data-skin="bolour"][data-theme="light"] .map-layer-pills,
html[data-skin="bolour"][data-theme="light"] .color-mode-pills {
    background: rgba(255, 255, 255, 0.95) !important;
    border: 1px solid rgba(203, 213, 225, 0.9) !important;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08) !important;
}
html[data-skin="bolour"][data-theme="light"] .map-type-pills button,
html[data-skin="bolour"][data-theme="light"] .map-layer-pills button,
html[data-skin="bolour"][data-theme="light"] .color-mode-pills button {
    color: #334155 !important;
    font-weight: 600 !important;
    text-shadow: none !important;
}
html[data-skin="bolour"][data-theme="light"] .map-type-pills button.active,
html[data-skin="bolour"][data-theme="light"] .map-layer-pills button.active,
html[data-skin="bolour"][data-theme="light"] .color-mode-pills button.active {
    background: #2563eb !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35) !important;
}

/* دکمه درج در آدرس در تم بلور (تثبیت پس‌زمینه تیره و متون واضح) */
html[data-skin="bolour"] #btn-apply-loc {
    background: #1e293b !important;
    border: 1px solid rgba(255, 255, 255, 0.28) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4), inset 0 1px 0 0 rgba(255, 255, 255, 0.22) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    opacity: 1 !important;
}
html[data-skin="bolour"] #btn-apply-loc:hover {
    background: #2563eb !important;
    border-color: #60a5fa !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.45) !important;
    transform: translateY(-1px) !important;
}
html[data-skin="bolour"][data-theme="light"] #btn-apply-loc {
    background: #16a34a !important;
    border: 1px solid #15803d !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(22, 163, 74, 0.25) !important;
}
html[data-skin="bolour"][data-theme="light"] #btn-apply-loc:hover {
    background: #15803d !important;
}

/* دکمه‌های کنترل زوم و موقعیت روی نقشه */
html[data-skin="bolour"] .map-ctrl-btn {
    background: rgba(15, 23, 42, 0.9) !important;
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4), inset 0 1px 0 0 rgba(255, 255, 255, 0.2) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
}
html[data-skin="bolour"] .map-ctrl-btn:hover {
    background: #1e293b !important;
    border-color: #3b82f6 !important;
    color: #60a5fa !important;
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35) !important;
    transform: scale(1.06) !important;
}
html[data-skin="bolour"][data-theme="light"] .map-ctrl-btn {
    background: rgba(255, 255, 255, 0.96) !important;
    border: 1px solid rgba(203, 213, 225, 0.85) !important;
    color: #1e293b !important;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12) !important;
}
html[data-skin="bolour"][data-theme="light"] .map-ctrl-btn:hover {
    background: #ffffff !important;
    border-color: #3b82f6 !important;
    color: #2563eb !important;
}

/* دکمه و اینپوت جستجوی نقشه */
html[data-skin="bolour"] #map-search-btn,
html[data-skin="bolour"] #map-top-search-btn {
    background: #2563eb !important;
    border: 1px solid #3b82f6 !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
    box-shadow: 0 3px 12px rgba(37, 99, 235, 0.4) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}
html[data-skin="bolour"] #map-search-btn:hover,
html[data-skin="bolour"] #map-top-search-btn:hover {
    background: #1d4ed8 !important;
    border-color: #60a5fa !important;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.55) !important;
}
html[data-skin="bolour"] #map-search-input,
html[data-skin="bolour"] #map-top-search {
    background: rgba(15, 23, 42, 0.75) !important;
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
    color: #ffffff !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.25) !important;
}
html[data-skin="bolour"] #map-search-input:focus,
html[data-skin="bolour"] #map-top-search:focus {
    background: rgba(15, 23, 42, 0.95) !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.35) !important;
}
html[data-skin="bolour"] #map-search-input::placeholder,
html[data-skin="bolour"] #map-top-search::placeholder {
    color: rgba(203, 213, 225, 0.6) !important;
}

/* نتایج جستجوی معابر و اماکن */
html[data-skin="bolour"] #map-search-results,
html[data-skin="bolour"] #map-top-search-results {
    background: rgba(15, 23, 42, 0.96) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #f1f5f9 !important;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.65) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
}
html[data-skin="bolour"] .map-search-item,
html[data-skin="bolour"] .map-top-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #f1f5f9 !important;
}
html[data-skin="bolour"] .map-search-item:hover,
html[data-skin="bolour"] .map-top-item:hover {
    background: rgba(37, 99, 235, 0.25) !important;
}

/* دکمه‌های اماکن اطراف */
html[data-skin="bolour"] #places-list button {
    background: rgba(15, 23, 42, 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
    color: #f1f5f9 !important;
    border-radius: 6px !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}
html[data-skin="bolour"] #places-list button:hover {
    background: #2563eb !important;
    border-color: #60a5fa !important;
    color: #ffffff !important;
}

/* کارت راهنما و لژند نقشه */
html[data-skin="bolour"] .map-legend-card {
    background: rgba(15, 23, 42, 0.9) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #f1f5f9 !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5) !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
}
html[data-skin="bolour"] .map-legend-card .legend-title {
    color: #ffffff !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
}

/* اصلاح پس‌زمینه و رنگ متن گزینه‌های دراپ‌دان (select option) در تم بلور */
html[data-skin="bolour"] select {
    color-scheme: dark;
}
html[data-skin="bolour"] select option,
html[data-skin="bolour"] select optgroup,
html[data-skin="bolour"] .ctx-chip select option {
    background-color: #0f172a !important;
    color: rgba(255, 255, 255, 0.95) !important;
}
html[data-skin="bolour"][data-theme="light"] select {
    color-scheme: light;
}
html[data-skin="bolour"][data-theme="light"] select option,
html[data-skin="bolour"][data-theme="light"] select optgroup,
html[data-skin="bolour"][data-theme="light"] .ctx-chip select option {
    background-color: #ffffff !important;
    color: #0f172a !important;
}

/* تنظیمات اسلایدر جوهر در تم بلور */
html[data-skin="bolour"][data-theme="dark"][data-ink="1"] { --line: rgba(255,255,255,0.08); }
html[data-skin="bolour"][data-theme="dark"][data-ink="2"] { --line: rgba(255,255,255,0.10); }
html[data-skin="bolour"][data-theme="dark"][data-ink="3"] { --line: rgba(255,255,255,0.12); }
html[data-skin="bolour"][data-theme="dark"][data-ink="4"] { --line: rgba(255,255,255,0.14); }
html[data-skin="bolour"][data-theme="dark"][data-ink="6"] { --line: rgba(255,255,255,0.18); }
html[data-skin="bolour"][data-theme="dark"][data-ink="7"] { --line: rgba(255,255,255,0.22); }
html[data-skin="bolour"][data-theme="dark"][data-ink="8"] { --line: rgba(255,255,255,0.26); }
html[data-skin="bolour"][data-theme="dark"][data-ink="9"] { --line: rgba(255,255,255,0.30); }
html[data-skin="bolour"][data-theme="dark"][data-ink="10"] { --line: rgba(255,255,255,0.36); }

/* دسترس‌پذیری و پشتیبانی از مرورگرهای بدون backdrop-filter */
@supports not ((backdrop-filter: blur(10px)) or (-webkit-backdrop-filter: blur(10px))) {
    html[data-skin="bolour"] .page,
    html[data-skin="bolour"] .rail,
    html[data-skin="bolour"] .side,
    html[data-skin="bolour"] .tabsbar,
    html[data-skin="bolour"] .statusbar,
    html[data-skin="bolour"] .flyout-pane,
    html[data-skin="bolour"] .look-pop,
    html[data-skin="bolour"] .jdp,
    html[data-skin="bolour"] .notes-pop,
    html[data-skin="bolour"] dialog.modal,
    html[data-skin="bolour"] .grid-wrap,
    html[data-skin="bolour"] .dash-panel,
    html[data-skin="bolour"] .dash-kpi-card,
    html[data-skin="bolour"] .mowsem-auth-card,
    html[data-skin="bolour"] .balance-card,
    html[data-skin="bolour"] .mini-dock {
        background: #0d1322 !important;
    }
    html[data-skin="bolour"][data-theme="light"] .page,
    html[data-skin="bolour"][data-theme="light"] .rail,
    html[data-skin="bolour"][data-theme="light"] .side,
    html[data-skin="bolour"][data-theme="light"] .tabsbar,
    html[data-skin="bolour"][data-theme="light"] .statusbar,
    html[data-skin="bolour"][data-theme="light"] .flyout-pane,
    html[data-skin="bolour"][data-theme="light"] .look-pop,
    html[data-skin="bolour"][data-theme="light"] .jdp,
    html[data-skin="bolour"][data-theme="light"] .notes-pop,
    html[data-skin="bolour"][data-theme="light"] dialog.modal,
    html[data-skin="bolour"][data-theme="light"] .grid-wrap,
    html[data-skin="bolour"][data-theme="light"] .dash-panel,
    html[data-skin="bolour"][data-theme="light"] .dash-kpi-card,
    html[data-skin="bolour"][data-theme="light"] .mowsem-auth-card,
    html[data-skin="bolour"][data-theme="light"] .balance-card,
    html[data-skin="bolour"][data-theme="light"] .mini-dock {
        background: #ffffff !important;
    }
}

@media (prefers-reduced-transparency: reduce) {
    html[data-skin="bolour"] body::before {
        display: none !important;
    }
    html[data-skin="bolour"] .page,
    html[data-skin="bolour"] .rail,
    html[data-skin="bolour"] .side,
    html[data-skin="bolour"] .tabsbar,
    html[data-skin="bolour"] .statusbar,
    html[data-skin="bolour"] .flyout-pane,
    html[data-skin="bolour"] .look-pop,
    html[data-skin="bolour"] .jdp,
    html[data-skin="bolour"] .notes-pop,
    html[data-skin="bolour"] dialog.modal,
    html[data-skin="bolour"] .grid-wrap,
    html[data-skin="bolour"] .dash-panel,
    html[data-skin="bolour"] .dash-kpi-card,
    html[data-skin="bolour"] .mowsem-auth-card,
    html[data-skin="bolour"] .balance-card,
    html[data-skin="bolour"] .mini-dock {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        background: #0d1322 !important;
    }
    html[data-skin="bolour"][data-theme="light"] .page,
    html[data-skin="bolour"][data-theme="light"] .rail,
    html[data-skin="bolour"][data-theme="light"] .side,
    html[data-skin="bolour"][data-theme="light"] .tabsbar,
    html[data-skin="bolour"][data-theme="light"] .statusbar,
    html[data-skin="bolour"][data-theme="light"] .flyout-pane,
    html[data-skin="bolour"][data-theme="light"] .look-pop,
    html[data-skin="bolour"][data-theme="light"] .jdp,
    html[data-skin="bolour"][data-theme="light"] .notes-pop,
    html[data-skin="bolour"][data-theme="light"] dialog.modal,
    html[data-skin="bolour"][data-theme="light"] .grid-wrap,
    html[data-skin="bolour"][data-theme="light"] .dash-panel,
    html[data-skin="bolour"][data-theme="light"] .dash-kpi-card,
    html[data-skin="bolour"][data-theme="light"] .mowsem-auth-card,
    html[data-skin="bolour"][data-theme="light"] .balance-card,
    html[data-skin="bolour"][data-theme="light"] .mini-dock {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        background: #ffffff !important;
    }
}



/* ═══════════════════════════════════════════════════════════════════
   صفحه ورود مبتنی بر نقش‌های سامانه (اتاق اصناف / متقاضیان و سازمان‌ها)
   ═══════════════════════════════════════════════════════════════════ */
body.asnaf-guest-body {
    background: radial-gradient(circle at top center, #1e1b4b 0%, #0f172a 55%, #090d16 100%) !important;
    min-height: 100vh !important;
    padding: 28px 16px !important;
}

.asnaf-page-wrap {
    max-width: 520px !important;
}

.asnaf-auth-card {
    background: #ffffff !important;
    border-radius: 20px !important;
    padding: 36px 40px 38px !important;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35), 0 4px 14px rgba(0, 0, 0, 0.12) !important;
    border: 1px solid #e2e8f0 !important;
    text-align: center !important;
}

.asnaf-alert {
    margin-bottom: 16px !important;
    text-align: right !important;
    font-size: 13px !important;
}

.asnaf-brand-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 26px;
}

.asnaf-brand-emblem {
    margin-bottom: 10px;
}

.asnaf-brand-img {
    max-height: 64px;
    width: auto;
    object-fit: contain;
}

.asnaf-brand-title {
    font-size: 20px;
    font-weight: 800;
    color: #1e293b;
    line-height: 1.4;
}

.asnaf-brand-subtitle {
    font-size: 15px;
    font-weight: 700;
    color: #334155;
    margin-top: 2px;
}

/* سوئیچر دو تبی */
.asnaf-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: #edf1f7;
    padding: 4px;
    border-radius: 10px;
    margin-bottom: 24px;
    gap: 4px;
}

.asnaf-tab-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 42px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #475569;
    font-family: Vazirmatn, sans-serif;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.asnaf-tab-btn .asnaf-tab-check {
    display: none;
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
}

.asnaf-tab-btn.is-active {
    background: #ffffff;
    color: #0f172a;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}

.asnaf-tab-btn.is-active .asnaf-tab-check {
    display: inline-block;
}

.asnaf-tab-panel {
    display: none;
}

.asnaf-tab-panel.is-active {
    display: block;
}

.asnaf-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.asnaf-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: right;
}

.asnaf-label {
    font-size: 13px;
    font-weight: 600;
    color: #0284c7;
    margin: 0;
}

.asnaf-req {
    color: #ef4444;
    margin-right: 2px;
}

.asnaf-input {
    width: 100%;
    height: 44px;
    border-radius: 8px;
    border: 1.5px solid #93c5fd;
    padding: 0 14px;
    font-size: 14.5px;
    font-family: Vazirmatn, sans-serif;
    font-weight: 600;
    color: #0f172a;
    background: #ffffff;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.asnaf-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.asnaf-password-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.asnaf-password-wrap .asnaf-input {
    padding-left: 42px;
}

.asnaf-eye-btn {
    position: absolute;
    left: 10px;
    background: transparent;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 4px;
    display: inline-flex;
    align-items: center;
}

/* باکس کپچای یکپارچه */
.asnaf-captcha-group {
    display: flex;
    align-items: stretch;
    height: 44px;
    border: 1.5px solid #93c5fd;
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
}

.asnaf-captcha-group:focus-within {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.asnaf-captcha-input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    padding: 0 12px;
    font-size: 13.5px;
    font-family: Vazirmatn, sans-serif;
    color: #0f172a;
    text-align: right;
    background: transparent;
}

.asnaf-captcha-input::placeholder {
    color: #94a3b8;
    font-size: 12.5px;
}

.asnaf-captcha-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border-right: 1px solid #cbd5e1;
    border-left: 1px solid #cbd5e1;
    padding: 0 4px;
}

.asnaf-captcha-img {
    height: 40px;
    width: auto;
    display: block;
}

.asnaf-captcha-refresh {
    width: 42px;
    border: none;
    background: #f8fafc;
    color: #1e40af;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
}

.asnaf-captcha-refresh:hover {
    background: #eff6ff;
}

/* سطر مرا به خاطر بسپار */
.asnaf-remember-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 2px;
}

.asnaf-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #334155;
    cursor: pointer;
    user-select: none;
}

.asnaf-checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #2563eb;
    cursor: pointer;
}

.asnaf-switch-link {
    font-size: 12.5px;
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
}

.asnaf-switch-link:hover {
    text-decoration: underline;
}

/* دکمه نارنجی ارسال کد / ورود */
.asnaf-btn-orange {
    width: 100%;
    height: 46px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(180deg, #ff9800 0%, #f59e0b 100%);
    color: #ffffff;
    font-family: Vazirmatn, sans-serif;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 4px;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.28);
    transition: filter 0.15s ease, transform 0.1s ease;
}

.asnaf-btn-orange:hover {
    filter: brightness(0.95);
}

.asnaf-btn-orange:active {
    transform: translateY(1px);
}

.asnaf-otp-methods-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.asnaf-alt-channels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.asnaf-btn-secondary {
    height: 38px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
    color: #334155;
    font-family: Vazirmatn, sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.asnaf-btn-secondary:hover {
    background: #f1f5f9;
}

/* مرحله دوم OTP */
.asnaf-otp-step {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.asnaf-role-pill {
    display: inline-block;
    align-self: center;
    padding: 4px 12px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 700;
}

.asnaf-otp-subtitle {
    margin: 0;
    font-size: 13.5px;
    color: #475569;
    line-height: 1.7;
}

.asnaf-change-link {
    font-size: 12.5px;
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 6px;
}

/* پنل متقاضیان */
.asnaf-portal-wrap {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.asnaf-portal-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 14px;
    border-bottom: 1px solid #e2e8f0;
}

.asnaf-portal-name {
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
}

.asnaf-portal-meta {
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
}

.asnaf-portal-logout {
    padding: 6px 14px;
    border-radius: 8px;
    border: 1px solid #fecaca;
    background: #fef2f2;
    color: #dc2626;
    font-family: Vazirmatn, sans-serif;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
}

.asnaf-portal-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.asnaf-stat-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.asnaf-stat-box.is-warn {
    background: #fffbeb;
    border-color: #fde68a;
}

.asnaf-stat-label {
    font-size: 11.5px;
    color: #64748b;
}

.asnaf-stat-val {
    font-size: 14px;
    color: #0f172a;
}

.asnaf-portal-heading {
    margin: 0 0 8px 0;
    font-size: 13.5px;
    font-weight: 700;
    color: #1e293b;
}

.asnaf-portal-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.asnaf-portal-item {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 12px;
    background: #ffffff;
}

.asnaf-portal-item-title {
    font-size: 13.5px;
    font-weight: 700;
    color: #0f172a;
}

.asnaf-portal-item-sub {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 12px;
    color: #64748b;
    margin-top: 4px;
}

.asnaf-portal-table-wrap {
    overflow-x: auto;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}

.asnaf-portal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
}

.asnaf-portal-table th,
.asnaf-portal-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #f1f5f9;
    text-align: right;
}

.asnaf-portal-table th {
    background: #f8fafc;
    color: #475569;
    font-weight: 700;
}

.asnaf-portal-empty {
    margin: 0;
    font-size: 12.5px;
    color: #64748b;
}

@media (max-width: 520px) {
    .asnaf-auth-card {
        padding: 28px 20px !important;
    }
    .asnaf-portal-stats {
        grid-template-columns: 1fr;
    }
}

/* ═══════════════════════════════════════════════════════════════════
   پنل تمام‌صفحه متقاضیان (بدهی‌های ابلاغ‌شده، مجوزها و تغییرات)
   ═══════════════════════════════════════════════════════════════════ */
body.portal-shell-body {
    margin: 0;
    padding: 16px;
    min-height: 100vh;
    background: #14133b;
    font-family: Vazirmatn, system-ui, -apple-system, sans-serif;
    direction: rtl;
    box-sizing: border-box;
    color: #0f172a;
}

.portal-shell {
    display: grid;
    grid-template-columns: 270px 1fr;
    gap: 16px;
    min-height: calc(100vh - 32px);
    max-width: 1600px;
    margin: 0 auto;
}

/* سایدبار راست */
.portal-sidebar {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #14133b;
    border-radius: 16px;
}

.portal-side-brand {
    background: #ffffff;
    border-radius: 14px;
    padding: 18px 14px 12px;
    text-align: center;
}

.portal-side-brand .asnaf-brand-header {
    margin-bottom: 0;
}

.portal-side-brand .asnaf-brand-title {
    font-size: 16px;
}

.portal-side-brand .asnaf-brand-subtitle {
    font-size: 12px;
    color: #475569;
}

.portal-side-nav {
    background: #ffffff;
    border-radius: 14px;
    padding: 12px 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.portal-nav-item {
    display: block;
    padding: 12px 18px;
    font-size: 13.5px;
    font-weight: 600;
    color: #1e293b;
    text-decoration: none;
    border-right: 3px solid transparent;
    transition: background 0.15s ease, color 0.15s ease;
}

.portal-nav-item:hover {
    background: #f8fafc;
}

.portal-nav-item.is-active {
    background: #fde8e8;
    color: #111827;
    font-weight: 700;
    border-right-color: #dc2626;
}

.portal-side-footer {
    padding: 10px 14px 6px;
    color: #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.portal-side-user {
    font-size: 13px;
    font-weight: 600;
}

.portal-side-user-label {
    color: #ef4444;
    margin-left: 4px;
}

.portal-side-bottom-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.portal-side-logout {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    color: #ef4444;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    padding: 4px 0;
}

.portal-side-ver {
    font-size: 11px;
    color: #94a3b8;
}

/* ستون اصلی */
.portal-main-col {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

.portal-topbar {
    background: #38335e;
    border-radius: 14px;
    height: 52px;
    padding: 0 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.portal-topbar-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.portal-top-icon {
    background: transparent;
    border: none;
    color: #e2e8f0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    padding: 4px;
    text-decoration: none;
}

.portal-top-icon:hover {
    color: #ffffff;
}

.portal-mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    color: #ffffff;
    cursor: pointer;
}

.portal-content-card {
    background: #ffffff;
    border-radius: 14px;
    padding: 22px 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

/* بنر صورتی عنوان */
.portal-section-banner {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    border-radius: 10px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.portal-banner-title {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
}

.portal-banner-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.portal-btn-red {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 14px;
    border: none;
    border-radius: 6px;
    background: #dc2626;
    color: #ffffff;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.portal-btn-red:hover {
    background: #b91c1c;
}

/* فیلتر بازشونده */
.portal-filter-box {
    display: none;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px 16px;
}

.portal-filter-box.is-open {
    display: block;
}

.portal-filter-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    align-items: end;
}

.portal-filter-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.portal-filter-field label {
    font-size: 12px;
    font-weight: 600;
    color: #475569;
}

.portal-filter-field input,
.portal-filter-field select {
    height: 36px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 0 10px;
    font-family: inherit;
    font-size: 13px;
    background: #ffffff;
}

.portal-filter-submit {
    display: flex;
    gap: 8px;
}

.portal-btn-navy {
    height: 36px;
    padding: 0 16px;
    border: none;
    border-radius: 6px;
    background: #141545;
    color: #ffffff;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.portal-btn-light {
    height: 36px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #ffffff;
    color: #334155;
    font-size: 12.5px;
    text-decoration: none;
}

/* جدول سرمه‌ای */
.portal-table-wrap {
    overflow-x: auto;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}

.portal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.portal-table thead th {
    background: #141545;
    color: #ffffff;
    font-weight: 700;
    padding: 12px 12px;
    text-align: center;
    white-space: nowrap;
}

.portal-sort-ico {
    font-size: 11px;
    opacity: 0.7;
    margin-right: 4px;
}

.portal-table tbody td {
    padding: 14px 12px;
    border-bottom: 1px solid #f1f5f9;
    text-align: center;
    color: #1e293b;
}

.portal-table tbody tr:hover {
    background: #f8fafc;
}

.portal-status {
    font-weight: 700;
    font-size: 12.5px;
}

.portal-status.is-paid {
    color: #16a34a;
}

.portal-status.is-pending {
    color: #f59e0b;
}

.portal-row-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.portal-act-btn {
    background: transparent;
    border: none;
    color: #334155;
    cursor: pointer;
    padding: 4px;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.portal-act-btn:hover {
    color: #141545;
}

.portal-empty-cell {
    padding: 28px !important;
    text-align: center !important;
    color: #64748b;
}

/* فوتر صفحه‌بندی */
.portal-table-footer {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    color: #475569;
}

.portal-pager {
    display: flex;
    align-items: center;
    gap: 8px;
}

.portal-page-arrow {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #ffffff;
    color: #334155;
    text-decoration: none;
}

.portal-page-arrow.is-disabled {
    opacity: 0.45;
    pointer-events: none;
}

.portal-page-num {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #94a3b8;
    border-radius: 6px;
    background: #ffffff;
    font-weight: 700;
}

.portal-goto-form {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-right: 6px;
}

.portal-goto-input {
    width: 44px;
    height: 28px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    text-align: center;
    font-family: inherit;
}

/* کارت‌های مجوز و پروانه کسب */
.portal-licenses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 14px;
}

.portal-license-card {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.portal-license-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 10px;
}

.portal-license-title {
    font-size: 14.5px;
    font-weight: 800;
    color: #0f172a;
}

.portal-license-sub {
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
}

.portal-license-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    font-size: 12.5px;
    color: #475569;
}

.portal-license-meta strong {
    color: #0f172a;
}

.portal-license-addr {
    font-size: 12px;
    color: #475569;
    background: #f8fafc;
    padding: 8px 10px;
    border-radius: 6px;
}

/* مودال جزئیات */
.portal-dialog {
    border: none;
    border-radius: 12px;
    padding: 0;
    max-width: 460px;
    width: 92%;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.portal-dialog-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: #141545;
    color: #ffffff;
}

.portal-dialog-close {
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 20px;
    cursor: pointer;
}

.portal-dialog-body {
    padding: 18px;
}

.portal-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    font-size: 13px;
}

.portal-detail-grid div {
    background: #f8fafc;
    padding: 8px 10px;
    border-radius: 6px;
}

.portal-detail-grid span {
    display: block;
    font-size: 11px;
    color: #64748b;
    margin-bottom: 2px;
}

@media (max-width: 960px) {
    .portal-shell {
        grid-template-columns: 1fr;
    }
    .portal-mobile-menu-btn {
        display: inline-flex;
    }
    .portal-sidebar {
        display: none;
    }
    .portal-sidebar.is-open {
        display: flex;
    }
    .portal-filter-grid {
        grid-template-columns: 1fr;
    }
}
