/* =====================================================================
   NexDesk Design System — v1.3 «دقیق و آرام»
   پایه‌ی v1.2 در ادامه است و لایه‌ی v1.3 (انتهای فایل) توکن‌ها و اجزا را بازتعریف می‌کند:
   زمینه‌ی گرم و روشن، منوی شناور، کارت‌های بدون خط، دکمه‌های قرصی، ورود مرحله‌ای.
   همه‌ی رنگ‌ها، فونت‌ها و گردی‌ها از تنظیمات برندینگ قابل تغییرند.
   ===================================================================== */
:root {
  --nd-primary: #0e8c93; --nd-primary-rgb: 14, 140, 147;
  --nd-secondary: #102a3a; --nd-secondary-rgb: 16, 42, 58;
  --nd-accent: #e39a1c; --nd-accent-rgb: 227, 154, 28;
  --nd-radius: 10px; --nd-radius-sm: 6px; --nd-radius-lg: 14px; --nd-space: 1;
  --nd-font: 'Vazirmatn FD', Tahoma, sans-serif; --nd-font-display: var(--nd-font);
  --nd-font-size: 14px; --nd-heading-weight: 800;
  --nd-logo-h: 38px; --nd-login-logo-h: 64px;
  --nd-app-bg: #f3f5f6;
  --nd-bg: var(--nd-app-bg);
  --nd-surface: #ffffff; --nd-surface-2: #f6f8f9; --nd-surface-3: #ebeff2;
  --nd-text: #13232e; --nd-text-2: #4b5f6c; --nd-muted: #82949f;
  --nd-border: #dfe5e9; --nd-border-2: #cbd5dc;
  --nd-success: #1b9a5a; --nd-warning: #c27d0e; --nd-danger: #d2433b; --nd-info: var(--nd-primary);
  --nd-shadow-sm: 0 1px 0 rgba(16, 42, 58, .04);
  --nd-shadow: 0 10px 28px -14px rgba(16, 42, 58, .28);
  --nd-shadow-lg: 0 24px 56px -20px rgba(16, 42, 58, .38);
  /* سازگاری با قالب‌ها: «گرادیان» حالا رنگ یکدست است */
  --nd-grad: linear-gradient(var(--nd-primary), var(--nd-primary));
  --nd-grad-soft: linear-gradient(rgba(var(--nd-primary-rgb), .09), rgba(var(--nd-primary-rgb), .09));
  --nd-tint: rgba(var(--nd-primary-rgb), .08);
  --nd-live: var(--nd-accent); --nd-live-rgb: var(--nd-accent-rgb);
  --nd-sidebar-w: 256px;
  --nd-glass: rgba(255, 255, 255, .86);
  --nd-ease: cubic-bezier(.2, .7, .2, 1);
  --bs-body-font-family: var(--nd-font);
  --bs-primary: var(--nd-primary); --bs-primary-rgb: var(--nd-primary-rgb);
  --bs-link-color: var(--nd-primary); --bs-link-hover-color: var(--nd-secondary);
  --bs-link-color-rgb: var(--nd-primary-rgb);
  --bs-border-radius: var(--nd-radius-sm); --bs-border-color: var(--nd-border);
  --bs-body-color: var(--nd-text); --bs-secondary-color: var(--nd-text-2);
}
[data-theme="dark"] {
  --nd-bg: #0c1820; --nd-surface: #12222c; --nd-surface-2: #162934; --nd-surface-3: #1c323f;
  --nd-text: #e4edf2; --nd-text-2: #a2b5c1; --nd-muted: #6c8392; --nd-border: #213845; --nd-border-2: #2c4656;
  --nd-shadow: 0 12px 30px -12px rgba(0, 0, 0, .7); --nd-shadow-lg: 0 30px 70px -24px rgba(0, 0, 0, .8);
  --nd-glass: rgba(18, 34, 44, .88); --nd-tint: rgba(var(--nd-primary-rgb), .16);
  --bs-body-bg: var(--nd-bg); --bs-body-color: var(--nd-text); --bs-border-color: var(--nd-border);
  --bs-secondary-color: var(--nd-text-2); --bs-tertiary-bg: var(--nd-surface-2); --bs-emphasis-color: #fff;
  color-scheme: dark;
}

* { scrollbar-width: thin; scrollbar-color: var(--nd-border-2) transparent; }
html { font-size: var(--nd-font-size); }
body { font-family: var(--nd-font); background: var(--nd-bg); color: var(--nd-text); -webkit-font-smoothing: antialiased; line-height: 1.75; }
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { font-family: var(--nd-font-display); font-weight: 700; color: var(--nd-text); line-height: 1.45; }
h1, .h1 { font-size: 1.9rem; } h2, .h2 { font-size: 1.55rem; } h3, .h3 { font-size: 1.32rem; } h4, .h4 { font-size: 1.16rem; } h5, .h5 { font-size: 1.05rem; } h6, .h6 { font-size: 1rem; }
a { text-decoration: none; color: var(--nd-primary); }
a:hover { color: var(--nd-secondary); }
[data-theme="dark"] a:hover { color: #fff; }
:focus-visible { outline: 2px solid var(--nd-primary); outline-offset: 2px; }
.text-muted, .text-secondary { color: var(--nd-text-2) !important; }
.text-faint { color: var(--nd-muted) !important; }
.text-primary { color: var(--nd-primary) !important; }
.text-warning { color: var(--nd-warning) !important; } .text-danger { color: var(--nd-danger) !important; } .text-success { color: var(--nd-success) !important; }
.ltr { direction: ltr; unicode-bidi: plaintext; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; direction: ltr; unicode-bidi: plaintext; font-size: .92em; }
.nd-display, .fw-800 { font-family: var(--nd-font-display); }
.fw-800 { font-weight: 800; } .fs-7 { font-size: .86rem; } .fs-8 { font-size: .78rem; }
.min-w-0 { min-width: 0; }
::selection { background: rgba(var(--nd-primary-rgb), .2); }

/* ---------- پس‌زمینه‌ی پنل (از تنظیمات) ---------- */
body.nd-bg-color, body.nd-bg-gradient, body.nd-bg-mesh { background: var(--nd-bg); }
body.nd-bg-pattern { background-color: var(--nd-bg); background-image: radial-gradient(rgba(var(--nd-secondary-rgb), .07) 1px, transparent 1px); background-size: 20px 20px; }
body.nd-bg-gradient { background: linear-gradient(180deg, rgba(var(--nd-primary-rgb), .07), transparent 420px), var(--nd-bg); }
body.nd-bg-mesh { background: radial-gradient(900px 500px at 100% 0%, rgba(var(--nd-primary-rgb), .09), transparent 60%), var(--nd-bg); background-attachment: fixed; }
body.nd-bg-image { background: linear-gradient(rgba(243, 245, 246, .9), rgba(243, 245, 246, .9)), var(--nd-app-bg-image, none) center/cover fixed, var(--nd-bg); }
[data-theme="dark"] body.nd-bg-image { background: linear-gradient(rgba(12, 24, 32, .92), rgba(12, 24, 32, .92)), var(--nd-app-bg-image, none) center/cover fixed; }
[data-theme="dark"] body { background: var(--nd-bg); }

/* ---------- چیدمان اصلی ---------- */
.nd-app { display: flex; min-height: 100vh; }
.nd-sidebar { width: var(--nd-sidebar-w); flex-shrink: 0; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  padding: 16px 12px; z-index: 1040; transition: transform .3s var(--nd-ease);
  --sb-bg: var(--nd-secondary); --sb-text: rgba(255, 255, 255, .74); --sb-muted: rgba(255, 255, 255, .42); --sb-hover: rgba(255, 255, 255, .06);
  --sb-active: rgba(var(--nd-primary-rgb), .26); --sb-active-text: #fff; --sb-border: rgba(255, 255, 255, .08); --sb-bar: var(--nd-primary);
  background: var(--sb-bg); color: var(--sb-text); }
.nd-sidebar[data-style="light"] { --sb-bg: var(--nd-surface); --sb-text: var(--nd-text-2); --sb-muted: var(--nd-muted); --sb-hover: var(--nd-surface-2);
  --sb-active: var(--nd-tint); --sb-active-text: var(--nd-primary); --sb-border: var(--nd-border); border-inline-start: 1px solid var(--nd-border); }
.nd-sidebar[data-style="brand"] { --sb-bg: var(--nd-primary); --sb-text: rgba(255, 255, 255, .86); --sb-muted: rgba(255, 255, 255, .6); --sb-hover: rgba(255, 255, 255, .1);
  --sb-active: rgba(0, 0, 0, .16); --sb-bar: #fff; }
.nd-sidebar[data-style="glass"] { --sb-bg: var(--nd-glass); --sb-text: var(--nd-text-2); --sb-muted: var(--nd-muted); --sb-hover: var(--nd-surface-2);
  --sb-active: var(--nd-tint); --sb-active-text: var(--nd-primary); --sb-border: var(--nd-border); backdrop-filter: blur(16px); border-inline-start: 1px solid var(--nd-border); }
[data-theme="dark"] .nd-sidebar[data-style="dark"] { --sb-bg: #091319; }
.nd-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; min-height: 52px; color: var(--sb-active-text); }
.nd-brand img.full { max-height: var(--nd-logo-h); max-width: 100%; object-fit: contain; }
.nd-brand img.mark { width: calc(var(--nd-logo-h) * .9); height: calc(var(--nd-logo-h) * .9); border-radius: 8px; object-fit: contain; }
.nd-brand .name { font-family: var(--nd-font-display); font-weight: 700; font-size: 1.05rem; color: var(--sb-active-text); line-height: 1.3; }
.nd-brand .sub { font-size: .74rem; color: var(--sb-muted); }
.nd-nav { flex: 1; overflow-y: auto; margin: 0 -4px; padding: 0 4px; }
.nd-nav .sec { font-size: .74rem; font-weight: 600; color: var(--sb-muted); padding: 16px 12px 6px; }
.nd-nav a { display: flex; align-items: center; gap: 11px; padding: 8px 12px; border-radius: var(--nd-radius-sm); color: var(--sb-text); font-weight: 500;
  margin-bottom: 1px; transition: background .15s, color .15s; position: relative; }
.nd-nav a i { font-size: 1.08rem; width: 20px; text-align: center; opacity: .85; }
.nd-nav a:hover { background: var(--sb-hover); color: var(--sb-active-text); }
.nd-nav a.active { background: var(--sb-active); color: var(--sb-active-text); font-weight: 600; }
.nd-nav a.active::before { content: ""; position: absolute; inset-inline-start: -4px; top: 9px; bottom: 9px; width: 3px; border-radius: 3px; background: var(--sb-bar); }
.nd-nav .count { margin-inline-start: auto; font-size: .72rem; font-weight: 700; min-width: 22px; height: 20px; padding: 0 7px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .1); color: var(--sb-active-text); }
.nd-sidebar[data-style="light"] .nd-nav .count, .nd-sidebar[data-style="glass"] .nd-nav .count { background: var(--nd-surface-3); color: var(--nd-text-2); }
.nd-nav .count.new { background: var(--nd-primary); color: #fff; }
.nd-nav .count.hot { background: var(--nd-live); color: #1d1404; animation: nd-live-pulse 2.4s infinite; }
.nd-sidebar-foot { border-top: 1px solid var(--sb-border); padding-top: 10px; margin-top: 8px; }
.nd-agent-status { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--nd-radius-sm); background: var(--sb-hover); cursor: pointer; }
.nd-agent-status .lbl { font-size: .82rem; color: var(--sb-text); }
.nd-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.nd-topbar { position: sticky; top: 0; z-index: 1030; display: flex; align-items: center; gap: 12px; padding: 10px 24px; min-height: 60px;
  background: var(--nd-glass); backdrop-filter: blur(14px) saturate(1.3); border-bottom: 1px solid var(--nd-border); }
.nd-topbar .title { font-family: var(--nd-font-display); font-weight: 700; font-size: 1.1rem; margin: 0; }
.nd-topbar .crumbs, .nd-topbar .sub { font-size: .8rem; color: var(--nd-muted); }
.nd-topbar .logo-mid { position: absolute; inset-inline: 0; margin: auto; width: fit-content; pointer-events: none; }
.nd-topbar .logo-mid img, .nd-topbar .logo-inline img { max-height: calc(var(--nd-logo-h) * .85); }
.nd-search { position: relative; max-width: 380px; flex: 1; }
.nd-search input { padding-inline-start: 36px; background: var(--nd-surface-2); border-color: var(--nd-border); border-radius: var(--nd-radius-sm); height: 38px; }
.nd-search i { position: absolute; inset-inline-start: 12px; top: 50%; transform: translateY(-50%); color: var(--nd-muted); }
.nd-content { padding: calc(24px * var(--nd-space)) 24px 40px; flex: 1; }
.nd-content > .container-fluid { max-width: 1600px; }
.nd-footer { padding: 14px 24px; color: var(--nd-muted); font-size: .8rem; border-top: 1px solid var(--nd-border); }
.nd-burger { display: none; }
@media (max-width: 991px) {
  .nd-sidebar { position: fixed; inset-block: 0; inset-inline-start: 0; transform: translateX(110%); box-shadow: var(--nd-shadow-lg); }
  .nd-sidebar.open { transform: none; }
  .nd-burger { display: inline-flex; }
  .nd-topbar { padding: 8px 12px; }
  .nd-content { padding: 16px 12px 90px; }
  .nd-backdrop { position: fixed; inset: 0; background: rgba(var(--nd-secondary-rgb), .5); z-index: 1035; display: none; }
  .nd-backdrop.show { display: block; }
}

/* نشانگر اتصال زنده (هدر) */
.nd-live { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--nd-text-2); padding: 4px 10px; border-radius: 20px; border: 1px solid var(--nd-border); background: var(--nd-surface); }
.nd-live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--nd-success); }
.nd-live.off::before { background: var(--nd-muted); }
.nd-live.blip::before { background: var(--nd-live); animation: nd-live-pulse 1.2s 2; }

