@charset "UTF-8";
/* ==========================================================================
   MenuSoft — ms-theme.css
   لایه‌ی طراحی: مینیمال • هم‌رنگ لوگو (آبی/فیروزه‌ای/نارنجی) • انیمیشن نرم • آیکون‌های ۳بعدی
   فقط بعد از css/app.css لود می‌شود و هیچ منطق/ساختار PHP را تغییر نمی‌دهد.
   برگشت به ظاهر قبلی: خط <link> این فایل را در includes/header.php حذف کنید.
   ========================================================================== */

:root {
    --ms-ease: cubic-bezier(.16, 1, .3, 1);
    --ms-blue-1: #56b2ff;   --ms-blue-2: #1e63ff;
    --ms-orange-1: #ffb347; --ms-orange-2: #ff6b00;
    --i1: var(--ms-blue-1); --i2: var(--ms-blue-2);
    /* سطوح و سایه‌ها: آرام‌تر و لایه‌ای */
    --bg-secondary: #f5f8fe;
    --border-color: #e8edf7;
    --border-radius: 16px;
    --radius-sm: 10px;
    --shadow-md: 0 1px 2px rgba(2, 23, 74, .04), 0 8px 24px -14px rgba(2, 23, 74, .16);
    --shadow-lg: 0 2px 4px rgba(2, 23, 74, .05), 0 22px 44px -18px rgba(2, 23, 74, .28);
    --transition: all .25s var(--ms-ease);
}
.dark-mode {
    --border-color: rgba(255, 255, 255, .08);
    --shadow-md: 0 1px 2px rgba(0, 0, 0, .35), 0 10px 28px -14px rgba(0, 0, 0, .65);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, .4), 0 24px 48px -18px rgba(0, 0, 0, .75);
}

/* ───────── پس‌زمینه‌ی ملایم (نور آبی/نارنجی لوگو) ───────── */
body.is-app:not(.dark-mode) {
    background:
        radial-gradient(1100px 480px at 100% -8%, rgba(30, 123, 255, .08), transparent 60%),
        radial-gradient(900px 420px at 0% 0%, rgba(255, 122, 0, .06), transparent 55%),
        var(--bg-secondary);
    background-attachment: fixed;
}

