@font-face { font-family: "Vazirmatn"; src: url("fonts/Vazirmatn.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --bg: #0b0c12; --bg-2: #11131c; --panel: rgba(255,255,255,.045); --panel-2: rgba(255,255,255,.075); --card-2: rgba(255,255,255,.075); --hover: rgba(255,255,255,.1);
  --line: rgba(255,255,255,.08); --line-2: rgba(255,255,255,.14); --fg: #eef0f6; --fg-2: rgba(238,240,246,.72); --muted: rgba(238,240,246,.48);
  --accent: #7c8cff; --accent-2: #b07cff; --green: #34d399; --red: #fb6f84; --yellow: #fbbf24; --cyan: #22d3ee;
  --r: 16px; --ease: cubic-bezier(.2,.8,.2,1);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); color: var(--fg); font: 14px/1.75 "Vazirmatn", Tahoma, sans-serif; direction: rtl; -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: fixed; inset: -20%; z-index: -1; pointer-events: none;
  background: radial-gradient(40% 35% at 85% 10%, rgba(124,140,255,.22), transparent 70%),
              radial-gradient(35% 30% at 10% 30%, rgba(176,124,255,.18), transparent 70%),
              radial-gradient(40% 35% at 60% 95%, rgba(34,211,238,.12), transparent 70%); }