/* ---------- دکمه‌های آیکونی، آواتار ---------- */
.btn-icon { width: 38px; height: 38px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--nd-radius-sm);
  background: var(--nd-surface); border: 1px solid var(--nd-border); color: var(--nd-text-2); position: relative; transition: background .15s, color .15s, border-color .15s; }
.btn-icon:hover { background: var(--nd-tint); color: var(--nd-primary); border-color: rgba(var(--nd-primary-rgb), .3); }
.btn-icon .dot { position: absolute; top: -5px; inset-inline-end: -5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--nd-live);
  color: #1d1404; font-size: .68rem; font-weight: 800; display: flex; align-items: center; justify-content: center; border: 2px solid var(--nd-surface); }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  background: var(--nd-secondary); color: #fff; font-weight: 700; font-size: .82rem; object-fit: cover; overflow: hidden; }
.avatar.sm { width: 26px; height: 26px; font-size: .68rem; } .avatar.lg { width: 52px; height: 52px; font-size: 1.1rem; } .avatar.xl { width: 80px; height: 80px; font-size: 1.5rem; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.presence { position: relative; } .presence::after { content: ""; position: absolute; bottom: 0; inset-inline-end: 0; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--nd-surface); background: var(--nd-muted); }
.presence.online::after { background: var(--nd-success); } .presence.away::after { background: var(--nd-warning); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--nd-muted); flex-shrink: 0; }
.status-dot.online { background: var(--nd-success); box-shadow: 0 0 0 3px rgba(27, 154, 90, .2); } .status-dot.away { background: var(--nd-warning); }

/* ---------- کارت‌ها ---------- */
.nd-card { background: var(--nd-surface); border: 1px solid var(--nd-border); border-radius: var(--nd-radius); position: relative; }
.nd-card.glass { background: var(--nd-surface); }
.nd-card.hover { transition: border-color .15s; }
.nd-card.hover:hover { border-color: rgba(var(--nd-primary-rgb), .45); }
.nd-card-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: calc(13px * var(--nd-space)) 18px; border-bottom: 1px solid var(--nd-border); min-height: 52px; }
.nd-card-head h5, .nd-card-head h6 { margin: 0; font-size: 1rem; font-weight: 700; }
.nd-card-head .ic { display: inline-flex; color: var(--nd-muted); font-size: 1.05rem; }
.nd-card-body { padding: calc(16px * var(--nd-space)) 18px; }
.nd-card-foot { padding: 12px 18px; border-top: 1px solid var(--nd-border); background: var(--nd-surface-2); border-radius: 0 0 var(--nd-radius) var(--nd-radius); }

