@font-face { font-family: Vazirmatn; src: url('../fonts/vazirmatn/Vazirmatn-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: Vazirmatn; src: url('../fonts/vazirmatn/Vazirmatn-Medium.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: Vazirmatn; src: url('../fonts/vazirmatn/Vazirmatn-SemiBold.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: Vazirmatn; src: url('../fonts/vazirmatn/Vazirmatn-Bold.woff2') format('woff2'); font-weight: 700; font-display: swap; }

/* ============================ Design Tokens ============================ */
:root {
    --primary: #16a34a;
    --primary-dark: #15803d;
    --primary-light: #dcfce7;
    --primary-soft: rgba(22, 163, 74, .08);
    --background: #f4f7f5;
    --surface: #ffffff;
    --surface-muted: #f0f4f2;
    --text: #1a2e25;
    --text-muted: #6b7f75;
    --border: #e3e9e6;
    --success: #16a34a;
    --warning: #d97706;
    --danger: #dc2626;
    --info: #0284c7;
    --radius: 0.875rem;
    --radius-sm: 0.625rem;
    --shadow-sm: 0 1px 0.125rem rgba(18, 44, 30, .06);
    --shadow-md: 0 0.25rem 0.875rem rgba(18, 44, 30, .08);
    --shadow-lg: 0 0.625rem 1.875rem rgba(18, 44, 30, .14);
    --sidebar-w: 16.125rem;
}
[data-bs-theme="dark"] {
    --primary: #22c55e;
    --primary-dark: #16a34a;
    --primary-light: #143122;
    --primary-soft: rgba(34, 197, 94, .10);
    --background: #0e1613;
    --surface: #16211b;
    --surface-muted: #1b2a22;
    --text: #e5efe9;
    --text-muted: #8ba297;
    --border: #24352c;
    --shadow-sm: 0 1px 0.125rem rgba(0, 0, 0, .3);
    --shadow-md: 0 0.25rem 0.875rem rgba(0, 0, 0, .35);
    --shadow-lg: 0 0.625rem 1.875rem rgba(0, 0, 0, .5);
}

/* ============================ Color Themes ============================ */
/* تم های رنگی — همان ساختار تم سبز با ته رنگ متفاوت.
   هر تم حالت روشن و تیره مستقل دارد. سبز تم پیش فرض است (بلاک های بالا)
   و انتخاب آن هیچ بازنویسی اضافه ای نیاز ندارد. */

/* ------------------------------- آبی ------------------------------- */
[data-pm-color="blue"] {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #dbeafe;
    --primary-soft: rgba(37, 99, 235, .08);
    --background: #f3f6fa;
    --surface-muted: #eef2f8;
    --text: #1a2537;
    --text-muted: #6b7890;
    --border: #e2e8f1;
    --shadow-sm: 0 1px 0.125rem rgba(17, 32, 57, .06);
    --shadow-md: 0 0.25rem 0.875rem rgba(17, 32, 57, .08);
    --shadow-lg: 0 0.625rem 1.875rem rgba(17, 32, 57, .14);
}
[data-pm-color="blue"][data-bs-theme="dark"] {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #16243d;
    --primary-soft: rgba(59, 130, 246, .12);
    --background: #0f141d;
    --surface: #151d2b;
    --surface-muted: #1a2333;
    --text: #e4eaf3;
    --text-muted: #8a97ad;
    --border: #243044;
}

/* ------------------------------ قرمز ------------------------------- */
[data-pm-color="red"] {
    --primary: #dc2626;
    --primary-dark: #b91c1c;
    --primary-light: #fee2e2;
    --primary-soft: rgba(220, 38, 38, .08);
    --background: #f9f5f5;
    --surface-muted: #f4efef;
    --text: #2f1c1c;
    --text-muted: #826b6b;
    --border: #ece2e2;
    --shadow-sm: 0 1px 0.125rem rgba(53, 18, 18, .06);
    --shadow-md: 0 0.25rem 0.875rem rgba(53, 18, 18, .08);
    --shadow-lg: 0 0.625rem 1.875rem rgba(53, 18, 18, .14);
}
[data-pm-color="red"][data-bs-theme="dark"] {
    --primary: #ef4444;
    --primary-dark: #dc2626;
    --primary-light: #341a1a;
    --primary-soft: rgba(239, 68, 68, .12);
    --background: #181010;
    --surface: #211516;
    --surface-muted: #2a1b1c;
    --text: #f2e7e7;
    --text-muted: #a68e8f;
    --border: #3a2426;
}

/* --------------------------- زرد (کهربایی) --------------------------- */
[data-pm-color="yellow"] {
    --primary: #d97706;
    --primary-dark: #b45309;
    --primary-light: #fef3c7;
    --primary-soft: rgba(217, 119, 6, .10);
    --background: #f9f6ef;
    --surface-muted: #f4efe3;
    --text: #2e2517;
    --text-muted: #7f7460;
    --border: #eae3d4;
    --shadow-sm: 0 1px 0.125rem rgba(51, 40, 14, .06);
    --shadow-md: 0 0.25rem 0.875rem rgba(51, 40, 14, .08);
    --shadow-lg: 0 0.625rem 1.875rem rgba(51, 40, 14, .14);
}
[data-pm-color="yellow"][data-bs-theme="dark"] {
    --primary: #f59e0b;
    --primary-dark: #d97706;
    --primary-light: #33260e;
    --primary-soft: rgba(245, 158, 11, .12);
    --background: #161207;
    --surface: #201a0e;
    --surface-muted: #292213;
    --text: #f1ead9;
    --text-muted: #a3977c;
    --border: #3b3119;
}

/* ------------------------------ بنفش ------------------------------- */
[data-pm-color="purple"] {
    --primary: #7c3aed;
    --primary-dark: #6d28d9;
    --primary-light: #ede9fe;
    --primary-soft: rgba(124, 58, 237, .08);
    --background: #f6f4fa;
    --surface-muted: #f0edf7;
    --text: #221b33;
    --text-muted: #716b85;
    --border: #e6e2ef;
    --shadow-sm: 0 1px 0.125rem rgba(31, 22, 54, .06);
    --shadow-md: 0 0.25rem 0.875rem rgba(31, 22, 54, .08);
    --shadow-lg: 0 0.625rem 1.875rem rgba(31, 22, 54, .14);
}
[data-pm-color="purple"][data-bs-theme="dark"] {
    --primary: #8b5cf6;
    --primary-dark: #7c3aed;
    --primary-light: #251b40;
    --primary-soft: rgba(139, 92, 246, .12);
    --background: #12101b;
    --surface: #191625;
    --surface-muted: #201c30;
    --text: #e9e5f3;
    --text-muted: #948da9;
    --border: #2c2740;
}

/* ================================ Base ================================ */
/* روت اسکیل: 16px پیش فرض مرورگر → 18px (همه اجزا شامل Bootstrap حدود ۱۲.۵٪ بزرگ تر) */
html { font-size: 18px; scroll-behavior: smooth; }
body {
    font-family: Vazirmatn, Tahoma, Arial, sans-serif !important;
    background: var(--background);
    color: var(--text);
    font-size: 0.875rem;
    min-height: 100vh;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
::selection { background: var(--primary-light); }

/* نقطه کانونی واضح برای دسترس پذیری */
:focus-visible {
    outline: 0.125rem solid var(--primary);
    outline-offset: 0.125rem;
    border-radius: 0.25rem;
}

/* فاصله حداقلی آیکون و متن (حداقل یک فاصله)
   در کانتینرهای flex، فاصله متنی HTML حذف می شود؛ این قانون فاصله را تضمین می کند */
i.bi { margin-inline-end: .3em; }
/* استثناها: آیکون های تنها (وسط چین) یا جاهایی که gap خودش فاصله می دهد
   توجه: سلکتور خام «a > i.bi:only-child» مجاز نیست — نودهای متنی را نمی بیند
   و فاصله تب ها و لینک های دارای متن را صفر می کرد */
.btn > i.bi:only-child,
button > i.bi:only-child,
.pm-search > i.bi,
.pm-nav-link > i.bi,
.pm-filter-chip > i.bi,
.pm-label-chip > i.bi,
.pm-card-due > i.bi,
.pm-time-badge > i.bi,
.pm-stat-icon > i.bi,
.pm-activity-dot > i.bi,
.pm-empty-icon > i.bi,
.pm-onboard-icon > i.bi,
.pm-att-icon > i.bi,
.pm-task-check > i.bi,
.pm-timer-chip-stop > i.bi,
.pm-pagination a > i.bi:only-child,
.pm-link-muted > i.bi:only-child,
[data-notifications-bell] > i.bi { margin-inline-end: 0; }

h1, h2, h3, h4, h5 { font-weight: 700; }

/* فرم ها */
.form-control, .form-select {
    background: var(--surface);
    border-color: var(--border);
    color: var(--text);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.84375rem;
    padding: .55rem .85rem;
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.1875rem var(--primary-soft);
    background: var(--surface);
    color: var(--text);
}
.form-control::placeholder { color: var(--text-muted); opacity: .7; }
.form-label { font-size: 0.8125rem; font-weight: 600; margin-bottom: .35rem; }
.form-text { font-size: 0.71875rem; color: var(--text-muted); }
.form-check-input:checked { background-color: var(--primary); border-color: var(--primary); }
.form-check-input:focus { box-shadow: 0 0 0 0.1875rem var(--primary-soft); border-color: var(--primary); }
.pm-field-error { color: var(--danger); font-size: 0.75rem; margin-top: 0.25rem; }

/* دکمه ها */
.btn { border-radius: var(--radius-sm); font-family: inherit; font-size: 0.84375rem; font-weight: 600; padding: .5rem 1.1rem; }
.btn-primary { background: var(--primary); border-color: var(--primary); }
.btn-primary:hover, .btn-primary:focus { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-outline-primary { color: var(--primary); border-color: var(--primary); }
.btn-outline-primary:hover, .btn-outline-primary:focus { background: var(--primary); border-color: var(--primary); }
.btn-soft {
    background: var(--primary-soft); color: var(--primary-dark); border: 0;
}
.btn-soft:hover { background: var(--primary-light); color: var(--primary-dark); }
.btn-sm { font-size: 0.78125rem; padding: .3rem .7rem; }

/* کارت ها */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-header { background: transparent; border-bottom: 1px solid var(--border); font-weight: 700; }
.modal-content { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.modal-header, .modal-footer { border-color: var(--border); }

/* جدول ها */
.table { --bs-table-bg: transparent; color: var(--text); }
.table > :not(caption) > * > * { border-color: var(--border); }
.table thead th { font-size: 0.75rem; color: var(--text-muted); font-weight: 600; background: var(--surface-muted); }
.table-hover > tbody > tr:hover > * { --bs-table-accent-bg: var(--surface-muted); color: var(--text); }

/* بج ها */
.badge { font-weight: 600; font-size: 0.6875rem; border-radius: 0.375rem; padding: .35em .6em; }
.badge-soft { background: var(--surface-muted); color: var(--text-muted); font-weight: 500; }

/* پیمایش اسکرول ظریف */
::-webkit-scrollbar { width: 0.5625rem; height: 0.5625rem; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 0.5rem; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
::-webkit-scrollbar-track { background: transparent; }

/* ================================ Layout =============================== */
.pm-layout { min-height: 100vh; }

/* سایدبار */
.pm-sidebar {
    position: fixed; inset-inline-start: 0; top: 0; bottom: 0;
    width: var(--sidebar-w);
    background: var(--surface);
    border-inline-end: 1px solid var(--border);
    display: flex; flex-direction: column;
    z-index: 1030;
    transition: transform .25s ease;
}
.pm-sidebar-brand {
    display: flex; align-items: center; gap: 0.625rem;
    padding: 1.125rem 1.25rem; border-bottom: 1px solid var(--border);
    font-weight: 700; font-size: 0.96875rem; color: var(--text);
}
.pm-brand-mark {
    width: 2.375rem; height: 2.375rem; border-radius: 0.6875rem; flex-shrink: 0;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff; display: flex; align-items: center; justify-content: center; font-size: 0.9375rem; font-weight: 700;
}
.pm-sidebar-nav { flex: 1; overflow-y: auto; padding: 0.75rem 0.75rem 1.25rem; }
.pm-nav-section { font-size: 0.65625rem; color: var(--text-muted); font-weight: 600; letter-spacing: 0.025rem; padding: 0.875rem 0.625rem 0.375rem; }
.pm-nav-link {
    display: flex; align-items: center; gap: 0.625rem;
    padding: 0.5625rem 0.75rem; margin-bottom: 0.125rem;
    border-radius: var(--radius-sm);
    color: var(--text-muted); font-size: 0.84375rem; font-weight: 500;
    transition: background .15s, color .15s;
}
.pm-nav-link i { width: 1.25rem; text-align: center; font-size: 0.9375rem; }
.pm-nav-link:hover { background: var(--surface-muted); color: var(--text); }
.pm-nav-link.active { background: var(--primary-soft); color: var(--primary-dark); font-weight: 600; }
[data-bs-theme="dark"] .pm-nav-link.active { color: var(--primary); }
.pm-nav-link .pm-nav-badge {
    margin-inline-start: auto; background: var(--danger); color: #fff;
    border-radius: 1.25rem; font-size: 0.65625rem; padding: 1px 0.4375rem; font-weight: 700;
}
.pm-sidebar-footer {
    border-top: 1px solid var(--border); padding: 0.75rem;
    display: flex; align-items: center; gap: 0.625rem;
}
.pm-sidebar-footer .pm-user-meta { flex: 1; min-width: 0; }
.pm-sidebar-footer .pm-user-name { font-size: 0.78125rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pm-sidebar-footer .pm-user-role { font-size: 0.6875rem; color: var(--text-muted); }

/* آواتار */
.pm-avatar {
    width: 2.125rem; height: 2.125rem; border-radius: 50%; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    color: #fff; font-size: 0.75rem; font-weight: 700;
}
.pm-avatar-sm { width: 1.625rem; height: 1.625rem; font-size: 0.625rem; }
.pm-avatar-lg { width: 2.875rem; height: 2.875rem; font-size: 1rem; }

/* محتوای اصلی */
.pm-main {
    margin-inline-start: var(--sidebar-w);
    min-height: 100vh;
    display: flex; flex-direction: column;
}

/* نوار بالا */
.pm-topbar {
    position: sticky; top: 0; z-index: 1020;
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    backdrop-filter: blur(0.5rem);
    border-bottom: 1px solid var(--border);
    padding: 0.625rem 1.5rem;
    display: flex; align-items: center; gap: 0.875rem;
    min-height: 3.625rem;
}
.pm-topbar-title { font-size: 1rem; font-weight: 700; margin: 0; }
.pm-topbar-sub { font-size: 0.75rem; color: var(--text-muted); margin: 0; }
.pm-topbar-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 0.5rem; }

/* جستجوی سراسری */
.pm-search { position: relative; width: 18.75rem; max-width: 38vw; }
.pm-search input {
    width: 100%; border: 1px solid var(--border); background: var(--surface-muted);
    border-radius: 0.625rem; padding: 0.5rem 2.25rem 0.5rem 0.75rem; font-family: inherit; font-size: 0.8125rem;
    color: var(--text);
}
.pm-search input:focus { outline: none; border-color: var(--primary); background: var(--surface); box-shadow: 0 0 0 0.1875rem var(--primary-soft); }
.pm-search > i { position: absolute; inset-inline-end: 0.75rem; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 0.8125rem; pointer-events: none; }
.pm-search-results {
    position: absolute; top: calc(100% + 0.375rem); inset-inline-end: 0;
    width: 23.75rem; max-width: 88vw; max-height: 26.25rem; overflow-y: auto;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow-lg); display: none; z-index: 1050; padding: 0.5rem;
}
.pm-search-results.open { display: block; }
.pm-search-group-title { font-size: 0.6875rem; color: var(--text-muted); font-weight: 700; padding: 0.5rem 0.625rem 0.25rem; }
.pm-search-item {
    display: block; padding: 0.5rem 0.625rem; border-radius: 0.5rem; color: var(--text);
}
.pm-search-item:hover, .pm-search-item:focus { background: var(--surface-muted); color: var(--text); outline: none; }
.pm-search-item .t { font-size: 0.8125rem; font-weight: 600; }
.pm-search-item .s { font-size: 0.71875rem; color: var(--text-muted); }
.pm-search-empty { padding: 1.125rem; text-align: center; color: var(--text-muted); font-size: 0.8125rem; }

/* زنگ اعلان ها */
.pm-bell { position: relative; }
.pm-bell .pm-bell-badge {
    position: absolute; top: -0.125rem; inset-inline-start: -0.125rem;
    min-width: 1rem; height: 1rem; border-radius: 0.625rem;
    background: var(--danger); color: #fff; font-size: 0.625rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center; padding: 0 0.25rem;
}

/* محتوا */
.pm-content { padding: 1.375rem 1.5rem 2.5rem; flex: 1; }
.pm-page-head { display: flex; align-items: flex-start; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.pm-page-head .pm-page-titles { flex: 1; min-width: 12.5rem; }
.pm-page-title { font-size: 1.1875rem; font-weight: 700; margin: 0; }
.pm-page-desc { color: var(--text-muted); font-size: 0.8125rem; margin: 0.1875rem 0 0; }

/* فوتر */
.pm-footer { padding: 0.875rem 1.5rem; color: var(--text-muted); font-size: 0.75rem; border-top: 1px solid var(--border); }

/* ============================== Components ============================= */

/* کارت آمار */
.pm-stat {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1rem 1.125rem;
    display: flex; align-items: center; gap: 0.875rem;
    box-shadow: var(--shadow-sm);
}
.pm-stat .pm-stat-icon {
    width: 2.75rem; height: 2.75rem; border-radius: 0.75rem; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; font-size: 1.1875rem;
}
.pm-stat .pm-stat-value { font-size: 1.375rem; font-weight: 700; line-height: 1.2; }
.pm-stat .pm-stat-label { font-size: 0.75rem; color: var(--text-muted); }
.pm-stat .pm-stat-link { font-size: 0.71875rem; }
.bg-soft-green { background: var(--primary-soft); color: var(--primary-dark); }
.bg-soft-blue { background: rgba(2, 132, 199, .1); color: var(--info); }
.bg-soft-red { background: rgba(220, 38, 38, .1); color: var(--danger); }
.bg-soft-amber { background: rgba(217, 119, 6, .12); color: var(--warning); }
.bg-soft-gray { background: var(--surface-muted); color: var(--text-muted); }

/* نوار پیشرفت */
.pm-progress { height: 0.5rem; background: var(--surface-muted); border-radius: 0.5rem; overflow: hidden; }
.pm-progress-bar { height: 100%; background: var(--primary); border-radius: 0.5rem; transition: width .4s ease; }
.pm-progress-thin { height: 0.3125rem; }

/* وضعیت خالی */
.pm-empty {
    text-align: center; padding: 3rem 1.25rem; color: var(--text-muted);
}
.pm-empty .pm-empty-icon {
    width: 4rem; height: 4rem; margin: 0 auto 0.875rem; border-radius: 1.25rem;
    background: var(--primary-soft); color: var(--primary);
    display: flex; align-items: center; justify-content: center; font-size: 1.625rem;
}
.pm-empty h3 { font-size: 1rem; color: var(--text); margin-bottom: 0.375rem; }
.pm-empty p { font-size: 0.8125rem; max-width: 23.75rem; margin: 0 auto 1.125rem; }

/* آیتم فعالیت */
.pm-activity-item { display: flex; gap: 0.75rem; padding: 0.625rem 0; border-bottom: 1px dashed var(--border); }
.pm-activity-item:last-child { border-bottom: 0; }
.pm-activity-dot {
    width: 2rem; height: 2rem; border-radius: 50%; flex-shrink: 0;
    background: var(--surface-muted); color: var(--text-muted);
    display: flex; align-items: center; justify-content: center; font-size: 0.8125rem;
}
.pm-activity-text { font-size: 0.8125rem; line-height: 1.7; }
.pm-activity-time { font-size: 0.6875rem; color: var(--text-muted); }

/* کارت پروژه */
.pm-project-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1.125rem;
    box-shadow: var(--shadow-sm); height: 100%;
    transition: box-shadow .2s, transform .2s;
    display: flex; flex-direction: column; gap: 0.625rem;
}
.pm-project-card:hover { box-shadow: var(--shadow-md); transform: translateY(-0.125rem); }
.pm-project-card .pm-project-name { font-size: 0.9375rem; font-weight: 700; color: var(--text); }
.pm-project-card .pm-project-name:hover { color: var(--primary-dark); }
.pm-project-card .pm-project-desc { font-size: 0.78125rem; color: var(--text-muted); min-height: 2.125rem; }

/* ردیف لیست تسک */
.pm-task-row {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.75rem 1rem; border-bottom: 1px solid var(--border);
    background: var(--surface);
    transition: background .15s;
}
.pm-task-row:hover { background: var(--surface-muted); }
.pm-task-row:last-child { border-bottom: 0; }
.pm-task-row .pm-task-title { font-size: 0.84375rem; font-weight: 600; color: var(--text); }
.pm-task-row .pm-task-title:hover { color: var(--primary-dark); }
.pm-task-row .pm-task-meta { font-size: 0.71875rem; color: var(--text-muted); display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; }
.pm-task-check {
    width: 1.25rem; height: 1.25rem; border-radius: 0.375rem; border: 0.125rem solid var(--border);
    background: transparent; cursor: pointer; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    color: transparent; font-size: 0.6875rem; transition: all .15s; padding: 0;
}
.pm-task-check:hover { border-color: var(--primary); color: var(--primary); }
.pm-task-check.checked { background: var(--primary); border-color: var(--primary); color: #fff; }
.pm-task-overdue .pm-task-title { color: var(--danger); }

/* چیپ برچسب */
.pm-label-chip {
    display: inline-flex; align-items: center; gap: 0.3125rem;
    font-size: 0.6875rem; font-weight: 600; color: var(--text);
    background: var(--surface-muted); border-radius: 0.375rem; padding: 0.125rem 0.5rem;
}
.pm-label-dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; }

/* پریست های فیلتر */
.pm-filter-chip {
    display: inline-flex; align-items: center; gap: 0.375rem;
    border: 1px solid var(--border); background: var(--surface);
    color: var(--text-muted); border-radius: 1.25rem; padding: 0.3125rem 0.875rem;
    font-size: 0.78125rem; font-weight: 500; cursor: pointer; text-decoration: none;
    transition: all .15s;
}
.pm-filter-chip:hover { border-color: var(--primary); color: var(--primary-dark); }
.pm-filter-chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* بخش فیلترها */
.pm-filters { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 0.75rem 0.875rem; margin-bottom: 1rem; }

/* تب های صفحه پروژه */
.pm-tabs {
    display: flex; gap: 0.25rem; overflow-x: auto;
    border-bottom: 1px solid var(--border); margin-bottom: 1.125rem;
    padding-bottom: 0;
}
.pm-tab {
    padding: 0.5625rem 1rem; font-size: 0.8125rem; font-weight: 600; color: var(--text-muted);
    border-bottom: 0.125rem solid transparent; white-space: nowrap; text-decoration: none;
    margin-bottom: -1px;
}
.pm-tab:hover { color: var(--text); }
.pm-tab.active { color: var(--primary-dark); border-bottom-color: var(--primary); }
[data-bs-theme="dark"] .pm-tab.active { color: var(--primary); }

/* صفحه بندی */
.pm-pagination { display: flex; gap: 0.375rem; justify-content: center; margin-top: 1.25rem; }
.pm-pagination a, .pm-pagination span {
    min-width: 2.125rem; height: 2.125rem; display: inline-flex; align-items: center; justify-content: center;
    border-radius: 0.5625rem; border: 1px solid var(--border); background: var(--surface);
    color: var(--text-muted); font-size: 0.78125rem; font-weight: 600; padding: 0 0.5rem; text-decoration: none;
}
.pm-pagination .active { background: var(--primary); border-color: var(--primary); color: #fff; }
.pm-pagination .disabled { opacity: .45; pointer-events: none; }

/* حالت بارگذاری */
.pm-loading-overlay {
    position: absolute; inset: 0; background: rgba(255,255,255,.55);
    display: flex; align-items: center; justify-content: center; z-index: 5; border-radius: inherit;
}
[data-bs-theme="dark"] .pm-loading-overlay { background: rgba(14, 22, 19, .6); }
.pm-skeleton { position: relative; overflow: hidden; background: var(--surface-muted) !important; border-radius: 0.375rem; min-height: 0.875rem; }
.pm-skeleton::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.45), transparent);
    animation: pm-shimmer 1.4s infinite;
}
[data-bs-theme="dark"] .pm-skeleton::after { background: linear-gradient(90deg, transparent, rgba(255,255,255,.08), transparent); }
@keyframes pm-shimmer { 0% { transform: translateX(100%); } 100% { transform: translateX(-100%); } }

/* اعلان صفحه موفقیت/خطا (toast) */
.pm-toast-wrap { position: fixed; bottom: 1.25rem; inset-inline-start: 1.25rem; z-index: 2000; display: flex; flex-direction: column; gap: 0.5rem; }
.pm-toast {
    background: var(--surface); color: var(--text); border: 1px solid var(--border);
    border-inline-start: 0.25rem solid var(--primary);
    border-radius: var(--radius-sm); padding: 0.75rem 1.125rem; box-shadow: var(--shadow-lg);
    font-size: 0.8125rem; min-width: 16.25rem; max-width: 23.75rem;
    animation: pm-toast-in .25s ease;
}
.pm-toast.error { border-inline-start-color: var(--danger); }
@keyframes pm-toast-in { from { opacity: 0; transform: translateY(0.5rem); } to { opacity: 1; transform: none; } }

/* ریزتکمه ها و متن کوچک */
.pm-muted { color: var(--text-muted); }
.pm-small { font-size: 0.75rem; }
.pm-link-muted { color: var(--text-muted); text-decoration: none; }
.pm-link-muted:hover { color: var(--primary); }

/* منوی بازشو مشترک */
.pm-dropdown { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow-md); }
.pm-dropdown .dropdown-item { font-size: 0.8125rem; color: var(--text); padding: 0.5rem 0.875rem; }
.pm-dropdown .dropdown-item:hover { background: var(--surface-muted); color: var(--text); }
