/* ===== تم‌ها ===== */
:root, [data-theme="aurora"] {
  --bg: #05060f; --bg2: #0b0b22;
  --a1: #8b5cf6; --a2: #22d3ee; --a3: #f472b6;
  --on-accent: #ffffff;
}
[data-theme="graphite"] {
  --bg: #07090d; --bg2: #10151d;
  --a1: #3b82f6; --a2: #94a3b8; --a3: #38bdf8;
  --on-accent: #ffffff;
}
[data-theme="ocean"] {
  --bg: #020d12; --bg2: #04202a;
  --a1: #14b8a6; --a2: #38bdf8; --a3: #a3e635;
  --on-accent: #01171a;
}
[data-theme="sunset"] {
  --bg: #0e050c; --bg2: #24091a;
  --a1: #f97316; --a2: #ec4899; --a3: #facc15;
  --on-accent: #ffffff;
}
:root {
  --card: rgba(13, 15, 34, .72);
  --card-solid: #0e1026;
  --field: rgba(4, 5, 14, .7);
  --line: rgba(255, 255, 255, .07);
  --line2: rgba(255, 255, 255, .13);
  --text: #f1f2fb;
  --muted: #8a90aa;
  --green: #34d399; --amber: #fbbf24; --red: #fb7185;
  --grad: linear-gradient(115deg, var(--a1), var(--a2));
  --grad3: linear-gradient(115deg, var(--a1), var(--a2) 55%, var(--a3));
  --radius: 22px;
  --side: 264px;
  --font: "Vazirmatn", "Vazir", Tahoma, system-ui, sans-serif;
  --mono: ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.7; min-height: 100vh; overflow-x: hidden; transition: background .5s; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--a2); }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.ltr { direction: ltr; unicode-bidi: isolate; }
.mono { font-family: var(--mono); direction: ltr; unicode-bidi: isolate; }
svg.i { width: 18px; height: 18px; flex: none; }
.spacer { flex: 1; }
.gtext { background: var(--grad3); -webkit-background-clip: text; background-clip: text; color: transparent; }
::selection { background: color-mix(in srgb, var(--a1) 55%, transparent); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 99px; border: 3px solid transparent; background-clip: padding-box; }

/* ===== پس‌زمینه: شفق، مدار، کف شبکه‌ای ===== */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; background: radial-gradient(120% 80% at 80% -10%, var(--bg2), var(--bg) 60%); }
.bg .aur { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5; mix-blend-mode: screen; will-change: transform; }
.bg .a1 { width: 900px; height: 340px; top: -120px; right: -100px; background: conic-gradient(from 90deg, var(--a1), var(--a2), var(--a3), var(--a1)); animation: aur1 26s ease-in-out infinite alternate; }
.bg .a2 { width: 700px; height: 260px; top: 30%; left: -260px; background: conic-gradient(from 200deg, var(--a2), transparent, var(--a1)); opacity: .3; animation: aur2 34s ease-in-out infinite alternate; }
.bg .a3 { width: 520px; height: 520px; bottom: -280px; right: 20%; background: radial-gradient(var(--a3), transparent 65%); opacity: .18; animation: aur2 40s ease-in-out infinite alternate-reverse; }
@keyframes aur1 { 0% { transform: rotate(-8deg) translateX(0); } 100% { transform: rotate(10deg) translateX(-220px) scaleY(1.3); } }
@keyframes aur2 { to { transform: translate(200px, -120px) rotate(25deg); } }
.bg .orbit { position: absolute; border-radius: 50%; border: 1px solid rgba(255,255,255,.05); }
.bg .o1 { width: 760px; height: 760px; top: -420px; left: -260px; animation: spin 90s linear infinite; }
.bg .o2 { width: 1200px; height: 1200px; top: -660px; left: -480px; border-style: dashed; border-color: rgba(255,255,255,.035); animation: spin 160s linear infinite reverse; }
.bg .orbit b { position: absolute; top: 50%; right: -4px; width: 8px; height: 8px; border-radius: 50%; background: var(--a2); box-shadow: 0 0 16px 3px var(--a2); }
.bg .o2 b { background: var(--a3); box-shadow: 0 0 16px 3px var(--a3); right: auto; left: 50%; top: -4px; }
@keyframes spin { to { transform: rotate(360deg); } }
.bg .floor { position: absolute; left: -50%; right: -50%; bottom: -10%; height: 55%; transform: perspective(600px) rotateX(62deg); transform-origin: bottom; background-image: linear-gradient(color-mix(in srgb, var(--a1) 45%, transparent) 1px, transparent 1px), linear-gradient(90deg, color-mix(in srgb, var(--a1) 45%, transparent) 1px, transparent 1px); background-size: 64px 64px; opacity: .22; -webkit-mask-image: linear-gradient(to top, #000 10%, transparent 85%); mask-image: linear-gradient(to top, #000 10%, transparent 85%); animation: floor 6s linear infinite; }
@keyframes floor { to { background-position: 0 64px, 0 0; } }
.bg .stars { position: absolute; inset: 0; opacity: .55; background-image: radial-gradient(1px 1px at 12% 22%, #fff, transparent), radial-gradient(1px 1px at 72% 12%, #fff, transparent), radial-gradient(1.5px 1.5px at 42% 48%, #fff, transparent), radial-gradient(1px 1px at 88% 42%, #fff, transparent), radial-gradient(1px 1px at 22% 62%, #fff, transparent), radial-gradient(1.5px 1.5px at 58% 24%, #fff, transparent), radial-gradient(1px 1px at 32% 8%, #fff, transparent), radial-gradient(1px 1px at 6% 36%, #fff, transparent), radial-gradient(1px 1px at 64% 58%, #fff, transparent); animation: tw 5s ease-in-out infinite alternate; }
@keyframes tw { to { opacity: .2; } }
.bg .noise { position: absolute; inset: 0; opacity: .05; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E"); }
@media (prefers-reduced-motion: reduce) { .bg *, .flow, .radar .sweep { animation: none !important; } }

/* ===== لوگو ===== */
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); flex: none; }
.brand b { font-size: 18px; font-weight: 900; direction: ltr; letter-spacing: -.3px; display: block; line-height: 1.2; }
.brand small { display: block; color: var(--muted); font-size: 11.5px; }
.logo { width: 40px; height: 40px; border-radius: 13px; background: var(--grad3); display: grid; place-items: center; flex: none; box-shadow: 0 10px 30px -8px var(--a1), inset 0 1px 0 rgba(255,255,255,.4); position: relative; overflow: hidden; }
.logo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.45) 50%, transparent 70%); transform: translateX(-120%); animation: shine 5s ease-in-out infinite; }
@keyframes shine { 60%, 100% { transform: translateX(120%); } }
.logo svg { width: 24px; height: 24px; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; filter: drop-shadow(0 0 4px rgba(255,255,255,.7)); }
.brand.big { justify-content: center; }
.brand.big b { font-size: 26px; }
.brand.big .logo { width: 54px; height: 54px; border-radius: 17px; }
.brand.big .logo svg { width: 30px; height: 30px; }

