/* آینهاده — سامانه داده فروش. Night field: deep green-black, glass panels, the logo's green as light. */
:root {
  --bg: #040b07; --bg-2: #07140d;
  --glass: rgba(255, 255, 255, .035); --glass-2: rgba(255, 255, 255, .06); --glass-3: rgba(255, 255, 255, .09);
  --line: rgba(255, 255, 255, .08); --line-2: rgba(255, 255, 255, .14);
  --ink: #eef7f1; --ink-2: #c3d6ca; --muted: #809b8c;
  --g1: #00c853; --g2: #2be36b; --g3: #a6ff5e; --teal: #19d3c5; --red: #ff7a7a; --amber: #ffc857;
  --r: 22px; --r-sm: 14px;
  --shadow: 0 20px 60px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .05);
  --side: 268px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
html { overflow-x: clip; }
body {
  font-family: Vazirmatn, "Plus Jakarta Sans", Tahoma, sans-serif; font-size: 15px; line-height: 1.6; color: var(--ink);
  background-color: var(--bg); min-height: 100vh; -webkit-font-smoothing: antialiased; font-feature-settings: "ss01";
  background-image:
    radial-gradient(900px 520px at 85% -10%, rgba(0, 200, 83, .17), transparent 60%),
    radial-gradient(700px 500px at 5% 105%, rgba(25, 211, 197, .08), transparent 60%),
    linear-gradient(rgba(255, 255, 255, .02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .02) 1px, transparent 1px);
  background-size: auto, auto, 56px 56px, 56px 56px; background-attachment: fixed;
}
a { color: var(--g3); }
h1, h2, h3 { margin: 0; line-height: 1.35; }
h1 { font-size: 26px; font-weight: 800; letter-spacing: -.01em; }
h2 { font-size: 16.5px; font-weight: 700; }
h3 { font-size: 15px; font-weight: 700; }
.sub, .muted { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
:focus-visible { outline: 2px solid var(--g3); outline-offset: 2px; border-radius: 8px; }
.ico { flex: none; }
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- shell ---------- */
.app { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100vh;
  background: linear-gradient(to left, rgba(255, 255, 255, .028) var(--side), transparent var(--side)); }
.side {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 28px 18px 20px; display: flex; flex-direction: column; gap: 8px;
  border-left: 1px solid var(--line); background: linear-gradient(180deg, rgba(255, 255, 255, .03), rgba(255, 255, 255, 0));
}
.side-brand img { width: 150px; height: auto; display: block; margin: 0 8px 4px; filter: drop-shadow(0 6px 22px rgba(0, 200, 83, .45)); }
.side-sub { margin: 0 10px 16px; font-size: 12.5px; color: var(--muted); }
.fresh { display: flex; align-items: center; gap: 9px; margin: 0 4px 16px; padding: 9px 12px; border-radius: 12px;
  background: rgba(0, 200, 83, .08); border: 1px solid rgba(0, 200, 83, .22); font-size: 12.5px; color: #b9f5cc; }
.fresh i { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--g2);
  box-shadow: 0 0 0 4px rgba(43, 227, 107, .16), 0 0 14px var(--g2); animation: beat 2.6s ease-in-out infinite; }
@keyframes beat { 50% { box-shadow: 0 0 0 7px rgba(43, 227, 107, .05), 0 0 18px var(--g2); } }
.nav { display: grid; gap: 2px; }
.nav-item { position: relative; display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 12px;
  color: var(--ink-2); text-decoration: none; font-size: 14.5px; font-weight: 500; transition: background .15s, color .15s; }
.nav-item .ico { color: var(--muted); transition: color .15s; }
.nav-item:hover { background: var(--glass-2); color: #fff; }
.nav-item:hover .ico { color: var(--g3); }
.nav-item.on { color: #fff; font-weight: 700; background: linear-gradient(270deg, rgba(0, 200, 83, .22), rgba(0, 200, 83, .02)); }
.nav-item.on .ico { color: var(--g3); filter: drop-shadow(0 0 6px rgba(166, 255, 94, .8)); }
.nav-item.on::before { content: ""; position: absolute; right: -18px; top: 10px; bottom: 10px; width: 3px; border-radius: 3px;
  background: var(--g3); box-shadow: 0 0 12px var(--g3); }
.side-user { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px;
  border-radius: 16px; background: var(--glass); border: 1px solid var(--line); }
.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.who b { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who small { display: block; color: var(--muted); font-size: 11.5px; }
.av { width: 38px; height: 38px; border-radius: 12px; flex: none; display: grid; place-items: center; font-weight: 800; font-size: 14px;
  color: #04210f; background: linear-gradient(135deg, var(--g3), var(--g1)); }
.out { display: inline-flex; align-items: center; gap: 6px; padding: 8px; border-radius: 10px; border: 0; background: transparent;
  color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; }
.out:hover { color: var(--red); background: rgba(255, 122, 122, .08); }
.side .out span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.u-acts { display: flex; align-items: center; gap: 2px; flex: none; }
a.out { text-decoration: none; }
.out.acct:hover, .out.acct.on { color: var(--g3); background: rgba(166, 255, 94, .08); }

/* ---------- account: change password ---------- */
.acct-card { max-width: 460px; margin-top: 18px; }
.acct-form { display: grid; gap: 8px; }
.acct-form label { font-size: 13px; font-weight: 600; color: var(--ink-2); margin-top: 6px; }
.acct-form input { font: inherit; padding: 13px 14px; border-radius: 14px; border: 1px solid var(--line-2); background: rgba(0, 0, 0, .3); color: #fff; }
.acct-form input:focus { outline: none; border-color: var(--g2); box-shadow: 0 0 0 4px rgba(43, 227, 107, .15); }
.acct-form .hint { margin: 4px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.8; }
.acct-form button { margin-top: 14px; font: inherit; font-weight: 800; font-size: 15px; padding: 13px; border-radius: 14px; border: 0; cursor: pointer;
  color: #04210f; background: linear-gradient(135deg, var(--g3), var(--g2)); box-shadow: 0 12px 30px rgba(43, 227, 107, .3); }
.acct-form .form-error { margin: 4px 0; }
.pill.warn { color: var(--amber); border-color: rgba(255, 200, 87, .35); background: rgba(255, 200, 87, .08); }
.main-col { min-width: 0; }
.main-col.has-banner { display: flex; flex-direction: column; min-height: 100vh; }
.main-col.has-banner main.flush { height: auto; flex: 1; min-height: 0; }
.viewas { display: flex; align-items: center; justify-content: space-between; gap: 10px 14px; flex-wrap: wrap; padding: 10px 22px;
  background: rgba(25, 211, 197, .1); border-bottom: 1px solid rgba(25, 211, 197, .3); color: var(--ink); font-size: 13.5px; }
.viewas.pend { background: rgba(255, 200, 87, .08); border-bottom-color: rgba(255, 200, 87, .3); }
.viewas .ico { vertical-align: -4px; margin-left: 4px; color: var(--teal); }
.viewas b { font-weight: 800; }
form.inline { display: inline; margin: 0; }
.btn.sm { padding: 6px 11px; font-size: 12.5px; border-radius: 10px; }
.btn.primary { color: #04210f; background: linear-gradient(135deg, var(--g3), var(--g2)); border: 0; font-weight: 800; }
.btn.primary:hover { color: #04210f; box-shadow: 0 10px 26px rgba(43, 227, 107, .35); }
.actions { margin-top: 14px; display: flex; gap: 8px; flex-wrap: wrap; }
#approve p { margin: 8px 0 0; color: var(--ink-2); line-height: 1.9; }
.mtop { display: none; }
main.content { max-width: 1260px; padding: 30px 34px 56px; }
main.flush { height: 100vh; display: flex; flex-direction: column; }
main.bare { max-width: 560px; margin: 14vh auto; padding: 0 20px; }

/* ---------- page head ---------- */
.page-head, .greet { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 22px; }
.controls { display: flex; gap: 10px; flex-wrap: wrap; }
.badges { display: flex; gap: 8px; flex-wrap: wrap; }
.badge { padding: 7px 13px; border-radius: 999px; font-size: 12.5px; background: var(--glass); border: 1px solid var(--line); color: var(--ink-2); }
.badge b { color: var(--g3); font-weight: 700; }

/* ---------- glass cards ---------- */
.card { position: relative; border-radius: var(--r); background: linear-gradient(180deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .018));
  border: 1px solid var(--line); box-shadow: var(--shadow); }
.pad { padding: 22px 24px; }
main.content > * + * { margin-top: 16px; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px 18px; flex-wrap: wrap; margin-bottom: 6px; }
.glow-edge::after { content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none; padding: 1px;
  background: linear-gradient(135deg, rgba(166, 255, 94, .55), rgba(0, 200, 83, .06) 40%, rgba(25, 211, 197, .35));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; }

/* chips, pills */
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.chip.up { color: #9dffbf; background: rgba(43, 227, 107, .12); border: 1px solid rgba(43, 227, 107, .3); }
.chip.down { color: var(--red); background: rgba(255, 122, 122, .1); border: 1px solid rgba(255, 122, 122, .25); }
.chip.zone { color: var(--ink-2); background: var(--glass-2); border: 1px solid var(--line); font-weight: 600; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap;
  color: var(--ink-2); background: var(--glass-2); border: 1px solid var(--line); }
.pill.ok { color: #9dffbf; background: rgba(43, 227, 107, .1); border-color: rgba(43, 227, 107, .28); }
.pill.bad { color: var(--red); background: rgba(255, 122, 122, .1); border-color: rgba(255, 122, 122, .28); }
.pill.gold { color: var(--amber); background: rgba(255, 200, 87, .1); border-color: rgba(255, 200, 87, .3); }
.pill.new { color: var(--teal); background: rgba(25, 211, 197, .1); border-color: rgba(25, 211, 197, .3); }
.pills { display: inline-flex; gap: 6px; }

/* ---------- KPI cards ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.kpis.compact { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.kpi { padding: 18px 18px 0; overflow: hidden; display: flex; flex-direction: column; min-height: 168px; }
.k-top { display: flex; justify-content: space-between; align-items: center; min-height: 40px; }
.k-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--g3);
  background: radial-gradient(circle at 30% 30%, rgba(166, 255, 94, .25), rgba(0, 200, 83, .07)); border: 1px solid rgba(166, 255, 94, .2); }
.k-lb { margin-top: 12px; font-size: 13px; color: var(--muted); }
.k-v { font-size: 30px; font-weight: 800; letter-spacing: -.01em; line-height: 1.25; font-variant-numeric: tabular-nums; }
.k-v small { font-size: 12px; font-weight: 500; color: var(--muted); margin-right: 6px; letter-spacing: 0; }
.k-foot { margin-top: 2px; color: var(--muted); font-size: 12.5px; }
.kpi .spark { display: block; width: calc(100% + 36px); height: 50px; margin: auto -18px 0; }
.kpi:not(:has(.spark)) { padding-bottom: 18px; }
.kpis.compact .kpi { min-height: 0; padding-bottom: 16px; box-shadow: none; background: var(--glass); }
.kpis.compact .k-v { font-size: 24px; }

/* ---------- home ---------- */
.hero { padding: 28px 30px 8px; overflow: hidden; }
.hero-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; }
.kicker { color: var(--g3); font-size: 13.5px; font-weight: 600; }
.hero h2 { margin-top: 6px; font-size: 17px; font-weight: 600; color: var(--ink-2); }
.big { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-top: 2px; }
.big .n { font-size: clamp(44px, 6vw, 80px); font-weight: 900; line-height: 1.08; letter-spacing: -.02em; font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #fff 25%, #b6ffd0); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 28px rgba(43, 227, 107, .22)); }
.big .u { font-size: 22px; font-weight: 700; color: var(--g3); }
.vs { margin-top: 10px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--ink-2); font-size: 14px; }
.legend { display: flex; gap: 16px; font-size: 12.5px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 18px; height: 4px; border-radius: 3px; }
.legend .lg-cur { background: linear-gradient(90deg, var(--g3), var(--teal)); box-shadow: 0 0 8px rgba(43, 227, 107, .6); }
.legend .lg-prev { background: rgba(255, 255, 255, .32); }
.zones { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 13px; }
.zones li { display: grid; grid-template-columns: minmax(7em, 10em) minmax(0, 1fr) auto 3em; align-items: center; gap: 12px; font-size: 14px; }
.z-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tr { display: block; height: 10px; border-radius: 99px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.tr i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(270deg, var(--g3), var(--g1)); box-shadow: 0 0 14px rgba(43, 227, 107, .5); }
.z-val { font-weight: 700; text-align: left; font-variant-numeric: tabular-nums; }
.z-pc { color: var(--muted); font-size: 12.5px; text-align: left; }
.donut-wrap { display: flex; align-items: center; gap: 18px; margin-top: 14px; }
.donut { flex: none; overflow: visible; }
.donut-track { stroke: rgba(255, 255, 255, .05); }
.seg-arc { transition: opacity .15s; cursor: default; }
.seg-arc.hot { filter: drop-shadow(0 0 8px rgba(166, 255, 94, .7)); }
.d-main { fill: #fff; font-family: Vazirmatn; font-size: 22px; font-weight: 800; }
.d-sub { fill: var(--muted); font-family: Vazirmatn; font-size: 11.5px; }
.plist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; flex: 1; min-width: 0; font-size: 13.5px; }
.plist li { display: flex; align-items: center; gap: 8px; }
.plist i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.plist span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plist b { margin-right: auto; font-weight: 700; font-variant-numeric: tabular-nums; }
.dests { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.dest { padding: 18px 18px 16px; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 4px; transition: transform .2s, border-color .2s; }
.dest:hover { transform: translateY(-3px); border-color: rgba(166, 255, 94, .35); }
.dest .d-ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; color: #04210f; margin-bottom: 8px;
  background: linear-gradient(135deg, var(--g3), var(--g1)); box-shadow: 0 8px 24px rgba(0, 200, 83, .35); }
.dest b { font-size: 15px; }
.dest small { color: var(--muted); font-size: 12.5px; }
.dest .d-meta { color: var(--g3); font-size: 12.5px; font-weight: 600; margin-top: 6px; }
.dest .go { position: absolute; left: 16px; top: 18px; color: var(--muted); transition: color .2s, transform .2s; }
.dest:hover .go { color: var(--g3); transform: translateX(-3px); }
.foot { margin: 22px 4px 0; font-size: 12px; color: var(--muted); }

/* ---------- charts ---------- */
.chart { display: block; width: 100%; height: auto; margin-top: 6px; overflow: visible; }
.chart text { font-family: Vazirmatn, sans-serif; }
.chart .grid { stroke: rgba(255, 255, 255, .06); }
.chart .axis { stroke: rgba(255, 255, 255, .12); }
.chart .xl { fill: var(--muted); font-size: 12px; }
.chart .xl.on { fill: var(--ink-2); font-weight: 600; }
.chart .yl { fill: var(--muted); font-size: 11.5px; }
.chart .band { fill: rgba(166, 255, 94, .045); stroke: rgba(166, 255, 94, .12); }
.chart .prev-line { fill: none; stroke: rgba(255, 255, 255, .28); stroke-width: 2; stroke-dasharray: 5 7; }
.chart .dot { fill: var(--g3); }
.chart .flag { fill: rgba(4, 11, 7, .88); stroke: rgba(166, 255, 94, .4); }
.chart .flag-t { fill: #fff; font-size: 13px; font-weight: 700; }
.chart .halo { fill: rgba(166, 255, 94, .18); }
.chart .end { fill: var(--g3); stroke: #04210f; stroke-width: 2; }
.chart .hit { fill: transparent; cursor: crosshair; outline: none; }
.chart.area .hit.hot, .chart.area .hit:focus-visible { fill: rgba(255, 255, 255, .03); }
.chart .col { fill: transparent; }
.chart .bar-prev { fill: rgba(255, 255, 255, .13); }
.chart .bar-cur { filter: drop-shadow(0 0 10px rgba(43, 227, 107, .35)); }
.chart.bars .hit.hot, .chart.bars .hit:focus-visible { fill: rgba(166, 255, 94, .05); }
.chart-m { display: none; }
.chart.m .xl { font-size: 22px; } .chart.m .xl.alt { display: none; } .chart.m .yl { font-size: 19px; }
.chart.m .flag, .chart.m .flag-t { display: none; }
.tip { position: absolute; z-index: 50; pointer-events: none; padding: 9px 12px; border-radius: 12px; min-width: 120px;
  background: rgba(6, 18, 12, .94); border: 1px solid rgba(166, 255, 94, .3); box-shadow: 0 14px 40px rgba(0, 0, 0, .5);
  font-size: 12.5px; color: var(--ink-2); line-height: 1.7; backdrop-filter: blur(10px); }
.tip .t1 { color: #fff; font-weight: 700; font-size: 13px; }
.tip .up { color: #9dffbf; font-weight: 700; } .tip .down { color: var(--red); font-weight: 700; }

/* ---------- segmented ---------- */
.segmented { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line);
  max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.segmented::-webkit-scrollbar { display: none; }
.seg { padding: 7px 15px; border-radius: 999px; color: var(--ink-2); text-decoration: none; font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.seg:hover { color: #fff; background: var(--glass-2); }
.seg.on { color: #04210f; font-weight: 800; background: linear-gradient(135deg, var(--g3), var(--g2)); box-shadow: 0 6px 18px rgba(43, 227, 107, .35); }

/* ---------- tables ---------- */
.tbl-wrap { overflow-x: auto; position: relative; margin-top: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 11px 12px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
thead th { color: var(--muted); font-weight: 600; font-size: 12.5px; border-bottom: 1px solid var(--line-2); }
tbody th { font-weight: 600; color: var(--ink); }
td { color: var(--ink-2); font-variant-numeric: tabular-nums; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: var(--glass); }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
td.strong, .strong { font-weight: 800; color: var(--ink); }
tr.current { background: linear-gradient(270deg, rgba(0, 200, 83, .14), rgba(0, 200, 83, .03)); }
tr.zero td, tr.zero th { color: var(--muted); }
.barcell { width: 22%; min-width: 120px; }
.hbar { display: block; height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.hbar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(270deg, var(--g3), var(--g1)); box-shadow: 0 0 10px rgba(43, 227, 107, .45); }

/* ---------- people ---------- */
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-top: 14px; }
.pcard { display: flex; flex-direction: column; gap: 12px; padding: 18px; text-decoration: none; color: var(--ink); transition: transform .2s, border-color .2s; }
.pcard:hover { transform: translateY(-3px); border-color: rgba(166, 255, 94, .35); }
.pc-top { display: flex; align-items: center; gap: 12px; }
.pc-top b { display: block; font-size: 15.5px; } .pc-top small { color: var(--muted); font-size: 12.5px; }
.mono { width: 48px; height: 48px; border-radius: 16px; flex: none; display: grid; place-items: center; font-weight: 800; font-size: 17px;
  color: #04210f; background: linear-gradient(135deg, var(--g3), var(--g1)); box-shadow: 0 8px 24px rgba(0, 200, 83, .3); }
.mono.support { background: linear-gradient(135deg, #7ff3e8, var(--teal)); box-shadow: 0 8px 24px rgba(25, 211, 197, .28); }
.pc-zones { display: flex; flex-wrap: wrap; gap: 5px; }
.pc-foot { display: grid; gap: 2px; padding-top: 12px; border-top: 1px solid var(--line); }
.pc-foot span { color: var(--muted); font-size: 12.5px; }
.pc-foot b { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.pc-foot b small { font-size: 12px; color: var(--muted); font-weight: 500; margin-right: 4px; }
.group-title { display: flex; align-items: center; gap: 10px; margin-top: 26px; }
.group-title:first-of-type { margin-top: 4px; }
.group-title .count { color: var(--muted); font-size: 13px; }

/* ---------- portal ---------- */
.person-head { display: flex; align-items: center; gap: 18px 22px; flex-wrap: wrap; padding: 22px 24px; margin-bottom: 16px; overflow: hidden; }
.person-head .mono { width: 72px; height: 72px; border-radius: 22px; font-size: 26px; box-shadow: 0 0 0 6px rgba(166, 255, 94, .08), 0 14px 40px rgba(0, 200, 83, .35); }
.person-head .mono.support { box-shadow: 0 0 0 6px rgba(25, 211, 197, .1), 0 14px 40px rgba(25, 211, 197, .3); }
.ph-text { flex: 1; min-width: 220px; }
.ph-zones { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.zl { font-size: 12.5px; color: var(--muted); margin-left: 2px; }
.reach { --p: 0; display: flex; align-items: center; gap: 12px; }
.reach b { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; font-size: 21px; font-weight: 800;
  background: radial-gradient(closest-side, #0b1a12 76%, transparent 78% 100%), conic-gradient(var(--g3) 0, var(--g2) calc(var(--p) * 1%), rgba(255, 255, 255, .08) 0);
  filter: drop-shadow(0 0 10px rgba(43, 227, 107, .35)); }
.reach span { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
table.progress td.pcell { width: 26%; min-width: 150px; }
table.progress th, table.progress td { padding-inline: 9px; }
table.progress td.lv { color: var(--muted); font-size: 13px; }
.pbar { position: relative; height: 10px; border-radius: 99px; background: rgba(255, 255, 255, .06); }
.pbar span { position: absolute; inset-block: 0; inset-inline-start: 0; border-radius: 99px; background: rgba(255, 255, 255, .22); }
.pbar.l1 span { background: linear-gradient(270deg, #7ff3e8, var(--teal)); }
.pbar.l2 span { background: linear-gradient(270deg, var(--g2), var(--g1)); box-shadow: 0 0 10px rgba(43, 227, 107, .4); }
.pbar.l3 span { background: linear-gradient(270deg, var(--g3), var(--g2)); box-shadow: 0 0 14px rgba(166, 255, 94, .55); }
.pbar .mark { position: absolute; top: -4px; bottom: -4px; width: 2px; border-radius: 2px; background: var(--amber); transform: translateX(50%);
  box-shadow: 0 0 6px rgba(255, 200, 87, .6); }
.lvwrap { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.lvl { display: inline-block; padding: 2px 11px; border-radius: 999px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.lvl.l0 { color: var(--muted); border: 1px dashed var(--line-2); font-weight: 600; }
.lvl.l1 { color: var(--teal); background: rgba(25, 211, 197, .1); border: 1px solid rgba(25, 211, 197, .3); }
.lvl.l2 { color: #04210f; background: var(--g2); }
.lvl.l3 { color: #04210f; background: linear-gradient(135deg, var(--g3), var(--g2)); box-shadow: 0 0 14px rgba(166, 255, 94, .5); }
.kind { font-size: 12.5px; color: var(--muted); }

.bonus-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: start; margin-top: 14px; }
.bonus-grid .statement { order: -1; }
@media (min-width: 1480px) {
  .bonus-grid { grid-template-columns: minmax(0, 1fr) 330px; }
  .bonus-grid .statement { order: 0; position: sticky; top: 20px; }
}
.statement { position: relative; border-radius: 20px; padding: 20px; background: linear-gradient(160deg, rgba(166, 255, 94, .1), rgba(0, 200, 83, .03) 45%, rgba(25, 211, 197, .06));
  border: 1px solid rgba(166, 255, 94, .22); }
.statement h3 { color: var(--g3); }
.steps { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 2px; }
.steps > li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 2px 10px; padding: 7px 0; font-size: 14px; }
.steps > li > span { color: var(--ink-2); }
.steps > li > b { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.steps > li.total { border-top: 1px solid rgba(166, 255, 94, .2); margin-top: 4px; padding-top: 11px; }
.steps > li.total > span, .steps > li.total > b { color: #fff; font-weight: 800; }
.steps .eq { display: none; font-style: normal; }
.steps .sub { grid-column: 1 / -1; list-style: none; margin: 2px 0 0; padding: 0 14px 0 0; display: grid; gap: 2px; }
.steps .sub li { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--muted); }
.steps .sub li span::before { content: "علی‌الحساب "; }
.pay { margin-top: 12px; padding: 14px 16px; border-radius: 16px; background: rgba(4, 11, 7, .6); border: 1px solid rgba(166, 255, 94, .3);
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 10px; box-shadow: inset 0 0 40px rgba(43, 227, 107, .08); }
.pay span { font-weight: 700; color: var(--ink-2); }
.pay b { font-size: 27px; font-weight: 900; letter-spacing: -.01em; font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #fff 10%, var(--g3)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pay small { width: 100%; text-align: end; font-size: 11.5px; color: var(--muted); }
.fine { margin: 12px 0 0; font-size: 12px; color: var(--muted); }
@media (min-width: 641px) and (max-width: 1479px) {
  .statement .steps { grid-template-columns: repeat(auto-fit, minmax(138px, 1fr)); gap: 8px; align-content: start; }
  .steps > li { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 11px 13px; margin: 0;
    border: 1px solid var(--line); border-radius: 14px; background: rgba(4, 11, 7, .45); }
  .steps > li.total { padding-top: 11px; border-color: rgba(166, 255, 94, .35); background: rgba(166, 255, 94, .08); }
  .steps > li > span { font-size: 12.5px; }
  .steps > li > b { font-size: 16px; }
  .steps .eq { display: inline; }
  .steps .sub { width: 100%; padding: 6px 0 0; margin-top: 2px; border-top: 1px dashed var(--line-2); }
  .steps .sub li span::before { content: none; }
  .pay { padding: 16px 20px; align-items: center; }
  .pay b { font-size: 34px; margin-inline-start: auto; }
  .pay small { width: auto; }
}

/* ---------- dashboards ---------- */
.dash-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 26px;
  border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .02); }
.dash-bar h1 { font-size: 19px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 15px; border-radius: 12px; font: inherit; font-size: 14px; font-weight: 600;
  text-decoration: none; cursor: pointer; border: 1px solid var(--line-2); color: var(--ink-2); background: var(--glass); }
.btn:hover { color: #fff; border-color: rgba(166, 255, 94, .4); }
.dash-frame { flex: 1; width: 100%; border: 0; display: block; background: transparent; color-scheme: dark; }

/* ---------- notices ---------- */
.notice { margin-top: 18px; padding: 20px 22px; border-radius: var(--r); background: var(--glass); border: 1px solid var(--line); }
.notice p { margin: 0; color: var(--ink-2); }
.notice a { font-weight: 700; margin-right: 6px; }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(360px, 1fr); }
.l-brand { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: 56px 60px 0;
  background: radial-gradient(700px 500px at 70% 20%, rgba(0, 200, 83, .22), transparent 65%), radial-gradient(600px 400px at 20% 90%, rgba(25, 211, 197, .12), transparent 60%);
  border-left: 1px solid var(--line); }
.l-logo { width: 230px; height: auto; filter: drop-shadow(0 10px 40px rgba(0, 200, 83, .55)); }
.l-copy { position: relative; z-index: 1; margin-top: 64px; }
.l-copy h1 { font-size: clamp(28px, 3.2vw, 42px); font-weight: 900; line-height: 1.3;
  background: linear-gradient(180deg, #fff 30%, #b6ffd0); -webkit-background-clip: text; background-clip: text; color: transparent; }
.l-copy p { margin: 12px 0 0; color: var(--ink-2); font-size: 15px; }
.l-copy .l-unit { margin-top: 4px; color: var(--g3); font-size: 13.5px; font-weight: 600; }
.l-wave { display: block; width: calc(100% + 120px); height: 300px; margin: 30px -60px 0; }
.l-form { display: grid; place-items: center; padding: 40px 24px; }
.l-form form { width: 100%; max-width: 380px; display: grid; gap: 8px; padding: 32px 30px; }
.l-form h2 { font-size: 26px; font-weight: 900; }
.l-form .muted { margin: 0 0 14px; }
.l-form label { font-size: 13px; font-weight: 600; color: var(--ink-2); margin-top: 6px; }
.l-form input { font: inherit; padding: 13px 14px; border-radius: 14px; border: 1px solid var(--line-2); background: rgba(0, 0, 0, .3); color: #fff; }
.l-form input:focus { outline: none; border-color: var(--g2); box-shadow: 0 0 0 4px rgba(43, 227, 107, .15); }
.l-form button { margin-top: 18px; font: inherit; font-weight: 800; font-size: 15px; padding: 14px; border-radius: 14px; border: 0; cursor: pointer;
  color: #04210f; background: linear-gradient(135deg, var(--g3), var(--g2)); box-shadow: 0 12px 30px rgba(43, 227, 107, .35); transition: transform .15s, box-shadow .15s; }
.l-form button:hover { transform: translateY(-1px); box-shadow: 0 16px 36px rgba(43, 227, 107, .45); }
.form-error { margin: 0 0 6px; padding: 10px 12px; border-radius: 12px; background: rgba(255, 122, 122, .1); border: 1px solid rgba(255, 122, 122, .25); color: var(--red); font-size: 13.5px; }

/* ---------- mid widths ---------- */
@media (max-width: 1180px) {
  :root { --side: 232px; }
  main.content { padding: 26px 24px 48px; }
  .barcell { display: none; }
  th, td { padding-inline: 10px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis.compact { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .nav-item { font-size: 14px; padding: 10px 12px; }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .chart .xl { font-size: 17px; } .chart .yl { font-size: 16px; }
  .chart .flag, .chart .flag-t { display: none; }
}
/* target progress between phone and wide desktop: the values on one line, the bar under them */
@media (min-width: 641px) and (max-width: 1180px) {
  table.progress, table.progress thead, table.progress tbody { display: block; }
  table.progress tr {
    display: grid; grid-template-columns: minmax(0, 1.8fr) repeat(5, minmax(0, 1fr)) minmax(0, 1.15fr) minmax(0, 1fr);
    grid-template-areas: "name vol c1 c2 c3 pc lvl nx" "bar bar bar bar bar bar bar bar";
    gap: 8px 10px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: center;
  }
  table.progress tbody tr:last-child { border-bottom: 0; }
  table.progress thead tr { grid-template-areas: "name vol c1 c2 c3 pc lvl nx"; padding: 0 0 8px; border-bottom: 1px solid var(--line-2); }
  table.progress tr > * { display: block; padding: 0; border: 0; white-space: normal; }
  table.progress tbody tr:hover { background: none; }
  table.progress tr > :first-child { grid-area: name; }
  table.progress .vol { grid-area: vol; } table.progress .pc { grid-area: pc; } table.progress .nx { grid-area: nx; }
  table.progress .c1 { grid-area: c1; } table.progress .c2 { grid-area: c2; } table.progress .c3 { grid-area: c3; }
  table.progress .lvcell { grid-area: lvl; display: flex; flex-wrap: wrap; gap: 4px; }
  table.progress td.pcell { grid-area: bar; width: auto; min-width: 0; }
  table.progress th.pcell { display: none; }
}
@media (max-width: 980px) {
  .app { grid-template-columns: minmax(0, 1fr); background: none; }
  .side { display: none; }
  .mtop { display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 20; padding: 10px 16px;
    background: rgba(4, 11, 7, .78); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
  .mtop img { height: 32px; width: auto; display: block; filter: drop-shadow(0 4px 14px rgba(0, 200, 83, .45)); }
  .mnav { position: relative; }
  .mnav summary { list-style: none; cursor: pointer; padding: 7px; border-radius: 10px; color: var(--ink); border: 1px solid var(--line); }
  .mnav summary::-webkit-details-marker { display: none; }
  .mnav nav { position: absolute; inset-inline-end: 0; top: 50px; width: min(290px, 84vw); padding: 8px; border-radius: 18px;
    background: #08160f; border: 1px solid var(--line-2); box-shadow: 0 24px 60px rgba(0, 0, 0, .7); display: grid; gap: 2px; z-index: 30; }
  .mnav .nav-item.on::before { display: none; }
  .mnav .out { justify-content: flex-start; padding: 11px 14px; }
  .mnav .out span { position: static; width: auto; height: auto; clip-path: none; }
  main.content { padding: 20px 16px 44px; }
  main.flush { height: calc(100vh - 57px); }
  .login { grid-template-columns: minmax(0, 1fr); }
  .l-brand { padding: 34px 26px 0; border-left: 0; border-bottom: 1px solid var(--line); }
  .l-logo { width: 150px; }
  .l-copy { margin-top: 26px; }
  .l-wave { height: 140px; margin: 10px -26px 0; width: calc(100% + 52px); }
}
@media (max-width: 640px) {
  body { font-size: 14.5px; }
  h1 { font-size: 22px; }
  .card.pad, .pad { padding: 18px 16px; }
  .hero { padding: 22px 18px 6px; }
  .big .u { font-size: 18px; }
  .kpis, .kpis.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .kpi { padding: 14px 14px 0; min-height: 150px; }
  .kpi .spark { width: calc(100% + 28px); margin: auto -14px 0; height: 42px; }
  .k-ic { width: 34px; height: 34px; border-radius: 10px; }
  .k-v { font-size: 22px; }
  .kpi:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .zones li { grid-template-columns: 6.5em minmax(0, 1fr) auto; }
  .z-pc { display: none; }
  .donut-wrap { flex-direction: column; align-items: stretch; }
  .donut { align-self: center; }
  .chart-d { display: none; } .chart-m { display: block; }
  .k-v small { display: block; margin: 0; }
  .kpis.compact .kpi { padding: 12px 14px; }
  .kpis.compact .k-ic { width: 30px; height: 30px; border-radius: 9px; }
  .kpis.compact .k-ic .ico { width: 17px; height: 17px; }
  .kpis.compact .k-top { min-height: 30px; }
  .kpis.compact .k-lb { margin-top: 8px; }
  .dests { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .dest { padding: 14px; }
  .dest small { display: none; }
  .dest .d-ic { width: 38px; height: 38px; border-radius: 12px; }
  .dest .go { display: none; }
  .l-brand { padding: 24px 22px 0; }
  .l-logo { width: 116px; }
  .l-copy { margin-top: 16px; }
  .l-copy h1 { font-size: 23px; }
  .l-copy p { font-size: 13.5px; margin-top: 6px; }
  .l-wave { height: 80px; margin: 6px -22px 0; width: calc(100% + 44px); }
  .l-form { padding: 22px 16px 40px; place-items: start center; }
  .l-form form { padding: 24px 20px; }
  .person-head { padding: 18px 16px; }
  .person-head .mono { width: 58px; height: 58px; font-size: 21px; border-radius: 18px; }
  .dash-bar { padding: 12px 16px; }
  .opt { display: none; }
  /* target progress: one card per item */
  table.progress thead { display: none; }
  table.progress, table.progress tbody { display: block; }
  table.progress tr {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 12px; padding: 14px 0;
    grid-template-areas: "name name lvl" "bar bar bar" "vol pc nx" "c1 c2 c3"; border-bottom: 1px solid var(--line);
  }
  table.progress tr:last-child { border-bottom: 0; }
  table.progress tr > * { display: block; padding: 0; border: 0; white-space: normal; }
  table.progress tbody tr:hover { background: none; }
  table.progress th[scope=row] { grid-area: name; font-size: 15px; align-self: center; }
  table.progress td.lvcell { grid-area: lvl; display: flex; flex-wrap: wrap; justify-content: flex-end; align-self: center; }
  table.progress td.pcell { grid-area: bar; width: auto; min-width: 0; }
  table.progress td.vol { grid-area: vol; font-weight: 700; color: var(--ink); }
  table.progress td.pc { grid-area: pc; } table.progress td.nx { grid-area: nx; }
  table.progress td.c1 { grid-area: c1; } table.progress td.c2 { grid-area: c2; } table.progress td.c3 { grid-area: c3; }
  table.progress td[data-l]::before { content: attr(data-l); display: block; font-size: 11.5px; font-weight: 400; color: var(--muted); }
  /* stacked tables: name and status on top, then label / value lines */
  table.stack { border-collapse: separate; border-spacing: 0; }
  table.stack thead { display: none; }
  table.stack, table.stack tbody { display: block; }
  table.stack tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 13px 0; border-bottom: 1px solid var(--line); }
  table.stack tr:last-child { border-bottom: 0; }
  table.stack tr > * { display: block; padding: 0; border: 0; white-space: normal; }
  table.stack tbody tr:hover { background: none; }
  table.stack tr.current { margin: 0 -10px; padding: 13px 10px; border-radius: 14px; border-bottom: 0; }
  table.stack th[scope=row] { grid-row: 1; grid-column: 1; font-size: 15px; align-self: center; }
  table.stack td.lead { grid-row: 1; grid-column: 2; align-self: center; }
  table.stack td[data-l] { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; }
  table.stack td[data-l]::before { content: attr(data-l); color: var(--muted); font-weight: 400; }
}
@media (prefers-reduced-motion: reduce) { *, *::before { transition: none !important; animation: none !important; } }

/* ---------- «تحلیل فروش» (read straight from the database) ---------- */
.nav-new { margin-right: auto; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; color: #04210f;
  background: linear-gradient(135deg, var(--g3), var(--g2)); }
.sales-tabs { display: flex; justify-content: space-between; align-items: center; gap: 10px 16px; flex-wrap: wrap; margin-bottom: 16px; }
.zones.rank { margin-top: 10px; gap: 11px; }
.zones.rank li { grid-template-columns: minmax(7em, 13em) minmax(0, 1fr) auto 5.2em; font-size: 13.5px; }
.zones.rank .z-pc { text-align: left; }
.zones.rank .chip, .zones.rank .pill { font-size: 11.5px; padding: 2px 8px; }
.stack-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.stack-col > * + * { margin-top: 0 !important; }
.grid-2.even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.kpis.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mix-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 6px 12px; padding: 12px 0;
  border-bottom: 1px solid var(--line); font-size: 14px; }
.mix-row:last-child { border-bottom: 0; padding-bottom: 0; }
.mix-row b { font-size: 17px; font-variant-numeric: tabular-nums; }
.mix-row .hbar { grid-column: 1 / -1; }
.mix-row small { grid-column: 1 / -1; color: var(--muted); font-size: 12.5px; }
.rk { display: inline-grid; place-items: center; min-width: 24px; height: 24px; margin-left: 8px; border-radius: 8px; font-size: 12px;
  color: var(--ink-2); background: var(--glass-2); font-weight: 700; }
.pname { display: inline-block; max-width: 34ch; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
.feat { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px 20px; flex-wrap: wrap; padding: 16px 0 4px; }
.feat + .feat { border-top: 1px solid var(--line); }
.feat h3 a { color: var(--ink); text-decoration: none; } .feat h3 a:hover { color: var(--g3); }
.feat-t { flex: 1; min-width: 260px; }
.recon { margin: 10px 0 0; color: var(--ink-2); font-size: 13.5px; line-height: 1.9; }
.recon-bad { margin: 6px 0 0; padding-right: 18px; color: var(--red); font-size: 12.5px; }
@media (max-width: 980px) { .grid-2.even { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) {
  .sales-tabs { flex-direction: column; align-items: stretch; }
  .page-head .controls { width: 100%; flex-direction: column; flex-wrap: nowrap; min-width: 0; }
  .sales-tabs .segmented, .page-head .controls .segmented { width: 100%; min-width: 0; flex: none; }
  .zones.rank li { grid-template-columns: minmax(0, 1fr) auto 4.6em; row-gap: 5px; }
  .zones.rank .z-name { grid-column: 1 / 2; }
  .zones.rank .tr { grid-column: 1 / -1; grid-row: 2; }
  .zones.rank .z-pc { display: block; }
  .kpis.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pname { max-width: 22ch; }
  table.sales-t td.opt { display: none; }
  table.sales-t tr { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 14px; }
  table.sales-t th[scope=row] { grid-column: 1; }
  table.sales-t td.lead { grid-column: 2; justify-self: end; font-size: 16px; }
  table.sales-t td[data-l] { grid-column: auto; flex-direction: column; justify-content: flex-start; gap: 1px; font-size: 14px; }
  table.sales-t td[data-l]::before { font-size: 11.5px; }
  table.sales-t td[data-l] .chip, table.sales-t td[data-l] .pill { align-self: flex-start; }
}
.pick-row { margin-bottom: 14px; }
.who-h { font-size: 20px; margin: 4px 2px 14px; display: flex; align-items: center; gap: 10px; }
.prev-v { display: block; color: var(--muted); font-size: 11.5px; font-weight: 400; }
tr.zero .muted-row { color: var(--muted); }
.hbar.sm { height: 5px; margin-top: 6px; }
.hist-note { margin: 10px 4px 0; }