/* ───────── رنگ آیکون‌ها بر اساس معنا (فقط متغیر؛ بدون تغییر ظاهر خارج از کادرهای ۳بعدی) ───────── */
i.fa-bolt,
i.fa-cash-register,
i.fa-receipt,
i.fa-shopping-cart,
i.fa-shopping-bag,
i.fa-percent,
i.fa-tags,
i.fa-tag,
i.fa-fire,
i.fa-motorcycle,
i.fa-truck,
i.fa-money-bill,
i.fa-money-bill-wave,
i.fa-coins,
i.fa-wallet,
i.fa-credit-card,
i.fa-file-invoice,
i.fa-file-invoice-dollar,
i.fa-ticket-alt,
i.fa-gift,
i.fa-hamburger,
i.fa-pizza-slice,
i.fa-concierge-bell,
i.fa-bell-concierge,
i.fa-print,
i.fa-mug-hot,
i.fa-coffee,
i.fa-burger { --i1:#ffb347; --i2:#ff6b00; }
i.fa-users,
i.fa-user,
i.fa-user-friends,
i.fa-user-plus,
i.fa-user-tie,
i.fa-headset,
i.fa-phone,
i.fa-phone-alt,
i.fa-comments,
i.fa-comment,
i.fa-comment-dots,
i.fa-sms,
i.fa-wifi,
i.fa-globe,
i.fa-search,
i.fa-paper-plane,
i.fa-envelope,
i.fa-mobile-alt,
i.fa-mobile { --i1:#52dcff; --i2:#0097d9; }
i.fa-check,
i.fa-check-circle,
i.fa-chart-line,
i.fa-chart-bar,
i.fa-chart-pie,
i.fa-tachometer-alt,
i.fa-gauge,
i.fa-download,
i.fa-file-excel,
i.fa-store,
i.fa-clipboard-check,
i.fa-sync,
i.fa-rotate,
i.fa-circle-check,
i.fa-clipboard-list { --i1:#3be0bf; --i2:#0e9f8a; }
i.fa-trash,
i.fa-trash-alt,
i.fa-times,
i.fa-ban,
i.fa-exclamation-triangle,
i.fa-exclamation-circle,
i.fa-sign-out-alt,
i.fa-power-off { --i1:#ff8a92; --i2:#e5484d; }
i.fa-star,
i.fa-crown,
i.fa-bell,
i.fa-exclamation,
i.fa-lightbulb,
i.fa-graduation-cap,
i.fa-medal,
i.fa-trophy,
i.fa-bookmark { --i1:#ffe070; --i2:#f5a300; }
i.fa-cog,
i.fa-cogs,
i.fa-gear,
i.fa-sliders-h,
i.fa-tools,
i.fa-wrench,
i.fa-shield-alt,
i.fa-key,
i.fa-lock,
i.fa-fingerprint,
i.fa-database,
i.fa-server,
i.fa-code,
i.fa-terminal { --i1:#5b78e8; --i2:#12307f; }

/* ───────── آیکون‌های ۳بعدی: سایدبار و منوی کاربر ───────── */
.sidebar .main-menu > li > a > i:first-child:not(.arrow),
.sidebar .main-menu > li > a .icon-wrap > i:first-child,
.drup-menu a > i:first-child {
    position: relative;
    display: inline-grid;
    place-items: center;
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    margin-left: 10px;
    font-size: .92rem;
    color: #fff !important;
    border-radius: 10px;
    background: linear-gradient(145deg, var(--i1), var(--i2));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .55),
        inset 0 -3px 5px rgba(0, 0, 0, .2),
        0 7px 12px -6px var(--i2);
    text-shadow: 0 1px 2px rgba(0, 0, 0, .3);
    transition: transform .4s var(--ms-ease), box-shadow .4s var(--ms-ease);
}
.sidebar .main-menu > li > a > i:first-child:not(.arrow)::before,
.sidebar .main-menu > li > a .icon-wrap > i:first-child::before,
.drup-menu a > i:first-child::before { position: relative; z-index: 1; }
/* برق شیشه‌ای بالای کاشی */
.sidebar .main-menu > li > a > i:first-child:not(.arrow)::after,
.sidebar .main-menu > li > a .icon-wrap > i:first-child::after,
.drup-menu a > i:first-child::after {
    content: "";
    position: absolute;
    inset: 1px 1px 52% 1px;
    border-radius: 9px 9px 14px 14px / 9px 9px 8px 8px;
    background: linear-gradient(rgba(255, 255, 255, .45), rgba(255, 255, 255, 0));
    pointer-events: none;
}
.drup-menu a > i:first-child { width: 28px; height: 28px; flex-basis: 28px; font-size: .8rem; border-radius: 9px; }
.sidebar .main-menu > li > a { perspective: 260px; }
.sidebar .main-menu > li > a:hover > i:first-child:not(.arrow),
.sidebar .main-menu > li > a:hover .icon-wrap > i:first-child,
.drup-menu a:hover > i:first-child {
    transform: translateY(-2px) rotateX(14deg) rotateY(-14deg) scale(1.06);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .6),
        inset 0 -3px 5px rgba(0, 0, 0, .22),
        0 12px 16px -7px var(--i2);
}
/* آیکون قفل‌شده: کم‌رنگ و خنثی */
.sidebar .main-menu > li > a.locked .icon-wrap > i:first-child {
    --i1: #b9c4dd; --i2: #8493b5;
    filter: saturate(.55);
}
.sidebar .main-menu > li > a .icon-wrap { display: inline-flex; position: relative; }

/* ───────── سایدبار مینیمال ───────── */
.sidebar {
    scrollbar-width: thin;
    scrollbar-color: rgba(30, 123, 255, .28) transparent;
}
.sidebar .main-menu { padding: .75rem .5rem; }
.sidebar .main-menu > li { animation: msSlide .5s var(--ms-ease) backwards; }
.sidebar .main-menu > li > a {
    margin: 2px 0;
    padding: .5rem .6rem;
    border-radius: 14px;
    border-right: 0;
    font-weight: 500;
    transition: background .25s var(--ms-ease), color .25s, transform .25s var(--ms-ease);
}
.sidebar .main-menu > li > a:hover {
    background: rgba(30, 123, 255, .07);
    transform: translateX(-2px);
}
.sidebar .main-menu > li.active > a {
    border-right: 0;
    color: var(--text-primary);
    background: linear-gradient(270deg, rgba(30, 123, 255, .13), rgba(255, 122, 0, .06) 70%, transparent);
    box-shadow: inset -3px 0 0 var(--ms-orange-2);
}
.sidebar .main-menu > li.active > a > i:first-child:not(.arrow) { --i1: var(--ms-orange-1); --i2: var(--ms-orange-2); }
.sidebar .main-menu > li > a > span:not(.icon-wrap) { min-width: 0; flex: 0 1 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar .main-menu > li > a .arrow { width: auto; margin: 0 auto 0 0; flex: 0 0 auto; font-size: .75rem; opacity: .55; transition: transform .3s var(--ms-ease); }
.submenu li a { border-radius: 10px; margin: 1px 8px; transition: background .2s, color .2s, padding .25s var(--ms-ease); }
.submenu li a:hover { background: rgba(30, 123, 255, .06); padding-right: 3.8rem; }
.sidebar .main-menu > li:nth-child(1) { animation-delay: 28ms; }
.sidebar .main-menu > li:nth-child(2) { animation-delay: 56ms; }
.sidebar .main-menu > li:nth-child(3) { animation-delay: 84ms; }
.sidebar .main-menu > li:nth-child(4) { animation-delay: 112ms; }
.sidebar .main-menu > li:nth-child(5) { animation-delay: 140ms; }
.sidebar .main-menu > li:nth-child(6) { animation-delay: 168ms; }
.sidebar .main-menu > li:nth-child(7) { animation-delay: 196ms; }
.sidebar .main-menu > li:nth-child(8) { animation-delay: 224ms; }
.sidebar .main-menu > li:nth-child(9) { animation-delay: 252ms; }
.sidebar .main-menu > li:nth-child(10) { animation-delay: 280ms; }
.sidebar .main-menu > li:nth-child(11) { animation-delay: 308ms; }
.sidebar .main-menu > li:nth-child(12) { animation-delay: 336ms; }
.sidebar .main-menu > li:nth-child(13) { animation-delay: 364ms; }
.sidebar .main-menu > li:nth-child(14) { animation-delay: 392ms; }

/* ───────── کارت‌ها ───────── */
.card, .stat-card, .ms-card {
    border: 1px solid var(--border-color);
    border-radius: 18px;
    box-shadow: var(--shadow-md);
    transition: transform .35s var(--ms-ease), box-shadow .35s var(--ms-ease), border-color .25s;
}
.stat-card:hover, .ms-card:hover, a.card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(30, 123, 255, .22);
}

/* ───────── کاشی آیکون ۳بعدی در کارت‌ها (رنگ زمینه‌ی اصلی دست‌نخورده؛ فقط عمق و برق) ───────── */
.stat-icon, .ds-kpi-icon, .ms-icon-wrap, .card-icon, .summary-icon, .page-icon {
    border-radius: 14px;
    background-image: linear-gradient(160deg, rgba(255, 255, 255, .38), rgba(255, 255, 255, 0) 55%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .55),
        inset 0 -4px 8px rgba(0, 0, 0, .14),
        0 12px 20px -10px rgba(2, 23, 74, .4);
    transition: transform .45s var(--ms-ease), box-shadow .45s var(--ms-ease);
}
.stat-card:hover .stat-icon, .ms-card:hover .ms-icon-wrap, .card:hover .card-icon,
.ds-kpi:hover .ds-kpi-icon, .stat-icon:hover, .ds-kpi-icon:hover, .ms-icon-wrap:hover {
    transform: perspective(420px) translateY(-3px) rotateX(10deg) rotateY(-10deg);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .6),
        inset 0 -4px 8px rgba(0, 0, 0, .16),
        0 18px 24px -12px rgba(2, 23, 74, .5);
}

/* ───────── دکمه‌ها: عمق ۳بعدی و حس فشردن ───────── */
.btn, .submit-btn {
    border-radius: 12px;
    font-weight: 600;
    transition: transform .2s var(--ms-ease), box-shadow .25s var(--ms-ease), filter .2s, background .25s;
}
.btn-primary, .submit-btn {
    background: linear-gradient(180deg, #ffa24d, #f06a00);
    border: 0;
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), inset 0 -3px 0 rgba(150, 55, 0, .28), 0 10px 18px -10px rgba(240, 106, 0, .75);
}
.btn-success {
    background: linear-gradient(180deg, #31cfb3, #0e9f8a);
    border: 0; color: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), inset 0 -3px 0 rgba(0, 80, 70, .28), 0 10px 18px -10px rgba(14, 159, 138, .7);
}
.btn-danger {
    background: linear-gradient(180deg, #ff7b82, #e5484d);
    border: 0; color: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), inset 0 -3px 0 rgba(120, 10, 20, .28), 0 10px 18px -10px rgba(229, 72, 77, .7);
}
.btn-primary:hover, .btn-success:hover, .btn-danger:hover, .submit-btn:hover { transform: translateY(-2px); filter: brightness(1.04); }
.btn-primary:active, .btn-success:active, .btn-danger:active, .submit-btn:active {
    transform: translateY(1px);
    filter: none;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, .22), 0 3px 8px -6px rgba(0, 0, 0, .4);
}
.btn:disabled, .submit-btn:disabled { transform: none; filter: grayscale(.35) opacity(.7); }

/* ───────── فرم‌ها ───────── */
.form-control, .form-select, .form-field {
    border-radius: 12px;
    border: 1.5px solid var(--border-color);
    transition: border-color .2s, box-shadow .25s var(--ms-ease), background .2s;
}
.form-control:focus, .form-select:focus, .form-field:focus {
    border-color: var(--ms-blue-2);
    box-shadow: 0 0 0 4px rgba(30, 123, 255, .14);
    outline: none;
}

/* ───────── مودال‌ها ───────── */
.modal { backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); }
.modal-content {
    border-radius: 22px;
    border: 1px solid var(--border-color);
    box-shadow: 0 34px 80px -24px rgba(2, 23, 74, .5);
    animation: msPop .38s var(--ms-ease) backwards;
}

/* ───────── جدول‌ها ───────── */
tbody tr { transition: background .2s; }
tbody tr:hover { background: rgba(30, 123, 255, .045); }

/* ───────── ورود نرم محتوای هر صفحه (بدون باقی‌گذاشتن transform → مودال‌ها و fixed ها سالم) ───────── */
.main-content > * { animation: msRise .55s var(--ms-ease) backwards; }
.main-content > *:nth-child(2) { animation-delay: .05s; }
.main-content > *:nth-child(3) { animation-delay: .10s; }
.main-content > *:nth-child(4) { animation-delay: .15s; }
.main-content > *:nth-child(n+5) { animation-delay: .2s; }

@keyframes msRise  { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes msSlide { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
@keyframes msPop   { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }

/* اسکرول‌بار نازک */
* { scrollbar-width: thin; scrollbar-color: rgba(30, 123, 255, .3) transparent; }

/* ───────── حالت تاریک ───────── */
.dark-mode .sidebar .main-menu > li > a:hover { background: rgba(255, 255, 255, .06); }
.dark-mode .sidebar .main-menu > li.active > a {
    color: #fff;
    background: linear-gradient(270deg, rgba(30, 123, 255, .22), rgba(255, 122, 0, .08) 70%, transparent);
}
.dark-mode tbody tr:hover { background: rgba(255, 255, 255, .04); }
.dark-mode .form-control:focus, .dark-mode .form-select:focus, .dark-mode .form-field:focus { box-shadow: 0 0 0 4px rgba(86, 178, 255, .22); }

/* ═══════════════════════════════════════════════════════════════════════
   قاب یکپارچه: هدر + سایدبار = یک سطح، یک رنگ، یک خط جداکننده
   (به‌جای دو بلوک سرمه‌ای با گرادیان‌های متفاوت و خط رنگی زیر هدر)
   ═══════════════════════════════════════════════════════════════════════ */
body.is-app {
    --ms-surface: #ffffff;
    --ms-line: #e8edf7;
    --ms-ink: #0b1a3d;
    --ms-muted: #5b6b8c;
}
body.is-app.dark-mode {
    --ms-surface: #0c1533;
    --ms-line: rgba(255, 255, 255, .08);
    --ms-ink: #e9efff;
    --ms-muted: #9db0da;
}

/* هدر */
body.is-app header {
    background: var(--ms-surface);
    color: var(--ms-ink);
    border-bottom: 1px solid var(--ms-line);
    box-shadow: none;
}
body.is-app header::after { display: none; }
body.is-app .header-container { max-width: none; padding: 0 18px 0 20px; }
body.is-app header .app-brand h1 { color: var(--ms-ink); font-size: 1.1rem; letter-spacing: -.2px; }
body.is-app header .app-logo { width: 44px; height: 44px; border-radius: 12px; }
body.is-app header i { color: var(--ms-muted); }
body.is-app header .sidebar-toggle {
    width: 38px; height: 38px; border-radius: 12px;
    background: rgba(30, 123, 255, .08); color: var(--ms-ink);
}
body.is-app header .theme-toggle {
    width: 38px; height: 38px; border-radius: 12px;
    background: rgba(30, 123, 255, .08); color: var(--ms-ink);
    transition: background .25s, transform .3s var(--ms-ease);
}
body.is-app header .theme-toggle:hover { background: rgba(30, 123, 255, .15); transform: rotate(-12deg); }
body.is-app header .user-drup { border-radius: 14px; padding: 4px 10px 4px 8px; }
body.is-app header .user-drup:hover { background: rgba(30, 123, 255, .07); }
body.is-app header .user-name { color: var(--ms-ink); font-weight: 600; }
body.is-app header .user-avatar {
    width: 42px; height: 42px; flex-basis: 42px;
    border: 2px solid transparent;
    background: linear-gradient(var(--ms-surface), var(--ms-surface)) padding-box,
                linear-gradient(135deg, #1aa8ff, #ff8a00) border-box;
}
/* دکمه‌ی «مشاهده منو» (استایل درون‌خطی قدیمی را خنثی می‌کند) */
body.is-app header .header-left > a {
    background: linear-gradient(135deg, #1aa8ff, #0a6cff) !important;
    color: #fff !important;
    padding: 8px 16px !important;
    border-radius: 12px !important;
    font-size: .84rem; font-weight: 700; white-space: nowrap;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), inset 0 -3px 0 rgba(0, 40, 140, .25), 0 10px 18px -10px rgba(10, 108, 255, .7);
    transition: transform .2s var(--ms-ease), filter .2s;
}
body.is-app header .header-left > a:hover { transform: translateY(-2px); filter: brightness(1.05); }
body.is-app .drup-menu { border-radius: 16px; overflow: hidden; }
body.is-app.dark-mode .drup-menu { background: #101c3f; border-color: var(--ms-line); }

/* برند هدر هم‌عرض سایدبار + خط جداکننده → قاب «L» یکپارچه */
@media (min-width: 769px) {
    body.is-app .header-right {
        align-self: stretch;
        width: calc(var(--sidebar-width) - 18px);
        border-left: 1px solid var(--ms-line);
        padding-left: 14px;
    }
    body.is-app .main-content { padding: 18px 20px; }
}

/* سایدبار: هم‌سطح و هم‌رنگ هدر */
body.is-app .sidebar {
    background: var(--ms-surface);
    border: 0;
    border-left: 1px solid var(--ms-line);
    box-shadow: none;
    scrollbar-color: rgba(30, 123, 255, .25) transparent;
}
body.is-app .sidebar .main-menu > li > a { color: var(--ms-ink); }
body.is-app .sidebar .main-menu li span { color: inherit; }
body.is-app .sidebar .main-menu > li > a:hover { background: rgba(30, 123, 255, .07); color: var(--ms-ink); }
body.is-app .sidebar .main-menu > li.active > a {
    color: var(--ms-ink);
    font-weight: 700;
    border-right: 0;
    background: linear-gradient(270deg, rgba(30, 123, 255, .12), rgba(255, 122, 0, .05) 70%, transparent);
    box-shadow: inset -3px 0 0 var(--brand-orange);
}
body.is-app .sidebar .main-menu > li > a.locked { color: var(--ms-muted); }
body.is-app .sidebar .main-menu > li > a .arrow { color: var(--ms-muted); }
body.is-app .sidebar .submenu { background: rgba(30, 123, 255, .035); margin: 2px 8px 6px; border-radius: 12px; }
body.is-app .sidebar .submenu li a { color: var(--ms-muted); }
body.is-app .sidebar .submenu li a:hover { color: var(--ms-ink); background: rgba(30, 123, 255, .07); }
body.is-app .sidebar .submenu li.active > a,
body.is-app .sidebar .submenu li a.active { color: var(--brand-blue); background: rgba(30, 123, 255, .09); }
body.is-app.dark-mode .sidebar .submenu { background: rgba(255, 255, 255, .04); }
body.is-app.dark-mode .sidebar .submenu li.active > a,
body.is-app.dark-mode .sidebar .submenu li a.active { color: #7cc0ff; }

@media (max-width: 768px) {
    body.is-app .sidebar { border-left: 0; box-shadow: 0 0 40px -10px rgba(2, 23, 74, .35); }
}

/* ═══════════════════════════════════════════════════════════════════════
   صفحات داخلی (pages/*): هم‌سبک با قاب جدید
   CSS هر صفحه با :where() اسکوپ شده (اولویت صفر)، پس این لایه بدون !important روی همه می‌نشیند.
   عمداً فقط ظاهرِ مشترک (تایپوگرافی، دکمه، تب، فرم، مودال، آیکون عنوان) را یکدست می‌کند؛
   رنگ‌ زمینه‌ی جدول‌ها و چیدمان‌های اختصاصی هر صفحه دست‌نخورده می‌ماند.
   ═══════════════════════════════════════════════════════════════════════ */

/* عنوان‌ها */
.main-content :is(.page-header, .section-header, .card-header, .chart-title, .modal-header) :is(h1, h2, h3, h4, h5) {
    color: var(--ms-ink, var(--text-primary));
    letter-spacing: -.1px;
}
.card-title, .chart-title, .modal-title { font-weight: 700; }

/* آیکونِ کنار عنوان → کاشی ۳بعدی کوچک (رنگ از معنای آیکون) */
.main-content :is(.page-header, .section-header, .card-header, .chart-title) :is(h1, h2, h3, h4, h5) > i:first-child,
.main-content .card-title > i:first-child,
.main-content .chart-title > i:first-child,
.modal-title > i:first-child {
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 30px; height: 30px;
    margin-inline-end: 8px;
    vertical-align: middle;
    font-size: .82rem;
    color: #fff !important;
    border-radius: 10px;
    background: linear-gradient(145deg, var(--i1), var(--i2));
    box-shadow: inset 0 1px 0 rgba(255,255,255,.55), inset 0 -3px 5px rgba(0,0,0,.2), 0 7px 12px -6px var(--i2);
    text-shadow: 0 1px 2px rgba(0,0,0,.3);
}
.main-content :is(.page-header, .section-header, .card-header, .chart-title) :is(h1, h2, h3, h4, h5) > i:first-child::before,
.main-content .card-title > i:first-child::before, .main-content .chart-title > i:first-child::before,
.modal-title > i:first-child::before { position: relative; z-index: 1; }
.main-content :is(.page-header, .section-header, .card-header, .chart-title) :is(h1, h2, h3, h4, h5) > i:first-child::after,
.main-content .card-title > i:first-child::after, .main-content .chart-title > i:first-child::after,
.modal-title > i:first-child::after {
    content: ""; position: absolute; inset: 1px 1px 52% 1px;
    border-radius: 9px 9px 14px 14px / 9px 9px 8px 8px;
    background: linear-gradient(rgba(255,255,255,.45), rgba(255,255,255,0));
    pointer-events: none;
}

/* شماره‌ی مراحل (راهنما/ویزارد): عمق ۳بعدی؛ رنگ اصلی هر صفحه حفظ می‌شود */
.step-num, .help-step-num {
    background-image: linear-gradient(160deg, rgba(255,255,255,.38), rgba(255,255,255,0) 55%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.55), inset 0 -3px 6px rgba(0,0,0,.16), 0 8px 14px -8px rgba(2,23,74,.45);
}

/* تب‌ها: نرم و گرد، فعال با آبی لوگو */
.tabs, .tab-list { scrollbar-width: none; }
.tab-btn, .tab, .settings-tab-link {
    border-radius: 12px;
    transition: background .25s var(--ms-ease), color .25s, transform .25s var(--ms-ease);
}
.tab-btn:hover, .tab:hover, .settings-tab-link:hover { background: rgba(30, 123, 255, .06); }
.tab-btn.active, .tab.active, .settings-tab-link.active { color: var(--brand-orange); background: rgba(255, 122, 0, .09); }  /* نارنجی = «فعال»، مثل نوار سایدبار */
.tab-content, .tab-panel { animation: msRise .45s var(--ms-ease) backwards; }

/* دکمه‌های ثانویه/خنثی/هشدار/حاشیه‌ای: هم‌خانواده‌ی دکمه‌های اصلی */
.btn-secondary, .btn-outline, .action-btn {
    border-radius: 12px;
    transition: transform .2s var(--ms-ease), box-shadow .25s var(--ms-ease), background .2s, border-color .2s;
}
.btn-secondary {
    background: linear-gradient(180deg, #f4f7fd, #e6ecf8);
    color: var(--ms-ink, var(--text-primary));
    border: 0;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.9), inset 0 -2px 0 rgba(2,23,74,.08), 0 6px 12px -8px rgba(2,23,74,.3);
}
.dark-mode .btn-secondary {
    background: linear-gradient(180deg, rgba(255,255,255,.1), rgba(255,255,255,.05));
    color: var(--ms-ink, #e9efff);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 6px 12px -8px rgba(0,0,0,.6);
}
.btn-secondary:hover, .btn-outline:hover, .action-btn:hover { transform: translateY(-2px); }
.btn-secondary:active, .btn-outline:active, .action-btn:active { transform: translateY(1px); }
.btn-outline { border-radius: 12px; }
.btn-warning {
    background: linear-gradient(180deg, #ffd25c, #f5a300);
    border: 0; color: #3a2500;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.5), inset 0 -3px 0 rgba(150,90,0,.25), 0 10px 18px -10px rgba(245,163,0,.7);
}
.btn-warning:hover { transform: translateY(-2px); }
.btn-sm { border-radius: 10px; }

/* فرم‌ها: برچسب، علامت اجباری، کنترل‌های انتخابی */
.form-label { color: var(--ms-ink, var(--text-primary)); font-weight: 600; font-size: .88rem; }
.req { color: var(--danger-color); }
input[type="checkbox"], input[type="radio"], input[type="range"], .form-range { accent-color: var(--brand-blue); }
.input-field, textarea.form-control, select.form-control {
    border-radius: 12px;
    transition: border-color .2s, box-shadow .25s var(--ms-ease);
}
.input-field:focus { border-color: var(--ms-blue-2); box-shadow: 0 0 0 4px rgba(30,123,255,.14); outline: none; }

/* کارت‌ها و جعبه‌های اطلاعات */
.card-header, .ms-card-header { border-radius: 18px 18px 0 0; }
.info-box, .chart-container, .breakdown-item {
    border-radius: 16px;
    border-color: var(--border-color);
}
.alert { border-radius: 14px; }
.ms-card-header { transition: background .2s; }
.ms-card-header:hover { background: rgba(30, 123, 255, .04); }

/* جدول‌ها: فقط رنگ خطوط و hover (زمینه‌ی سربرگ هر صفحه دست‌نخورده) */
.main-content table td, .main-content table th { border-color: var(--border-color); }

/* وضعیت خالی / بدون داده */
.empty-state, .no-data { color: var(--ms-muted, var(--text-secondary)); }

/* مودال‌های سفارشیِ صفحات (modal-overlay/modal-box) */
.modal-overlay { backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); }
.modal-box {
    border-radius: 22px;
    border: 1px solid var(--border-color);
    box-shadow: 0 34px 80px -24px rgba(2, 23, 74, .5);
    animation: msPop .38s var(--ms-ease) backwards;
}
.modal-close, .modal-close-btn { border-radius: 12px; transition: background .2s, transform .3s var(--ms-ease); }
.modal-close:hover, .modal-close-btn:hover { transform: rotate(90deg); }

/* صفحه‌بندی */
.pagination :is(a, button, li) { border-radius: 10px; }

/* ───────── حرکت کمتر: احترام به تنظیم سیستم کاربر ───────── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