/* شاخص‌ها: عدد بزرگ، برچسب کوچک؛ رنگ فقط وقتی وضعیت معنا دارد */
.nd-stat { padding: 16px 18px; display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 12px; align-items: flex-start; height: 100%; position: relative; }
.nd-stat > div { flex: 1; min-width: 0; }
.nd-stat .ic { width: auto; height: auto; font-size: 1.15rem; color: var(--nd-muted); background: none; box-shadow: none; flex-shrink: 0; }
.nd-stat .v { font-family: var(--nd-font-display); font-size: 1.85rem; font-weight: 700; line-height: 1.15; color: var(--nd-text); }
.nd-stat .l { color: var(--nd-text-2); font-size: .86rem; }
.nd-stat .trend { font-size: .76rem; font-weight: 600; }
.nd-stat.link { cursor: pointer; }
.nd-card.nd-stat-card::before, .nd-card:has(> .nd-stat.alert)::before { content: ""; position: absolute; inset-inline-start: -1px; top: 12px; bottom: 12px; width: 3px; border-radius: 3px; background: var(--c1, var(--nd-primary)); }
.c-blue, .c-brand, .c-cyan { --c1: var(--nd-primary); } .c-green { --c1: var(--nd-success); } .c-orange { --c1: var(--nd-accent); }
.c-red { --c1: var(--nd-danger); } .c-purple { --c1: #6b5ca5; } .c-slate { --c1: var(--nd-muted); } .c-pink { --c1: #b84a74; }
.nd-card:has(> .nd-stat.c-red) .nd-stat .v { color: var(--nd-danger); }

/* ---------- دکمه‌ها ---------- */
.btn { border-radius: var(--nd-radius-sm); font-weight: 600; padding: .45rem 1rem; transition: background .15s, border-color .15s, color .15s, box-shadow .15s; }
.btn:focus-visible { box-shadow: 0 0 0 3px rgba(var(--nd-primary-rgb), .3); }
.btn-primary { background: var(--nd-primary); border: 1px solid var(--nd-primary); color: #fff; }
.btn-primary:hover, .btn-primary:focus, .btn-primary:active { background: color-mix(in srgb, var(--nd-primary) 86%, #000); border-color: color-mix(in srgb, var(--nd-primary) 86%, #000); color: #fff; }
.btn-primary:disabled { background: var(--nd-primary); border-color: var(--nd-primary); opacity: .6; }
.btn-soft { background: var(--nd-tint); color: var(--nd-primary); border: 1px solid transparent; }
.btn-soft:hover { background: rgba(var(--nd-primary-rgb), .16); color: var(--nd-primary); }
.btn-light, .btn-outline-secondary { background: var(--nd-surface); border: 1px solid var(--nd-border-2); color: var(--nd-text); }
.btn-light:hover, .btn-outline-secondary:hover { background: var(--nd-surface-2); border-color: var(--nd-border-2); color: var(--nd-text); }
.btn-ghost { background: transparent; border: 1px solid transparent; color: var(--nd-text-2); } .btn-ghost:hover { background: var(--nd-surface-2); color: var(--nd-text); }
.btn-success { background: var(--nd-success); border-color: var(--nd-success); } .btn-danger { background: var(--nd-danger); border-color: var(--nd-danger); }
.btn-success:hover { background: color-mix(in srgb, var(--nd-success) 86%, #000); } .btn-danger:hover { background: color-mix(in srgb, var(--nd-danger) 86%, #000); }
.btn-soft-danger { background: rgba(210, 67, 59, .09); color: var(--nd-danger); border: 1px solid transparent; } .btn-soft-danger:hover { background: rgba(210, 67, 59, .16); color: var(--nd-danger); }
.btn-soft-success { background: rgba(27, 154, 90, .1); color: var(--nd-success); border: 1px solid transparent; }
.btn-link { color: var(--nd-primary); font-weight: 600; }
.btn-lg { padding: .62rem 1.4rem; font-size: 1rem; }
.btn-sm { padding: .28rem .7rem; font-size: .84rem; }

/* ---------- برچسب‌ها ---------- */
.nd-badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 20px; font-size: .76rem; font-weight: 600; white-space: nowrap;
  --c: var(--nd-muted); background: color-mix(in srgb, var(--c) 11%, transparent); color: color-mix(in srgb, var(--c) 82%, var(--nd-text)); }
.nd-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
.nd-badge.nodot::before { display: none; }
.nd-badge.solid { background: var(--c); color: #fff; } .nd-badge.solid::before { background: #fff; }
.nd-tag { display: inline-flex; align-items: center; padding: 0 8px; border-radius: 4px; font-size: .74rem; font-weight: 600; --c: var(--nd-muted);
  border: 1px solid color-mix(in srgb, var(--c) 30%, transparent); color: color-mix(in srgb, var(--c) 85%, var(--nd-text)); background: color-mix(in srgb, var(--c) 6%, transparent); }
.sla-ok { color: var(--nd-success); } .sla-risk { color: var(--nd-warning); } .sla-breached { color: var(--nd-danger); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 20px; background: var(--nd-surface); border: 1px solid var(--nd-border); font-size: .82rem; color: var(--nd-text-2); }
.chip.active, .chip:hover { background: var(--nd-tint); color: var(--nd-primary); border-color: rgba(var(--nd-primary-rgb), .35); }
.chip .n { font-weight: 700; }

/* ---------- فرم‌ها ---------- */
.form-control, .form-select { border-radius: var(--nd-radius-sm); border-color: var(--nd-border-2); background-color: var(--nd-surface); color: var(--nd-text); padding: .5rem .8rem; min-height: 38px; }
.form-control-sm, .form-select-sm { min-height: 32px; padding: .3rem .6rem; }
.form-control:focus, .form-select:focus { border-color: var(--nd-primary); box-shadow: 0 0 0 3px rgba(var(--nd-primary-rgb), .16); background-color: var(--nd-surface); color: var(--nd-text); }
.form-control::placeholder { color: var(--nd-muted); }
.form-label { font-weight: 600; font-size: .88rem; color: var(--nd-text); margin-bottom: .3rem; }
.form-text { color: var(--nd-muted); font-size: .8rem; }
.form-check-input { border-color: var(--nd-border-2); }
.form-check-input:checked { background-color: var(--nd-primary); border-color: var(--nd-primary); }
.form-check-input:focus { box-shadow: 0 0 0 3px rgba(var(--nd-primary-rgb), .18); border-color: var(--nd-primary); }
.form-switch .form-check-input { width: 2.5em; height: 1.35em; cursor: pointer; margin-top: .15em; }
.form-check-label { cursor: pointer; }
.input-group-text { background: var(--nd-surface-2); border-color: var(--nd-border-2); color: var(--nd-text-2); }
[data-theme="dark"] .form-select { --bs-form-select-bg-img: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23a2b5c1' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e"); }
.nd-field-error { color: var(--nd-danger); font-size: .8rem; margin-top: 4px; }
.is-invalid { border-color: var(--nd-danger) !important; }
.nd-drop { border: 1px dashed var(--nd-border-2); border-radius: var(--nd-radius-sm); padding: 14px; text-align: center; color: var(--nd-text-2); cursor: pointer; transition: border-color .15s, background .15s; background: var(--nd-surface-2); }
.nd-drop:hover, .nd-drop.over { border-color: var(--nd-primary); color: var(--nd-primary); background: var(--nd-tint); }
.nd-files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.nd-files .f { font-size: .78rem; background: var(--nd-surface-3); padding: 2px 10px; border-radius: 4px; }
.color-input { width: 46px; height: 38px; padding: 3px; border-radius: var(--nd-radius-sm); cursor: pointer; flex-shrink: 0; }
.nd-secret { position: relative; } .nd-secret .form-control { padding-inline-end: 38px; }
.nd-secret-eye { position: absolute; inset-inline-end: 4px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--nd-muted); width: 32px; height: 32px; border-radius: 4px; }
.nd-secret-eye:hover { color: var(--nd-text); background: var(--nd-surface-2); }
.nd-note { font-size: .84rem; color: var(--nd-text-2); background: var(--nd-surface-2); border: 1px solid var(--nd-border); border-inline-start: 3px solid var(--nd-primary); border-radius: var(--nd-radius-sm); padding: 10px 14px; line-height: 1.9; }

/* ردیف‌های تنظیمات: عنوان و توضیح (راست) — کنترل با عرض ثابت (چپ)؛ کلیدها در یک خط تراز */
.nd-sets { display: flex; flex-direction: column; padding-block: 0 !important; }
.nd-set { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 360px); gap: 6px 28px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--nd-border); }
.nd-sets > .nd-set:last-child, .nd-sets > :last-child > .nd-set { border-bottom: 0; }
.nd-set[hidden] { display: none; }
.nd-set-label label { font-weight: 600; color: var(--nd-text); cursor: pointer; }
.nd-set-help { font-size: .8rem; color: var(--nd-muted); margin-top: 2px; line-height: 1.7; }
.nd-set-control { min-width: 0; }
.nd-set.is-switch .nd-set-control { display: flex; justify-content: flex-end; }
.nd-set.is-switch .form-switch { padding-inline-start: 2.6em; }
.nd-set.is-block { grid-template-columns: 1fr; }
.nd-set.has-error .form-control, .nd-set.has-error .form-select { border-color: var(--nd-danger); }
.nd-set .nd-num { max-width: 160px; }
.nd-sets .contents { display: contents; }
/* ردیف تنظیمات بر اساس عرض خود کارت (نه صفحه): در کارت‌های باریک، عنوان بالای کنترل قرار می‌گیرد */
.nd-card:has(.nd-set), .nd-sets { container-type: inline-size; }
@container (max-width: 640px) {
  .nd-set { grid-template-columns: 1fr; gap: 6px; }
  .nd-set.is-switch { grid-template-columns: 1fr auto; gap: 4px 16px; }
  .nd-set .nd-num { max-width: none; }
}
@media (max-width: 767px) { .nd-set { grid-template-columns: 1fr; } .nd-set.is-switch { grid-template-columns: 1fr auto; } }

/* ---------- جدول‌ها ---------- */
.nd-table { width: 100%; margin: 0; --bs-table-bg: transparent; color: var(--nd-text); }
.nd-table > :not(caption) > * > * { padding: .7rem .9rem; border-bottom-color: var(--nd-border); background: transparent; color: inherit; }
.nd-table thead th { font-size: .78rem; font-weight: 600; color: var(--nd-text-2); background: var(--nd-surface-2); border-bottom: 1px solid var(--nd-border); white-space: nowrap; }
.nd-table tbody tr { transition: background .12s; }
.nd-table tbody tr:hover { background: var(--nd-surface-2); }
/* خوانده‌نشده برای همین کاربر: نوار کناری، زمینه‌ی ملایم و متن پررنگ (بعد از باز کردن تیکت عادی می‌شود) */
.nd-table .subj { color: var(--nd-text); font-weight: 500; }
.nd-table tbody tr.unread { background: rgba(var(--nd-primary-rgb), .045); }
.nd-table tbody tr.unread td:first-child { box-shadow: inset -3px 0 0 var(--nd-primary); }
.nd-table tbody tr.unread .subj { font-weight: 800; color: var(--nd-text); }
.nd-table tbody tr.unread .subj::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--nd-primary); margin-inline-end: 7px; vertical-align: 2px; }
.nd-table tbody tr.unread td { color: var(--nd-text); } .nd-table .subj:hover { color: var(--nd-primary); }
.nd-table td .meta { font-size: .78rem; color: var(--nd-muted); }
.table-responsive { border-radius: var(--nd-radius); }
/* ردیف تازه‌رسیده: یک بار درخشش زعفرانی و برچسب «جدید» */
.nd-row-new { animation: nd-row-flash 4.5s var(--nd-ease) both; }
.nd-row-new .subj::after { content: "جدید"; margin-inline-start: 8px; font-size: .7rem; font-weight: 700; color: #1d1404; background: var(--nd-live); padding: 0 7px; border-radius: 10px; vertical-align: 2px; }
@keyframes nd-row-flash { 0% { background: rgba(var(--nd-live-rgb), .32); } 100% { background: transparent; } }

/* ---------- تب‌ها ---------- */
.nd-tabs { display: flex; gap: 2px; padding: 3px; background: var(--nd-surface-2); border: 1px solid var(--nd-border); border-radius: calc(var(--nd-radius-sm) + 3px); overflow-x: auto; }
.nd-tabs a, .nd-tabs button { padding: 6px 13px; border-radius: var(--nd-radius-sm); color: var(--nd-text-2); font-weight: 600; font-size: .86rem; white-space: nowrap; border: 0; background: none; display: inline-flex; gap: 6px; align-items: center; }
.nd-tabs a:hover, .nd-tabs button:hover { color: var(--nd-text); }
.nd-tabs a.active, .nd-tabs button.active { background: var(--nd-surface); color: var(--nd-primary); box-shadow: 0 1px 2px rgba(16, 42, 58, .1); }
.nd-tabs .n { font-size: .72rem; padding: 0 7px; border-radius: 10px; background: var(--nd-surface-3); }
.nd-underline-tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--nd-border); overflow-x: auto; }
.nd-underline-tabs a { padding: 10px 2px; color: var(--nd-text-2); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.nd-underline-tabs a.active { color: var(--nd-primary); border-color: var(--nd-primary); }

/* ---------- صف تیکت‌ها (ستون کناری) ---------- */
.nd-queue a { display: flex; align-items: center; gap: 10px; padding: 7px 12px; border-radius: var(--nd-radius-sm); color: var(--nd-text-2); font-weight: 500; font-size: .9rem; }
.nd-queue a:hover { background: var(--nd-surface-2); color: var(--nd-text); }
.nd-queue a.active { background: var(--nd-tint); color: var(--nd-primary); font-weight: 600; }
.nd-queue a .n { margin-inline-start: auto; font-size: .76rem; font-weight: 700; color: var(--nd-muted); }
.nd-queue a.active .n { color: var(--nd-primary); }

/* ---------- گفتگوی تیکت ---------- */
.nd-thread { display: flex; flex-direction: column; gap: 16px; }
.nd-msg { display: flex; gap: 12px; }
.nd-msg .bubble { flex: 1; min-width: 0; background: var(--nd-surface); border: 1px solid var(--nd-border); border-radius: var(--nd-radius); overflow: hidden; transition: box-shadow .3s; }
.nd-msg .bubble-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; padding: 9px 16px; border-bottom: 1px solid var(--nd-border); font-size: .86rem; }
.nd-msg .bubble-head .who { font-weight: 700; color: var(--nd-text); }
.nd-msg .bubble-head .when { color: var(--nd-muted); font-size: .78rem; margin-inline-start: auto; }
.nd-msg .bubble-body { padding: 14px 18px; white-space: normal; word-wrap: break-word; line-height: 2; }
.nd-msg.staff .bubble { border-color: rgba(var(--nd-primary-rgb), .3); }
.nd-msg.staff .bubble-head { background: var(--nd-tint); }
.nd-msg.note .bubble { background: #fdf7ea; border-color: #ecd59f; } .nd-msg.note .bubble-head { background: #faefd3; border-color: #ecd59f; }
[data-theme="dark"] .nd-msg.note .bubble { background: #2a2312; border-color: #5c4a1c; } [data-theme="dark"] .nd-msg.note .bubble-head { background: #33291a; border-color: #5c4a1c; }
.nd-msg.ai .bubble { border-color: rgba(var(--nd-primary-rgb), .4); } .nd-msg.ai .bubble-head { background: var(--nd-tint); }
.nd-msg.draft .bubble { border: 1px dashed var(--nd-primary); }
/* پیام تازه‌رسیده (زنده) */
.nd-msg-new .bubble { animation: nd-msg-flash 5s var(--nd-ease) both; }
@keyframes nd-msg-flash { 0%, 30% { box-shadow: 0 0 0 3px rgba(var(--nd-live-rgb), .55); } 100% { box-shadow: 0 0 0 0 rgba(var(--nd-live-rgb), 0); } }
.nd-event { align-self: center; font-size: .78rem; color: var(--nd-text-2); background: var(--nd-surface); border: 1px solid var(--nd-border); padding: 3px 14px; border-radius: 20px; display: inline-flex; gap: 6px; align-items: center; max-width: 92%; text-align: center; }
.nd-attach { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 18px 14px; }
.nd-attach a { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: var(--nd-radius-sm); background: var(--nd-surface-2); border: 1px solid var(--nd-border); font-size: .82rem; color: var(--nd-text); }
.nd-attach a:hover { border-color: var(--nd-primary); color: var(--nd-primary); }
.nd-attach img { max-width: 220px; max-height: 160px; border-radius: var(--nd-radius-sm); display: block; border: 1px solid var(--nd-border); }
.nd-md p:last-child { margin-bottom: 0; }
.nd-md h2, .nd-md h3, .nd-md h4, .nd-md h5 { margin-top: 1.2em; font-size: 1.1rem; }
.nd-md pre, .nd-code { background: var(--nd-secondary); color: #e3ecf1; padding: 12px 14px; border-radius: var(--nd-radius-sm); direction: ltr; text-align: left; overflow-x: auto; font-size: .84rem; }
.nd-md code { background: var(--nd-surface-3); padding: 1px 6px; border-radius: 4px; font-size: .88em; direction: ltr; unicode-bidi: plaintext; }
.nd-md blockquote { border-inline-start: 3px solid var(--nd-primary); padding: 4px 14px; color: var(--nd-text-2); background: var(--nd-surface-2); border-radius: 4px; }
.nd-composer { background: var(--nd-surface); border: 1px solid var(--nd-border-2); border-radius: var(--nd-radius); }
.nd-composer:focus-within { border-color: var(--nd-primary); box-shadow: 0 0 0 3px rgba(var(--nd-primary-rgb), .12); }
.nd-composer textarea { border: 0; resize: vertical; min-height: 130px; box-shadow: none !important; padding: 14px 18px; background: transparent; }
.nd-composer .tools { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--nd-border); flex-wrap: wrap; background: var(--nd-surface-2); border-radius: 0 0 var(--nd-radius) var(--nd-radius); }
.nd-composer.note-mode { border-color: #ecd59f; } .nd-composer.note-mode textarea { background: #fdf7ea; }
[data-theme="dark"] .nd-composer.note-mode textarea { background: #2a2312; }
/* پیشرفت آپلود */
.nd-upload { padding: 10px 16px 14px; border-top: 1px solid var(--nd-border); }
.nd-upload-text { display: flex; justify-content: space-between; font-size: .84rem; color: var(--nd-text-2); margin-bottom: 6px; }
.nd-upload-text b { font-family: var(--nd-font-display); color: var(--nd-text); }
.nd-upload-track { height: 6px; border-radius: 6px; background: var(--nd-surface-3); overflow: hidden; }
.nd-upload-track span { display: block; height: 100%; background: var(--nd-primary); border-radius: 6px; transition: width .2s; }
.nd-upload-done { color: var(--nd-success); font-weight: 600; font-size: .88rem; }
.nd-upload-error { color: var(--nd-danger); font-weight: 600; font-size: .88rem; }
.nd-jump { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 1050; border: 0; border-radius: 20px; padding: 7px 16px; background: var(--nd-live); color: #1d1404; font-weight: 700; box-shadow: var(--nd-shadow); }
.nd-prop { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--nd-border); font-size: .88rem; }
.nd-prop:last-child { border-bottom: 0; } .nd-prop .k { color: var(--nd-text-2); } .nd-prop .v { font-weight: 600; text-align: left; }

/* ---------- پرتال مشتری ---------- */
.nd-hero { position: relative; border-radius: var(--nd-radius-lg); padding: 44px 40px; color: #fff; overflow: hidden; background: var(--nd-secondary); }
.nd-hero::after { content: ""; position: absolute; inset-inline-end: 0; top: 0; bottom: 0; width: 6px; background: var(--nd-primary); }
.nd-hero.has-image { background: linear-gradient(90deg, rgba(var(--nd-secondary-rgb), .94) 35%, rgba(var(--nd-secondary-rgb), .6)), var(--nd-hero-image) center/cover; }
.nd-hero h1 { color: #fff; font-size: 2rem; position: relative; z-index: 1; }
.nd-hero p { color: rgba(255, 255, 255, .78); position: relative; z-index: 1; max-width: 620px; }
.nd-hero .search { position: relative; z-index: 1; max-width: 620px; }
.nd-hero .search input { height: 52px; border-radius: var(--nd-radius); border: 0; padding-inline-start: 48px; font-size: 1rem; }
.nd-hero .search input:focus { box-shadow: 0 0 0 3px rgba(var(--nd-primary-rgb), .55); }
.nd-hero .search i { position: absolute; inset-inline-start: 16px; top: 50%; transform: translateY(-50%); color: var(--nd-muted); font-size: 1.15rem; }
.nd-hero .hero-logo { max-height: calc(var(--nd-logo-h) * 1.4); position: relative; z-index: 1; }
.nd-action { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 20px; height: 100%; color: var(--nd-text); }
.nd-action:hover { color: var(--nd-text); }
.nd-action .ic { width: 40px; height: 40px; border-radius: var(--nd-radius-sm); display: flex; align-items: center; justify-content: center; font-size: 1.2rem;
  color: var(--c1, var(--nd-primary)); background: color-mix(in srgb, var(--c1, var(--nd-primary)) 10%, transparent); }
.nd-action h6 { margin: 0; font-weight: 700; } .nd-action p { margin: 0; color: var(--nd-text-2); font-size: .84rem; }
.nd-portal-nav { position: sticky; top: 0; z-index: 1030; background: var(--nd-glass); backdrop-filter: blur(14px) saturate(1.3); border-bottom: 1px solid var(--nd-border); }
.nd-portal-nav .inner { max-width: 1240px; margin: 0 auto; display: flex; align-items: center; gap: 18px; padding: 8px 18px; min-height: 64px; }
.nd-portal-nav .logo img { max-height: var(--nd-logo-h); }
.nd-portal-nav .logo .name { font-family: var(--nd-font-display); font-weight: 700; font-size: 1.05rem; color: var(--nd-text); }
.nd-portal-nav.center .inner { justify-content: space-between; } .nd-portal-nav.center .logo { position: absolute; inset-inline: 0; width: fit-content; margin: auto; }
.nd-portal-nav nav a { padding: 7px 12px; border-radius: var(--nd-radius-sm); color: var(--nd-text-2); font-weight: 600; font-size: .92rem; display: inline-flex; align-items: center; gap: 7px; }
.nd-portal-nav nav a:hover { color: var(--nd-text); background: var(--nd-surface-2); }
.nd-portal-nav nav a.active { color: var(--nd-primary); background: var(--nd-tint); }
.nd-portal { max-width: 1240px; margin: 0 auto; padding: 24px 18px 60px; }
.nd-mobile-tabs { display: none; }
.nd-portal-nav nav.main { display: flex; }
@media (max-width: 991px) {
  .nd-portal-nav nav.main { display: none; }
  .nd-portal-nav .inner { gap: 10px; min-height: 56px; }
  .nd-mobile-tabs { display: flex; position: fixed; bottom: 0; inset-inline: 0; z-index: 1030; background: var(--nd-glass); backdrop-filter: blur(16px); border-top: 1px solid var(--nd-border);
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); justify-content: space-around; }
  .nd-mobile-tabs a { display: flex; flex-direction: column; align-items: center; font-size: .7rem; color: var(--nd-text-2); padding: 4px 8px; border-radius: var(--nd-radius-sm); gap: 2px; position: relative; }
  .nd-mobile-tabs a i { font-size: 1.28rem; } .nd-mobile-tabs a.active { color: var(--nd-primary); }
  .nd-mobile-tabs a.fab i { background: var(--nd-primary); color: #fff; width: 46px; height: 46px; border-radius: 14px; display: flex; align-items: center; justify-content: center; margin-top: -20px; box-shadow: var(--nd-shadow); }
  .nd-portal { padding: 16px 12px 100px; }
  .nd-hero { padding: 28px 20px; } .nd-hero h1 { font-size: 1.45rem; }
}

/* ---------- صفحه‌ی ورود ---------- */
.nd-auth { min-height: 100vh; display: flex; position: relative; overflow: hidden; background: var(--nd-login-bg); }
.nd-auth .bg { position: absolute; inset: 0; z-index: 0; }
.nd-auth .bg.color, .nd-auth .bg.mesh, .nd-auth .bg.gradient { background: var(--nd-login-bg); }
.nd-auth .bg.mesh { background: radial-gradient(700px 500px at 20% 20%, rgba(var(--nd-primary-rgb), .35), transparent 60%), var(--nd-login-bg); }
.nd-auth .bg.gradient { background: linear-gradient(160deg, var(--nd-login-bg), color-mix(in srgb, var(--nd-login-bg) 70%, var(--nd-primary))); }
.nd-auth .bg.pattern { background: radial-gradient(rgba(255, 255, 255, .09) 1px, transparent 1px) 0 0/20px 20px, var(--nd-login-bg); }
.nd-auth .bg.image { background: linear-gradient(rgba(0, 0, 0, var(--nd-login-overlay)), rgba(0, 0, 0, var(--nd-login-overlay))), var(--nd-login-bg-image, none) center/cover, var(--nd-login-bg); }
.nd-auth .orb { display: none; }
.nd-auth .wrap { position: relative; z-index: 1; display: flex; width: 100%; }
.nd-auth .panel { flex: 1.1; display: flex; flex-direction: column; justify-content: space-between; padding: 52px 60px; color: #fff; position: relative; }
.nd-auth .panel.img { background: linear-gradient(rgba(0, 0, 0, var(--nd-login-overlay)), rgba(0, 0, 0, calc(var(--nd-login-overlay) + .15))), var(--nd-login-side-image) center/cover; }
.nd-auth .panel h1 { color: #fff; font-size: 2.6rem; line-height: 1.4; max-width: 520px; font-weight: 800; }
.nd-auth .panel p { color: rgba(255, 255, 255, .74); font-size: 1.08rem; max-width: 480px; }
.nd-auth .panel .feat { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; color: rgba(255, 255, 255, .9); font-weight: 500; }
.nd-auth .panel .feat i { width: 32px; height: 32px; border-radius: var(--nd-radius-sm); border: 1px solid rgba(255, 255, 255, .2); display: flex; align-items: center; justify-content: center; color: var(--nd-primary); background: rgba(255, 255, 255, .04); }
.nd-auth .formside { flex: 1; display: flex; align-items: center; justify-content: center; padding: 30px 20px; }
.nd-auth.split .formside { background: var(--nd-surface); }
.nd-auth-card { width: 100%; max-width: 420px; }
.nd-auth.center .nd-auth-card { background: var(--nd-surface); padding: 36px 34px; border-radius: var(--nd-radius-lg); box-shadow: var(--nd-shadow-lg); }
.nd-auth.glass .nd-auth-card { background: rgba(255, 255, 255, .12); backdrop-filter: blur(22px) saturate(1.4); border: 1px solid rgba(255, 255, 255, .22); padding: 36px 34px; border-radius: var(--nd-radius-lg); color: #fff; }
.nd-auth.glass .nd-auth-card h2, .nd-auth.glass .nd-auth-card .form-label, .nd-auth.glass .nd-auth-card a, .nd-auth.glass .nd-auth-card .text-muted { color: #fff !important; }
.nd-auth.glass .form-control { background: rgba(255, 255, 255, .94); }
.nd-auth.minimal { background: var(--nd-surface) !important; } .nd-auth.minimal .bg { display: none; }
.nd-auth-card h2 { font-size: 1.55rem; margin-bottom: 4px; }
.nd-auth-card .form-control { height: 48px; padding-inline-start: 42px; }
.nd-auth-card .ifield { position: relative; } .nd-auth-card .ifield > i { position: absolute; inset-inline-start: 14px; top: 50%; transform: translateY(-50%); color: var(--nd-muted); font-size: 1.05rem; z-index: 2; }
.nd-auth-card .ifield .eye { position: absolute; inset-inline-end: 8px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--nd-muted); z-index: 2; }
.nd-auth-card .btn-lg { height: 48px; }
.nd-auth-logo { max-height: var(--nd-login-logo-h); max-width: 240px; object-fit: contain; }
.nd-auth-logo-mark { width: var(--nd-login-logo-h); height: var(--nd-login-logo-h); border-radius: 14px; background: var(--nd-secondary); display: inline-flex; align-items: center; justify-content: center; color: var(--nd-primary); font-size: calc(var(--nd-login-logo-h) * .42); }
.nd-captcha { display: flex; gap: 8px; align-items: stretch; } .nd-captcha img { height: 48px; border-radius: var(--nd-radius-sm); border: 1px solid var(--nd-border); cursor: pointer; background: #f6f8fc; }
.nd-captcha-box .g-recaptcha, .nd-captcha-box .cf-turnstile, .nd-captcha-box .h-captcha, .nd-captcha-box .arcaptcha { min-height: 70px; }
.nd-otp { display: flex; gap: 8px; direction: ltr; justify-content: center; }
.nd-otp input { width: 48px; height: 56px; text-align: center; font-size: 1.45rem; font-weight: 700; font-family: var(--nd-font-display); border-radius: var(--nd-radius-sm) !important; padding: 0 !important; }
.nd-page-logo { position: absolute; top: 26px; inset-inline-start: 0; inset-inline-end: 0; text-align: center; z-index: 3; }
@media (max-width: 991px) {
  .nd-auth .panel { display: none; }
  .nd-auth.split .formside { background: transparent; }
  .nd-auth.split .nd-auth-card { background: var(--nd-surface); padding: 28px 22px; border-radius: var(--nd-radius-lg); }
}

/* ---------- چت ---------- */
.nd-chat { display: flex; flex-direction: column; height: 100%; min-height: 0; background: var(--nd-surface); }
.nd-chat-head { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--nd-border); background: var(--nd-surface); }
.nd-chat-head.brand { background: var(--nd-secondary); color: #fff; border: 0; } .nd-chat-head.brand .text-muted { color: rgba(255, 255, 255, .72) !important; }
.nd-chat-body { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 8px; background: var(--nd-surface-2); }
.nd-bubble { max-width: 78%; padding: 9px 14px; border-radius: 14px; font-size: .93rem; line-height: 1.85; position: relative; word-wrap: break-word; white-space: pre-wrap; }
.nd-bubble .t { display: block; font-size: .68rem; opacity: .65; margin-top: 2px; }
.nd-bubble .n { display: block; font-size: .74rem; font-weight: 700; opacity: .8; margin-bottom: 2px; }
.nd-bubble.me { align-self: flex-start; background: var(--nd-primary); color: #fff; border-end-start-radius: 4px; }
.nd-bubble.them { align-self: flex-end; background: var(--nd-surface); border: 1px solid var(--nd-border); border-end-end-radius: 4px; }
.nd-bubble.bot { align-self: flex-end; background: var(--nd-surface); border: 1px solid rgba(var(--nd-primary-rgb), .4); border-end-end-radius: 4px; }
.nd-bubble.internal { align-self: center; background: #fdf7ea; color: #6b4e12; border: 1px dashed #d9b25c; font-size: .84rem; max-width: 90%; }
.nd-bubble a { color: inherit; text-decoration: underline; }
.nd-bubble img { max-width: 220px; border-radius: 10px; display: block; margin-top: 4px; }
.nd-sys { align-self: center; font-size: .76rem; color: var(--nd-text-2); background: var(--nd-surface); border: 1px solid var(--nd-border); padding: 2px 12px; border-radius: 20px; text-align: center; max-width: 90%; }
.nd-typing { display: inline-flex; gap: 4px; padding: 12px 14px; background: var(--nd-surface); border: 1px solid var(--nd-border); border-radius: 14px; align-self: flex-end; }
.nd-typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--nd-muted); animation: nd-bounce 1.2s infinite; }
.nd-typing span:nth-child(2) { animation-delay: .15s; } .nd-typing span:nth-child(3) { animation-delay: .3s; }
.nd-chat-input { display: flex; gap: 8px; align-items: flex-end; padding: 12px; border-top: 1px solid var(--nd-border); background: var(--nd-surface); }
.nd-chat-input textarea { resize: none; border-radius: var(--nd-radius); min-height: 44px; max-height: 140px; padding: 10px 14px; }
.nd-chat-input .send { width: 44px; height: 44px; border-radius: var(--nd-radius); flex-shrink: 0; display: flex; align-items: center; justify-content: center; padding: 0; font-size: 1.1rem; }
.nd-quick { display: flex; gap: 6px; flex-wrap: wrap; } .nd-quick button { font-size: .8rem; }
.nd-rate { display: flex; gap: 10px; justify-content: center; direction: ltr; }
.nd-rate label { cursor: pointer; font-size: 2rem; filter: grayscale(1); opacity: .45; transition: opacity .15s, transform .15s, filter .15s; }
.nd-rate input { display: none; } .nd-rate input:checked + span, .nd-rate label:hover span { filter: none; opacity: 1; }
.nd-rate label:hover, .nd-rate label:has(input:checked) { filter: none; opacity: 1; transform: scale(1.12); }
.nd-stars { display: inline-flex; flex-direction: row-reverse; gap: 4px; direction: ltr; }
.nd-stars input { display: none; } .nd-stars label { font-size: 1.9rem; color: var(--nd-border-2); cursor: pointer; transition: color .1s; }
.nd-stars label:hover, .nd-stars label:hover ~ label, .nd-stars input:checked ~ label { color: var(--nd-accent); }
.nd-nps { display: grid; grid-template-columns: repeat(11, 1fr); gap: 4px; direction: ltr; }
.nd-nps input { display: none; } .nd-nps label { text-align: center; padding: 8px 0; border-radius: var(--nd-radius-sm); border: 1px solid var(--nd-border-2); cursor: pointer; font-weight: 700; font-size: .86rem; }
.nd-nps input:checked + label { background: var(--nd-primary); color: #fff; border-color: transparent; }
.nd-yn input { display: none; } .nd-yn label { padding: 8px 26px; border-radius: var(--nd-radius-sm); border: 1px solid var(--nd-border-2); cursor: pointer; font-weight: 700; }
.nd-yn input:checked + label { background: var(--nd-primary); color: #fff; border-color: transparent; }
.nd-console { display: grid; grid-template-columns: 300px 1fr 290px; height: calc(100vh - 60px - 50px); min-height: 520px; border: 1px solid var(--nd-border); border-radius: var(--nd-radius); overflow: hidden; background: var(--nd-surface); }
.nd-console > div { min-height: 0; } .nd-console .col-list { border-inline-end: 1px solid var(--nd-border); display: flex; flex-direction: column; background: var(--nd-surface); }
.nd-console .col-info { border-inline-start: 1px solid var(--nd-border); overflow-y: auto; padding: 16px; background: var(--nd-surface); }
.nd-console .list { overflow-y: auto; flex: 1; }
.nd-console .grp { font-size: .76rem; font-weight: 700; color: var(--nd-muted); padding: 12px 16px 6px; display: flex; justify-content: space-between; }
.nd-session { display: flex; gap: 10px; padding: 10px 16px; cursor: pointer; border-inline-start: 3px solid transparent; transition: background .12s; }
.nd-session:hover { background: var(--nd-surface-2); } .nd-session.active { background: var(--nd-tint); border-color: var(--nd-primary); }
.nd-session .nm { font-weight: 700; font-size: .9rem; } .nd-session .lst { font-size: .78rem; color: var(--nd-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 190px; }
.nd-session .ub { background: var(--nd-live); color: #1d1404; font-size: .68rem; font-weight: 700; border-radius: 10px; padding: 0 7px; height: 18px; display: inline-flex; align-items: center; }
.nd-session.waiting { background: rgba(var(--nd-live-rgb), .08); } .nd-session.waiting .wt { color: var(--nd-warning); font-weight: 700; font-size: .74rem; }
@media (max-width: 1199px) { .nd-console { grid-template-columns: 270px 1fr; } .nd-console .col-info { display: none; } }
@media (max-width: 767px) { .nd-console { grid-template-columns: 1fr; height: auto; } .nd-console .col-list { max-height: 260px; } .nd-console .col-main { height: 70vh; } }

/* ---------- انتخاب اینترفیس روتر/سوئیچ ---------- */
.nd-ifpicker { border: 1px solid var(--nd-border); border-radius: var(--nd-radius-sm); background: var(--nd-surface); overflow: hidden; }
.nd-ifpicker.busy .nd-ifp-list { opacity: .5; pointer-events: none; }
.nd-ifp-bar { display: flex; gap: 8px; align-items: center; padding: 8px; border-bottom: 1px solid var(--nd-border); background: var(--nd-surface-2); flex-wrap: wrap; }
.nd-ifp-search { position: relative; flex: 1; min-width: 160px; } .nd-ifp-search i { position: absolute; inset-inline-start: 10px; top: 50%; transform: translateY(-50%); color: var(--nd-muted); font-size: .85rem; }
.nd-ifp-search input { padding-inline-start: 30px; }
.nd-ifp-up { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; color: var(--nd-text-2); white-space: nowrap; cursor: pointer; } .nd-ifp-up input { margin: 0; }
.nd-ifp-meta { font-size: .8rem; color: var(--nd-text-2); padding: 6px 12px; border-bottom: 1px solid var(--nd-border); min-height: 32px; }
.nd-ifp-meta:empty { display: none; }
.nd-ifp-list { max-height: 340px; overflow-y: auto; }
.nd-ifp-row { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto auto auto; gap: 10px; align-items: center; padding: 8px 12px; border-bottom: 1px solid var(--nd-border); cursor: pointer; }
.nd-ifp-row:last-child { border-bottom: 0; }
.nd-ifp-row:hover { background: var(--nd-surface-2); }
.nd-ifp-row.sel { background: var(--nd-tint); box-shadow: inset -3px 0 0 var(--nd-primary); }
.nd-ifp-row:focus-visible { outline: 2px solid var(--nd-primary); outline-offset: -2px; }
.nd-ifp-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--nd-muted); }
.nd-ifp-dot.up { background: var(--nd-success); } .nd-ifp-dot.down { background: var(--nd-danger); } .nd-ifp-dot.off { background: var(--nd-border-2); }
.nd-ifp-name { min-width: 0; display: flex; flex-direction: column; }
.nd-ifp-name b { font-weight: 700; font-size: .9rem; text-align: right; }
.nd-ifp-name span { font-size: .8rem; color: var(--nd-text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nd-ifp-name em { font-style: normal; font-size: .76rem; color: var(--nd-warning); }
.nd-ifp-speed { font-size: .78rem; color: var(--nd-text-2); white-space: nowrap; direction: ltr; }
.nd-ifp-idx { font-size: .74rem; color: var(--nd-muted); white-space: nowrap; }
.nd-ifp-rate { display: flex; flex-direction: column; font-size: .76rem; color: var(--nd-text); white-space: nowrap; direction: ltr; text-align: left; font-variant-numeric: tabular-nums; }
.nd-ifp-empty { padding: 26px 14px; text-align: center; color: var(--nd-muted); font-size: .86rem; }

/* ---------- حالت خالی و متفرقه ---------- */
.nd-empty { text-align: center; padding: 44px 20px; color: var(--nd-text-2); }
.nd-empty .ic { width: auto; height: auto; background: none; color: var(--nd-border-2); display: inline-flex; font-size: 2.6rem; margin-bottom: 8px; }
.nd-empty h6 { font-weight: 700; color: var(--nd-text); }
.nd-progress { height: 6px; border-radius: 6px; background: var(--nd-surface-3); overflow: hidden; }
.nd-progress > span { display: block; height: 100%; border-radius: 6px; background: var(--nd-primary); }
.nd-divider { display: flex; align-items: center; gap: 12px; color: var(--nd-muted); font-size: .8rem; margin: 18px 0; }
.nd-divider::before, .nd-divider::after { content: ""; flex: 1; height: 1px; background: var(--nd-border); }
.nd-kbd { font-family: ui-monospace, monospace; font-size: .74rem; padding: 0 6px; border: 1px solid var(--nd-border-2); border-bottom-width: 2px; border-radius: 4px; background: var(--nd-surface); }
.nd-list-item { display: flex; align-items: center; gap: 12px; padding: 11px 18px; border-bottom: 1px solid var(--nd-border); color: var(--nd-text); transition: background .12s; }
.nd-list-item:last-child { border-bottom: 0; } a.nd-list-item:hover { background: var(--nd-surface-2); color: var(--nd-text); }
.nd-list-item .t { font-weight: 600; font-size: .92rem; } .nd-list-item .s { font-size: .78rem; color: var(--nd-muted); }
.nd-banner { padding: 9px 18px; display: flex; align-items: center; gap: 10px; font-size: .9rem; font-weight: 600; }
.nd-banner.info { background: var(--nd-tint); color: var(--nd-primary); } .nd-banner.outage { background: rgba(210, 67, 59, .1); color: #a5302a; }
.nd-banner.maintenance { background: rgba(var(--nd-accent-rgb), .14); color: #7a4f06; } .nd-banner.news { background: var(--nd-tint); color: var(--nd-primary); }
[data-theme="dark"] .nd-banner.outage { color: #f2a19b; } [data-theme="dark"] .nd-banner.maintenance { color: #f2c574; }
.alert { border-radius: var(--nd-radius-sm); border: 1px solid transparent; }
.alert-success { background: rgba(27, 154, 90, .09); border-color: rgba(27, 154, 90, .2); color: #146b40; }
.alert-danger { background: rgba(210, 67, 59, .08); border-color: rgba(210, 67, 59, .2); color: #a5302a; }
.alert-info { background: var(--nd-tint); border-color: rgba(var(--nd-primary-rgb), .2); color: color-mix(in srgb, var(--nd-primary) 70%, var(--nd-text)); }
.alert-warning { background: rgba(var(--nd-accent-rgb), .1); border-color: rgba(var(--nd-accent-rgb), .28); color: #7a4f06; }
[data-theme="dark"] .alert-success { color: #7fd6a8; } [data-theme="dark"] .alert-danger { color: #f2a19b; } [data-theme="dark"] .alert-info { color: #8fd3d7; } [data-theme="dark"] .alert-warning { color: #f2c574; }
.dropdown-menu { border: 1px solid var(--nd-border); border-radius: var(--nd-radius); box-shadow: var(--nd-shadow-lg); padding: 6px; background: var(--nd-surface); --bs-dropdown-link-color: var(--nd-text); --bs-dropdown-link-hover-bg: var(--nd-surface-2); }
.dropdown-item { border-radius: var(--nd-radius-sm); padding: 7px 12px; font-size: .9rem; display: flex; gap: 9px; align-items: center; color: var(--nd-text); }
.dropdown-item:hover { background: var(--nd-surface-2); color: var(--nd-text); }
.modal-content { border: 0; border-radius: var(--nd-radius-lg); box-shadow: var(--nd-shadow-lg); background: var(--nd-surface); color: var(--nd-text); }
.modal-header, .modal-footer { border-color: var(--nd-border); }
.modal-title { font-family: var(--nd-font-display); font-weight: 700; }
[data-theme="dark"] .btn-close { filter: invert(1); }
.page-link { border-radius: var(--nd-radius-sm) !important; margin: 0 2px; border-color: var(--nd-border); color: var(--nd-text-2); background: var(--nd-surface); }
.page-item.active .page-link { background: var(--nd-primary); border-color: var(--nd-primary); }
.nd-notif-panel { width: 360px; max-height: 480px; overflow-y: auto; padding: 0; }
.nd-notif { display: flex; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--nd-border); color: var(--nd-text); font-size: .86rem; }
.nd-notif.unread { background: var(--nd-tint); } .nd-notif:hover { background: var(--nd-surface-2); color: var(--nd-text); }
.nd-notif .i { width: 32px; height: 32px; border-radius: var(--nd-radius-sm); background: var(--nd-surface-2); color: var(--nd-primary); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.nd-toasts { position: fixed; bottom: 20px; inset-inline-start: 20px; z-index: 2000; display: flex; flex-direction: column; gap: 8px; max-width: 360px; }
.nd-toast { background: var(--nd-surface); border: 1px solid var(--nd-border); border-radius: var(--nd-radius); box-shadow: var(--nd-shadow-lg); padding: 12px 14px; display: flex; gap: 12px; animation: nd-toast-in .35s var(--nd-ease) both; cursor: pointer; }
.nd-toast .i { width: 34px; height: 34px; border-radius: var(--nd-radius-sm); background: var(--nd-tint); color: var(--nd-primary); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.nd-toast.live { border-inline-start: 4px solid var(--nd-live); } .nd-toast.live .i { background: rgba(var(--nd-live-rgb), .16); color: #a16a0b; }
.nd-toast .tt { font-weight: 700; font-size: .9rem; } .nd-toast .tb { font-size: .82rem; color: var(--nd-text-2); overflow-wrap: anywhere; }
.nd-settings-nav a { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: var(--nd-radius-sm); color: var(--nd-text-2); font-weight: 500; font-size: .9rem; }
.nd-settings-nav a i { color: var(--nd-muted); width: 18px; text-align: center; }
.nd-settings-nav a:hover { background: var(--nd-surface-2); color: var(--nd-text); }
.nd-settings-nav a.active { background: var(--nd-tint); color: var(--nd-primary); font-weight: 600; } .nd-settings-nav a.active i { color: var(--nd-primary); }
.nd-settings-nav .sec { font-size: .76rem; font-weight: 600; color: var(--nd-muted); padding: 14px 12px 4px; }
.nd-preset { width: 44px; height: 44px; border-radius: var(--nd-radius); cursor: pointer; border: 3px solid transparent; outline: 1px solid var(--nd-border); }
.nd-preset.active { border-color: var(--nd-surface); outline: 2px solid var(--nd-text); }
.nd-img-prev { height: 52px; max-width: 160px; object-fit: contain; border-radius: var(--nd-radius-sm); border: 1px solid var(--nd-border); padding: 4px; background: repeating-conic-gradient(#e7ebee 0% 25%, #fff 0% 50%) 50%/14px 14px; }
.heat td { width: 3.8%; height: 22px; border-radius: 3px; padding: 0 !important; }
.nd-kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; font-size: .9rem; } .nd-kv dt { color: var(--nd-text-2); font-weight: 500; } .nd-kv dd { margin: 0; font-weight: 600; }
.nd-sticky { position: sticky; top: 80px; }
.nd-sparkle { color: var(--nd-primary); }
.nd-section-title { font-size: .82rem; font-weight: 600; color: var(--nd-text-2); margin-bottom: 10px; }
.cursor-pointer { cursor: pointer; }
.nd-version { display: inline-flex; align-items: center; gap: .3rem; font-size: .76rem; text-decoration: none; white-space: nowrap; }
.nd-version.muted { color: var(--nd-muted); } a.nd-version:hover { color: var(--nd-primary); }
.nd-version.side { color: var(--sb-muted); padding: .15rem .6rem; border-radius: 20px; background: var(--sb-hover); }
a.nd-version.side:hover { color: var(--sb-active-text); }
@media (max-width: 991px) { .nd-portal-foot { padding-bottom: 6rem !important; } }

/* ---------- حرکت‌ها: فقط برای رویداد و پاسخ به کاربر ---------- */
@keyframes nd-toast-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes nd-live-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(var(--nd-live-rgb), .55); } 60% { box-shadow: 0 0 0 7px rgba(var(--nd-live-rgb), 0); } }
@keyframes nd-bounce { 0%, 80%, 100% { transform: translateY(0); opacity: .5; } 40% { transform: translateY(-4px); opacity: 1; } }
@keyframes nd-fade-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.nd-anim > * { animation: none; }
body.no-anim *, body.no-anim *::before, body.no-anim *::after { animation: none !important; transition: none !important; }
body.no-glass .nd-topbar, body.no-glass .nd-portal-nav, body.no-glass .nd-mobile-tabs { backdrop-filter: none; background: var(--nd-surface); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition: none !important; } }
@media print {
  .nd-sidebar, .nd-topbar, .nd-portal-nav, .nd-mobile-tabs, .no-print, .nd-toasts { display: none !important; }
  .nd-content { padding: 0; } body { background: #fff !important; } .nd-card { break-inside: avoid; }
}

/* ---------- موبایل ---------- */
html, body { max-width: 100%; overflow-x: hidden; }
@media (max-width: 575px) {
  .nd-stat { padding: 12px 14px; } .nd-stat .v { font-size: 1.4rem; } .nd-stat .l { font-size: .78rem; }
  .nd-action { padding: 14px; } .nd-action p { display: none; }
  .nd-card-head, .nd-card-body { padding-inline: 14px; }
  .nd-list-item { padding: 10px 14px; }
  .nd-hero .search input { height: 48px; }
  .nd-msg .avatar { display: none; }
  .nd-otp input { width: 42px; height: 52px; }
  .nd-toasts { inset-inline: 12px; bottom: 80px; max-width: none; }
  .nd-ifp-row { grid-template-columns: 10px minmax(0, 1fr) auto; } .nd-ifp-speed, .nd-ifp-idx { display: none; }
}

/* جدول تیکت‌ها: ستون‌ها در یک خط؛ فقط موضوع جای بیشتری می‌گیرد و متن طولانی کوتاه می‌شود */
#ticket-rows td { white-space: nowrap; vertical-align: middle; }
#ticket-rows td:nth-child(2) { white-space: normal; min-width: 260px; }
#ticket-rows td:nth-child(3) .meta, #ticket-rows td:nth-child(3) .small { max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
#ticket-rows .nd-tag { white-space: nowrap; }

/* ---------- رنگ‌های سری گراف (اعتبارسنجی‌شده برای کوررنگی، حالت روشن و تیره) ---------- */
:root { --nd-c1: #00969f; --nd-c2: #c76d16; --nd-c3: #6b5bd6; }

/* ---------- گراف مصرف (SVG، زمان از چپ به راست) ---------- */
.nd-bw-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--nd-border); border-radius: var(--nd-radius); margin-bottom: 16px; background: var(--nd-surface-2); }
.nd-bw-stats > div { padding: 14px 16px; min-width: 0; }
.nd-bw-stats > div + div { border-inline-start: 1px solid var(--nd-border); }
.nd-bw-stats .k { font-size: .8rem; color: var(--nd-text-2); display: flex; align-items: center; gap: 7px; }
.nd-bw-stats .sw { width: 14px; height: 3px; border-radius: 2px; background: var(--c); }
.nd-bw-stats .v { font-family: var(--nd-font-display); font-weight: 800; font-size: 1.35rem; color: var(--nd-text); line-height: 1.5; font-variant-numeric: tabular-nums; }
.nd-bw-stats .v.sm { font-size: 1rem; line-height: 1.6; } .nd-bw-stats .v.sm i { color: var(--nd-muted); font-size: .85rem; }
.nd-bw-stats .m { font-size: .78rem; color: var(--nd-muted); }
@media (max-width: 767px) { .nd-bw-stats { grid-template-columns: 1fr 1fr; } .nd-bw-stats > div:nth-child(3) { border-inline-start: 0; } .nd-bw-stats > div:nth-child(n+3) { border-top: 1px solid var(--nd-border); } }
.nd-bw-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .78rem; color: var(--nd-muted); margin-top: 8px; }
.nd-bw-live { display: inline-flex; align-items: center; gap: 6px; font-size: .75rem; font-weight: 600; color: var(--nd-success); margin-inline-start: 4px; }
.nd-bw-live .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: nd-live-pulse 2.4s infinite; }
@media (prefers-reduced-motion: reduce) { .nd-bw-live .dot { animation: none; } }
.nd-seg { display: inline-flex; gap: 2px; padding: 3px; background: var(--nd-surface-2); border: 1px solid var(--nd-border); border-radius: 999px; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
.nd-seg button, .nd-seg a { border: 0; background: none; padding: 5px 13px; border-radius: 999px; color: var(--nd-text-2); font-weight: 600; font-size: .82rem; white-space: nowrap; transition: background .2s var(--nd-ease), color .2s; }
.nd-seg button:hover, .nd-seg a:hover { color: var(--nd-text); }
.nd-seg button.active, .nd-seg a.active { background: var(--nd-surface); color: var(--nd-primary); box-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 0 0 1px var(--nd-border); }
.nd-bwg-range { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 16px; }
.nd-bwg-range .lbl { font-size: .84rem; font-weight: 600; color: var(--nd-text-2); display: inline-flex; gap: 6px; align-items: center; margin: 0; }
.nd-bwg-range .nd-jdt { width: 220px; cursor: pointer; background-image: none; }
.nd-bwg-range .to { color: var(--nd-muted); font-size: .84rem; }
.nd-bwg-range .msg { color: var(--nd-danger); font-size: .82rem; font-weight: 600; }
.nd-bwg-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 6px; }
.nd-bwg-bar .legend { display: flex; flex-wrap: wrap; gap: 4px; }
.nd-bwg-bar .legend .it { border: 0; background: none; display: inline-flex; align-items: center; gap: 7px; padding: 3px 9px; border-radius: 999px; font-size: .8rem; font-weight: 600; color: var(--nd-text-2); }
.nd-bwg-bar .legend .it:hover { background: var(--nd-surface-2); }
.nd-bwg-bar .legend .it i { width: 16px; height: 3px; border-radius: 2px; background: var(--nd-c1); }
.nd-bwg-bar .legend .it.c2 i { background: var(--nd-c2); } .nd-bwg-bar .legend .it.ref i { background: repeating-linear-gradient(90deg, var(--nd-text-2) 0 3px, transparent 3px 6px); }
.nd-bwg-bar .legend .it.cap i { background: repeating-linear-gradient(90deg, var(--nd-danger) 0 6px, transparent 6px 9px); }
.nd-bwg-bar .legend .it.off { opacity: .45; text-decoration: line-through; }
.nd-bwg-bar .span { font-size: .78rem; color: var(--nd-muted); font-variant-numeric: tabular-nums; }
.nd-bwg-plot { position: relative; direction: ltr; height: 330px; }
.nd-bwg-plot > div:first-child { height: 100%; }
.nd-bwg-plot svg { width: 100%; height: 100%; display: block; overflow: visible; user-select: none; -webkit-user-select: none; font-family: var(--nd-font); }
.nd-bwg-plot .grid { stroke: var(--nd-border); stroke-width: 1; } .nd-bwg-plot .grid.base { stroke: var(--nd-border-2); }
.nd-bwg-plot .vgrid { stroke: var(--nd-border); stroke-width: 1; stroke-dasharray: 2 4; opacity: .7; }
.nd-bwg-plot .ax { fill: var(--nd-muted); font-size: 11px; } .nd-bwg-plot .ax.d { font-size: 10px; opacity: .85; } .nd-bwg-plot .ax.u { font-size: 10px; }
.nd-bwg-plot .area { fill: var(--nd-c1); opacity: .12; stroke: none; }
.nd-bwg-plot .l1 { fill: none; stroke: var(--nd-c1); stroke-width: 1.8; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.nd-bwg-plot .l2 { fill: none; stroke: var(--nd-c2); stroke-width: 1.8; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.nd-bwg-plot .dot1 { fill: var(--nd-c1); } .nd-bwg-plot .dot2 { fill: var(--nd-c2); }
.nd-bwg-plot .gap { fill: var(--nd-surface-3); opacity: .55; }
.nd-bwg-plot .p95 { stroke: var(--nd-text-2); stroke-width: 1; stroke-dasharray: 3 4; opacity: .8; vector-effect: non-scaling-stroke; }
.nd-bwg-plot .cap { stroke: var(--nd-danger); stroke-width: 1.2; stroke-dasharray: 7 5; vector-effect: non-scaling-stroke; }
.nd-bwg-plot .lbl { fill: var(--nd-text-2); font-size: 11px; direction: rtl; } .nd-bwg-plot .lbl.cap { fill: var(--nd-danger); }
.nd-bwg-plot .now { stroke: var(--nd-muted); stroke-width: 1; stroke-dasharray: 1 3; }
.nd-bwg-plot .guide { stroke: var(--nd-text); stroke-width: 1; stroke-opacity: .35; pointer-events: none; vector-effect: non-scaling-stroke; }
.nd-bwg-plot .hv1 { fill: var(--nd-surface); stroke: var(--nd-c1); stroke-width: 2; pointer-events: none; }
.nd-bwg-plot .hv2 { fill: var(--nd-surface); stroke: var(--nd-c2); stroke-width: 2; pointer-events: none; }
.nd-bwg-plot .sel { fill: var(--nd-primary); opacity: .14; stroke: var(--nd-primary); stroke-width: 1; pointer-events: none; }
.nd-bwg-plot .ov { fill: transparent; cursor: crosshair; touch-action: pan-y; }
.nd-bwg.is-loading .nd-bwg-plot svg { opacity: .55; transition: opacity .2s; }
.nd-bwg-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--nd-muted); pointer-events: none; direction: rtl; }
.nd-bwg-tip { position: absolute; top: 8px; z-index: 5; direction: rtl; pointer-events: none; min-width: 170px; background: var(--nd-surface); border: 1px solid var(--nd-border-2); border-radius: 12px; padding: 8px 12px; font-size: .8rem; line-height: 1.9; box-shadow: var(--nd-shadow); }
.nd-bwg-tip .t { font-weight: 700; color: var(--nd-text); font-variant-numeric: tabular-nums; border-bottom: 1px solid var(--nd-border); margin-bottom: 4px; padding-bottom: 2px; }
.nd-bwg-tip b { font-variant-numeric: tabular-nums; } .nd-bwg-tip small { color: var(--nd-muted); } .nd-bwg-tip .m { color: var(--nd-text-2); }
.nd-bwg-tip .sw { display: inline-block; width: 10px; height: 3px; border-radius: 2px; margin-inline-end: 6px; vertical-align: middle; background: var(--nd-c1); } .nd-bwg-tip .sw.c2 { background: var(--nd-c2); }
.nd-bwg-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 6px; }
.nd-bwg-tools .hint { margin-inline-end: auto; font-size: .78rem; color: var(--nd-muted); }
@media (max-width: 767px) { .nd-bwg-plot { height: 260px; } .nd-bwg-range .nd-jdt { width: 100%; } .nd-bwg-range .to { display: none; } }
@media (hover: none) { .nd-bwg-tools .hint { display: none; } }
/* انتخابگر تاریخ و ساعت شمسی */
.nd-jdp { position: fixed; z-index: 3000; width: 300px; background: var(--nd-surface); color: var(--nd-text); border: 1px solid var(--nd-border-2); border-radius: 16px; box-shadow: var(--nd-shadow-lg); padding: 12px; direction: rtl; font-size: .86rem; animation: nd-pop .18s var(--nd-ease); }
.nd-jdp .h { display: flex; align-items: center; gap: 4px; margin-bottom: 8px; } .nd-jdp .h b { flex: 1; text-align: center; font-weight: 700; }
.nd-jdp .h button { border: 0; background: none; width: 30px; height: 30px; border-radius: 8px; color: var(--nd-text-2); } .nd-jdp .h button:hover { background: var(--nd-surface-2); color: var(--nd-text); }
.nd-jdp .g { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; } .nd-jdp .w { color: var(--nd-muted); font-size: .74rem; padding: 4px 0; }
.nd-jdp .d { border: 1px solid transparent; background: none; padding: 6px 0; border-radius: 8px; color: inherit; font: inherit; font-variant-numeric: tabular-nums; }
.nd-jdp .d:hover { background: var(--nd-surface-2); } .nd-jdp .d.today { border-color: var(--nd-primary); } .nd-jdp .d.fri { color: var(--nd-danger); }
.nd-jdp .d.sel { background: var(--nd-primary); color: #fff; }
.nd-jdp .f { display: flex; align-items: center; gap: 4px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--nd-border); flex-wrap: wrap; }
.nd-jdp .f select { border: 1px solid var(--nd-border-2); border-radius: 8px; background: var(--nd-surface); color: var(--nd-text); padding: 2px 4px; }
.nd-jdp .f .sp { flex: 1; } .nd-jdp .f button { border: 1px solid var(--nd-border-2); background: var(--nd-surface); color: var(--nd-text-2); border-radius: 999px; padding: 2px 10px; font-size: .78rem; }
.nd-jdp .f button.ok { background: var(--nd-primary); border-color: var(--nd-primary); color: #fff; }
@keyframes nd-pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }

/* ---------- داشبورد: نوار وضعیت زنده ---------- */
.nd-pulse { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); background: var(--nd-surface); border: 1px solid var(--nd-border); border-radius: var(--nd-radius-lg); overflow: hidden; }
.nd-pulse .seg { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 16px 20px 18px; color: var(--nd-text); min-width: 0; transition: background .2s; }
.nd-pulse .seg + .seg { border-inline-start: 1px solid var(--nd-border); }
.nd-pulse a.seg:hover { background: var(--nd-surface-2); color: var(--nd-text); }
.nd-pulse .l { font-size: .82rem; font-weight: 600; color: var(--nd-text-2); }
.nd-pulse b { font-family: var(--nd-font-display); font-size: 2.15rem; font-weight: 800; line-height: 1.15; letter-spacing: -.01em; }
.nd-pulse .s { font-size: .76rem; color: var(--nd-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* نشانه‌ی وضعیت: نوار رنگی بالای بخش + رنگ عدد؛ متن توضیح همیشه کنار رنگ است (فقط رنگ نیست) */
.nd-pulse .seg::before { content: ""; position: absolute; inset-inline: 0; top: 0; height: 3px; background: transparent; }
.nd-pulse .seg.is-new::before { background: var(--nd-primary); } .nd-pulse .seg.is-new b { color: var(--nd-primary); }
.nd-pulse .seg.is-warn::before { background: var(--nd-warning); } .nd-pulse .seg.is-warn b { color: var(--nd-warning); }
.nd-pulse .seg.is-bad::before { background: var(--nd-danger); } .nd-pulse .seg.is-bad b { color: var(--nd-danger); }
.nd-pulse .seg.is-live b::after { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--nd-live); margin-inline-start: 8px; vertical-align: middle; animation: nd-live-pulse 2.4s infinite; }
/* عدد تغییرکرده: یک بار درخشش زعفرانی */
.nd-pulse .seg.changed { animation: nd-seg-flash 2.4s var(--nd-ease); }
@keyframes nd-seg-flash { 0%, 20% { background: rgba(var(--nd-live-rgb), .18); } 100% { background: transparent; } }
@media (max-width: 1199px) { .nd-pulse { grid-template-columns: repeat(3, minmax(0, 1fr)); } .nd-pulse .seg:nth-child(4) { border-inline-start: 0; } .nd-pulse .seg:nth-child(n+4) { border-top: 1px solid var(--nd-border); } }
@media (max-width: 575px) { .nd-pulse { grid-template-columns: repeat(2, minmax(0, 1fr)); } .nd-pulse .seg:nth-child(n) { border-inline-start: 0; border-top: 1px solid var(--nd-border); } .nd-pulse .seg:nth-child(-n+2) { border-top: 0; } .nd-pulse .seg:nth-child(even) { border-inline-start: 1px solid var(--nd-border); } .nd-pulse b { font-size: 1.7rem; } }
@media (prefers-reduced-motion: reduce) { .nd-pulse .seg.changed, .nd-pulse .seg.is-live b::after { animation: none; } }

.nd-card-note { margin-inline-start: auto; font-size: .76rem; color: var(--nd-muted); }
.nd-card-head .ic.is-bad { color: var(--nd-danger); }
.nd-kq .row-m { display: flex; justify-content: space-between; font-size: .86rem; margin-bottom: 6px; } .nd-kq .row-m b { font-family: var(--nd-font-display); }
.nd-kq .nd-progress { margin-bottom: 16px; }
.nd-kq .nd-progress + .row-m + .nd-progress > span { background: var(--nd-success); }
.nd-kq-grid { display: grid; grid-template-columns: 1fr 1fr; margin: 4px 0 0; border-top: 1px solid var(--nd-border); }
.nd-kq-grid > div { padding: 12px 0; } .nd-kq-grid > div:nth-child(odd) { padding-inline-end: 12px; } .nd-kq-grid > div:nth-child(even) { padding-inline-start: 12px; border-inline-start: 1px solid var(--nd-border); }
.nd-kq-grid > div:nth-child(n+3) { border-top: 1px solid var(--nd-border); }
.nd-kq-grid dt { font-size: .76rem; font-weight: 500; color: var(--nd-muted); } .nd-kq-grid dd { margin: 0; font-family: var(--nd-font-display); font-weight: 800; font-size: 1.02rem; }
.nd-stars { color: var(--nd-accent); letter-spacing: 1px; font-size: .82rem; } .nd-stars .off { color: var(--nd-surface-3); }

/* ---------- تصویر پروفایل: ویرایش و پنجره‌ی برش (مثل تلگرام) ---------- */
.avatar.xxl { width: 112px; height: 112px; font-size: 2rem; cursor: pointer; }
.nd-avatar-edit { position: relative; width: 112px; height: 112px; }
.nd-avatar-edit .avatar { box-shadow: 0 0 0 4px var(--nd-surface), 0 0 0 5px var(--nd-border); transition: filter .2s; }
.nd-avatar-edit .avatar:hover { filter: brightness(.92); }
.nd-avatar-edit .cam { position: absolute; bottom: 2px; inset-inline-start: 2px; width: 34px; height: 34px; border-radius: 50%; background: var(--nd-primary); color: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: 0 0 0 3px var(--nd-surface); transition: transform .15s var(--nd-ease); }
.nd-avatar-edit .cam:hover { transform: scale(1.06); }
.nd-avatar-edit:focus-within .cam { outline: 2px solid var(--nd-primary); outline-offset: 2px; }
.nd-avatar-edit.busy .avatar { filter: grayscale(1) brightness(.85); }
.nd-avatar-edit.busy::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 3px solid transparent; border-top-color: var(--nd-primary); animation: nd-spin .8s linear infinite; }
@keyframes nd-spin { to { transform: rotate(360deg); } }
html.nd-crop-open { overflow: hidden; }
.nd-crop { position: fixed; inset: 0; z-index: 4000; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 16px;
  background: rgba(8, 10, 14, .94); backdrop-filter: blur(6px); color: #fff; animation: nd-fade .2s var(--nd-ease); }
.nd-crop.out { animation: nd-fade .18s reverse both; }
@keyframes nd-fade { from { opacity: 0; } to { opacity: 1; } }
.nd-crop-top { width: min(92vw, 520px); display: flex; align-items: center; justify-content: space-between; }
.nd-crop-top b { font-weight: 700; font-size: 1rem; }
.nd-crop .ic { width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .08); color: #fff; display: grid; place-items: center; font-size: 1.05rem; transition: background .15s; }
.nd-crop .ic:hover { background: rgba(255, 255, 255, .16); }
.nd-crop-stage { position: relative; width: min(88vw, 62vh, 440px); aspect-ratio: 1; overflow: hidden; border-radius: 18px; cursor: grab; touch-action: none; background: #000; outline: none; }
.nd-crop-stage.grab { cursor: grabbing; }
.nd-crop-stage:focus-visible { box-shadow: 0 0 0 2px rgba(255, 255, 255, .5); }
.nd-crop-stage img { position: absolute; left: 50%; top: 50%; max-width: none; transform-origin: center; user-select: none; -webkit-user-drag: none; pointer-events: none; will-change: transform; }
.nd-crop-mask { position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 999px rgba(8, 10, 14, .62); outline: 2px solid rgba(255, 255, 255, .85); outline-offset: -1px; pointer-events: none; }
.nd-crop-stage.grab .nd-crop-mask { background: linear-gradient(rgba(255,255,255,.18), rgba(255,255,255,.18)) 33.33% 0/1px 100% no-repeat, linear-gradient(rgba(255,255,255,.18), rgba(255,255,255,.18)) 66.66% 0/1px 100% no-repeat, linear-gradient(rgba(255,255,255,.18), rgba(255,255,255,.18)) 0 33.33%/100% 1px no-repeat, linear-gradient(rgba(255,255,255,.18), rgba(255,255,255,.18)) 0 66.66%/100% 1px no-repeat; }
.nd-crop-bar { width: min(88vw, 440px); display: flex; align-items: center; gap: 12px; color: rgba(255, 255, 255, .7); }
.nd-crop-bar input[type=range] { flex: 1; accent-color: #fff; direction: ltr; }
.nd-crop-bar .small { font-size: .8rem; }
.nd-crop-actions { width: min(88vw, 440px); display: flex; align-items: center; justify-content: space-between; }
.nd-crop-actions .btn-light { background: rgba(255, 255, 255, .08); border-color: transparent; color: #fff; border-radius: 999px; padding-inline: 20px; }
.nd-crop-actions .btn-light:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.nd-crop-ok { width: 58px; height: 58px; border-radius: 50%; border: 0; background: var(--nd-primary); color: #fff; font-size: 1.6rem; display: grid; place-items: center; box-shadow: 0 10px 30px -8px rgba(var(--nd-primary-rgb), .8); transition: transform .15s var(--nd-ease); }
.nd-crop-ok:hover { transform: scale(1.05); } .nd-crop-ok:active { transform: scale(.96); }

/* =====================================================================
   لایه‌ی طراحی v1.3 — «دقیق و آرام»
   یک «ماده»ی واحد برای همه‌ی سطح‌ها: سفید با سایه‌ی نرم و خط موئی (حالت روشن)،
   سطح تیره با خط موئی (حالت تیره). دکمه‌ها قرصی، کارت‌ها گردتر، منو شناور.
   حرکت فقط در ورود صفحه (یک بار، مرحله‌ای) و پاسخ به کاربر؛ چیزی تکرار نمی‌شود.
   نکته‌ی فارسی: فاصله‌ی حروف (letter-spacing) هرگز روی متن فارسی اعمال نمی‌شود.
   ===================================================================== */
:root {
  --nd-surface: #ffffff; --nd-surface-2: #f4f5f2; --nd-surface-3: #eaece7;
  --nd-text: #10171e; --nd-text-2: #4a545e; --nd-muted: #879098;
  --nd-border: #e7e9e4; --nd-border-2: #d5d9d2;
  --nd-r-card: calc(var(--nd-radius) + 4px); --nd-r-ctl: max(8px, calc(var(--nd-radius) - 2px));
  --nd-hair: 0 0 0 1px rgba(16, 23, 30, .055);
  --nd-shadow-sm: 0 1px 2px rgba(16, 23, 30, .05);
  --nd-shadow-card: 0 0 0 1px rgba(16, 23, 30, .05), 0 1px 2px rgba(16, 23, 30, .04), 0 8px 24px -14px rgba(16, 23, 30, .14);
  --nd-shadow: 0 0 0 1px rgba(16, 23, 30, .05), 0 12px 32px -14px rgba(16, 23, 30, .22);
  --nd-shadow-lg: 0 0 0 1px rgba(16, 23, 30, .06), 0 24px 60px -22px rgba(16, 23, 30, .32);
  --nd-glass: rgba(245, 246, 244, .78);
  --nd-ease: cubic-bezier(.22, 1, .36, 1); --nd-ease-state: cubic-bezier(.4, 0, .2, 1);
}
[data-theme="dark"] {
  --nd-bg: #0b0d10; --nd-surface: #121519; --nd-surface-2: #171a1f; --nd-surface-3: #1f242a;
  --nd-text: #e9edf1; --nd-text-2: #a6b0ba; --nd-muted: #6e7883; --nd-border: #22272d; --nd-border-2: #2e353c;
  --nd-hair: 0 0 0 1px rgba(255, 255, 255, .06);
  --nd-shadow-card: 0 0 0 1px rgba(255, 255, 255, .055), 0 10px 30px -18px rgba(0, 0, 0, .8);
  --nd-shadow: 0 0 0 1px rgba(255, 255, 255, .07), 0 16px 40px -16px rgba(0, 0, 0, .85);
  --nd-shadow-lg: 0 0 0 1px rgba(255, 255, 255, .08), 0 30px 70px -24px rgba(0, 0, 0, .9);
  --nd-glass: rgba(11, 13, 16, .72);
}
html { -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
body { line-height: 1.8; }
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { font-weight: var(--nd-heading-weight, 700); }
.nd-num, .nd-pulse b, .nd-stat .v, .nd-bw-stats .v, .nd-kq-grid dd, time { font-variant-numeric: tabular-nums; }
::selection { background: rgba(var(--nd-primary-rgb), .22); color: inherit; }

/* ---------- چیدمان: منوی شناور داخل قاب ---------- */
@media (min-width: 992px) {
  .nd-sidebar { margin: 12px; margin-inline-end: 0; top: 12px; height: calc(100vh - 24px); border-radius: 22px; padding: 18px 12px 12px;
    box-shadow: 0 18px 40px -24px rgba(var(--nd-secondary-rgb), .7); overflow: hidden; isolation: isolate; }
  .nd-sidebar[data-style="dark"]::after, .nd-sidebar[data-style="brand"]::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: radial-gradient(120% 60% at 100% 0%, rgba(255, 255, 255, .07), transparent 60%); }
  .nd-sidebar[data-style="light"], .nd-sidebar[data-style="glass"] { border: 0; box-shadow: var(--nd-shadow-card); }
}
.nd-brand { padding: 2px 8px 18px; }
.nd-brand img.mark { border-radius: 11px; }
.nd-nav .sec { font-size: .72rem; padding: 18px 12px 6px; opacity: .9; }
.nd-nav a { border-radius: 12px; padding: 9px 12px; margin-bottom: 2px; transition: background .2s var(--nd-ease-state), color .2s var(--nd-ease-state); }
.nd-nav a i { font-size: 1.05rem; transition: transform .25s var(--nd-ease); }
.nd-nav a:hover i { transform: translateX(-2px); }
.nd-nav a.active { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); }
.nd-nav a.active::before { inset-inline-start: 4px; top: 50%; bottom: auto; height: 16px; transform: translateY(-50%); width: 3px; }
.nd-nav .count { border-radius: 999px; }
.nd-agent-status { border-radius: 14px; }

/* هدر شیشه‌ای: خط زیرین فقط بعد از اسکرول */
.nd-topbar { background: var(--nd-glass); border-bottom: 1px solid transparent; padding: 12px 28px; min-height: 68px; transition: border-color .25s, box-shadow .25s; }
.nd-topbar.scrolled { border-bottom-color: var(--nd-border); box-shadow: 0 8px 24px -20px rgba(16, 23, 30, .35); }
.nd-topbar .title { font-size: 1.22rem; font-weight: 800; line-height: 1.35; }
.nd-search input { border-radius: 999px; background: var(--nd-surface); border-color: transparent; box-shadow: var(--nd-hair); height: 40px; }
.nd-search input:hover { box-shadow: 0 0 0 1px var(--nd-border-2); }
.nd-content { padding: calc(20px * var(--nd-space)) 28px 44px; }
.nd-footer { border-top: 0; padding: 18px 28px; }
@media (max-width: 991px) { .nd-topbar { padding: 8px 12px; min-height: 60px; } .nd-content { padding: 14px 12px 92px; } }

/* ---------- ماده‌ی واحد: کارت ---------- */
.nd-card { border: 0; border-radius: var(--nd-r-card); box-shadow: var(--nd-shadow-card); background: var(--nd-surface); }
.nd-card.hover { transition: box-shadow .25s var(--nd-ease-state), transform .25s var(--nd-ease); }
.nd-card.hover:hover { box-shadow: var(--nd-shadow); transform: translateY(-1px); }
.nd-card-head { padding: calc(15px * var(--nd-space)) 20px; min-height: 56px; border-bottom-color: var(--nd-border); }
.nd-card-head h5, .nd-card-head h6 { font-size: 1rem; font-weight: 800; }
.nd-card-head .ic { width: 30px; height: 30px; border-radius: 10px; background: var(--nd-surface-2); justify-content: center; align-items: center; font-size: .98rem; color: var(--nd-text-2); }
.nd-card-body { padding: calc(18px * var(--nd-space)) 20px; }
.nd-card-foot { border-radius: 0 0 var(--nd-r-card) var(--nd-r-card); padding: 14px 20px; }
.table-responsive { border-radius: 0 0 var(--nd-r-card) var(--nd-r-card); }
.nd-card > .table-responsive:first-child { border-radius: var(--nd-r-card); }
.nd-list-item { padding: 12px 20px; }
.nd-pulse, .nd-bw-stats { border: 0; box-shadow: var(--nd-shadow-card); border-radius: var(--nd-r-card); background: var(--nd-surface); }
.nd-bw-stats { box-shadow: var(--nd-hair); background: var(--nd-surface-2); }
.nd-pulse .seg { padding: 18px 22px 20px; }
.nd-pulse .l { font-size: .8rem; font-weight: 500; color: var(--nd-muted); }
.nd-pulse b { font-size: 2.35rem; font-weight: 700; letter-spacing: 0; line-height: 1.2; }
.nd-pulse .seg::before { height: 2px; inset-inline: 22px; border-radius: 0 0 2px 2px; }
.nd-stat .v { font-size: 2rem; font-weight: 700; }

/* ---------- دکمه‌ها: قرصی، فشردن فیزیکی ---------- */
.btn { border-radius: 999px; font-weight: 600; padding: .5rem 1.15rem; transition: background .2s var(--nd-ease-state), border-color .2s, color .2s, box-shadow .2s, transform .12s var(--nd-ease-state); }
.btn:active { transform: scale(.97); }
.btn-primary { box-shadow: 0 1px 2px rgba(var(--nd-primary-rgb), .3), 0 6px 16px -8px rgba(var(--nd-primary-rgb), .55), inset 0 1px 0 rgba(255, 255, 255, .16); }
.btn-primary:hover { box-shadow: 0 1px 2px rgba(var(--nd-primary-rgb), .3), 0 10px 22px -10px rgba(var(--nd-primary-rgb), .7), inset 0 1px 0 rgba(255, 255, 255, .16); }
.btn-light, .btn-outline-secondary { border-color: transparent; box-shadow: var(--nd-hair), var(--nd-shadow-sm); background: var(--nd-surface); }
.btn-light:hover, .btn-outline-secondary:hover { border-color: transparent; box-shadow: 0 0 0 1px var(--nd-border-2), var(--nd-shadow-sm); background: var(--nd-surface); }
.btn-lg { padding: .7rem 1.6rem; } .btn-sm { padding: .32rem .85rem; }
.btn-icon { border-radius: 999px; width: 40px; height: 40px; border-color: transparent; box-shadow: var(--nd-hair); }
.btn-icon:hover { border-color: transparent; box-shadow: 0 0 0 1px rgba(var(--nd-primary-rgb), .35); }
.nd-live { border-color: transparent; box-shadow: var(--nd-hair); padding: 5px 12px; }
.chip { border-color: transparent; box-shadow: var(--nd-hair); }

/* ---------- فرم‌ها: سطح ملایم، حلقه‌ی تمرکز واضح ---------- */
.form-control, .form-select { border-radius: var(--nd-r-ctl); min-height: 42px; border-color: var(--nd-border-2); transition: border-color .2s, box-shadow .2s, background-color .2s; }
.form-control:hover, .form-select:hover { border-color: color-mix(in srgb, var(--nd-border-2) 60%, var(--nd-text-2)); }
.form-control:focus, .form-select:focus { box-shadow: 0 0 0 4px rgba(var(--nd-primary-rgb), .14); }
.form-control-sm, .form-select-sm { min-height: 34px; }
.form-label { font-size: .86rem; color: var(--nd-text-2); }
.input-group > .form-control, .input-group > .form-select, .input-group-text { border-radius: var(--nd-r-ctl); }
.nd-note { border: 0; border-inline-start: 3px solid var(--nd-primary); border-radius: 12px; }

/* ---------- جدول‌ها ---------- */
.nd-table thead th { background: transparent; font-size: .76rem; font-weight: 600; color: var(--nd-muted); padding-top: .9rem; padding-bottom: .7rem; }
.nd-table > :not(caption) > * > * { padding: .8rem 1rem; }
.nd-table tbody tr:last-child > * { border-bottom: 0; }

/* ---------- تب‌ها و سگمنت‌ها ---------- */
.nd-tabs, .nd-seg { border: 0; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--nd-border); background: var(--nd-surface-2); padding: 4px; }
.nd-tabs a, .nd-tabs button { border-radius: 999px; padding: 6px 14px; transition: color .2s, background .25s var(--nd-ease-state), box-shadow .25s; }
.nd-tabs a.active, .nd-tabs button.active { box-shadow: 0 1px 2px rgba(16, 23, 30, .08), 0 0 0 1px var(--nd-border); }
.nd-queue a, .nd-settings-nav a { border-radius: 12px; }

/* ---------- لایه‌های شناور ---------- */
.dropdown-menu { border: 0; border-radius: 16px; box-shadow: var(--nd-shadow-lg); padding: 6px; animation: nd-pop .18s var(--nd-ease); }
.dropdown-item { border-radius: 10px; }
.modal-content { border-radius: 22px; }
.nd-toast { border: 0; border-radius: 16px; box-shadow: var(--nd-shadow-lg); }
.alert { border-radius: 14px; }
.nd-badge { padding: 3px 10px; }

/* ---------- ورود مرحله‌ای (فقط بار اول صفحه؛ بخش‌های زنده‌ی بعدی دوباره حرکت نمی‌کنند) ---------- */
@keyframes nd-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
html:not(.nd-settled) .nd-content > .container-fluid > *, html:not(.nd-settled) .nd-content > :not(.container-fluid) { animation: nd-rise .7s var(--nd-ease) both; }
html:not(.nd-settled) .nd-content > .container-fluid > :nth-child(2), html:not(.nd-settled) .nd-content > :nth-child(2) { animation-delay: .06s; }
html:not(.nd-settled) .nd-content > .container-fluid > :nth-child(3), html:not(.nd-settled) .nd-content > :nth-child(3) { animation-delay: .12s; }
html:not(.nd-settled) .nd-content > .container-fluid > :nth-child(4), html:not(.nd-settled) .nd-content > :nth-child(4) { animation-delay: .18s; }
html:not(.nd-settled) .nd-content > .container-fluid > :nth-child(n+5), html:not(.nd-settled) .nd-content > :nth-child(n+5) { animation-delay: .24s; }
@media (prefers-reduced-motion: reduce) { html:not(.nd-settled) .nd-content * { animation: none !important; } }

/* ---------- صفحه‌ی ورود: قاب داخلی و خط زنده ---------- */
@media (min-width: 992px) {
  .nd-auth.split { background: var(--nd-surface); }
  .nd-auth.split > .bg { inset: 14px; inset-inline-end: auto; width: 52%; border-radius: 30px; }
  .nd-auth.split .panel { flex: 0 0 52%; margin: 14px; margin-inline-end: 0; border-radius: 30px; padding: 44px 52px; overflow: hidden; isolation: isolate; }
  .nd-auth.split .panel.img { border-radius: 30px; }
  .nd-auth.split .formside { background: transparent; }
}
.nd-auth .panel::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .06; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.nd-auth .panel h1 { font-size: clamp(2rem, 3.1vw, 3.1rem); line-height: 1.32; font-weight: 800; max-width: 15ch; }
.nd-auth .panel p { color: rgba(255, 255, 255, .66); font-size: 1.05rem; max-width: 30rem; line-height: 1.9; }
.nd-auth .panel .feat { font-size: .95rem; color: rgba(255, 255, 255, .82); margin-bottom: 10px; }
.nd-auth .panel .feat i { border-radius: 999px; border-color: rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .05); color: #fff; width: 30px; height: 30px; font-size: .85rem; }
.nd-auth-card h2 { font-size: 1.7rem; font-weight: 800; }
.nd-auth-card .form-control { height: 50px; border-radius: 14px; }
.nd-auth-card .btn-lg { height: 50px; }
/* امضای صفحه‌ی ورود: خط زنده‌ی سرویس که یک بار کشیده می‌شود و نقطه‌ی «اکنون» */
.nd-pulseline { position: relative; margin: 28px 0 6px; max-width: 34rem; }
.nd-pulseline svg { width: 100%; height: 86px; display: block; overflow: visible; direction: ltr; }
.nd-pulseline .base { stroke: rgba(255, 255, 255, .1); stroke-width: 1; }
.nd-pulseline .ln { fill: none; stroke: rgba(255, 255, 255, .9); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: nd-draw 2.2s .35s var(--nd-ease) forwards; }
.nd-pulseline .ar { fill: url(#ndpl-g); opacity: 0; animation: nd-fade-in 1.2s 1.6s ease forwards; }
.nd-pulseline .now { fill: var(--nd-accent); opacity: 0; animation: nd-fade-in .4s 2.4s ease forwards; }
.nd-pulseline .halo { fill: none; stroke: var(--nd-accent); stroke-width: 1.4; opacity: 0; transform-box: fill-box; transform-origin: center; animation: nd-halo 1.6s 2.5s var(--nd-ease) 2; }
.nd-pulseline .cap { display: flex; justify-content: space-between; font-size: .78rem; color: rgba(255, 255, 255, .5); margin-top: 8px; }
.nd-pulseline .cap b { color: #fff; font-weight: 600; } .nd-pulseline .cap .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--nd-accent); margin-inline-end: 6px; }
@keyframes nd-draw { to { stroke-dashoffset: 0; } }
@keyframes nd-fade-in { to { opacity: 1; } }
@keyframes nd-halo { 0% { opacity: .9; transform: scale(1); } 100% { opacity: 0; transform: scale(3.2); } }
@media (prefers-reduced-motion: reduce) { .nd-pulseline .ln { stroke-dashoffset: 0; animation: none; } .nd-pulseline .ar, .nd-pulseline .now { opacity: 1; animation: none; } .nd-pulseline .halo { display: none; } }

/* ---------- پرتال مشتری ---------- */
.nd-portal-nav { border-bottom: 1px solid transparent; }
.nd-hero { border-radius: 28px; }
.nd-portal-nav.scrolled { border-bottom-color: var(--nd-border); }
/* کلیدهای روشن/خاموش: فاصله‌ی برچسب از کلید (RTL) */
.form-check.form-switch { padding-right: 3.2em; padding-left: 0; min-height: 1.6em; }
.form-switch .form-check-input { margin-right: -3.2em; margin-left: 0; float: right; transition: background-position .2s var(--nd-ease-state), background-color .2s; }
.nd-set.is-switch .form-switch { padding-inline-start: 3.2em; }
.form-check-inline.form-switch { margin-left: 1.4rem; margin-right: 0; }
.nd-secret-area { -webkit-text-security: disc; font-family: ui-monospace, monospace; direction: ltr; resize: vertical; min-height: 42px; }
.nd-secret .form-control.ltr { padding-left: 40px; padding-right: .8rem; }
.nd-license-lock { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; padding: 16px; background: var(--nd-bg); } .nd-license-lock .nd-card { max-width: 520px; }
