/* ناویار امین (سامانه GRC) - پوسته راست‌به‌چپ. همه فایل‌ها داخل بسته؛ بدون CDN. */
@font-face {
    font-family: "Vazirmatn";
    src: url("/vendor/vazirmatn/Vazirmatn-Variable-f6d31671339db80142ceaf6382570e79.woff2") format("woff2");
    font-weight: 100 900;
    font-display: swap;
}

:root {
    --bg: #f4f6f9;
    --surface: #ffffff;
    --surface-2: #f8fafc;
    --border: #e3e8ef;
    --text: #1b2533;
    --muted: #6b778a;
    --primary: #0f7a83;
    --primary-dark: #0b5f66;
    --primary-soft: #e3f3f4;
    --nav: #10243a;
    --nav-2: #18324f;
    --nav-text: #c9d5e3;
    --red: #dc3b3b;
    --orange: #ef8a2c;
    --yellow: #e5b62a;
    --green: #2e9e5b;
    --blue: #2f6fdb;
    --purple: #7c4ddb;
    --teal: #13968f;
    --gray: #8a94a6;
    --radius: 10px;
    --shadow: 0 1px 2px rgba(16, 36, 58, .06), 0 1px 8px rgba(16, 36, 58, .04);
    color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
    font-family: "Vazirmatn", Tahoma, Arial, sans-serif;
    font-size: 13.5px;
    color: var(--text);
    background: var(--bg);
    line-height: 1.7;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: 0; }
h1 { font-size: 20px; }
h2 { font-size: 16px; }
h3 { font-size: 14px; }
small, .muted { color: var(--muted); }
code, .ltr { direction: ltr; unicode-bidi: embed; font-family: Consolas, monospace; font-size: 12px; }