a { color: var(--accent); text-decoration: none; }
.ic { width: 18px; height: 18px; flex: none; }
.ltr { direction: ltr; unicode-bidi: embed; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
h1, h2, h3 { margin: 0; font-weight: 750; letter-spacing: -.2px; }
h1 { font-size: 22px; } h2 { font-size: 17px; } h3 { font-size: 15px; }
code, .mono { font-family: "Cascadia Code", Consolas, monospace; font-size: 12.5px; direction: ltr; unicode-bidi: embed; }

/* layout */
.app { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; padding: 18px 14px; display: flex; flex-direction: column; gap: 4px;
  background: rgba(12,13,20,.94); border-left: 1px solid var(--line); overflow-y: auto; overscroll-behavior: contain; }
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 10px 18px; }
.brand .logo { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 8px 24px rgba(124,140,255,.35); }
.brand b { display: block; font-size: 15px; } .brand small { color: var(--muted); font-size: 11.5px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 12px; color: var(--fg-2); transition: background .2s, color .2s; }
.nav a:hover { background: var(--panel-2); color: var(--fg); }
.nav a.on { background: linear-gradient(135deg, rgba(124,140,255,.22), rgba(176,124,255,.12)); color: #fff; box-shadow: inset 0 0 0 1px rgba(124,140,255,.3); }
.side .foot { margin-top: auto; padding: 10px 12px; font-size: 12px; color: var(--muted); }
.main { padding: 24px 28px 40px; min-width: 0; }
.topbar { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.topbar .grow { flex: 1; }
.burger { display: none; }

/* cards */
.card { background: var(--panel); border-radius: var(--r); box-shadow: inset 0 0 0 1px var(--line); padding: 18px; }
.lsum-vpn { margin-top: 10px; }
.lsum-vpn .ic { width: 15px; height: 15px; vertical-align: -3px; }
.lsum-bar { height: 7px; border-radius: 7px; background: rgba(255,255,255,.08); overflow: hidden; margin-top: 6px; }
.lsum-bar i { display: block; height: 100%; border-radius: 7px; background: linear-gradient(90deg, var(--accent), var(--cyan)); }
.card h2 { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.grid { display: grid; gap: 16px; }
.g4 { grid-template-columns: repeat(4, minmax(0,1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0,1fr)); } .g2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.stat { display: flex; gap: 14px; align-items: center; }
.stat .bub { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; color: #fff; flex: none; }
.stat .bub .ic { width: 22px; height: 22px; }
.stat b { display: block; font-size: 22px; line-height: 1.3; }
.stat span { color: var(--muted); font-size: 12.5px; }
.chart-box { position: relative; height: 260px; }

/* table */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: right; font-weight: 650; color: var(--muted); font-size: 12px; padding: 10px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:hover td { background: rgba(255,255,255,.02); }
.actions { display: flex; gap: 6px; justify-content: flex-end; }

/* controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 0; cursor: pointer; font: inherit; font-weight: 650; font-size: 13px;
  padding: 9px 16px; border-radius: 12px; background: var(--panel-2); color: var(--fg); transition: transform .15s var(--ease), background .2s, box-shadow .2s; white-space: nowrap; }
.btn:hover { background: var(--hover); }
.btn:active { transform: scale(.97); }
.btn.primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; box-shadow: 0 8px 24px rgba(124,140,255,.3); }
.btn.primary:hover { box-shadow: 0 10px 30px rgba(124,140,255,.45); }
.btn.danger { background: rgba(251,111,132,.14); color: #ff9fae; }
.btn.sm { padding: 6px 10px; font-size: 12px; border-radius: 10px; }
.btn.icon { padding: 7px; }
.btn .ic { width: 16px; height: 16px; }
label { display: block; font-size: 12.5px; color: var(--fg-2); margin: 12px 0 6px; font-weight: 600; }
.input, select, textarea { width: 100%; font: inherit; color: var(--fg); background: rgba(0,0,0,.28); border: 1px solid var(--line-2); border-radius: 12px;
  padding: 10px 12px; outline: none; transition: border-color .2s, box-shadow .2s; }
.input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(124,140,255,.18); }
select option { background: var(--bg-2); }
.help { font-size: 12px; color: var(--muted); margin-top: 5px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0 16px; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; margin: 6px 0; color: var(--fg); font-weight: 500; }
.switch input { position: absolute; opacity: 0; }
.switch i { width: 40px; height: 23px; border-radius: 12px; background: rgba(255,255,255,.14); position: relative; transition: background .2s; flex: none; }
.switch i::after { content: ""; position: absolute; top: 3px; right: 3px; width: 17px; height: 17px; border-radius: 50%; background: #fff; transition: transform .25s var(--ease); }
.switch input:checked + i { background: var(--green); }
.switch input:checked + i::after { transform: translateX(-17px); }
.feat-group { padding: 12px 14px; border-radius: 14px; background: rgba(0,0,0,.18); box-shadow: inset 0 0 0 1px var(--line); }
.feat-group h4 { margin: 0 0 6px; display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--fg-2); }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 650; background: var(--panel-2); white-space: nowrap; }
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.b-green { color: var(--green); background: rgba(52,211,153,.12); } .b-red { color: var(--red); background: rgba(251,111,132,.12); }
.b-yellow { color: var(--yellow); background: rgba(251,191,36,.12); } .b-cyan { color: var(--cyan); background: rgba(34,211,238,.12); }
.plan-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.plan-chip .ic { width: 14px; height: 14px; }

.flash { padding: 12px 16px; border-radius: 14px; margin-bottom: 16px; display: flex; gap: 10px; align-items: center; animation: pop .35s var(--ease); }
.flash.ok { background: rgba(52,211,153,.12); color: #8ff0c8; box-shadow: inset 0 0 0 1px rgba(52,211,153,.3); }
.flash.err { background: rgba(251,111,132,.12); color: #ffb3bf; box-shadow: inset 0 0 0 1px rgba(251,111,132,.3); }
@keyframes pop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* auth / installer */
.center { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth { width: min(440px, 100%); }
.auth .brand { justify-content: center; padding-bottom: 8px; }
.steps { display: flex; gap: 8px; justify-content: center; margin: 6px 0 18px; }
.steps span { width: 34px; height: 5px; border-radius: 3px; background: var(--panel-2); }
.steps span.on { background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.req { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.req:last-child { border: 0; }
.req .ok { color: var(--green); } .req .bad { color: var(--red); }

/* public plans */
.hero { text-align: center; padding: 40px 16px 10px; }
.hero h1 { font-size: 30px; background: linear-gradient(135deg, #fff, #c9ceff 50%, #d9b8ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--fg-2); max-width: 560px; margin: 10px auto 0; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; max-width: 1150px; margin: 28px auto; padding: 0 16px; }
.plan { position: relative; padding: 22px 20px; border-radius: 22px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); display: flex; flex-direction: column; gap: 12px;
  transition: transform .25s var(--ease), box-shadow .25s; overflow: hidden; }
.plan::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--pc); }
.plan::after { content: ""; position: absolute; top: -60px; left: -60px; width: 180px; height: 180px; border-radius: 50%; background: var(--pc); opacity: .08; filter: blur(10px); }
.plan:hover { transform: translateY(-4px); box-shadow: inset 0 0 0 1px var(--pc), 0 20px 50px rgba(0,0,0,.35); }
.plan .pi { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: color-mix(in srgb, var(--pc) 20%, transparent); color: var(--pc); }
.plan .pi .ic { width: 22px; height: 22px; }
.plan .price { font-size: 24px; font-weight: 800; }
.plan .price small { font-size: 12px; color: var(--muted); font-weight: 500; }
.plan ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; flex: 1; }
.plan li { display: flex; gap: 8px; align-items: center; }
.plan li .ic { width: 15px; height: 15px; }
.plan li.no { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(255,255,255,.2); }
.plan li .ic.y { color: var(--green); } .plan li .ic.n { color: rgba(255,255,255,.25); }
.plan.current { box-shadow: inset 0 0 0 2px var(--pc); }
.footer { text-align: center; color: var(--muted); font-size: 12.5px; padding: 30px 16px; }
.footer a { color: var(--fg-2); }
.keybox { font-family: Consolas, monospace; font-size: 20px; letter-spacing: 1px; direction: ltr; text-align: center; padding: 14px; border-radius: 14px;
  background: rgba(0,0,0,.35); box-shadow: inset 0 0 0 1px var(--line-2); user-select: all; }
.dropzone { border: 2px dashed var(--line-2); border-radius: 16px; padding: 28px; text-align: center; color: var(--fg-2); transition: border-color .2s, background .2s; cursor: pointer; }
.dropzone:hover, .dropzone.drag { border-color: var(--accent); background: rgba(124,140,255,.06); }
.dropzone .ic { width: 34px; height: 34px; color: var(--accent); }
.pager { display: flex; gap: 6px; justify-content: center; margin-top: 14px; }

@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 30; width: 260px; right: 0; transform: translateX(100%); transition: transform .3s var(--ease); }
  .side.open { transform: none; }
  .burger { display: inline-flex; }
  .g3, .g2, .form-grid { grid-template-columns: 1fr; }
  .main { padding: 16px; }
}
@media (max-width: 520px) { .g4 { grid-template-columns: 1fr; } }
td .mono, td.mono, a.mono { white-space: nowrap; }
@media (max-width: 860px) {
  .grid[style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
  .main, .card { min-width: 0; }
  .topbar h1 { font-size: 18px; }
}

/* modals */
dialog.modal { border: 0; padding: 0; background: transparent; color: var(--fg); width: min(720px, 94vw); max-width: none; overflow: visible; }
dialog.modal.wide { width: min(1120px, 96vw); }
dialog.modal::backdrop { background: rgba(4,5,9,.74); }
dialog.modal[open] > .mbox { animation: mIn .2s var(--ease); }
dialog.modal > .mbox { position: relative; background: linear-gradient(160deg, rgb(36,39,56), rgb(17,18,27));
  border-radius: 24px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12), inset 0 1px 0 rgba(255,255,255,.16), 0 34px 90px rgba(0,0,0,.6); padding: 20px 22px 22px; max-height: 88vh; overflow: auto; }
dialog.modal > .mbox::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 120px; border-radius: 24px 24px 0 0; pointer-events: none;
  background: radial-gradient(60% 100% at 80% 0%, rgba(124,140,255,.2), transparent 70%), radial-gradient(50% 100% at 10% 0%, rgba(176,124,255,.14), transparent 70%); }
.mhead { position: relative; display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.mhead h2 { flex: 1; margin: 0; display: flex; align-items: center; gap: 9px; }
.mhead .mic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 8px 22px rgba(124,140,255,.35); flex: none; }
.mfoot { display: flex; gap: 8px; justify-content: flex-start; margin-top: 18px; flex-wrap: wrap; }
@keyframes mIn { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
.glass-row { padding: 12px 14px; border-radius: 16px; background: rgba(255,255,255,.035); box-shadow: inset 0 0 0 1px var(--line); }

/* checkbox / radio */
input[type=checkbox]:not(.switch input), input[type=radio]:not(.switch input) { appearance: none; -webkit-appearance: none; width: 20px; height: 20px; margin: 0; border-radius: 7px; cursor: pointer;
  background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1.5px var(--line-2); display: inline-grid; place-items: center; vertical-align: middle; transition: background .2s, box-shadow .2s, transform .15s var(--ease); flex: none; }
input[type=radio]:not(.switch input) { border-radius: 50%; }
input[type=checkbox]:not(.switch input):hover, input[type=radio]:not(.switch input):hover { box-shadow: inset 0 0 0 1.5px var(--accent); }
input[type=checkbox]:not(.switch input):active { transform: scale(.9); }
input[type=checkbox]:not(.switch input):checked { background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 4px 12px rgba(124,140,255,.35); }
input[type=checkbox]:not(.switch input):checked::after { content: ""; width: 9px; height: 5px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
input[type=radio]:not(.switch input):checked { box-shadow: inset 0 0 0 1.5px var(--accent), 0 4px 12px rgba(124,140,255,.3); }
input[type=radio]:not(.switch input):checked::after { content: ""; width: 9px; height: 9px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.choice { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 16px; cursor: pointer; margin: 0; background: rgba(255,255,255,.035);
  box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .2s, background .2s; font-weight: 500; color: var(--fg); }
.choice:has(input:checked) { background: rgba(124,140,255,.1); box-shadow: inset 0 0 0 1.5px var(--accent); }
.choice b { display: block; font-size: 13px; } .choice small { display: block; color: var(--muted); font-size: 11.5px; font-weight: 400; margin-top: 2px; }
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
tr.sel-off td { opacity: .45; }
.tiers { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.tier { border-radius: 18px; padding: 12px 14px; background: linear-gradient(160deg, rgba(255,255,255,.05), rgba(255,255,255,.015)); box-shadow: inset 0 0 0 1px var(--line);
  transition: box-shadow .2s, opacity .2s; opacity: .62; }
.tier.on { opacity: 1; box-shadow: inset 0 0 0 1.5px rgba(124,140,255,.45), 0 10px 30px rgba(0,0,0,.25); background: linear-gradient(160deg, rgba(124,140,255,.12), rgba(176,124,255,.04)); }
.tier .th { display: flex; align-items: center; gap: 9px; }
.tier .ti { width: 32px; height: 32px; border-radius: 11px; display: grid; place-items: center; background: rgba(124,140,255,.16); color: var(--accent); }
.tier .ti .ic { width: 16px; height: 16px; }
.tier .th b { font-size: 13.5px; }
.tier .tg { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.tier .tg label { display: flex; align-items: center; gap: 5px; font-size: 11.5px; margin: 10px 0 5px; }
.tier .tg label .ic { width: 13px; height: 13px; color: var(--muted); }
.tier .tg .input { padding: 8px 10px; }
.tier .tf { font-size: 11.5px; color: var(--muted); margin-top: 8px; }
.brand .logo.has-img { background: none; padding: 0; overflow: hidden; box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.brand .logo.has-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.brand-up { display: flex; align-items: center; gap: 14px; margin: 4px 0 6px; }
.brand-prev { width: 72px; height: 72px; flex: none; border-radius: 20px; overflow: hidden; display: grid; place-items: center;
  background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--line), 0 10px 26px rgba(0,0,0,.3); }
.brand-prev img { width: 100%; height: 100%; object-fit: cover; display: block; }
.brand-def { width: 100%; height: 100%; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.brand-def .ic { width: 30px; height: 30px; }
.brand-meta { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1; }
.brand-meta b { font-size: 13.5px; } .brand-meta small { font-size: 11.5px; }
.mv-pair { display: inline-flex; gap: 2px; padding: 2px; border-radius: 11px; background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--line); vertical-align: middle; }
.mv-pair form { display: inline; margin: 0; }
.mv-pair .btn.sm { padding: 5px 6px; border-radius: 8px; background: transparent; }
.mv-pair .btn.sm:hover:not([disabled]) { background: var(--hover); }
.mv-pair .btn[disabled] { opacity: .3; cursor: default; transform: none; }
.mv-pair .btn .ic { width: 14px; height: 14px; }
.sort-hint { font-size: 11px; color: var(--muted); }
.np-sub { margin: 16px 0 6px; font-size: 12.5px; font-weight: 700; color: var(--fg-2); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.np-sub a { font-weight: 500; font-size: 11.5px; margin-inline-start: auto; }
.np-line { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12.5px; padding: 6px 0; line-height: 1.8; }
.np-line .muted { font-size: 11.5px; }
.np-acc { margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: rgba(0,0,0,.18); box-shadow: inset 0 0 0 1px var(--line); animation: pop .3s var(--ease); }
.np-acc .np-h { display: flex; gap: 8px; align-items: center; margin-bottom: 4px; }
.np-acc .np-h .muted { margin-inline-start: auto; font-size: 11.5px; }
.np-acc .np-h .ic { width: 18px; height: 18px; color: var(--accent); }
.np-acc table, .np-sub + .table-wrap table { font-size: 12px; }
.np-acc td, .np-acc th, .np-sub + .table-wrap td, .np-sub + .table-wrap th { padding: 7px 8px; }
.np-code { font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.aip-box { margin-top: 12px; }
.aip-sum { gap: 6px; }
.aip-at { font-size: 11.5px; }
.aip-det { margin-top: 10px; border-radius: 12px; background: rgba(0,0,0,.16); box-shadow: inset 0 0 0 1px var(--line); }
.aip-det > summary { cursor: pointer; padding: 9px 12px; font-size: 12.5px; font-weight: 650; color: var(--fg-2); }
.aip-list { display: flex; flex-direction: column; gap: 4px; padding: 0 10px 10px; max-height: 320px; overflow-y: auto; }
.aip-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12px; padding: 4px 6px; border-radius: 8px; background: rgba(255,255,255,.03); }
.aip-row .mono { font-size: 11.5px; }
.aip-row small { font-size: 11px; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
:root { color-scheme: dark; }
select option, select optgroup { background: #1b1e2c; color: #eef0ff; }

@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .22s; }
.navbar-load { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 9999; pointer-events: none; opacity: 0; transition: opacity .2s; }
.navbar-load i { position: absolute; inset: 0 100% 0 0; background: linear-gradient(90deg, #6b8cff, #b07cff, #34d399); box-shadow: 0 0 14px #8b7cff, 0 0 4px #b07cff; border-radius: 0 3px 3px 0; }
.navbar-load.on { opacity: 1; }
.navbar-load.on i { animation: navLoad 8s cubic-bezier(.1,.7,.2,1) forwards; }
.navbar-load.on::after { content: ""; position: absolute; top: 0; width: 120px; height: 3px; background: linear-gradient(90deg, transparent, rgba(255,255,255,.9), transparent); animation: navShine 1.1s linear infinite; }
@keyframes navLoad { 0% { right: 100%; } 20% { right: 55%; } 60% { right: 25%; } 100% { right: 8%; } }
@keyframes navShine { from { left: -120px; } to { left: 100%; } }
html.is-loading .main { opacity: .72; transition: opacity .25s; }
html.is-loading .main .card { position: relative; }
html.is-loading .main .card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.05) 50%, transparent 70%); background-size: 220% 100%; animation: cardShimmer 1.2s linear infinite; }
@keyframes cardShimmer { from { background-position: 120% 0; } to { background-position: -120% 0; } }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } .navbar-load.on::after, html.is-loading .main .card::after { animation: none; } }

:root[data-theme="light"] {
  --bg: #f4f5fa; --bg-2: #ffffff; --panel: #ffffff; --panel-2: #eef0f7; --card-2: #f4f5fb; --hover: #e6e9f4;
  --line: #e2e5ef; --line-2: #cfd4e3; --fg: #161a2b; --fg-2: #3b4157; --muted: #6a718c;
  --accent: #4f5bd5; --accent-2: #6d4fd5; --green: #12875a; --red: #cf3550; --yellow: #a96d12; --cyan: #0b8aa3;
  --elev: 0 1px 2px rgba(22,26,60,.06), 0 4px 14px rgba(22,26,60,.05); color-scheme: light;
}
:root[data-theme="light"] body::before { display: none; }
:root[data-theme="light"] body { background: var(--bg); }
:root[data-theme="light"] .card { background: var(--panel); box-shadow: inset 0 0 0 1px var(--line), var(--elev); }
:root[data-theme="light"] .side { background: #fbfbfe; border-left: 1px solid var(--line); }
:root[data-theme="light"] .nav a.on { background: color-mix(in srgb, var(--accent) 13%, #fff); color: var(--accent); box-shadow: none; font-weight: 700; }
:root[data-theme="light"] .nav a:hover { background: var(--panel-2); }
:root[data-theme="light"] .input, :root[data-theme="light"] select, :root[data-theme="light"] textarea { background: #fff; border-color: var(--line-2); }
:root[data-theme="light"] select option, :root[data-theme="light"] select optgroup { background: #fff; color: var(--fg); }
:root[data-theme="light"] .btn { background: var(--panel-2); }
:root[data-theme="light"] .btn:hover { background: var(--hover); }
:root[data-theme="light"] .btn.primary { background: var(--accent); color: #fff; box-shadow: 0 2px 8px color-mix(in srgb, var(--accent) 35%, transparent); }
:root[data-theme="light"] .btn.danger { background: color-mix(in srgb, var(--red) 12%, #fff); color: var(--red); }
:root[data-theme="light"] .switch i { background: #cdd2e1; }
:root[data-theme="light"] .switch input:checked + i { background: var(--green); }
:root[data-theme="light"] tr:hover td { background: #f7f8fc; }
:root[data-theme="light"] .flash.ok { background: #e9f8f1; color: #0f6e49; box-shadow: inset 0 0 0 1px #b8e8d2; }
:root[data-theme="light"] .flash.err { background: #fdecef; color: #a3223a; box-shadow: inset 0 0 0 1px #f5c2cc; }
:root[data-theme="light"] .feat-group, :root[data-theme="light"] .np-acc, :root[data-theme="light"] .aip-det { background: var(--card-2); }
:root[data-theme="light"] .keybox { background: var(--card-2); }
:root[data-theme="light"] dialog.modal > .mbox { background: #fff; box-shadow: 0 30px 80px rgba(20,24,60,.25), inset 0 0 0 1px var(--line); }
:root[data-theme="light"] dialog.modal > .mbox::before { opacity: .45; }
:root[data-theme="light"] dialog.modal::backdrop { background: rgba(20,24,50,.38); }
:root[data-theme="light"] input[type=checkbox]:not(.switch input), :root[data-theme="light"] input[type=radio]:not(.switch input) { background: #fff; }
:root[data-theme="light"] input[type=checkbox]:not(.switch input):checked { background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
:root[data-theme="light"] .choice, :root[data-theme="light"] .glass-row, :root[data-theme="light"] .tier { background: var(--card-2); }
:root[data-theme="light"] .badge { background: var(--panel-2); }
:root[data-theme="light"] .hero h1 { background: linear-gradient(135deg, #1b1f3a, #4f5bd5); -webkit-background-clip: text; background-clip: text; }
:root[data-theme="light"] .plan { background: #fff; box-shadow: inset 0 0 0 1px var(--line), var(--elev); }
:root[data-theme="light"] .lsum-bar { background: var(--panel-2); }

.nav a .nb { margin-inline-start: auto; }
.railbtn { display: inline-flex; }
@media (min-width: 861px) {
  :root[data-rail="rail"] .app { grid-template-columns: 76px 1fr; }
  :root[data-rail="rail"] .side { width: 76px; padding: 14px 10px; overflow-x: hidden; z-index: 40; transition: width .22s var(--ease), box-shadow .22s; }
  :root[data-rail="rail"] .side .lbl { opacity: 0; white-space: nowrap; transition: opacity .15s; }
  :root[data-rail="rail"] .side .brand { padding: 6px 8px 18px; }
  :root[data-rail="rail"] .nav a { padding: 10px 14px; white-space: nowrap; }
  :root[data-rail="rail"] .nav a .nb { position: absolute; margin: 0; transform: translate(10px, -10px) scale(.85); }
  :root[data-rail="rail"] .side:hover { width: 252px; box-shadow: -18px 0 40px rgba(10,12,30,.18); }
  :root[data-rail="rail"] .side:hover .lbl { opacity: 1; }
  :root[data-rail="rail"] .side:hover .nav a .nb { position: static; transform: none; margin-inline-start: auto; }
  .bnav { display: none; }
}
.bnav { display: none; }
@media (max-width: 860px) {
  .railbtn { display: none; }
  .bnav { display: flex; position: fixed; inset: auto 0 0 0; z-index: 35; justify-content: space-around; padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px));
    background: var(--panel); box-shadow: 0 -1px 0 var(--line), 0 -8px 24px rgba(10,12,30,.08); }
  .bnav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border-radius: 12px; color: var(--muted); font-size: 11px; }
  .bnav a .ic { width: 20px; height: 20px; }
  .bnav a.on { color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); font-weight: 700; }
  .main { padding-bottom: 86px; }
  .hide-sm { display: none; }
}
.today { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-bottom: 16px; }
.today a { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--r); background: var(--panel); box-shadow: inset 0 0 0 1px var(--line), var(--elev, none); color: var(--fg); }
.today a .ti { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; background: color-mix(in srgb, var(--tc, var(--accent)) 14%, transparent); color: var(--tc, var(--accent)); }
.today a b { display: block; font-size: 20px; line-height: 1.2; } .today a span { color: var(--muted); font-size: 12px; }
.today a.zero { opacity: .6; }
@media (min-width: 861px) { .topbar .burger { display: none; } }
@media (max-width: 860px) { .topbar .burger { display: inline-flex; } }
.jdp-f { position: relative; display: flex; align-items: center; }
.jdp-f .jdp-t { cursor: pointer; padding-left: 30px; }
.jdp-x { position: absolute; left: 8px; border: 0; background: none; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; padding: 0; }
.jdp { position: absolute; z-index: 3000; width: 272px; padding: 12px; border-radius: 18px; background: rgba(22,24,34,.97); backdrop-filter: blur(24px); box-shadow: 0 20px 50px rgba(0,0,0,.5), inset 0 0 0 1px rgba(255,255,255,.1); direction: rtl; }
.jdp-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.jdp-h button { width: 30px; height: 30px; border-radius: 10px; border: 0; background: rgba(255,255,255,.06); color: inherit; font-size: 18px; cursor: pointer; }
.jdp-h b { font-size: 13.5px; }
.jdp-w, .jdp-g { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; text-align: center; }
.jdp-w span { font-size: 11px; color: var(--muted); padding: 2px 0; }
.jdp-g button { height: 32px; border: 0; border-radius: 9px; background: transparent; color: inherit; font: inherit; font-size: 12.5px; cursor: pointer; }
.jdp-g button:hover { background: rgba(255,255,255,.08); }
.jdp-g button.td { box-shadow: inset 0 0 0 1px var(--accent); }
.jdp-g button.on { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; font-weight: 700; }
.jdp-tm { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 12px; }
.jdp-tm .input { width: 72px; padding: 6px 8px; }
.jdp-a { display: flex; justify-content: space-between; margin-top: 10px; }
:root[data-theme="light"] .jdp { background: rgba(255,255,255,.98); }

.tbl-tools { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 6px 0 8px; }
.tbl-tools .tbl-find { flex: 1 1 200px; min-width: 160px; max-width: 360px; padding: 8px 12px; font-size: 12.5px; }
.tbl-tools .tbl-cnt { font-size: 12px; margin-inline-start: 4px; }
tr.tbl-more td { text-align: center; cursor: pointer; color: var(--accent); font-size: 12.5px; padding: 12px; }
tr.tbl-more td:hover { background: rgba(124,140,255,.08); }
tr[hidden] { display: none !important; }

.main { overflow-x: clip; }
.mic.mic-danger { background: linear-gradient(135deg, #fb6f84, #e11d48) !important; box-shadow: 0 8px 22px rgba(225,29,72,.35) !important; }
.awc .awc-msg, .bkdlg .bk-msg { margin: 0 0 6px; color: var(--fg-2); line-height: 1.9; white-space: pre-line; }
.bkdlg .bk-field { margin-top: 8px; }
.bkbar { position: fixed; z-index: 45; inset: auto 0 16px 0; margin: 0 auto; width: min(980px, calc(100vw - 32px)); display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap;
  padding: 10px 14px; border-radius: 18px; background: rgba(24,26,40,.94); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 18px 50px rgba(0,0,0,.45), inset 0 0 0 1px rgba(124,140,255,.35); animation: pop .25s var(--ease); }
.bkbar[hidden] { display: none; }
.bk-info { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.bk-info .bk-n { font-size: 16px; color: var(--accent); }
.bk-info button { border: 0; background: none; color: var(--accent); font: inherit; font-size: 12px; cursor: pointer; padding: 2px 4px; display: inline-flex; gap: 4px; align-items: center; }
.bk-info button .ic { width: 14px; height: 14px; }
.bk-acts { display: flex; gap: 6px; flex-wrap: wrap; margin-inline-start: auto; }
body.bk-on .main { padding-bottom: 110px; }
:root[data-theme="light"] .bkbar { background: rgba(255,255,255,.96); box-shadow: 0 18px 50px rgba(20,24,60,.18), inset 0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent); }
tr.bk-sel td, .bk-row.bk-sel { background: color-mix(in srgb, var(--accent) 9%, transparent) !important; }
th .bk-all, td .bk { margin: 0; }
td.ck, th.ck { width: 34px; padding-inline-end: 0; }

.pf { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 650; background: var(--panel-2); white-space: nowrap; }
.pf .ic { width: 13px; height: 13px; }
.pf b { font-weight: 700; opacity: .85; }
.pf.p-and { color: #3ddc84; background: rgba(61,220,132,.12); } .pf.p-win { color: #4cc2ff; background: rgba(76,194,255,.12); }
.pf.p-mac { color: #c8cbd6; background: rgba(200,203,214,.12); } .pf.p-lin { color: #fbbf24; background: rgba(251,191,36,.12); }
.pf.p-ios { color: #e5e7eb; background: rgba(229,231,235,.1); } .pf.p-web { color: var(--cyan); background: rgba(34,211,238,.12); }
:root[data-theme="light"] .pf.p-and { color: #12875a; } :root[data-theme="light"] .pf.p-win { color: #0b6fb3; } :root[data-theme="light"] .pf.p-mac, :root[data-theme="light"] .pf.p-ios { color: #3b4157; background: #eef0f7; } :root[data-theme="light"] .pf.p-lin { color: #a96d12; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; background: var(--panel-2); color: var(--fg-2); white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.chip .ic { width: 13px; height: 13px; flex: none; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.tm { display: inline-flex; flex-direction: column; line-height: 1.35; white-space: nowrap; }
.tm b { font-weight: 700; font-variant-numeric: tabular-nums; font-size: 12.5px; }
.tm small { color: var(--muted); font-size: 10.5px; }
.empty { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 34px 16px; color: var(--muted); }
.empty .ic { width: 34px; height: 34px; color: var(--accent); opacity: .8; }
.empty b { color: var(--fg-2); font-size: 14px; }
.empty span { font-size: 12.5px; max-width: 420px; }
.pager { flex-wrap: wrap; align-items: center; }
.pager .pg-of { font-size: 12px; margin-inline-start: 8px; }

.flt { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin-bottom: 12px; }
.flt > * { flex: 1 1 150px; min-width: 0; }
.flt .grow2 { flex: 3 1 240px; }
.flt label { margin: 0 0 4px; font-size: 11.5px; color: var(--muted); }
.flt .input, .flt select { padding: 8px 11px; font-size: 12.5px; }
.flt .fbtns { flex: 0 0 auto; display: flex; gap: 6px; }
.seg { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; margin-bottom: 12px; }
.seg a { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px; font-size: 12.5px; background: var(--card-2); box-shadow: inset 0 0 0 1px var(--line); color: inherit; }
.seg a b { font-size: 11px; padding: 0 7px; border-radius: 99px; background: rgba(127,127,127,.16); }
.seg a.on { background: color-mix(in srgb, var(--accent) 20%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 55%, transparent); font-weight: 700; }
.seg a .ic { width: 14px; height: 14px; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.toolbar .row { gap: 6px; }

.table-wrap.tall { max-height: min(72vh, 900px); overflow: auto; overscroll-behavior: contain; border-radius: 12px; }
.table-wrap.tall th { position: sticky; top: 0; z-index: 2; background: rgb(20,22,33); }
:root[data-theme="light"] .table-wrap.tall th { background: #fff; }
.lv td { vertical-align: top; }
.lv tr.lv-row > td:first-child { box-shadow: inset -3px 0 0 transparent; }
.lv tr.l-error > td:first-child { box-shadow: inset -3px 0 0 var(--red); }
.lv tr.l-warn > td:first-child { box-shadow: inset -3px 0 0 var(--yellow); }
.lv tr.l-ok > td:first-child { box-shadow: inset -3px 0 0 var(--green); }
.lv tr.l-info > td:first-child { box-shadow: inset -3px 0 0 color-mix(in srgb, var(--accent) 60%, transparent); }
.lvl { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 99px; }
.lvl::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.lvl.l-error { color: var(--red); background: rgba(251,111,132,.12); } .lvl.l-warn { color: var(--yellow); background: rgba(251,191,36,.12); }
.lvl.l-ok { color: var(--green); background: rgba(52,211,153,.12); } .lvl.l-info { color: var(--accent); background: rgba(124,140,255,.12); }
.lv .msg { max-width: 640px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.lv tr.open .msg { white-space: pre-wrap; word-break: break-word; overflow: visible; }
.lv .more { display: none; margin-top: 8px; padding: 10px 12px; border-radius: 12px; background: rgba(0,0,0,.18); box-shadow: inset 0 0 0 1px var(--line); font-size: 12px; }
.lv tr.open .more { display: block; }
:root[data-theme="light"] .lv .more { background: var(--card-2); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; font-size: 12px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.copyb { border: 0; background: var(--panel-2); color: var(--fg-2); border-radius: 8px; padding: 3px 7px; cursor: pointer; font: inherit; font-size: 11px; display: inline-flex; gap: 4px; align-items: center; }
.copyb .ic { width: 13px; height: 13px; }

@media (max-width: 760px) {
  table.rt, table.rt tbody, table.rt tr, table.rt td { display: block; width: 100%; }
  table.rt thead, table.rt tr:has(> th) { display: none; }
  table.rt tr { position: relative; margin: 0 0 10px; padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,.03); box-shadow: inset 0 0 0 1px var(--line); }
  :root[data-theme="light"] table.rt tr { background: var(--card-2); }
  table.rt td { border: 0; padding: 4px 0; display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; text-align: left; min-width: 0; }
  table.rt td > * { min-width: 0; }
  table.rt td[data-l]::before { content: attr(data-l); color: var(--muted); font-size: 11.5px; flex: none; text-align: right; padding-top: 1px; }
  table.rt td.ck { position: absolute; top: 10px; left: 10px; width: auto; padding: 0; }
  table.rt td.ck::before, table.rt td.actions::before, table.rt td.full::before { display: none; }
  table.rt td.actions { justify-content: flex-start; flex-wrap: wrap; padding-top: 8px; margin-top: 4px; border-top: 1px solid var(--line); }
  table.rt td.full { display: block; text-align: right; }
  table.rt td.ttl { font-weight: 700; padding-left: 34px; justify-content: flex-start; text-align: right; }
  table.rt td.ttl::before { display: none; }
  table.rt td:empty { display: none; }
  table.rt tr:hover td { background: none; }
  .lv .msg { max-width: none; white-space: normal; }
  .table-wrap.tall { max-height: none; overflow: visible; }
  .bkbar { inset: auto 0 calc(70px + env(safe-area-inset-bottom, 0px)) 0; width: calc(100vw - 20px); padding: 8px 10px; }
  .bk-acts { margin: 0; }
  .bk-acts .btn span { display: none; }
  .bk-acts .btn { padding: 7px 9px; }
  body.bk-on .main { padding-bottom: 170px; }
  .flt > * { flex-basis: 120px; }
  .toolbar { gap: 6px; }
  .card { padding: 14px; }
  .topbar { gap: 8px; margin-bottom: 14px; }
  .topbar h1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
}