/* ===== منوی کناری ===== */
.side { position: fixed; top: 14px; bottom: 14px; right: 14px; width: var(--side); z-index: 30; display: flex; flex-direction: column; gap: 26px; padding: 22px 16px 18px; border-radius: 28px; background: linear-gradient(180deg, rgba(16,18,40,.78), rgba(8,9,22,.82)); -webkit-backdrop-filter: blur(22px) saturate(1.4); backdrop-filter: blur(22px) saturate(1.4); border: 1px solid var(--line); box-shadow: 0 30px 80px -30px #000, inset 0 1px 0 rgba(255,255,255,.06); }
.side .brand { padding: 0 8px; }
nav.tabs { display: flex; flex-direction: column; gap: 4px; }
nav.tabs a { position: relative; display: flex; align-items: center; gap: 13px; color: var(--muted); text-decoration: none; padding: 11px 14px; border-radius: 15px; font-weight: 600; font-size: 14.5px; transition: color .2s, background .2s; }
nav.tabs a svg { width: 20px; height: 20px; }
nav.tabs a:hover { color: var(--text); background: rgba(255,255,255,.04); }
nav.tabs a.on { color: var(--text); background: linear-gradient(270deg, color-mix(in srgb, var(--a1) 30%, transparent), color-mix(in srgb, var(--a2) 6%, transparent)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--a1) 35%, transparent); }
nav.tabs a.on::before { content: ""; position: absolute; right: -16px; top: 22%; bottom: 22%; width: 4px; border-radius: 4px 0 0 4px; background: var(--grad); box-shadow: 0 0 14px var(--a2); }
nav.tabs a.on svg { color: var(--a2); filter: drop-shadow(0 0 6px var(--a2)); }
nav.tabs a .cnt { margin-inline-start: auto; min-width: 21px; height: 21px; border-radius: 99px; background: var(--red); color: #fff; font-size: 11px; display: grid; place-items: center; padding: 0 6px; box-shadow: 0 0 12px rgba(251,113,133,.6); }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 14px; padding: 16px 8px 0; border-top: 1px solid var(--line); }
.side-live { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.live i { display: block; width: 9px; height: 9px; border-radius: 50%; background: #4b5565; }
.live.on i { background: var(--green); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(52,211,153,.6); } 70% { box-shadow: 0 0 0 9px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.swatches { display: flex; gap: 10px; }
.swatches button { width: 30px; height: 30px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0; transition: transform .15s; box-shadow: inset 0 0 0 2px rgba(0,0,0,.35); }
.swatches button:hover { transform: scale(1.12); }
.swatches button.on { border-color: #fff; box-shadow: 0 0 16px -2px var(--a1), inset 0 0 0 2px rgba(0,0,0,.35); }
.mtop, .bottom-tabs { display: none; }

/* ===== بدنه ===== */
.main { margin-right: calc(var(--side) + 28px); padding: 26px 34px 60px 34px; max-width: 1760px; }
.pagebar { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.pagebar h1 { margin: 0; font-size: 32px; font-weight: 900; letter-spacing: -.5px; line-height: 1.3; background: linear-gradient(90deg, var(--text) 30%, color-mix(in srgb, var(--a2) 80%, var(--text))); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pagebar .sub { color: var(--muted); font-size: 13.5px; }
.clock { text-align: left; padding: 8px 18px; border-radius: 16px; background: rgba(255,255,255,.03); border: 1px solid var(--line); line-height: 1.4; }
.clock b { display: block; font-size: 20px; font-weight: 800; direction: ltr; font-variant-numeric: tabular-nums; }
.clock span { color: var(--muted); font-size: 12px; }
main { animation: rise .4s ease; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
.page-h { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.page-h h2, .page-h > .sub { display: none; }
.page-h:not(:has(.btn, .seg)) { display: none; }
.section-h { display: flex; align-items: center; gap: 12px; margin: 34px 0 16px; }
.section-h h3 { margin: 0; font-size: 18px; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.section-h h3::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--grad); box-shadow: 0 0 12px var(--a1); transform: rotate(45deg); }
.section-h span { color: var(--muted); font-size: 13.5px; }
.section-h::after { content: ""; flex: 1; height: 1px; background: linear-gradient(270deg, var(--line2), transparent); }

/* کارت با حاشیه گرادیانی */
.box { position: relative; border-radius: var(--radius); background: linear-gradient(var(--card), var(--card)) padding-box, linear-gradient(140deg, color-mix(in srgb, var(--a1) 45%, transparent), rgba(255,255,255,.04) 35%, rgba(255,255,255,.03) 65%, color-mix(in srgb, var(--a2) 35%, transparent)) border-box; border: 1px solid transparent; -webkit-backdrop-filter: blur(18px) saturate(1.3); backdrop-filter: blur(18px) saturate(1.3); box-shadow: 0 24px 60px -34px rgba(0,0,0,.9), inset 0 1px 0 rgba(255,255,255,.05); }

/* ===== دکمه ===== */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 18px; border-radius: 14px; border: 1px solid var(--line2); background: rgba(255,255,255,.04); cursor: pointer; transition: .18s; white-space: nowrap; font-size: 14px; font-weight: 600; text-decoration: none; color: var(--text); overflow: hidden; }
.btn:hover { background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.24); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--grad); border-color: transparent; color: var(--on-accent); font-weight: 800; box-shadow: 0 12px 30px -12px var(--a1), inset 0 1px 0 rgba(255,255,255,.35); }
.btn.primary::after { content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%); transform: translateX(-120%); transition: transform .6s; }
.btn.primary:hover::after { transform: translateX(120%); }
.btn.primary:hover { transform: translateY(-1px); box-shadow: 0 16px 36px -12px var(--a1), inset 0 1px 0 rgba(255,255,255,.35); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--red); border-color: rgba(251,113,133,.35); background: rgba(251,113,133,.07); }
.btn.danger:hover { background: rgba(251,113,133,.16); }
.btn.sm { padding: 5px 12px; font-size: 12.5px; border-radius: 11px; }
.btn.icon { padding: 0; width: 36px; height: 36px; border-radius: 12px; overflow: visible; }
.btn svg { width: 16px; height: 16px; }
[data-tip] { position: relative; }
[data-tip]:hover::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); background: var(--card-solid); border: 1px solid var(--line2); padding: 3px 10px; border-radius: 8px; font-size: 12px; font-weight: 400; white-space: nowrap; z-index: 5; pointer-events: none; color: var(--text); }

/* ===== ورود ===== */
#login { min-height: 100vh; display: grid; place-items: center; padding: 16px; position: relative; }
.login-art { position: absolute; width: min(620px, 120vw); aspect-ratio: 1; left: 50%; top: 50%; transform: translate(-50%, -50%); pointer-events: none; }
.login-art svg { width: 100%; height: 100%; }
.login-art .ring { fill: none; stroke: rgba(255,255,255,.07); stroke-dasharray: 2 8; transform-origin: 200px 200px; animation: spin 60s linear infinite; }
.login-art .r2 { animation-direction: reverse; animation-duration: 45s; stroke: color-mix(in srgb, var(--a1) 30%, transparent); }
.login-art .r3 { stroke-dasharray: none; stroke: rgba(255,255,255,.04); }
.login-art .arc { fill: none; stroke: url(#lg); stroke-width: 3; stroke-dasharray: 10 14; animation: dash 1.4s linear infinite; filter: drop-shadow(0 0 8px var(--a2)); }
.login-art .nd { fill: var(--a2); filter: drop-shadow(0 0 10px var(--a2)); }
.login-card { position: relative; width: 100%; max-width: 410px; background: rgba(10, 12, 28, .7); -webkit-backdrop-filter: blur(26px); backdrop-filter: blur(26px); border: 1px solid var(--line2); border-radius: 30px; padding: 44px 32px 28px; text-align: center; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 40px 120px -30px #000, 0 0 100px -40px var(--a1); }
.login-card p { margin: 0 0 12px; }
.login-card .btn { width: 100%; padding: 13px; font-size: 15px; }
.err { color: var(--red); min-height: 20px; font-size: 13px; }

/* ===== فرم ===== */
.input, select.input, textarea.input { width: 100%; background: var(--field); border: 1px solid var(--line2); border-radius: 13px; padding: 10px 15px; outline: none; transition: .15s; font-size: 14.5px; }
.input:focus { border-color: var(--a1); box-shadow: 0 0 0 4px color-mix(in srgb, var(--a1) 22%, transparent); }
.input::placeholder { color: #575e78; }
select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23eef0fa' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-position: 14px 50%; background-repeat: no-repeat; padding-left: 38px; font-weight: 600; }
select.input option, select.btn option { background: var(--card-solid); }
textarea.input { min-height: 130px; resize: vertical; line-height: 1.9; }
.field label { display: block; color: var(--muted); font-size: 13px; margin-bottom: 7px; }
.hint { color: var(--muted); font-size: 12.5px; margin-top: 6px; line-height: 1.9; }
.hint .ok { color: var(--text); } .hint .ok::before { content: "✓ "; color: var(--green); }
.hint .no { color: var(--text); } .hint .no::before { content: "✗ "; color: var(--red); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row-inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row-inline .input { flex: 1; min-width: 140px; }
.check { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; user-select: none; font-size: 13.5px; }
.check input { display: none; }
.check span.sw { width: 42px; height: 24px; border-radius: 99px; background: rgba(255,255,255,.12); position: relative; transition: .2s; flex: none; }
.check span.sw::after { content: ""; position: absolute; top: 3px; right: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: .2s; box-shadow: 0 2px 6px rgba(0,0,0,.4); }
.check input:checked + span.sw { background: var(--grad); box-shadow: 0 0 14px -2px var(--a1); }
.check input:checked + span.sw::after { right: 21px; }
details.adv summary { cursor: pointer; list-style: none; font-weight: 600; }
details.adv summary::before { content: "◂ "; color: var(--muted); }
details.adv[open] summary::before { content: "▾ "; }
details.adv > div { margin-top: 12px; display: flex; flex-direction: column; gap: 12px; }
.engines { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.engine { border: 1px solid var(--line2); border-radius: 14px; padding: 11px 14px; cursor: pointer; background: var(--field); transition: .15s; }
.engine.on { border-color: var(--a1); box-shadow: 0 0 0 1px var(--a1), 0 10px 30px -14px var(--a1); }
.engine b { display: block; }
.engine span { font-size: 12px; color: var(--muted); display: block; margin-top: 2px; }

/* ===== داشبورد: نقشه زنده ===== */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 18px; margin-bottom: 18px; }
.topo-card { padding: 20px 22px 12px; overflow: hidden; }
.card-h { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.card-h b { font-size: 16px; font-weight: 800; }
.card-h .muted { font-size: 12.5px; }
.legend2 { display: flex; gap: 14px; font-size: 12px; color: var(--muted); }
.legend2 i { display: inline-block; width: 18px; height: 3px; border-radius: 2px; margin-left: 6px; vertical-align: 3px; }
.topo { position: relative; margin-top: 8px; }
.topo svg.paths { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.topo .base { fill: none; stroke: rgba(255,255,255,.06); stroke-width: 7; stroke-linecap: round; }
.topo .flow { fill: none; stroke-width: 2.6; stroke-linecap: round; stroke-dasharray: 3 13; animation: dash 1.1s linear infinite; }
.topo .flow.up { stroke: url(#fg); filter: drop-shadow(0 0 5px var(--a2)); }
.topo .flow.bad { stroke: var(--red); stroke-dasharray: 6 8; animation: none; opacity: .75; }
.topo .flow.wait { stroke: var(--amber); animation-duration: 2.4s; }
@keyframes dash { to { stroke-dashoffset: -32; } }
.radar { position: absolute; left: 50%; top: 50%; width: 360px; height: 360px; transform: translate(-50%, -50%); border-radius: 50%; pointer-events: none; background: repeating-radial-gradient(circle, transparent 0 44px, rgba(255,255,255,.045) 44px 45px); -webkit-mask-image: radial-gradient(circle, #000 55%, transparent 72%); mask-image: radial-gradient(circle, #000 55%, transparent 72%); }
.radar .sweep { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 0deg, transparent 0 300deg, color-mix(in srgb, var(--a2) 22%, transparent) 360deg); animation: spin 6s linear infinite; }
.node { position: absolute; display: flex; align-items: center; gap: 12px; z-index: 2; }
.node.ir { flex-direction: row-reverse; transform: translate(-26px, -50%); }
.node.fx { flex-direction: row; transform: translate(calc(-100% + 26px), -50%); }
.node .orb { position: relative; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; flex: none; background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--nc) 55%, #fff 0%), color-mix(in srgb, var(--nc) 20%, #000) 75%); box-shadow: 0 0 0 1px color-mix(in srgb, var(--nc) 60%, transparent), 0 0 28px -4px var(--nc); --nc: var(--a1); }
.node.fx .orb { --nc: var(--a2); }
.node.off .orb { --nc: var(--red); }
.node.unk .orb { --nc: #64748b; }
.node .orb::before { content: ""; position: absolute; inset: -7px; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--nc) 45%, transparent); animation: ping 2.6s ease-out infinite; }
.node.unk .orb::before { display: none; }
@keyframes ping { from { transform: scale(.85); opacity: 1; } to { transform: scale(1.35); opacity: 0; } }
.node .orb img { width: 24px; height: 18px; border-radius: 3px; object-fit: cover; box-shadow: 0 0 0 1px rgba(0,0,0,.4); }
.node .orb .cc { font-size: 11px; font-weight: 800; direction: ltr; }
.node .lab { display: flex; flex-direction: column; line-height: 1.35; white-space: nowrap; }
.node.fx .lab { align-items: flex-end; text-align: left; }
.node.ir .lab { align-items: flex-start; }
.node .lab b { font-size: 14px; font-weight: 800; direction: ltr; unicode-bidi: isolate; }
.node .lab span { font-size: 11.5px; color: var(--muted); direction: ltr; unicode-bidi: isolate; }
.plabel { position: absolute; transform: translate(-50%, -50%); z-index: 3; display: flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 99px; font-size: 11.5px; font-weight: 700; white-space: nowrap; background: rgba(6,7,18,.86); border: 1px solid color-mix(in srgb, var(--a2) 40%, transparent); box-shadow: 0 6px 18px -6px #000; }
.plabel.bad { border-color: rgba(251,113,133,.55); color: #fda4af; }
.plabel .ms { color: var(--a2); direction: ltr; }
.topo-empty { display: grid; place-items: center; text-align: center; color: var(--muted); height: 100%; position: relative; z-index: 2; }
.colh { position: absolute; top: 0; font-size: 11.5px; color: var(--muted); letter-spacing: .3px; transform: translateX(-50%); }

/* حلقه سلامت */
.health { padding: 22px; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.health .card-h { width: 100%; }
.ring { position: relative; width: 210px; height: 210px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.ring .trk { fill: none; stroke: rgba(255,255,255,.06); }
.ring .val { fill: none; stroke-linecap: round; transition: stroke-dashoffset .8s; }
.ring .c { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; }
.ring .c b { font-size: 46px; font-weight: 900; line-height: 1.05; }
.ring .c span { color: var(--muted); font-size: 12.5px; }
.hstats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
.hstats div { padding: 10px; border-radius: 14px; background: rgba(255,255,255,.03); border: 1px solid var(--line); }
.hstats b { display: block; font-size: 20px; font-weight: 800; }
.hstats span { font-size: 12px; color: var(--muted); }
.hstats .g b { color: var(--green); } .hstats .r b { color: var(--red); }

/* کارت‌های عددی با نمودار کوچک */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-bottom: 18px; }
.kpi { padding: 18px 20px 0; overflow: hidden; display: flex; flex-direction: column; min-height: 150px; }
.kpi .t { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13.5px; }
.kpi .t .ic { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; color: var(--kc); background: color-mix(in srgb, var(--kc) 14%, transparent); border: 1px solid color-mix(in srgb, var(--kc) 40%, transparent); }
.kpi .t .ic svg { width: 18px; height: 18px; }
.kpi .v { font-size: 30px; font-weight: 900; line-height: 1.3; margin-top: 10px; white-space: nowrap; }
.kpi .s { font-size: 12px; color: var(--muted); }
.kpi svg.spark { margin: auto -20px 0; width: calc(100% + 40px); height: 56px; display: block; }
.kpi { --kc: var(--a1); }
.kpi.k2 { --kc: var(--a2); } .kpi.k3 { --kc: var(--a3); } .kpi.k4 { --kc: var(--amber); }
.kpi::before { content: ""; position: absolute; width: 200px; height: 200px; left: -70px; top: -110px; background: radial-gradient(color-mix(in srgb, var(--kc) 30%, transparent), transparent 70%); pointer-events: none; }

/* ===== نمودار ===== */
.ranges { display: flex; margin: 0; overflow-x: auto; scrollbar-width: none; }
.ranges::-webkit-scrollbar { display: none; }
.seg { display: inline-flex; background: rgba(0,0,0,.25); border: 1px solid var(--line); border-radius: 14px; padding: 4px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 5px 14px; border-radius: 10px; cursor: pointer; color: var(--muted); font-size: 13px; font-weight: 600; transition: .15s; white-space: nowrap; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--grad); color: var(--on-accent); box-shadow: 0 6px 18px -6px var(--a1); }
.chart-card { padding: 18px 22px 14px; margin-bottom: 8px; }
.chart-card .h { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; flex-wrap: wrap; }
.chart-card .h b { font-size: 16px; font-weight: 800; }
.chart-card .h .vals { font-weight: 800; direction: ltr; }
.chart-card canvas { width: 100%; height: 250px; display: block; }
.legend { display: flex; gap: 18px; font-size: 13px; color: var(--muted); }
.legend i { display: inline-block; width: 14px; height: 4px; border-radius: 2px; margin-left: 6px; vertical-align: 3px; }

/* ===== کارت سرور ===== */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.card { overflow: hidden; padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; transition: transform .25s, box-shadow .25s; }
.card:hover { transform: translateY(-4px); box-shadow: 0 30px 60px -30px rgba(0,0,0,.9), 0 0 50px -30px var(--a1); }
.card .top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.name { font-weight: 800; font-size: 16.5px; direction: ltr; unicode-bidi: isolate; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: #4b5565; flex: none; }
.dot.on { background: var(--green); box-shadow: 0 0 10px var(--green); }
.dot.off { background: var(--red); box-shadow: 0 0 10px var(--red); }
.dot.warn { background: var(--amber); box-shadow: 0 0 10px var(--amber); }
.chip { font-size: 12px; padding: 1px 10px; border-radius: 8px; border: 1px solid var(--line2); color: var(--muted); white-space: nowrap; font-weight: 700; }
.chip.g { color: #6ee7b7; border-color: rgba(52,211,153,.45); background: rgba(52,211,153,.09); }
.chip.y { color: #fcd34d; border-color: rgba(251,191,36,.45); background: rgba(251,191,36,.09); }
.chip.b { color: #7dd3fc; border-color: rgba(56,189,248,.45); background: rgba(56,189,248,.09); }
.chip.r { color: #fda4af; border-color: rgba(251,113,133,.45); background: rgba(251,113,133,.09); }
.chip.v { color: #c4b5fd; border-color: rgba(139,92,246,.45); background: rgba(139,92,246,.09); }
.chip.dim { font-size: 11.5px; padding: 0 8px; background: rgba(255,255,255,.04); font-weight: 500; }
.flag { display: inline-block; width: 22px; height: 16px; border-radius: 3px; object-fit: cover; vertical-align: middle; flex: none; box-shadow: 0 0 0 1px rgba(255,255,255,.14); }
.ipline { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.ipline .ip { direction: ltr; }
.srv-flag { position: absolute; top: -40px; left: -40px; width: 150px; height: 150px; opacity: .08; border-radius: 50%; object-fit: cover; filter: blur(1px) saturate(1.4); pointer-events: none; }
.gauges { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: center; }
.gauge { position: relative; width: 100%; max-width: 104px; aspect-ratio: 1; justify-self: center; }
.gauge svg { width: 100%; height: 100%; transform: rotate(135deg); }
.gauge .trk { fill: none; stroke: rgba(255,255,255,.07); stroke-width: 8; stroke-linecap: round; }
.gauge .val { fill: none; stroke-width: 8; stroke-linecap: round; transition: stroke-dasharray .7s; }
.gauge .c { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; line-height: 1.2; }
.gauge .c b { font-size: 19px; font-weight: 900; }
.gauge .c span { font-size: 11px; color: var(--muted); letter-spacing: .5px; }
.iocol { display: flex; flex-direction: column; gap: 8px; min-width: 104px; }
.iocol div { padding: 6px 10px; border-radius: 12px; background: rgba(255,255,255,.03); border: 1px solid var(--line); line-height: 1.35; }
.iocol span { font-size: 11px; color: var(--muted); display: block; }
.iocol b { font-size: 13px; direction: ltr; unicode-bidi: isolate; display: block; text-align: right; }
.iocol .u b { color: var(--a2); } .iocol .d b { color: var(--a3); }
.meter { display: flex; flex-direction: column; gap: 6px; }
.meter .lbl { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--muted); }
.meter .lbl b { font-weight: 700; color: var(--text); }
.bar { height: 7px; border-radius: 99px; background: rgba(255,255,255,.07); overflow: hidden; display: flex; }
.bar i { display: block; height: 100%; border-radius: 99px; background: var(--grad); transition: width .6s; }
.io { display: flex; justify-content: space-between; font-size: 14px; direction: ltr; font-weight: 600; }
.offline-msg { color: var(--red); font-size: 14px; display: flex; align-items: center; gap: 10px; padding: 18px; border-radius: 16px; background: rgba(251,113,133,.06); border: 1px dashed rgba(251,113,133,.35); }
.actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; padding-top: 14px; border-top: 1px solid var(--line); }

/* ===== کارت تانل ===== */
.tcard { gap: 12px; overflow: hidden; }
.tcard .route { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 16px; background: rgba(0,0,0,.22); border: 1px solid var(--line); }
.tcard .route .end { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 12px; min-width: 64px; }
.tcard .route .end b { direction: ltr; font-size: 12.5px; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tcard .route svg { width: 100%; height: 26px; overflow: visible; }
.tcard .route .ln { fill: none; stroke: rgba(255,255,255,.08); stroke-width: 6; stroke-linecap: round; }
.tcard .route .fl { fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 3 11; animation: dash 1s linear infinite; }
.tcard .route .fl.up { stroke: url(#fg2); filter: drop-shadow(0 0 4px var(--a2)); }
.tcard .route .fl.bad { stroke: var(--red); animation: none; stroke-dasharray: 6 8; }
.tcard .route .fl.wait { stroke: var(--amber); }
.state { display: inline-flex; align-items: center; gap: 7px; font-weight: 800; font-size: 14px; padding: 2px 12px; border-radius: 10px; background: rgba(255,255,255,.04); }
.state.up { color: var(--green); background: rgba(52,211,153,.1); }
.state.down, .state.error, .state.missing { color: var(--red); background: rgba(251,113,133,.1); }
.state.pending { color: var(--amber); }
.state.unknown { color: var(--muted); }
.state.degraded { color: var(--amber); background: rgba(251,191,36,.1); }
.state.disabled { color: var(--muted); background: rgba(148,163,184,.1); }
.stats3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stats3 > span { padding: 8px 10px; border-radius: 12px; background: rgba(255,255,255,.03); border: 1px solid var(--line); font-size: 11.5px; color: var(--muted); line-height: 1.4; }
.stats3 b { display: block; font-weight: 800; font-size: 15px; color: var(--text); }
.kline { display: flex; gap: 10px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.kline b { color: var(--text); font-weight: 600; direction: ltr; unicode-bidi: isolate; }
.kv { display: flex; gap: 8px; flex-wrap: wrap; }
.kv span { font-size: 12.5px; background: var(--field); border: 1px solid var(--line); border-radius: 10px; padding: 3px 10px; color: var(--muted); }
.kv b { color: var(--text); margin-inline-start: 4px; }
.ports { display: flex; flex-wrap: wrap; gap: 5px; }
.ports span { font-family: var(--mono); font-size: 11.5px; background: color-mix(in srgb, var(--a1) 12%, transparent); border: 1px solid color-mix(in srgb, var(--a1) 32%, transparent); color: color-mix(in srgb, var(--a2) 70%, #fff); border-radius: 7px; padding: 0 8px; direction: ltr; }
.note { font-size: 12.5px; color: var(--amber); }
.spin { width: 14px; height: 14px; border: 2px solid rgba(255,255,255,.15); border-top-color: var(--a2); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; vertical-align: middle; }
.empty { text-align: center; padding: 50px 20px; border: 1px dashed var(--line2); border-radius: var(--radius); color: var(--muted); grid-column: 1 / -1; background: rgba(255,255,255,.02); }
.empty h3 { color: var(--text); margin: 10px 0 6px; }

/* ===== جدول ===== */
.mon { width: 100%; border-collapse: collapse; font-size: 14px; }
.mon th { color: var(--muted); font-weight: 600; font-size: 12.5px; text-align: right; padding: 13px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; background: rgba(0,0,0,.18); }
.mon td { padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.mon tbody tr { transition: background .15s; }
.mon tbody tr:hover { background: color-mix(in srgb, var(--a1) 8%, transparent); }
.mon tr:last-child td { border-bottom: 0; }
.mon .num { direction: ltr; text-align: right; font-variant-numeric: tabular-nums; }
.tbl-wrap { overflow-x: auto; }

/* ===== هشدارها و تنظیمات ===== */
.timeline { display: flex; flex-direction: column; max-height: 520px; overflow: auto; }
.ev { padding: 12px 20px; display: flex; gap: 12px; align-items: center; border-bottom: 1px solid var(--line); }
.ev:last-child { border-bottom: 0; }
.ev time { margin-inline-start: auto; color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.panel { padding: 22px 24px; display: flex; flex-direction: column; gap: 14px; }
.panel h3 { margin: 0; font-size: 17px; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.panel h3::before { content: ""; width: 4px; height: 18px; border-radius: 4px; background: var(--grad); box-shadow: 0 0 10px var(--a1); }
.cards3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: start; margin-top: 18px; }
.rule-row { display: grid; grid-template-columns: 1.2fr 1.2fr 1fr 1fr auto; gap: 10px; align-items: end; }
.sp-row { display: grid; grid-template-columns: 1.3fr 1.3fr .7fr 1fr auto auto; gap: 10px; align-items: end; }
.sp-row .check { padding-bottom: 10px; }
.sp-out { display: flex; align-items: baseline; gap: 14px; padding: 14px 18px; border-radius: 16px; background: color-mix(in srgb, var(--a1) 10%, transparent); border: 1px solid color-mix(in srgb, var(--a1) 35%, transparent); flex-wrap: wrap; }
.sp-out b { font-size: 28px; font-weight: 900; background: var(--grad3); -webkit-background-clip: text; background-clip: text; color: transparent; }
.kvt { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.kvt span { color: var(--muted); }
.kvt b { font-weight: 600; word-break: break-all; text-align: left; }
.keybox { font-family: var(--mono); font-size: 11.5px; background: var(--field); border: 1px solid var(--line); border-radius: 12px; padding: 12px; word-break: break-all; direction: ltr; text-align: left; color: color-mix(in srgb, var(--a2) 70%, #fff); }

/* ===== مودال ===== */
.modal-bg { position: fixed; inset: 0; z-index: 50; background: rgba(2,3,9,.66); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); display: flex; align-items: center; justify-content: center; padding: 16px; animation: fade .15s; }
.modal { width: 100%; max-width: 800px; max-height: calc(100vh - 32px); overflow: auto; background: linear-gradient(var(--card-solid), var(--card-solid)) padding-box, linear-gradient(140deg, color-mix(in srgb, var(--a1) 55%, transparent), rgba(255,255,255,.06) 40%, color-mix(in srgb, var(--a2) 45%, transparent)) border-box; border: 1px solid transparent; border-radius: 26px; box-shadow: 0 50px 120px -20px #000, 0 0 100px -50px var(--a1); animation: pop .2s; }
.modal.wide { max-width: 1000px; }
.modal-h { padding: 24px 28px 4px; display: flex; align-items: center; gap: 12px; }
.modal-h h3 { margin: 0; font-size: 19px; font-weight: 800; }
.modal-b { padding: 16px 28px; display: flex; flex-direction: column; gap: 16px; }
.modal-f { padding: 6px 28px 26px; display: flex; gap: 10px; }
.modal-f .btn { padding: 11px 22px; font-size: 15px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }
pre.log { margin: 0; background: #03040a; border: 1px solid var(--line); border-radius: 16px; padding: 16px; height: 55vh; overflow: auto; font-family: var(--mono); font-size: 12px; line-height: 1.65; direction: ltr; text-align: left; white-space: pre-wrap; word-break: break-word; color: #cbd5e1; }

/* ===== اعلان ===== */
#toasts { position: fixed; bottom: 20px; left: 20px; z-index: 99; display: flex; flex-direction: column; gap: 8px; }
.toast { background: color-mix(in srgb, var(--card-solid) 95%, transparent); border: 1px solid var(--line2); padding: 12px 16px; border-radius: 14px; min-width: 240px; max-width: 400px; box-shadow: 0 16px 40px rgba(0,0,0,.55); animation: pop .2s; font-size: 13px; display: flex; gap: 10px; align-items: center; }
.toast::before { content: "✓"; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: rgba(52,211,153,.18); color: var(--green); font-size: 12px; flex: none; }
.toast.error::before { content: "!"; background: rgba(251,113,133,.18); color: var(--red); }

/* ===== واکنش‌گرا ===== */
@media (max-width: 1500px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1280px) {
  .hero { grid-template-columns: 1fr; }
  .health { flex-direction: row; flex-wrap: wrap; justify-content: center; }
  .health .card-h { justify-content: center; }
  .hstats { max-width: 360px; }
  .cards3 { grid-template-columns: 1fr 1fr; }
  .sp-row { grid-template-columns: 1fr 1fr 1fr; }
  .rule-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 1100px) { :root { --side: 84px; } .side .brand span:last-child, nav.tabs a span:not(.cnt), .side-live span:last-child { display: none; } nav.tabs a { justify-content: center; padding: 12px; } nav.tabs a .cnt { position: absolute; top: 2px; left: 6px; } .swatches { flex-wrap: wrap; justify-content: center; } .side-foot { padding: 14px 0 0; align-items: center; } .side .brand { padding: 0; justify-content: center; } .main { padding: 22px 22px 60px; } }
@media (max-width: 860px) {
  .side { display: none; }
  .main { margin-right: 0; padding: 14px 16px 120px; }
  .mtop { display: flex; position: sticky; top: 0; z-index: 30; align-items: center; gap: 10px; padding: 10px 16px; background: rgba(5,6,15,.72); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); border-bottom: 1px solid var(--line); }
  .mtop .logo { width: 34px; height: 34px; border-radius: 11px; } .mtop .logo svg { width: 20px; height: 20px; }
  .mtop .brand b { font-size: 16px; }
  .bottom-tabs { display: flex; position: fixed; bottom: 10px; right: 10px; left: 10px; z-index: 40; background: rgba(10,11,26,.86); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); border: 1px solid var(--line2); border-radius: 22px; justify-content: space-around; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); box-shadow: 0 20px 50px -10px #000; }
  .bottom-tabs a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 1px; color: var(--muted); text-decoration: none; font-size: 10.5px; padding: 5px 7px; border-radius: 14px; }
  .bottom-tabs a svg { width: 20px; height: 20px; }
  .bottom-tabs a.on { color: var(--text); background: color-mix(in srgb, var(--a1) 22%, transparent); }
  .bottom-tabs a.on svg { color: var(--a2); }
  .bottom-tabs a .cnt { position: absolute; top: 0; left: 4px; min-width: 16px; height: 16px; border-radius: 99px; background: var(--red); color: #fff; font-size: 10px; display: grid; place-items: center; padding: 0 4px; line-height: 1; }
  .pagebar h1 { font-size: 25px; }
  .clock { display: none; }
  .cards3 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .grid { grid-template-columns: 1fr; }
  .kpis { gap: 10px; }
  .kpi { padding: 14px 14px 0; min-height: 128px; } .kpi .v { font-size: 21px; } .kpi svg.spark { margin: auto -14px 0; width: calc(100% + 28px); height: 44px; }
  .kpi .t { font-size: 12px; } .kpi .t .ic { width: 28px; height: 28px; }
  .row2, .engines, .rule-row, .sp-row { grid-template-columns: 1fr; }
  .modal-h, .modal-b, .modal-f { padding-left: 18px; padding-right: 18px; }
  .ring { width: 170px; height: 170px; } .ring .c b { font-size: 38px; }
  .topo-card { padding: 16px 12px 8px; } .topo { margin-bottom: 30px; }
  .node .orb { width: 40px; height: 40px; } .node.ir, .node.fx { flex-direction: column; gap: 4px; transform: translate(-50%, -20px); } .node .lab, .node.fx .lab, .node.ir .lab { align-items: center; } .node .orb img { width: 20px; height: 15px; }
  .node .lab span { display: none; } .node .lab b { font-size: 12px; }
  .plabel { font-size: 10.5px; padding: 1px 7px; }
  .radar { width: 240px; height: 240px; }
  .gauges { grid-template-columns: 1fr 1fr; } .iocol { grid-column: 1 / -1; flex-direction: row; } .iocol div { flex: 1; }
}

/* ===== تم «زون»: شبکه زنده، کارت‌های براق (kgrid) ===== */
[data-theme="zone"] {
  --bg: #07090d; --bg2: #0d1320;
  --a1: #2f8bff; --a2: #8b5cf6; --a3: #5ad1c9;
  --on-accent: #ffffff;
}
[data-theme="zone"] body { --card: rgba(13,17,25,.82); --card-solid: #0e121a; --line: rgba(255,255,255,.08); --line2: rgba(255,255,255,.14); --muted: #8d97a3; --text: #f2f4f7; }
[data-theme="zone"] .bg .aur, [data-theme="zone"] .bg .orbit, [data-theme="zone"] .bg .floor { display: none; }
#kgrid { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.bg::after { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 50% at 50% 0%, color-mix(in srgb, var(--a2) 14%, transparent), transparent 70%), radial-gradient(50% 40% at 100% 100%, color-mix(in srgb, var(--a1) 10%, transparent), transparent 70%); pointer-events: none; }

/* کارت‌ها: رنگ اختصاصی، حاشیه گرادیانی، برق عبوری و شیب سه‌بعدی */
.kpi, .card, .panel { --c: 47,139,255; }
.kpis > :nth-child(5n+2), .grid > :nth-child(5n+2), .cards3 > :nth-child(3n+2) { --c: 139,92,246; }
.kpis > :nth-child(5n+3), .grid > :nth-child(5n+3), .cards3 > :nth-child(3n+3) { --c: 90,209,201; }
.kpis > :nth-child(5n+4), .grid > :nth-child(5n+4) { --c: 250,190,88; }
.kpis > :nth-child(5n+5), .grid > :nth-child(5n+5) { --c: 236,72,153; }
[data-theme="zone"] .box { background: linear-gradient(var(--card), var(--card)) padding-box, linear-gradient(140deg, rgba(var(--c, 47,139,255), .55), rgba(255,255,255,.05) 40%, rgba(255,255,255,.03) 62%, rgba(var(--c, 47,139,255), .3)) border-box; }
.kpi, .card { transform-style: preserve-3d; transition: transform .35s cubic-bezier(.16,.8,.24,1), box-shadow .35s, border-color .35s; animation: zin .7s cubic-bezier(.16,.8,.24,1) backwards; }
.kpis > :nth-child(2), .grid > :nth-child(2) { animation-delay: .06s; }
.kpis > :nth-child(3), .grid > :nth-child(3) { animation-delay: .12s; }
.kpis > :nth-child(4), .grid > :nth-child(4) { animation-delay: .18s; }
.grid > :nth-child(n+5) { animation-delay: .24s; }
.kpi::after, .card::after { content: ""; position: absolute; top: -60%; left: -60%; width: 55%; height: 220%; background: linear-gradient(115deg, transparent, rgba(255,255,255,.11), transparent); transform: rotate(20deg) translateX(-60%); transition: transform .9s ease; pointer-events: none; z-index: 2; }
.kpi:hover::after, .card:hover::after { transform: rotate(20deg) translateX(320%); }
.kpi:hover, .card:hover { transform: perspective(900px) translateY(-6px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); box-shadow: 0 24px 48px -18px rgba(0,0,0,.75), 0 0 36px -6px rgba(var(--c), .35); }
.kpi .ic { box-shadow: 0 0 22px -4px rgba(var(--c), .6); transition: transform .35s; }
.kpi:hover .ic { transform: rotate(-8deg) scale(1.1); }
.kpi .v { font-family: 'Rajdhani', var(--font); letter-spacing: .02em; }
.page-h h2 { background: linear-gradient(90deg, var(--text), color-mix(in srgb, var(--a1) 70%, var(--text)), var(--text)); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: zshine 6s linear infinite; }
#page > * { animation: zin .6s cubic-bezier(.16,.8,.24,1) backwards; }
@keyframes zin { from { opacity: 0; transform: translateY(18px) scale(.97); filter: blur(8px); } }
@keyframes zshine { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .kpi, .card, #page > *, .page-h h2 { animation: none; } }
/* ابزارهای هاشم */
.modal-b.tools { display: flex; flex-direction: column; gap: 8px; }
.tool-sec { border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; background: rgba(0,0,0,.18); }
.tool-sec summary { cursor: pointer; font-weight: 800; }
.tool-sec .hint { margin: 8px 0; line-height: 1.9; }
.tool-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tool-oo { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border: 1px dashed var(--line2); border-radius: 12px; }
.tool-oo b { font-size: 12.5px; font-weight: 700; }
.fhint { font-size: 11.5px; color: var(--muted); line-height: 1.7; margin-top: 4px; }

/* ======================================================================
   هویت بصری «سیگنال» (v2): هدر و سایدبار تازه، نمودار خوانا، موبایل سبک
   ====================================================================== */
[data-theme="signal"] {
  --bg: #060a0f; --bg2: #0a1a1f;
  --a1: #2ee6c5; --a2: #4da3ff; --a3: #ffb547;
  --on-accent: #03140f;
}
[data-theme="signal"] body {
  --card: rgba(11, 19, 25, .8); --card-solid: #0c161c; --field: rgba(3, 8, 11, .72);
  --line: rgba(150, 215, 235, .08); --line2: rgba(150, 215, 235, .15);
  --text: #eef6f8; --muted: #8b9ea6; --green: #3ddc97; --amber: #ffb547; --red: #ff6b7a;
  --radius: 20px;
}
[data-theme="signal"] .bg .aur, [data-theme="signal"] .bg .orbit, [data-theme="signal"] .bg .floor { display: none; }
[data-theme="signal"] .bg { background: radial-gradient(90% 70% at 100% 0%, #0d2228 0%, transparent 60%), radial-gradient(70% 60% at 0% 100%, #10201a 0%, transparent 65%), var(--bg); }
[data-theme="signal"] .bg::after { background: radial-gradient(40% 35% at 85% 8%, rgba(46,230,197,.10), transparent 70%), radial-gradient(35% 30% at 10% 95%, rgba(255,181,71,.07), transparent 70%); }
/* نوار نور آرام که از روی صفحه رد می‌شود */
.bg .sweep2 { position: absolute; inset: -20% 0; background: linear-gradient(180deg, transparent 0%, color-mix(in srgb, var(--a1) 7%, transparent) 50%, transparent 100%); height: 30%; animation: sweep2 14s linear infinite; pointer-events: none; }
@keyframes sweep2 { from { transform: translateY(-40vh); } to { transform: translateY(140vh); } }

/* ---------- تایپوگرافی و فاصله‌ها ---------- */
.num, .kpi .v, .clock b, .stats3 b, .sbar-stat b, .tip b { font-family: 'Rajdhani', var(--font); font-variant-numeric: tabular-nums; letter-spacing: .01em; }
:focus-visible { outline: 2px solid color-mix(in srgb, var(--a1) 80%, white); outline-offset: 2px; border-radius: 10px; }
::selection { background: color-mix(in srgb, var(--a1) 35%, transparent); }

/* ---------- سایدبار ---------- */
.side { gap: 18px; padding: 20px 14px 16px; border-radius: 26px; background: linear-gradient(180deg, color-mix(in srgb, var(--card-solid) 92%, transparent), color-mix(in srgb, var(--bg) 92%, transparent)); box-shadow: 0 30px 80px -30px #000, inset 0 1px 0 rgba(255,255,255,.05), inset 0 0 0 1px var(--line); border: 0; overflow: hidden; }
.side::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 160px; background: radial-gradient(80% 100% at 100% 0%, color-mix(in srgb, var(--a1) 16%, transparent), transparent 70%); pointer-events: none; }
.side .brand { position: relative; padding: 2px 6px 14px; border-bottom: 1px solid var(--line); }
.side .brand .logo { box-shadow: 0 0 0 1px rgba(255,255,255,.12), 0 10px 26px -8px var(--a1); }
nav.tabs { gap: 2px; overflow-y: auto; scrollbar-width: none; }
nav.tabs .grp { font-size: 11px; font-weight: 700; color: color-mix(in srgb, var(--muted) 75%, transparent); letter-spacing: .04em; padding: 14px 14px 6px; }
nav.tabs .grp:first-child { padding-top: 4px; }
nav.tabs a { padding: 10px 12px; border-radius: 14px; font-size: 14px; gap: 12px; }
nav.tabs a .ico { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: rgba(255,255,255,.03); box-shadow: inset 0 0 0 1px var(--line); transition: .25s; flex: none; }
nav.tabs a svg { width: 18px; height: 18px; }
nav.tabs a:hover .ico { background: rgba(255,255,255,.06); }
nav.tabs a.on { background: linear-gradient(270deg, color-mix(in srgb, var(--a1) 16%, transparent), transparent 85%); box-shadow: none; color: var(--text); }
nav.tabs a.on::before { right: -14px; top: 18%; bottom: 18%; width: 3px; background: var(--a1); box-shadow: 0 0 12px var(--a1), 0 0 24px var(--a1); }
nav.tabs a.on .ico { background: color-mix(in srgb, var(--a1) 18%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--a1) 45%, transparent), 0 0 20px -4px var(--a1); }
nav.tabs a.on svg { color: var(--a1); filter: drop-shadow(0 0 5px var(--a1)); }
nav.tabs a .cnt { background: color-mix(in srgb, var(--red) 22%, transparent); color: var(--red); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--red) 50%, transparent); font-family: 'Rajdhani', var(--font); font-weight: 700; }
.side-foot { gap: 12px; padding: 14px 4px 0; }
.sbar-status { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sbar-stat { padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,.025); box-shadow: inset 0 0 0 1px var(--line); display: flex; flex-direction: column; gap: 6px; }
.sbar-stat span { font-size: 11px; color: var(--muted); }
.sbar-stat b { font-size: 18px; line-height: 1; }
.sbar-stat i { display: block; height: 3px; border-radius: 3px; background: rgba(255,255,255,.07); overflow: hidden; }
.sbar-stat i::after { content: ""; display: block; height: 100%; width: var(--p, 0%); background: var(--k, var(--a1)); box-shadow: 0 0 8px var(--k, var(--a1)); transition: width .6s; }
.side-row { display: flex; align-items: center; gap: 8px; }
.side-row .swatches { flex: 1; }
.side-collapse { width: 34px; height: 34px; border-radius: 11px; border: 0; background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.side-collapse:hover { color: var(--text); }
.side-collapse svg { width: 16px; height: 16px; transition: transform .3s; }
/* حالت جمع‌شده */
html.side-mini { --side: 88px; }
html.side-mini .side .brand > span:last-child, html.side-mini nav.tabs a > span:not(.cnt):not(.ico), html.side-mini nav.tabs .grp, html.side-mini .sbar-status, html.side-mini .side-live, html.side-mini .swatches, html.side-mini #logoutBtn { display: none; }
html.side-mini nav.tabs a { justify-content: center; padding: 8px; }
html.side-mini nav.tabs a .cnt { position: absolute; top: 2px; left: 8px; min-width: 18px; height: 18px; font-size: 10px; }
html.side-mini .side .brand { justify-content: center; padding: 2px 0 14px; }
html.side-mini .side-collapse svg { transform: scaleX(-1); }
html.side-mini .side-row { justify-content: center; }

/* ---------- هدر ---------- */
.pagebar { position: sticky; top: 12px; z-index: 20; margin: 0 0 22px; padding: 12px 14px 12px 12px; border-radius: 20px; background: color-mix(in srgb, var(--card-solid) 78%, transparent); -webkit-backdrop-filter: blur(18px) saturate(1.3); backdrop-filter: blur(18px) saturate(1.3); box-shadow: 0 18px 40px -26px #000, inset 0 0 0 1px var(--line); gap: 12px; flex-wrap: wrap; }
.pagebar .ttl { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pagebar .ttl .pico { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; color: var(--a1); background: color-mix(in srgb, var(--a1) 12%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--a1) 35%, transparent); flex: none; }
.pagebar .ttl .pico svg { width: 20px; height: 20px; }
.pagebar h1 { font-size: 22px; letter-spacing: -.2px; line-height: 1.35; }
.pagebar .sub { font-size: 12.5px; }
.hb { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; }
.hpill { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 13px; background: rgba(255,255,255,.03); box-shadow: inset 0 0 0 1px var(--line); font-size: 13px; font-weight: 700; white-space: nowrap; color: var(--text); text-decoration: none; }
.hpill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px color-mix(in srgb, var(--green) 18%, transparent); }
.hpill.warn .dot { background: var(--amber); box-shadow: 0 0 0 4px color-mix(in srgb, var(--amber) 18%, transparent); animation: pulse 1.6s infinite; }
.hpill.bad .dot { background: var(--red); box-shadow: 0 0 0 4px color-mix(in srgb, var(--red) 18%, transparent); animation: pulse 1.2s infinite; }
.hpill.job { color: var(--a2); }
.hbtn { position: relative; width: 40px; height: 40px; border-radius: 13px; border: 0; display: grid; place-items: center; background: rgba(255,255,255,.03); box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); cursor: pointer; text-decoration: none; transition: .2s; }
.hbtn:hover { color: var(--text); background: rgba(255,255,255,.06); }
.hbtn svg { width: 18px; height: 18px; }
.hbtn .badge { position: absolute; top: -4px; left: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--red); color: #fff; font: 700 10.5px/18px 'Rajdhani', var(--font); text-align: center; box-shadow: 0 0 0 2px var(--card-solid); }
.pagebar .clock { padding: 0 14px; height: 40px; display: flex; flex-direction: column; justify-content: center; border-radius: 13px; background: rgba(255,255,255,.03); border: 0; box-shadow: inset 0 0 0 1px var(--line); }
.pagebar .clock b { font-size: 16px; line-height: 1.1; }
.pagebar .clock span { font-size: 10.5px; line-height: 1.3; }

/* ---------- کارت‌ها ---------- */
[data-theme="signal"] .box { background: linear-gradient(180deg, rgba(255,255,255,.025), transparent 40%) padding-box, linear-gradient(var(--card), var(--card)) padding-box, linear-gradient(160deg, rgba(var(--c, 46,230,197), .28), rgba(255,255,255,.05) 30%, rgba(255,255,255,.03) 70%, rgba(var(--c, 46,230,197), .14)) border-box; box-shadow: 0 22px 50px -32px #000, inset 0 1px 0 rgba(255,255,255,.04); }
[data-theme="signal"] .kpi, [data-theme="signal"] .card, [data-theme="signal"] .panel { --c: 46,230,197; }
[data-theme="signal"] .kpis > :nth-child(4n+2), [data-theme="signal"] .grid > :nth-child(4n+2) { --c: 77,163,255; }
[data-theme="signal"] .kpis > :nth-child(4n+3), [data-theme="signal"] .grid > :nth-child(4n+3) { --c: 255,181,71; }
[data-theme="signal"] .kpis > :nth-child(4n+4), [data-theme="signal"] .grid > :nth-child(4n+4) { --c: 167,139,250; }
[data-theme="signal"] .panel h3::before { background: var(--a1); box-shadow: 0 0 10px var(--a1); }
[data-theme="signal"] .page-h h2 { background: none; color: var(--text); -webkit-background-clip: initial; background-clip: initial; animation: none; }
[data-theme="signal"] .btn.primary { background: linear-gradient(115deg, var(--a1), color-mix(in srgb, var(--a1) 55%, var(--a2))); }
[data-theme="signal"] .seg button.on { background: color-mix(in srgb, var(--a1) 85%, white 0%); }

/* ---------- جدول‌ها ---------- */
table.mon thead th { position: sticky; top: 0; background: color-mix(in srgb, var(--card-solid) 96%, transparent); font-size: 12px; font-weight: 700; color: var(--muted); }
table.mon tbody tr { transition: background .2s; }
table.mon tbody tr:nth-child(even) { background: rgba(255,255,255,.012); }
table.mon tbody tr:hover { background: color-mix(in srgb, var(--a1) 6%, transparent); }

/* ---------- نمودار ---------- */
.chart-card { position: relative; }
.chart-card canvas { height: 260px; cursor: crosshair; }
.ctip { position: absolute; pointer-events: none; z-index: 5; min-width: 150px; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--card-solid) 94%, transparent); box-shadow: 0 16px 34px -14px #000, inset 0 0 0 1px var(--line2); font-size: 12px; opacity: 0; transform: translateY(4px); transition: opacity .15s, transform .15s; }
.ctip.on { opacity: 1; transform: none; }
.ctip .t { color: var(--muted); margin-bottom: 6px; direction: ltr; text-align: right; }
.ctip .r { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.ctip .r i { width: 8px; height: 8px; border-radius: 3px; display: inline-block; }
.ctip .r b { direction: ltr; font-size: 14px; }

/* ---------- ریسپانسیو ---------- */
@media (max-width: 1280px) and (min-width: 861px) { html:not(.side-open) { --side: 88px; } html:not(.side-open) .side .brand > span:last-child, html:not(.side-open) nav.tabs a > span:not(.cnt):not(.ico), html:not(.side-open) nav.tabs .grp, html:not(.side-open) .sbar-status, html:not(.side-open) .side-live, html:not(.side-open) .swatches, html:not(.side-open) #logoutBtn { display: none; } html:not(.side-open) nav.tabs a { justify-content: center; padding: 8px; } html:not(.side-open) nav.tabs a .cnt { position: absolute; top: 2px; left: 8px; } html:not(.side-open) .side .brand { justify-content: center; padding: 2px 0 14px; } html:not(.side-open) .side-row { justify-content: center; } }
@media (max-width: 1100px) { .hb .clock { display: none; } }
@media (max-width: 860px) {
  .pagebar { top: 64px; padding: 10px; border-radius: 16px; }
  .pagebar .ttl .pico { width: 36px; height: 36px; border-radius: 11px; }
  .pagebar h1 { font-size: 18px; }
  .pagebar .sub { display: none; }
  .hpill .txt { display: none; } .hpill { padding: 0 12px; }
  .mtop { background: color-mix(in srgb, var(--bg) 82%, transparent); }
  .bottom-tabs { border-radius: 20px; background: color-mix(in srgb, var(--card-solid) 92%, transparent); box-shadow: 0 20px 50px -10px #000, inset 0 0 0 1px var(--line2); border: 0; }
  .bottom-tabs a .ico { display: contents; }
  .bottom-tabs a.on { background: color-mix(in srgb, var(--a1) 16%, transparent); }
  .bottom-tabs a.on svg { color: var(--a1); }
  .bottom-tabs .grp { display: none; }
}
@media (max-width: 520px) { .bottom-tabs a span:not(.cnt):not(.ico) { font-size: 9.5px; } .hb { gap: 6px; } .hbtn, .hpill { width: 36px; height: 36px; } .hpill { width: auto; } }
/* حالت سبک برای موبایل و دستگاه‌های ضعیف */
html.lite .box, html.lite .pagebar, html.lite .side { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
html.lite .kpi, html.lite .card, html.lite #page > * { animation: none !important; }
html.lite .kpi::after, html.lite .card::after, html.lite .bg .sweep2, html.lite .bg .stars { display: none; }
html.lite .kpi:hover, html.lite .card:hover { transform: none; }
[data-theme="signal"] .side-live { display: none; }
[data-theme="signal"] .srv-flag { opacity: .05; filter: blur(3px) saturate(1.2); }
.side .brand { padding-left: 44px; }
.side-collapse.in-brand { position: absolute; left: 4px; top: 6px; }
html.side-mini .side .brand, html.side-mini .side-collapse.in-brand { padding-left: 0; }
html.side-mini .side-collapse.in-brand { position: static; margin: 0 auto; }
html.side-mini .side .brand { flex-direction: column; gap: 10px; }
.swatches button { width: 24px; height: 24px; }
nav.tabs a .ico { display: grid !important; }
nav.tabs a .ico svg { display: block; }
/* کاشی‌های آمار صفحه تانل‌ها */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.tile { display: flex; align-items: center; gap: 14px; padding: 16px 18px; min-width: 0; }
.tile .ic { width: 44px; height: 44px; flex: none; border-radius: 14px; display: grid; place-items: center; color: var(--a1); background: color-mix(in srgb, var(--a1) 12%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--a1) 30%, transparent); }
.tile.r .ic { color: var(--a3); background: color-mix(in srgb, var(--a3) 12%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--a3) 30%, transparent); }
.tile .ic svg { width: 20px; height: 20px; }
.tile .k { font-size: 12.5px; color: var(--muted); }
.tile .v { font: 700 22px/1.3 'Rajdhani', var(--font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1280px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .tiles { gap: 10px; } .tile { padding: 12px; gap: 10px; } .tile .ic { width: 36px; height: 36px; } .tile .v { font-size: 18px; } }

/* وضعیت ادغام‌شده در هدر */
.sbar-status { display: none !important; }
.hpill#hStatus { height: auto; min-height: 40px; padding: 6px 14px; }

/* ===== لایه ظاهری «Premium Dark Network Command Center» (فقط CSS؛ بدون تغییر در ساختار و عملکرد) ===== */
html[data-theme="zone"] { --bg: #060a14; --bg2: #0b1428; --muted: #9aa6b8; }
html[data-theme="zone"] body { --card: rgba(11,16,30,.80); --card-solid: #0c1222; --line: rgba(140,170,255,.10); --line2: rgba(140,170,255,.18); }
/* هاله‌های نور محیطی: آبی، فیروزه‌ای، بنفش در گوشه‌ها؛ فقط transform با CSS */
html[data-theme] .bg .aur { display: block !important; filter: blur(110px); mix-blend-mode: screen; }
html[data-theme] .bg .a1 { width: 760px; height: 520px; top: -240px; right: -180px; left: auto; background: radial-gradient(closest-side, #2f8bff, transparent); opacity: .34; animation: pgFloatA 38s ease-in-out infinite alternate; }
html[data-theme] .bg .a2 { width: 680px; height: 520px; top: auto; bottom: -260px; left: -200px; background: radial-gradient(closest-side, #22d3c5, transparent); opacity: .20; animation: pgFloatB 46s ease-in-out infinite alternate; }
html[data-theme] .bg .a3 { width: 620px; height: 620px; top: 24%; right: auto; left: 38%; bottom: auto; background: radial-gradient(closest-side, #8b5cf6, transparent); opacity: .16; animation: pgFloatA 54s ease-in-out infinite alternate-reverse; }
@keyframes pgFloatA { to { transform: translate3d(-90px, 70px, 0) scale(1.12); } }
@keyframes pgFloatB { to { transform: translate3d(110px, -80px, 0) scale(1.1); } }
/* الگوی شبکه هندسی بسیار ظریف */
.bg::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(130,165,255,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(130,165,255,.045) 1px, transparent 1px); background-size: 56px 56px; -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 25%, #000 25%, transparent 78%); mask-image: radial-gradient(ellipse 80% 70% at 50% 25%, #000 25%, transparent 78%); }
/* منو: همان ساختار، ظاهر ظریف‌تر */
.side { background: linear-gradient(180deg, rgba(12,18,34,.86), rgba(7,11,22,.90)); box-shadow: 0 30px 80px -34px #000, inset 0 1px 0 rgba(255,255,255,.05), inset 0 0 0 1px rgba(140,170,255,.06); }
nav.tabs a { transition: color .2s, background .25s, transform .25s; }
nav.tabs a:hover { background: rgba(140,170,255,.06); color: var(--text); transform: translateX(-2px); }
nav.tabs a.on { background: linear-gradient(270deg, color-mix(in srgb, var(--a1) 20%, transparent), transparent 88%); }
nav.tabs a.on::before { width: 3px; background: linear-gradient(180deg, var(--a2), var(--a1)); box-shadow: 0 0 10px var(--a1), 0 0 22px color-mix(in srgb, var(--a1) 60%, transparent); }
nav.tabs .grp { letter-spacing: .06em; opacity: .8; }
/* کارت‌ها و بخش‌ها: مرز ظریف و سایه کنترل‌شده */
.box { box-shadow: 0 20px 44px -28px rgba(0,0,0,.9), 0 1px 0 rgba(255,255,255,.04) inset; }
.card.box:hover, .kpi.box:hover { box-shadow: 0 26px 52px -26px rgba(0,0,0,.95), 0 0 0 1px color-mix(in srgb, var(--a1) 22%, transparent), 0 1px 0 rgba(255,255,255,.06) inset; }
.pagebar h1 { letter-spacing: -.01em; }
.hpill, .hbtn { background: rgba(140,170,255,.045); }
/* موبایل و دستگاه‌های ضعیف: سبک‌تر */
@media (max-width: 860px) { html[data-theme] .bg .aur { filter: blur(70px); } html[data-theme] .bg .a3 { display: none !important; } .bg::before { background-size: 44px 44px; } nav.tabs a:hover { transform: none; } }
@media (prefers-reduced-motion: reduce) { html[data-theme] .bg .aur { animation: none !important; } nav.tabs a:hover { transform: none; } }

/* ===== صفحه ورود «دروازه دیجیتالی» + پس‌زمینه «Aurora Flow» (فقط CSS) ===== */
#login { background: radial-gradient(70% 60% at 50% 45%, rgba(24,40,90,.55), transparent 70%); overflow: hidden; }
.gate { position: absolute; left: 50%; top: 50%; width: min(820px, 150vw); aspect-ratio: 1; transform: translate(-50%, -50%); pointer-events: none; }
.gate svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.g-r circle { fill: none; stroke-width: 1.6; opacity: .75; }
.g-r { transform-origin: 200px 200px; will-change: transform; }
.gr1 { animation: gSpin 120s linear infinite; } .gr2 { animation: gSpin 80s linear infinite reverse; } .gr3 { animation: gSpin 100s linear infinite; } .gr4 { animation: gSpin 60s linear infinite reverse; }
.g-core { fill: url(#gg1); opacity: .14; transform-origin: 200px 200px; animation: gPulse 7s ease-in-out infinite; }
.g-glow { position: absolute; inset: 22%; border-radius: 50%; background: radial-gradient(closest-side, rgba(47,139,255,.45), rgba(139,92,246,.22) 55%, transparent 75%); filter: blur(30px); animation: gPulse 9s ease-in-out infinite; }
.g-beam { position: absolute; left: 50%; top: -10%; bottom: -10%; width: 2px; margin-left: -1px; background: linear-gradient(180deg, transparent, rgba(120,170,255,.55), transparent); opacity: .35; animation: gBeam 10s ease-in-out infinite; }
@keyframes gSpin { to { transform: rotate(360deg); } }
@keyframes gPulse { 50% { transform: scale(1.08); opacity: .9; } }
@keyframes gBeam { 50% { opacity: .12; transform: scaleY(.9); } }
.g-core { transform-box: view-box; }
.login-card { z-index: 2; max-width: 400px; background: linear-gradient(180deg, rgba(14,20,38,.78), rgba(8,12,24,.82)); border: 1px solid rgba(140,170,255,.16); border-radius: 28px; padding: 36px 30px 26px; box-shadow: 0 40px 100px -30px #000, 0 0 80px -34px #2f8bff, inset 0 1px 0 rgba(255,255,255,.06); }
.lg-ico { width: 58px; height: 58px; margin: 0 auto 4px; border-radius: 18px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #2f8bff, #8b5cf6); box-shadow: 0 10px 30px -10px #2f8bff, inset 0 1px 0 rgba(255,255,255,.4); }
.lg-ico svg { width: 28px; height: 28px; }
.lg-title { margin: 6px 0 0; font-family: 'Rajdhani', var(--font); font-size: 27px; font-weight: 700; letter-spacing: .22em; direction: ltr; background: linear-gradient(90deg, #bcd6ff, #c9b6ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lg-sub { margin: 0 0 14px !important; color: var(--muted); font-size: 12.5px; letter-spacing: .14em; direction: ltr; }
.pw { position: relative; }
.pw .input { padding-inline-end: 46px; }
.pw-eye { position: absolute; top: 50%; inset-inline-end: 8px; transform: translateY(-50%); width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer; transition: color .2s, background .2s; }
.pw-eye:hover { color: var(--text); background: rgba(255,255,255,.06); }
.pw-eye svg { width: 19px; height: 19px; }
.pw-eye.on { color: var(--a1); }
#loginBtn { position: relative; background: linear-gradient(115deg, #2f8bff, #8b5cf6); box-shadow: 0 14px 34px -14px #2f8bff, inset 0 1px 0 rgba(255,255,255,.3); transition: filter .2s, transform .2s, box-shadow .2s; }
#loginBtn:hover:not(:disabled) { filter: brightness(1.1); transform: translateY(-1px); box-shadow: 0 18px 40px -14px #6d7bff, inset 0 1px 0 rgba(255,255,255,.35); }
#loginBtn:disabled { cursor: progress; opacity: .85; }
.lg-spin { display: none; width: 16px; height: 16px; margin-inline-start: 10px; border-radius: 50%; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; animation: gSpin .8s linear infinite; }
#loginBtn.loading .lg-spin { display: inline-block; }
#loginBtn.loading .lbl { opacity: .85; }
#login .err:not(:empty) { margin-top: 2px; padding: 9px 12px; border-radius: 12px; font-size: 13px; line-height: 1.7; color: #ffb4bf; background: rgba(251,113,133,.10); box-shadow: inset 0 0 0 1px rgba(251,113,133,.35); animation: gErr .3s ease; }
@keyframes gErr { from { opacity: 0; transform: translateY(-4px); } }
/* موج‌های نور «Aurora Flow» پشت محتوای پنل */
.bg .wave { position: absolute; left: 0; bottom: 0; width: 200%; height: 46vh; pointer-events: none; opacity: .5; will-change: transform; }
.bg .wave path { fill: none; stroke-width: 1.4; }
.bg .w1 { animation: gWave 70s linear infinite; }
.bg .w2 { bottom: -2vh; opacity: .32; animation: gWave 110s linear infinite reverse; }
@keyframes gWave { to { transform: translate3d(-50%, 0, 0); } }
@media (max-width: 860px) { .bg .w2 { display: none; } .bg .wave { height: 30vh; opacity: .35; } .gate { width: 170vw; } .login-card { padding: 30px 22px 22px; } .g-glow { filter: blur(20px); } }
@media (prefers-reduced-motion: reduce) { .g-r, .g-core, .g-glow, .g-beam, .bg .wave { animation: none !important; } }

/* ===== تم‌های بیشتر + انتخاب‌گر رنگ در هدر بالا ===== */
[data-theme="black"] { --bg: #000; --bg2: #000; --a1: #3b82f6; --a2: #8b5cf6; --a3: #22d3ee; --on-accent: #fff; }
[data-theme="black"] body { --card: rgba(9,9,11,.94); --card-solid: #060608; --field: rgba(0,0,0,.85); --line: rgba(255,255,255,.09); --line2: rgba(255,255,255,.16); --muted: #9ca3af; }
html[data-theme="black"] .bg { background: #000; }
html[data-theme="black"] .bg .aur, html[data-theme="black"] .bg .wave, html[data-theme="black"] .bg .floor, html[data-theme="black"] .bg .stars, html[data-theme="black"] .bg .noise, html[data-theme="black"] .bg .orbit, html[data-theme="black"] .bg .sweep2, html[data-theme="black"] .bg #kgrid { display: none !important; }
html[data-theme="black"] .bg::before, html[data-theme="black"] .bg::after { display: none; }
[data-theme="black"] .side { background: #040405; }
[data-theme="carbon"] { --bg: #0a0b0d; --bg2: #14171c; --a1: #94a3b8; --a2: #64748b; --a3: #cbd5e1; --on-accent: #0b0d10; }
[data-theme="carbon"] body { --card: rgba(17,19,23,.84); --card-solid: #111317; --line: rgba(203,213,225,.09); --line2: rgba(203,213,225,.17); }
[data-theme="turquoise"] { --bg: #031211; --bg2: #06302d; --a1: #2dd4bf; --a2: #22d3ee; --a3: #5eead4; --on-accent: #02130f; }
[data-theme="turquoise"] body { --card: rgba(6,28,27,.80); --card-solid: #061c1b; --line: rgba(94,234,212,.11); --line2: rgba(94,234,212,.20); }
[data-theme="emerald"] { --bg: #030f09; --bg2: #07281a; --a1: #34d399; --a2: #10b981; --a3: #a3e635; --on-accent: #021409; }
[data-theme="emerald"] body { --card: rgba(6,26,18,.80); --card-solid: #061a12; --line: rgba(52,211,153,.11); --line2: rgba(52,211,153,.20); }
[data-theme="crimson"] { --bg: #10060a; --bg2: #2a0a14; --a1: #f43f5e; --a2: #fb7185; --a3: #f59e0b; --on-accent: #fff; }
[data-theme="crimson"] body { --card: rgba(30,10,16,.80); --card-solid: #1e0a10; --line: rgba(251,113,133,.11); --line2: rgba(251,113,133,.20); }
[data-theme="gold"] { --bg: #0e0a03; --bg2: #261b06; --a1: #fbbf24; --a2: #f59e0b; --a3: #fde68a; --on-accent: #1a1203; }
[data-theme="gold"] body { --card: rgba(28,20,6,.80); --card-solid: #1c1406; --line: rgba(251,191,36,.11); --line2: rgba(251,191,36,.20); }
[data-theme="violet"] { --bg: #0a0614; --bg2: #1b0f3a; --a1: #a78bfa; --a2: #8b5cf6; --a3: #f0abfc; --on-accent: #fff; }
[data-theme="violet"] body { --card: rgba(20,12,40,.80); --card-solid: #140c28; --line: rgba(167,139,250,.12); --line2: rgba(167,139,250,.22); }
[data-theme="ice"] { --bg: #050b14; --bg2: #0a1c33; --a1: #7dd3fc; --a2: #38bdf8; --a3: #c7d2fe; --on-accent: #04121f; }
[data-theme="ice"] body { --card: rgba(8,20,36,.80); --card-solid: #081424; --line: rgba(125,211,252,.11); --line2: rgba(125,211,252,.20); }
/* هاله‌ها و موج‌ها همرنگ تم انتخاب‌شده */
html[data-theme] .bg .a1 { background: radial-gradient(closest-side, var(--a1), transparent); }
html[data-theme] .bg .a2 { background: radial-gradient(closest-side, var(--a3), transparent); }
html[data-theme] .bg .a3 { background: radial-gradient(closest-side, var(--a2), transparent); }
.bg .w1 stop:nth-child(1), .bg .w1 stop:nth-child(3) { stop-color: var(--a1); } .bg .w1 stop:nth-child(2) { stop-color: var(--a2); }
.bg .w2 stop:nth-child(1), .bg .w2 stop:nth-child(3) { stop-color: var(--a3); } .bg .w2 stop:nth-child(2) { stop-color: var(--a1); }
/* انتخاب‌گر رنگ (دکمه در هدر) */
.themepop { position: fixed; top: 82px; left: 34px; z-index: 80; width: 300px; padding: 14px; border-radius: 20px; background: linear-gradient(180deg, rgba(14,20,38,.96), rgba(8,12,24,.97)); border: 1px solid var(--line2); box-shadow: 0 30px 80px -20px #000; animation: gErr .18s ease; }
.themepop .tp-h { font-weight: 800; font-size: 13.5px; margin-bottom: 10px; color: var(--text); }
#themePop .swatches { display: grid !important; grid-template-columns: repeat(2, 1fr); gap: 6px; }
#themePop .swatches button { width: auto; height: auto; border-radius: 12px; display: flex; align-items: center; gap: 9px; padding: 7px 10px; background: rgba(255,255,255,.04); border: 1px solid var(--line); color: var(--text); font-size: 13px; text-align: start; box-shadow: none; }
#themePop .swatches button i { width: 18px; height: 18px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); }
#themePop .swatches button:hover { background: rgba(255,255,255,.08); transform: none; }
#themePop .swatches button.on { border-color: var(--a1); box-shadow: 0 0 0 1px var(--a1), 0 0 16px -6px var(--a1); }
#themePop.hidden { display: none; }
@media (max-width: 860px) { .themepop { left: 12px; right: 12px; width: auto; top: 76px; } }

/* پیشنهاد بهترین تانل */
.adv-pair { margin-top: 14px; }
.adv-pair h3 { flex-wrap: wrap; row-gap: 6px; }
.adv-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.adv-envs { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 10px; }
.adv-env { display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line2); background: rgba(255,255,255,.02); line-height: 1.8; }
.adv-env b { font-size: 13px; }
.adv-env .warn, .adv-pair .warn { color: #fcd34d; }
.adv-fs { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 6px; }
.adv-lbl { font-size: 12.5px; color: var(--muted); font-weight: 700; }
.adv-why { min-width: 220px; max-width: 420px; white-space: normal; }
.adv-pair tr.dimrow td { opacity: .55; }
.adv-pair details summary { cursor: pointer; font-size: 12.5px; }
.row3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; align-items: end; }