/* ---------- قاب اصلی ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
    width: 250px; flex: 0 0 250px; background: var(--nav); color: var(--nav-text);
    position: sticky; top: 0; height: 100vh; overflow-y: auto; padding-bottom: 24px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 20px; color: #fff; border-bottom: 1px solid rgba(255,255,255,.07); }
.brand-logo { width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(135deg, #19a7b0, #2f6fdb); display: grid; place-items: center; font-weight: 800; }
.brand-logo.mark { background: transparent; padding: 0; box-shadow: none; }
.brand-logo.mark img { width: 100%; height: 100%; display: block; }
.login-logo { width: 300px; max-width: 84%; margin-bottom: 6px; }
.brand strong { font-size: 16px; display: block; }
.nav-ro { font-size: 10px; padding: 1px 6px; border-radius: 999px; background: rgba(220,59,59,.2); color: #ffb4b4; margin-inline-start: 6px; white-space: nowrap; }
.brand small { color: #8fa3b8; font-size: 11px; }
.nav-group { padding: 4px 10px; }
.nav-group > summary {
    list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px;
    padding: 9px 12px; border-radius: 8px; color: #dde6f0; font-weight: 600;
}
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-group > summary:hover { background: var(--nav-2); }
.nav-group[open] > summary { color: #fff; }
.nav-group > summary .chev { margin-inline-start: auto; transition: transform .15s; opacity: .6; }
.nav-group[open] > summary .chev { transform: rotate(-90deg); }
.nav-group a {
    display: block; padding: 6px 42px 6px 12px; color: var(--nav-text); border-radius: 7px; font-size: 13px;
}
.nav-group a.nav-single { display: flex; align-items: center; gap: 10px; padding: 9px 12px; color: #dde6f0; font-weight: 600; font-size: 13.5px; }
.nav-group a:hover { background: var(--nav-2); text-decoration: none; color: #fff; }
.nav-group a.active { background: var(--primary); color: #fff; }
.icon { width: 18px; height: 18px; flex: 0 0 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
    height: 60px; background: var(--surface); border-bottom: 1px solid var(--border);
    display: flex; align-items: center; gap: 16px; padding: 0 24px; position: sticky; top: 0; z-index: 20;
}
.topbar .company-select { display: flex; align-items: center; gap: 8px; }
.topbar select { min-width: 240px; }
.topbar .spacer { flex: 1; }
.topbar .today { color: var(--muted); font-size: 12.5px; }
.user-chip { display: flex; align-items: center; gap: 10px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--primary-soft); color: var(--primary-dark); display: grid; place-items: center; font-weight: 800; }
.user-chip .who { line-height: 1.3; }
.user-chip .who small { display: block; font-size: 11px; }
.content { padding: 20px 24px 40px; }

.licence-banner { background: #fff4e5; border-bottom: 1px solid #f5d3a3; color: #8a4b00; padding: 8px 24px; font-size: 13px; }
.licence-banner.danger { background: #fdecec; border-color: #f3b9b9; color: #9b1c1c; }

/* ---------- سرصفحه ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.crumbs { color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.crumbs a { color: var(--muted); }
.crumbs span + span::before { content: " / "; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- کارت و شاخص ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.card-body { padding: 16px; }
.card + .card, .card + .grid-2, .grid-2 + .card, .kpis + .card, .card + .grid-3, .grid-3 + .card { margin-top: 16px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; display: flex; align-items: center; gap: 12px; box-shadow: var(--shadow); }
.kpi .kpi-icon { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.kpi .kpi-icon.red { background: #fdecec; color: var(--red); }
.kpi .kpi-icon.orange { background: #fff1e3; color: var(--orange); }
.kpi .kpi-icon.green { background: #e7f6ed; color: var(--green); }
.kpi .kpi-icon.blue { background: #e8effc; color: var(--blue); }
.kpi .kpi-icon.purple { background: #f0eafc; color: var(--purple); }
.kpi strong { font-size: 22px; display: block; line-height: 1.2; }
.kpi span { color: var(--muted); font-size: 12.5px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid-2 > .card + .card, .grid-3 > .card + .card { margin-top: 0; }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: 1 / -1; }
.split { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 16px; align-items: start; }
.split > .card + .card { margin-top: 0; }

/* ---------- جدول ---------- */
.table-wrap { overflow-x: auto; }
table.grid { width: 100%; border-collapse: collapse; font-size: 13px; }
table.grid th { background: var(--surface-2); color: #415066; font-weight: 600; text-align: right; padding: 9px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.grid td { padding: 8px 10px; border-bottom: 1px solid #eef1f5; vertical-align: middle; }
table.grid tr:hover td { background: #fafcfd; }
table.grid tr.selected td { background: var(--primary-soft); }
table.grid td.num, table.grid th.num { text-align: center; }
table.grid .row-actions { white-space: nowrap; text-align: left; }
table.grid.compact td { padding: 5px 8px; }
.tree-indent { display: inline-block; }

/* ---------- برچسب وضعیت ---------- */
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 1px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: #eef1f5; color: #4a5568; }
.chip.gray { background: #eef1f5; color: #4a5568; }
.chip.blue { background: #e6eefc; color: #2459b8; }
.chip.green { background: #e3f5ea; color: #1f7a45; }
.chip.yellow { background: #fbf3d3; color: #8a6a00; }
.chip.orange { background: #fdeedd; color: #b55a00; }
.chip.red { background: #fde6e6; color: #b42323; }
.chip.purple { background: #efe8fc; color: #5b34b0; }
.chip.teal { background: #dff4f2; color: #0d6f69; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--gray); }
.score { display: inline-block; min-width: 34px; text-align: center; padding: 1px 8px; border-radius: 6px; color: #fff; font-weight: 700; }
.awaiting { display: inline-flex; gap: 6px; align-items: center; padding: 2px 10px; border-radius: 6px; background: #fff7e0; color: #8a6200; border: 1px dashed #e5b62a; font-size: 12px; font-weight: 600; }
.temp { background: #fff1f1; color: #9b1c1c; border-color: #e99; }

/* ---------- دکمه و فرم ---------- */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: 13px; cursor: pointer; text-decoration: none !important; white-space: nowrap; }
.btn:hover { background: var(--surface-2); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { border-color: var(--primary); color: var(--primary); }
.btn-danger { color: var(--red); border-color: #f1c4c4; }
.btn-sm { padding: 2px 10px; font-size: 12px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
input, select, textarea { font: inherit; font-size: 13px; padding: 6px 10px; border: 1px solid #d3dae4; border-radius: 8px; background: #fff; color: var(--text); width: 100%; }
input[type=checkbox], input[type=radio] { width: auto; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary-soft); border-color: var(--primary); }
textarea { min-height: 80px; resize: vertical; }
label { display: block; font-size: 12.5px; color: #415066; margin-bottom: 4px; font-weight: 600; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px 18px; }
.form-grid .full { grid-column: 1 / -1; }
.form-actions { display: flex; gap: 8px; margin-top: 18px; }
.field-hint { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.inline-form { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.inline-form > div { min-width: 160px; }
.check-row { display: flex; align-items: center; gap: 6px; font-weight: 400; }

.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; font-weight: 600; }
.flash.ok { background: #e3f5ea; color: #1f7a45; border: 1px solid #bfe6cd; }
.flash.error { background: #fde6e6; color: #9b1c1c; border: 1px solid #f3b9b9; }
.note { background: #f0f7ff; border: 1px solid #cfe0fb; color: #23436f; padding: 10px 14px; border-radius: 8px; }
.note.warn { background: #fff7e0; border-color: #f0d68a; color: #6b5000; }

/* ---------- تب ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); padding: 0 12px; overflow-x: auto; }
.tabs a { padding: 10px 14px; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; font-weight: 600; }
.tabs a:hover { text-decoration: none; color: var(--text); }
.tabs a.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ---------- نوار پیشرفت ---------- */
.progress { height: 7px; background: #e9edf2; border-radius: 99px; overflow: hidden; min-width: 70px; }
.progress > span { display: block; height: 100%; background: var(--primary); border-radius: 99px; }
.progress.green > span { background: var(--green); }
.progress.orange > span { background: var(--orange); }

/* ---------- جزئیات ---------- */
.dl { display: grid; grid-template-columns: 150px 1fr; gap: 6px 12px; margin: 0; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; font-weight: 500; }
.empty { text-align: center; color: var(--muted); padding: 30px 10px; }
.tree-list { list-style: none; margin: 0; padding: 0; }
.tree-list ul { list-style: none; margin: 0; padding-right: 22px; border-right: 1px dashed #cfd8e3; }
.tree-list li { padding: 3px 0; }
.heatmap { display: grid; gap: 3px; }
.heatmap div { border-radius: 4px; display: grid; place-items: center; font-weight: 700; color: #fff; min-height: 38px; font-size: 13px; }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-left: 4px; vertical-align: -2px; }
.matrix-table th { writing-mode: initial; }
.matrix-table td { text-align: center; }
.sep { height: 1px; background: var(--border); margin: 14px 0; }

/* ---------- ورود ---------- */
/* RTL: ستون اول سمت راست است؛ فرم ورود سمت راست و معرفی سامانه سمت چپ */
.login-page { min-height: 100vh; display: grid; grid-template-columns: 460px 1fr; background: var(--bg); }
/* هم‌قد صفحه نمایش و ثابت هنگام اسکرول ستون ورود (فهرست کاربران نمایشی بلند است)، تا نما و متن وسط دید بمانند.
   پس‌زمینه: توری هم‌محور (ایزومتریک، هم‌زبان با مکعب‌های نشان امین رای) روی گرادیان سرمه‌ای تا فیروزه‌ای */
.login-hero { position: sticky; top: 0; height: 100vh; align-self: start; overflow: hidden; isolation: isolate; color: #e8f1f8;
    padding: 28px 48px 36px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
    background: repeating-linear-gradient(30deg, rgba(127,224,227,.035) 0 1px, transparent 1px 40px),
                repeating-linear-gradient(150deg, rgba(127,224,227,.035) 0 1px, transparent 1px 40px),
                radial-gradient(ellipse 70% 60% at 50% 38%, rgba(23,110,120,.55), transparent 70%),
                linear-gradient(165deg, #07131f 0%, #0b2533 45%, #0b3a44 100%); }
.login-hero h1 { font-size: 40px; color: #fff; margin: 0; letter-spacing: -.3px; }
.login-hero p { max-width: 540px; color: #bcd0e2; margin: 0; }
.login-box { order: -1; position: relative; background: #fff; padding: 48px 40px; box-shadow: 0 0 40px rgba(7,19,31,.35); z-index: 1; display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.countdown { background: #fff4e5; border: 1px solid #f5d3a3; color: #8a4b00; border-radius: 8px; padding: 10px 14px; }
.demo-users { font-size: 12px; }
.demo-users td { padding: 3px 6px; border-bottom: 1px solid #eef1f5; cursor: pointer; }
.demo-users tr:hover td { background: var(--primary-soft); }

@media (max-width: 1100px) {
    .grid-2, .grid-3, .split { grid-template-columns: 1fr; }
    .span-2 { grid-column: auto; }
    .login-page { grid-template-columns: 1fr; }
    .login-hero { display: none; }
}
@media (max-width: 800px) {
    .sidebar { display: none; }
}
@media print {
    .sidebar, .topbar, .actions, .btn { display: none !important; }
}
.kpi-link { text-decoration: none !important; color: inherit; display: block; }
.kpi-link .kpi { height: 100%; }
.grid-2 + .grid-2, .grid-3 + .grid-2, .grid-2 + .grid-3, .grid-3 + .grid-3, .kpis + .grid-2, .kpis + .grid-3 { margin-top: 16px; }
.report-card { text-decoration: none !important; color: inherit; }
.report-card:hover { border-color: var(--primary); }
.report-card p { color: var(--muted); margin: 6px 0 0; font-size: 13px; }

/* ------------------------------------------------------------------ نقشه وابستگی فرآیند و دارایی (js/asset-graph.js) */
.ag { padding: 0 0 4px; }
.ag-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 16px; border-bottom: 1px solid var(--border); }
.ag-legend { display: flex; flex-wrap: wrap; gap: 10px; font-size: 12px; color: var(--muted); }
.ag-legend-item { display: inline-flex; align-items: center; gap: 5px; }
.ag-hint { font-size: 11px; margin-inline-start: auto; }
.ag-swatch { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: 0 0 10px; }
.ag-swatch.big { width: 13px; height: 13px; flex-basis: 13px; box-shadow: 0 0 0 2px #34b3b6; }
.ag-stage { position: relative; display: grid; grid-template-columns: 1fr 270px; height: 540px; }
.ag-svg { width: 100%; height: 100%; display: block; cursor: grab; touch-action: none;
    background: radial-gradient(circle, #d9e1ea 1px, transparent 1.2px) 0 0 / 22px 22px, #fbfcfe; }
.ag-svg:active { cursor: grabbing; }
.ag-link { stroke: #c3ccd8; stroke-width: 1.2; transition: stroke .15s, stroke-width .15s, opacity .15s; }
.ag-link.primary { stroke: #9fb0c3; }
.ag-link.hl { stroke: #0f7a83; stroke-width: 3; }
.ag-link.dim { opacity: .18; }
.ag-node { cursor: pointer; transition: opacity .15s; }
.ag-node text { font-size: 11px; fill: #334155; paint-order: stroke; stroke: #fbfcfe; stroke-width: 4px; stroke-linejoin: round; pointer-events: none; }
.ag-node.process text { font-size: 12.5px; font-weight: 700; fill: #10243a; }
.ag-node .ag-dot { stroke: #fff; stroke-width: 2; }
.ag-node.process .ag-halo { fill: none; stroke: #34b3b6; stroke-width: 2; opacity: .7; }
.ag-node.process.critical .ag-halo { stroke: var(--red); }
.ag-node.center .ag-dot { stroke: #f59e0b; stroke-width: 4; }
.ag-node .ag-center-ring { fill: none; stroke: #f59e0b; stroke-width: 2; stroke-dasharray: 4 3; opacity: .85; }
.ag-node .ag-center-badge { font-size: 10.5px; font-weight: 700; fill: #b45309; }
.ag-node.center text { font-size: 13.5px; font-weight: 800; fill: #10243a; }
.ag-node.far:not(.selected) { opacity: .75; }
.ag-panel-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.ag-panel-actions .btn { margin-top: 8px; }
.ag.ag-full { background: var(--surface); display: flex; flex-direction: column; }
.ag.ag-full .ag-stage { flex: 1; height: auto !important; }
.split-handle { height: 14px; margin: 6px 0; display: flex; align-items: center; justify-content: center; cursor: row-resize;
    border-radius: 6px; touch-action: none; user-select: none; }
.split-handle span { width: 64px; height: 5px; border-radius: 3px; background: #c3ccd8; transition: background .15s, width .15s; }
.split-handle:hover span, .split-handle.dragging span { background: var(--primary); width: 96px; }
.split-handle + .card { margin-top: 0; }
.split-collapsed { margin-bottom: 0 !important; }
.ag-node.selected .ag-dot { stroke: #0f7a83; stroke-width: 4; }
.ag-node.selected text { font-weight: 800; }
.ag-node.dim { opacity: .22; }
.ag-node:hover .ag-dot { filter: brightness(1.15); }
.ag-panel { border-inline-start: 1px solid var(--border); padding: 14px; overflow-y: auto; background: var(--surface); font-size: 13px; }
.ag-panel-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.ag-panel h4 { margin: 14px 0 6px; font-size: 12.5px; }
.ag-panel .btn { margin-top: 8px; }
.ag-list { list-style: none; margin: 0; padding: 0; }
.ag-list li { display: flex; align-items: center; gap: 7px; padding: 4px 0; border-bottom: 1px solid #f1f4f8; }
.ag-link-btn { background: none; border: 0; padding: 0; color: var(--primary); cursor: pointer; text-align: start; font: inherit; }
.ag-link-btn:hover { text-decoration: underline; }
.ag-status { position: absolute; top: 14px; left: 300px; right: 14px; text-align: center; pointer-events: none; }
@media (max-width: 900px) {
    .ag-stage { grid-template-columns: 1fr; height: auto; }
    .ag-svg { height: 420px; }
    .ag-panel { border-inline-start: 0; border-top: 1px solid var(--border); max-height: 260px; }
    .ag-status { left: 14px; }
}

/* ------------------------------------------------------------------ نشان متحرک صفحه ورود (fragments/hero.html، docs/BRAND.md) */
/* اندازه نشان به ارتفاع صفحه بسته است تا نام، سه رکن و توضیح بدون اسکرول زیر آن دیده شوند */
.na-stage { width: clamp(150px, 30vh, 250px); aspect-ratio: 176 / 186; flex: 0 0 auto; pointer-events: none; }
.na-mark { width: 100%; height: 100%; overflow: visible; }
/* گروه‌های متحرک نسبت به دستگاه مختصات SVG می‌چرخند و بزرگ می‌شوند؛ مرکز وجه بالا (64، 37) */
.na-mark g, .na-mark ellipse, .na-mark circle { transform-box: view-box; }
.na-float { animation: na-float 7s ease-in-out infinite; }
.na-floor { fill: #020b10; opacity: .5; filter: blur(5px); transform-origin: 64px 148px; animation: na-floor 7s ease-in-out infinite; }
.na-glow { transform-origin: 64px 58px; animation: na-glow 7s ease-in-out infinite; }
.na-cube path { stroke: #12191a; stroke-width: 4.5; stroke-linejoin: round; }
.na-ring { fill: none; stroke: #fff; stroke-width: 2; stroke-opacity: .9; stroke-dasharray: 3 4.2; animation: na-ring 1.8s linear infinite; }
.na-sway { transform-origin: 64px 37px; animation: na-sway 9s ease-in-out 1.6s infinite; }
.na-needle { transform-origin: 64px 37px; animation: na-open 1.1s cubic-bezier(.34,1.56,.64,1) .35s both; }
.na-needle path { stroke: #12191a; stroke-width: 1.6; stroke-linejoin: round; }
.na-pin { fill: #fff; stroke: #12191a; stroke-width: 1.4; }

.na-text { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; max-width: 560px; }
.na-text > * { animation: na-rise .7s ease-out both; }
.na-text > :nth-child(2) { animation-delay: .08s; }
.na-text > :nth-child(3) { animation-delay: .16s; }
.na-text > :nth-child(n+4) { animation-delay: .24s; }
.na-eyebrow { font-size: 12.5px; font-weight: 600; color: #8fe9eb; padding: 5px 14px; border-radius: 999px;
    background: rgba(52,224,227,.08); border: 1px solid rgba(52,224,227,.25); }
.login-hero .na-sub { font-size: 17px; font-weight: 700; color: #e8f1f8; margin-top: -4px; }
.login-hero .na-desc { font-size: 13.5px; line-height: 1.9; }
.login-hero .na-demo { color: #8aa3b8; font-size: 12.5px; }
/* سه رکن؛ نشانک هر رکن همان شکل و رنگ وجه آن در مکعب است */
.na-pillars { list-style: none; margin: 10px 0 6px; padding: 0; display: flex; gap: 10px; }
.na-pillars li { display: grid; grid-template-columns: auto 1fr; column-gap: 9px; align-items: center; text-align: start; padding: 9px 14px;
    border-radius: 10px; background: rgba(255,255,255,.04); border: 1px solid rgba(127,224,227,.16); }
.na-pillars b { color: #fff; font-size: 14px; }
.na-pillars span { grid-column: 2; color: #9fb7c9; font-size: 11.5px; }
.na-face { grid-row: span 2; display: block; }
.na-face-top { width: 24px; height: 14px; clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); background: linear-gradient(135deg, #4fcbce, #2a9aa1); }
.na-face-light { width: 13px; height: 22px; clip-path: polygon(0 0, 100% 33%, 100% 100%, 0 67%); background: linear-gradient(160deg, #fbfcfc, #cdd3d6); }
.na-face-dark { width: 13px; height: 22px; clip-path: polygon(100% 0, 0 33%, 0 100%, 100% 67%); background: linear-gradient(160deg, #959a9e, #5b6064); }

@keyframes na-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes na-floor { 0%, 100% { transform: scale(1); opacity: .5; } 50% { transform: scale(.88); opacity: .32; } }
@keyframes na-glow { 0%, 100% { transform: scale(.94); opacity: .8; } 50% { transform: scale(1.04); opacity: 1; } }
@keyframes na-ring { to { stroke-dashoffset: -7.2; } }
@keyframes na-open { from { transform: scale(.2, 0); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes na-sway { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(4deg); } 65% { transform: rotate(-3deg); } }
@keyframes na-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (max-height: 760px) { .na-stage { width: clamp(130px, 24vh, 200px); } .login-hero .na-desc { display: none; } }
@media (max-width: 1350px) { .na-pillars span { display: none; } }
@media (prefers-reduced-motion: reduce) {
    .login-hero *, .login-hero *::before { animation: none !important; }
}

/* تاریخچه تغییرات: بندهای هر نسخه */
.changelog { margin: 0; padding-inline-start: 20px; }
.changelog li { margin-bottom: 8px; line-height: 1.9; }
.changelog code { font-size: .92em; }

/* داشبوردها و داشبوردساز (ANALYSIS بخش ۱۰.۱۲) */
.dash-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.dash-cards > .card + .card { margin-top: 0; }
.dash-card-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.dash-card-head .icon { color: var(--primary); }
.dash-card p { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.9; }
.dash-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; align-items: start; }
.dash-grid > .card + .card { margin-top: 0; }
.dash-widget { min-width: 0; }
.dash-widget.w-3 { grid-column: span 3; }
.dash-widget.w-4 { grid-column: span 4; }
.dash-widget.w-6 { grid-column: span 6; }
.dash-widget.w-8 { grid-column: span 8; }
.dash-widget.w-9 { grid-column: span 9; }
.dash-widget.w-12 { grid-column: span 12; }
.dash-widget .card-head strong { font-size: 13.5px; }
.widget-chart { position: relative; }
.widget-kpi { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 4px; text-align: center; }
.widget-kpi strong { font-size: 34px; line-height: 1.2; color: var(--primary); }
.widget-kpi span { color: var(--muted); font-size: 12.5px; }
.widget-table { overflow: auto; }
.widget-tools { display: inline-flex; gap: 3px; flex-wrap: wrap; }
.widget-tools form { display: inline; }
.muted { color: var(--muted); }
.builder-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 20px; }
.builder-preview { position: sticky; top: 12px; align-self: start; }
.builder-preview .dash-widget { grid-column: span 12; }
.code-input { font-family: Consolas, "Courier New", monospace; font-size: 13px; direction: ltr; text-align: left; }
.insert-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.insert-chips .chip { border: 0; cursor: pointer; font: inherit; font-size: 12px; }
.field-ref { margin-top: 12px; }
.field-ref summary { cursor: pointer; font-weight: 600; margin-bottom: 6px; }
.field-ref table { font-size: 12px; }
table.drill .drill-row td { padding: 0; border-bottom: 0; }
table.drill .drill-row td:not(:empty) { padding: 6px 28px 12px 6px; background: var(--surface-2); }
.drill-panel table.grid { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
.drill-panel .drill-row td:not(:empty) { padding: 6px 28px 10px 6px; background: #f3f6fa; }
tr.drill-top td { background: #fff4f4; }
.drill-toggle.open { background: var(--primary-soft); }
@media (max-width: 1100px) {
    .dash-widget.w-3, .dash-widget.w-4 { grid-column: span 6; }
    .dash-widget.w-8, .dash-widget.w-9 { grid-column: span 12; }
    .builder-grid { grid-template-columns: 1fr; }
}
@media (max-width: 700px) { .dash-widget { grid-column: span 12 !important; } }

/* داشبوردساز: مرحله‌ها و ردیف‌های حالت ساده */
.build-step { border-top: 1px solid var(--border, #e5e7eb); padding-top: 12px; margin-top: 12px; }
.build-step:first-child { border-top: 0; margin-top: 0; padding-top: 0; }
.build-step h3 { display: flex; align-items: center; gap: 8px; font-size: 14px; margin: 0 0 10px; flex-wrap: wrap; }
.build-step h3 small { color: var(--muted); font-weight: 400; }
.step-no { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #e6eefc; color: #2459b8; font-size: 12px; font-weight: 700; flex: none; }
.step-no.small { width: 20px; height: 20px; font-size: 11px; background: #eef1f5; color: #4a5568; }
.mode-switch { margin-inline-start: auto; display: inline-flex; gap: 4px; }
.cond-row, .measure-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 8px; padding: 6px 8px; background: #f8fafc; border-radius: 8px; }
.cond-row select, .cond-row input, .measure-row select, .measure-row input { flex: 1 1 140px; min-width: 0; width: auto; }
.cond-row .cond-hint { flex-basis: 100%; margin: 0 28px 0 0; }
.match-row { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.column-picks { display: flex; flex-wrap: wrap; gap: 4px 14px; }
[data-charts][hidden] { display: none !important; }
