/* NEXRADIUS reseller panel (/panel). Persian, right to left, phone first. */
@font-face {
    font-family: "Vazirmatn"; font-style: normal; font-weight: 100 900; font-display: swap;
    src: url("/css/fonts/Vazirmatn-Variable.woff2") format("woff2");
}
:root {
    --bg: #f3f5f9; --card: #ffffff; --ink: #0f1e3d; --ink2: #3b4a66; --muted: #6b7890; --line: #e3e8f0; --line2: #eef1f6;
    --navy: #0f1e3d; --navy2: #1b2f5e; --accent: #2f6bff; --accent-soft: #e8efff;
    --ok: #12805c; --ok-soft: #e3f5ee; --warn: #b26a00; --warn-soft: #fff3df; --bad: #c62f3c; --bad-soft: #fde9eb;
    --radius: 14px; --shadow: 0 1px 2px rgba(15,30,61,.06), 0 4px 16px rgba(15,30,61,.05);
    --side: 248px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.7 "Vazirmatn", Tahoma, sans-serif; }
a { color: var(--accent); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
[dir=ltr], .ltr { direction: ltr; unicode-bidi: isolate; }
.num { font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }
:focus-visible { outline: 3px solid rgba(47,107,255,.35); outline-offset: 2px; }

/* ------------------------------------------------------------- gate (login) */
body.gate { min-height: 100vh; display: grid; place-items: center; padding: 16px;
    background: radial-gradient(1200px 600px at 100% 0%, #1b2f5e 0%, #0f1e3d 55%, #0a1530 100%); }
.gate-box { width: 100%; max-width: 380px; background: var(--card); border-radius: 20px; padding: 28px 24px 18px;
    box-shadow: 0 20px 60px rgba(0,0,0,.35); text-align: center; }
.gate-logo { border-radius: 16px; }
.gate-box h1 { margin: 10px 0 0; font-size: 22px; }
.gate-sub { margin: 0 0 18px; color: var(--muted); font-size: 13.5px; }
.gate-box form { text-align: start; }
.gate-actions { display: flex; gap: 8px; justify-content: center; margin-top: 12px; }
.gate-foot { margin: 18px 0 0; color: var(--muted); font-size: 11px; letter-spacing: .2em; }

/* ------------------------------------------------------------- controls */
.field { display: block; margin: 0 0 12px; }
.field > span { display: block; font-size: 13px; color: var(--ink2); margin-bottom: 4px; font-weight: 600; }
.field small { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }
input[type=text], input[type=password], input[type=number], input[type=search], input[type=tel], input:not([type]), select, textarea {
    width: 100%; height: 44px; border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 0 12px;
    transition: border-color .15s, box-shadow .15s; }
textarea { height: auto; min-height: 120px; padding: 10px 12px; line-height: 1.8; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 42px; padding: 0 16px;
    border: 0; border-radius: 10px; background: var(--navy); color: #fff; font-weight: 700; cursor: pointer; white-space: nowrap;
    transition: background .15s, transform .05s; }
.btn:hover { background: var(--navy2); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .55; cursor: default; }
.btn.wide { width: 100%; height: 46px; margin-top: 4px; }
.btn.ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn.ghost:hover { background: var(--line2); }
.btn.blue { background: var(--accent); }
.btn.blue:hover { background: #1f58e6; }
.btn.danger { background: #fff; color: var(--bad); border: 1px solid #f3c7cc; }
.btn.danger:hover { background: var(--bad-soft); }
.btn.sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.btn svg { width: 18px; height: 18px; flex: none; }
.iconbtn { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: #fff; display: inline-grid;
    place-items: center; cursor: pointer; color: var(--ink2); }
.iconbtn svg { width: 18px; height: 18px; }
.note { padding: 10px 12px; border-radius: 10px; font-size: 13.5px; margin: 0 0 12px; text-align: start; }
.note.bad { background: var(--bad-soft); color: var(--bad); }
.note.warn { background: var(--warn-soft); color: var(--warn); }
.note.ok { background: var(--ok-soft); color: var(--ok); }
.note.info { background: var(--accent-soft); color: #1d48b8; }

/* ------------------------------------------------------------- layout */
.boot { min-height: 100vh; display: grid; place-items: center; }
.spinner { width: 32px; height: 32px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.shell { min-height: 100vh; }
.side { position: fixed; inset: 0 0 0 auto; width: var(--side); background: var(--navy); color: #c9d3e8; display: flex; flex-direction: column; z-index: 20; }
.side .brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px; color: #fff; }
.side .brand img { width: 34px; height: 34px; border-radius: 9px; }
.side .brand b { font-size: 15px; display: block; line-height: 1.3; }
.side .brand span { font-size: 11.5px; color: #93a3c4; }
.nav { list-style: none; margin: 6px 0 0; padding: 0 10px; flex: 1; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: #c9d3e8; font-weight: 600; font-size: 14.5px; }
.nav a svg { width: 20px; height: 20px; flex: none; opacity: .9; }
.nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav a.on { background: rgba(255,255,255,.12); color: #fff; }
.side .me { padding: 12px 18px 16px; border-top: 1px solid rgba(255,255,255,.08); font-size: 13px; }
.side .me b { color: #fff; display: block; }
.side .me a { color: #93a3c4; font-size: 12.5px; }
.main { margin-inline-start: var(--side); padding: 22px 28px 40px; }
.wrap { max-width: 1480px; margin: 0 auto; }
.top { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.top h1 { margin: 0; font-size: 21px; flex: 1; min-width: 0; }
.top .back { color: var(--muted); }
.wallet-pill { display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 999px;
    padding: 6px 8px 6px 14px; font-weight: 700; font-size: 14px; color: var(--ink); }
.wallet-pill small { color: var(--muted); font-weight: 500; font-size: 12px; }
.wallet-pill .plus { width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; }
.tabbar { display: none; }

@media (max-width: 860px) {
    .side { display: none; }
    .main { margin: 0; padding: 14px 16px calc(84px + env(safe-area-inset-bottom)); }
    .top h1 { font-size: 18px; }
    .tabbar { display: flex; position: fixed; inset: auto 0 0 0; background: #fff; border-top: 1px solid var(--line); z-index: 30;
        padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); justify-content: space-around; }
    .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 1px; color: var(--muted); font-size: 11px; font-weight: 600; padding: 4px 0; }
    .tabbar a svg { width: 22px; height: 22px; }
    .tabbar a.on { color: var(--navy); }
    .tabbar a.make { color: #fff; }
    .tabbar a.make span.ic { width: 46px; height: 46px; margin-top: -20px; border-radius: 50%; background: var(--accent); display: grid; place-items: center;
        box-shadow: 0 6px 18px rgba(47,107,255,.4); }
    .tabbar a.make b { color: var(--navy); font-weight: 600; }
}

/* ------------------------------------------------------------- cards and grids */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; min-width: 0; }
.card + .card { margin-top: 14px; }
.card h2 { margin: 0 0 12px; font-size: 15.5px; display: flex; align-items: center; gap: 8px; }
.card h2 .more { margin-inline-start: auto; font-size: 13px; font-weight: 600; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dash { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 1100px) { .dash { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) { .g2, .g3 { grid-template-columns: minmax(0, 1fr); } }

.hero { background: linear-gradient(135deg, #0f1e3d 0%, #1b3a7a 100%); color: #fff; border-radius: 18px; padding: 18px; box-shadow: var(--shadow);
    display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.hero .k { font-size: 13px; color: #b8c6e6; }
.hero .v { font-size: 28px; font-weight: 800; line-height: 1.3; }
.hero .v small { font-size: 14px; font-weight: 500; color: #b8c6e6; }
.hero .acts { margin-inline-start: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.hero .btn { background: rgba(255,255,255,.14); }
.hero .btn:hover { background: rgba(255,255,255,.22); }
.hero .btn.blue { background: var(--accent); }

.tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin: 14px 0; }
@media (max-width: 1100px) { .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 520px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
.tile { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 14px; display: block; color: var(--ink); min-width: 0; }
.tile:hover { box-shadow: 0 0 0 2px var(--accent-soft), var(--shadow); }
.tile .k { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.tile .v { font-size: 24px; font-weight: 800; line-height: 1.4; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--muted); flex: none; }
.dot.ok { background: #19b37b; } .dot.warn { background: #f0a020; } .dot.bad { background: var(--bad); } .dot.blue { background: var(--accent); }
.dot.live { background: #19b37b; box-shadow: 0 0 0 3px rgba(25,179,123,.2); }

/* chart */
.chart { width: 100%; height: 190px; display: block; }
.chart .bar { fill: var(--accent); }
.chart .bar2 { fill: #9db8ff; }
.chart .bar:hover, .chart .bar2:hover { fill: var(--navy); }
.chart .axis { stroke: var(--line); }
.chart text { fill: var(--muted); font-size: 10px; font-family: inherit; }
.legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-inline-end: 5px; vertical-align: -1px; }
.hbars .row { display: grid; grid-template-columns: 110px minmax(0, 1fr) 40px; gap: 8px; align-items: center; font-size: 13px; margin: 6px 0; }
.hbars .track { height: 8px; border-radius: 99px; background: var(--line2); overflow: hidden; }
.hbars .fill { height: 100%; background: var(--accent); border-radius: 99px; }
.hbars .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* lists */
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line2); min-width: 0; }
.list li:last-child { border-bottom: 0; }
.list .grow { flex: 1; min-width: 0; }
.list .t { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list .s { font-size: 12.5px; color: var(--muted); }
.empty { text-align: center; color: var(--muted); padding: 24px 8px; font-size: 14px; }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 99px; white-space: nowrap;
    background: var(--line2); color: var(--ink2); }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.blue { background: var(--accent-soft); color: #1d48b8; }
.badge.teal { background: #ccfbf1; color: #0f766e; }

/* users */
.filters { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 12px; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 34px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line); background: #fff; font-size: 13px; font-weight: 600;
    cursor: pointer; color: var(--ink2); display: inline-flex; align-items: center; gap: 6px; }
.chip.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.chip .c { font-size: 11.5px; opacity: .75; }
.searchrow { display: flex; gap: 8px; margin-bottom: 12px; }
.searchrow input { flex: 1; }
.searchrow select { width: auto; min-width: 130px; }
.utable { width: 100%; border-collapse: collapse; font-size: 14px; }
.utable th { text-align: start; font-size: 12.5px; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.utable td { padding: 10px; border-bottom: 1px solid var(--line2); vertical-align: middle; }
.utable tr { cursor: pointer; }
.utable tbody tr:hover td { background: #f8faff; }
.uname { font-weight: 700; display: flex; align-items: center; gap: 8px; }
.prog { height: 6px; border-radius: 99px; background: var(--line2); overflow: hidden; min-width: 80px; margin-top: 4px; }
.prog i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.prog i.warn { background: #f0a020; } .prog i.bad { background: var(--bad); }
.ucards { display: none; }
@media (max-width: 760px) {
    .utable { display: none; }
    .ucards { display: block; }
    .ucard { display: block; background: var(--card); border-radius: 12px; box-shadow: var(--shadow); padding: 12px 14px; margin-bottom: 10px; color: var(--ink); }
    .ucard .r1 { display: flex; align-items: center; gap: 8px; }
    .ucard .r1 .uname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
    .ucard .r2 { display: flex; gap: 12px; font-size: 12.5px; color: var(--muted); margin-top: 4px; flex-wrap: wrap; }
}
.pager { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 14px; font-size: 13px; color: var(--muted); }

/* user page */
.ustat { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ustat .av { width: 48px; height: 48px; border-radius: 14px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center;
    font-weight: 800; font-size: 20px; flex: none; text-transform: uppercase; }
.ustat h2 { margin: 0; font-size: 19px; }
.kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; margin: 0; }
@media (max-width: 520px) { .kv { grid-template-columns: minmax(0, 1fr); } }
.kv div { min-width: 0; }
.kv dt { font-size: 12.5px; color: var(--muted); }
.kv dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.cred { display: flex; align-items: center; gap: 8px; background: var(--line2); border-radius: 10px; padding: 6px 6px 6px 12px; margin-bottom: 8px; }
.cred .l { font-size: 12.5px; color: var(--muted); width: 70px; flex: none; }
.cred code { flex: 1; font: 600 15px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; direction: ltr; text-align: left; overflow-wrap: anywhere; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.pre { font-family: inherit; white-space: pre-wrap; background: var(--line2); border-radius: 10px; padding: 12px; font-size: 14px; margin: 0 0 10px; overflow-wrap: anywhere; }
.pre.code { direction: ltr; text-align: left; font: 12.5px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; max-height: 260px; overflow: auto; }
.qr { width: 180px; height: 180px; background: #fff; padding: 8px; border-radius: 12px; border: 1px solid var(--line); }
.qr svg { width: 100%; height: 100%; display: block; }
.split { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.split > .grow { flex: 1; min-width: 220px; }

/* create */
.plans { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.plan { position: relative; border: 2px solid var(--line); border-radius: 14px; padding: 12px 14px; cursor: pointer; background: #fff; text-align: start; display: block; }
.plan input { position: absolute; opacity: 0; pointer-events: none; }
.plan.on { border-color: var(--accent); background: #f7f9ff; box-shadow: 0 0 0 3px var(--accent-soft); }
.plan .pn { font-weight: 800; font-size: 15px; }
.plan .pp { color: var(--accent); font-weight: 800; margin: 2px 0 4px; }
.plan .pf { font-size: 12.5px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 10px; }
.secs { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.sec { all: unset; box-sizing: border-box; display: flex; flex-direction: column; gap: 6px; min-height: 150px; padding: 16px; border: 1px solid var(--line);
       border-radius: 16px; background: #fff; cursor: pointer; text-align: start; box-shadow: 0 1px 2px rgba(15,23,42,.04); transition: border-color .15s, box-shadow .15s; }
.sec:hover, .sec:focus-visible { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.sec .st { font-weight: 800; font-size: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.sec .sd { font-size: 13px; color: var(--ink2); flex: 1; line-height: 1.7; white-space: pre-line; }
.sec .sf { display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
.sec .sn { font-size: 12px; color: var(--muted); }
.sec .sgo { display: block; text-align: center; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 13.5px; padding: 9px 14px; border-radius: 10px; white-space: nowrap; }
.secbar { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.secbar b { font-size: 15px; }
html[dir=rtl] .secbar .btn svg { transform: none; }
html[dir=ltr] .secbar .btn svg { transform: scaleX(-1); }
.plan.has-img { padding-top: 0; overflow: hidden; }
.plan .pimg { display: block; width: calc(100% + 28px); margin: 0 -14px 10px; aspect-ratio: 16/9; object-fit: cover; background: var(--line); }
.plan .pc { font-size: 11.5px; color: var(--ink2); margin-top: 1px; }
.plan .pd { font-size: 12.5px; color: var(--ink2); margin-top: 6px; line-height: 1.6; white-space: pre-line; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.seg { display: inline-flex; background: var(--line2); border-radius: 10px; padding: 3px; gap: 3px; }
.seg a { display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border-radius: 8px; font-weight: 700; font-size: 13.5px; color: var(--ink2); }
.seg a.on { background: #fff; color: var(--navy); box-shadow: 0 1px 3px rgba(15,30,61,.12); }
.seg button { border: 0; background: transparent; height: 36px; padding: 0 14px; border-radius: 8px; font-weight: 700; font-size: 13.5px; color: var(--ink2); cursor: pointer; }
.seg button.on { background: #fff; color: var(--navy); box-shadow: 0 1px 3px rgba(15,30,61,.12); }
.sumbar { position: sticky; bottom: 0; display: flex; align-items: center; gap: 12px; background: #fff; border-top: 1px solid var(--line);
    margin: 14px -16px -16px; padding: 12px 16px; border-radius: 0 0 var(--radius) var(--radius); flex-wrap: wrap; }
.sumbar .total { flex: 1; font-size: 14px; color: var(--muted); }
.sumbar .total b { color: var(--ink); font-size: 18px; }
/* change of service (vService) */
.sw-now { margin: 0 0 12px; font-size: 14px; }
.sw-note { margin: 12px 0 0; font-size: 13px; color: var(--muted); line-height: 1.7; }
.sw-q small.s { font-weight: 500; color: var(--muted); font-size: 12px; }
@media (max-width: 860px) { .sumbar { bottom: calc(68px + env(safe-area-inset-bottom)); } }
.created { list-style: none; margin: 0; padding: 0; }
.created li { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.created code { font: 600 14px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; direction: ltr; }

/* dialog */
.dlg-back { position: fixed; inset: 0; background: rgba(10,20,45,.45); z-index: 50; display: grid; place-items: center; padding: 16px; animation: fade .12s; }
.dlg { width: 100%; max-width: 440px; background: #fff; border-radius: 18px; box-shadow: 0 20px 60px rgba(0,0,0,.3); padding: 18px; max-height: calc(100vh - 32px); overflow: auto; }
.dlg h3 { margin: 0 0 12px; font-size: 17px; }
.dlg .acts { display: flex; gap: 8px; justify-content: flex-start; margin-top: 14px; flex-wrap: wrap; }
@media (max-width: 520px) { .dlg-back { place-items: end center; padding: 0; } .dlg { border-radius: 18px 18px 0 0; max-width: none; padding-bottom: calc(18px + env(safe-area-inset-bottom)); } }
@keyframes fade { from { opacity: 0; } }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 12px;
    font-size: 14px; z-index: 60; box-shadow: 0 10px 30px rgba(0,0,0,.25); max-width: calc(100vw - 32px); }
.toast.bad { background: var(--bad); }
@media (max-width: 860px) { .toast { bottom: calc(84px + env(safe-area-inset-bottom)); } }

/* wallet */
.amounts { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.tx .amt { font-weight: 800; direction: ltr; }
.tx .amt.plus { color: var(--ok); } .tx .amt.minus { color: var(--bad); }
.gw { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.countdown { font-weight: 800; font-size: 18px; }

/* subs */
.subcard { display: block; color: var(--ink); }
.subcard .r { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-top: 6px; }
.subcard .r b { color: var(--ink); }
.pricetbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.pricetbl td { padding: 6px 4px; border-bottom: 1px solid var(--line2); vertical-align: middle; }
.pricetbl input[type=text] { height: 38px; }
.pricetbl .min { font-size: 12px; color: var(--muted); }
.check { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.check input { width: 18px; height: 18px; }

/* telegram bot */
.botstate { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.botstate .big { font-size: 17px; font-weight: 800; }
.pricegrid { width: 100%; border-collapse: collapse; font-size: 14px; }
.pricegrid th { text-align: start; font-size: 12.5px; color: var(--muted); font-weight: 600; padding: 6px 4px; border-bottom: 1px solid var(--line); }
.pricegrid td { padding: 6px 4px; border-bottom: 1px solid var(--line2); vertical-align: middle; }
.pricegrid input[type=text] { height: 38px; }
.code { font: 800 22px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .12em; direction: ltr; }
.switch { display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; margin-bottom: 12px; }
.switch input { width: 20px; height: 20px; }
@media (max-width: 760px) { .pricegrid .hide-sm { display: none; } }

/* English (left to right) */
[dir=ltr] .side { inset: 0 auto 0 0; }
[dir=ltr] .iconbtn.back svg, [dir=ltr] .nav-back svg { transform: scaleX(-1); }
[dir=ltr] .hbars .row { direction: ltr; }
[dir=ltr] body { font-family: "Inter", "Segoe UI", "Vazirmatn", Tahoma, sans-serif; }
@media (max-width: 860px) { [dir=ltr] .main { margin: 0; } }

/* ------------------------------------------------------------- user page */
.uhero { position: relative; overflow: hidden; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; border-radius: 18px; padding: 18px 20px; color: #fff;
    background: linear-gradient(120deg, #0f1e3d 0%, #1b3a7a 60%, #2f6bff 140%); box-shadow: var(--shadow); }
.uhero::after { content: ""; position: absolute; inset-inline-end: -60px; top: -80px; width: 260px; height: 260px; border-radius: 50%; background: rgba(255,255,255,.06); pointer-events: none; }
.uhero.st-expired, .uhero.st-locked { background: linear-gradient(120deg, #3b1020 0%, #7a1b2f 70%, #c62f3c 150%); }
.uhero.st-finished { background: linear-gradient(120deg, #3a2405 0%, #7a4b0b 70%, #d98b14 150%); }
.uhero .av { width: 56px; height: 56px; border-radius: 16px; background: rgba(255,255,255,.14); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 24px;
    text-transform: uppercase; flex: none; border: 1px solid rgba(255,255,255,.2); }
.uhero .who { flex: 1; min-width: 0; }
.uhero h2 { margin: 0 0 6px; font-size: 22px; line-height: 1.3; overflow-wrap: anywhere; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip-l { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 99px; background: rgba(255,255,255,.12); color: #e6ecfa;
    font-size: 12.5px; font-weight: 600; border: 1px solid rgba(255,255,255,.16); }
.chip-l.on { background: rgba(25,179,123,.22); border-color: rgba(25,179,123,.5); color: #d6fbea; }
.uhero .badge { height: 26px; padding: 0 10px; }
.hero-acts { display: flex; gap: 8px; flex-wrap: wrap; position: relative; z-index: 1; }
.btn.light { background: #fff; color: var(--navy); }
.btn.light:hover { background: #eef3ff; }
.btn.glass { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22); }
.btn.glass:hover { background: rgba(255,255,255,.22); }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 14px 0; }
@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .kpis { grid-template-columns: minmax(0, 1fr); } }
.kpi { border-radius: 16px; padding: 14px 16px; background: var(--card); box-shadow: var(--shadow); border-top: 4px solid var(--kc); min-width: 0; }
.kpi .k { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--kc); }
.kpi .k svg { width: 17px; height: 17px; }
.kpi .v { font-size: 17px; font-weight: 800; margin-top: 6px; line-height: 1.5; overflow-wrap: anywhere; }
.kpi .v small { font-size: 13px; color: var(--muted); font-weight: 600; }
.kpi .s { font-size: 12.5px; color: var(--muted); margin-top: 4px; min-height: 18px; }
.kpi .bar { height: 7px; border-radius: 99px; background: var(--kt); overflow: hidden; margin-top: 10px; }
.kpi .bar i { display: block; height: 100%; border-radius: 99px; background: var(--kc); }
.kpi .bar i.warn { background: #f0a020; } .kpi .bar i.bad { background: var(--bad); }
.k-blue { --kc: #2f6bff; --kt: #e8efff; } .k-violet { --kc: #7a4dff; --kt: #efe9ff; } .k-amber { --kc: #c27a00; --kt: #fff3df; } .k-green { --kc: #12805c; --kt: #e3f5ee; }
.sec-head { display: flex; align-items: center; gap: 10px; margin: -2px 0 12px; }
.sec-head h2 { margin: 0; font-size: 15.5px; }
.sec-head .more { margin-inline-start: auto; }
.sec-ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.sec-ic svg { width: 18px; height: 18px; }
.c-blue { background: #e8efff; color: #2f6bff; } .c-green { background: #e3f5ee; color: #12805c; } .c-teal { background: #e0f6f6; color: #0e7c86; }
.c-slate { background: #eef1f6; color: #3b4a66; } .c-violet { background: #efe9ff; color: #6a3df0; } .c-amber { background: #fff3df; color: #b26a00; }
.card.tint-blue { background: linear-gradient(180deg, #f5f8ff 0%, #fff 120px); }
.card.tint-teal { background: linear-gradient(180deg, #f1fbfb 0%, #fff 120px); }
.act-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.act-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 78px; padding: 10px 8px; border-radius: 14px;
    border: 1px solid var(--tb); background: var(--tt); color: var(--tc); font-weight: 700; font-size: 13px; cursor: pointer; text-align: center; transition: transform .08s, box-shadow .15s; }
.act-tile svg { width: 22px; height: 22px; }
.act-tile:hover { box-shadow: 0 6px 16px rgba(15,30,61,.08); transform: translateY(-1px); }
.act-tile[disabled] { opacity: .5; }
.t-blue { --tt: #eef3ff; --tb: #d6e2ff; --tc: #1d4fd8; } .t-green { --tt: #eaf7f1; --tb: #c8eadb; --tc: #0f7350; }
.t-amber { --tt: #fff6e6; --tb: #f6deb0; --tc: #a15c00; } .t-red { --tt: #fdeef0; --tb: #f6cdd2; --tc: #b8232f; }
.t-violet { --tt: #f3eeff; --tb: #ddd0ff; --tc: #5b33d6; } .t-teal { --tt: #e9f8f8; --tb: #c4e9ea; --tc: #0b6f78; } .t-slate { --tt: #f3f5f9; --tb: #e1e6ef; --tc: #3b4a66; }
.wgbox { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; margin: 12px 0 10px; }
.wgbox .grow { flex: 1; min-width: 200px; }
.wgbox .pre.code { margin: 0; max-height: 196px; }

/* tickets */
.tk-badge { margin-inline-start: auto; }
.tk-list a { color: inherit; min-width: 0; }
.tk-sub { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-meta { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.tk-head { display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.tk-head h2 { margin: 0; overflow-wrap: anywhere; }
.tk-thread { display: flex; flex-direction: column; gap: 10px; margin: 12px 0; }
.tk-msg { max-width: 85%; padding: 10px 14px; border-radius: 14px; background: var(--card); box-shadow: var(--shadow); }
.tk-msg.me { align-self: flex-start; background: var(--accent-soft); }
.tk-msg.admin { align-self: flex-end; }
.tk-who { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.tk-body { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.8; }
.row-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.tabbar a { position: relative; }
.tk-dot { position: absolute; top: 6px; inset-inline-end: calc(50% - 16px); width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
