/* gamefast.ir - the Web App's own stylesheet. A real website layout (top
   navigation + landing page for visitors, sidebar dashboard for
   customers) that shares nothing visual with the Telegram Mini App
   (webapp/style.css) - only the self-hosted Vazirmatn font files are the
   same bytes (/app/fonts/*). Every color/shape below reads through the
   variables site/theme.js's SITE_THEMES sets; the :root block is the
   'default' (آرنا) theme so the page paints correctly before JS runs. */
:root{
  --bg:#0a0c10; --bg2:#0e1117; --surface:#141822; --surface2:#1a1f2c;
  --line:#232a39; --line-soft:rgba(163,255,18,.14); --well:#0b0e14; --bg-rgb:10,12,16;
  --text:#eef2f7; --muted:#8c96aa; --accent:#a3ff12; --accent2:#22d3ee; --accent-ink:#0a0c10;
  --green:#22c55e; --red:#f43f5e; --yellow:#fbbf24; --radius:16px; --radius-sm:10px;
  --glow:rgba(163,255,18,.22); --shadow:0 12px 40px rgba(0,0,0,.45);
  --topbar-h:64px; --tabs-h:62px; --sidebar-w:250px; --wrap:1180px;
}
@font-face{
  font-family:'Vazirmatn'; font-style:normal; font-weight:100 900; font-display:swap;
  src:url('/app/fonts/vazirmatn-arabic.woff2') format('woff2');
  unicode-range:U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0897-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC;
}
@font-face{
  font-family:'Vazirmatn'; font-style:normal; font-weight:100 900; font-display:swap;
  src:url('/app/fonts/vazirmatn-latin.woff2') format('woff2');
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
*{box-sizing:border-box; -webkit-tap-highlight-color:transparent;}
html{scroll-behavior:smooth;}
html,body{margin:0; padding:0;}
body{
  background:var(--bg); color:var(--text); min-height:100vh;
  font-family:'Vazirmatn', -apple-system, 'Segoe UI', Tahoma, sans-serif; font-size:14.5px; line-height:1.7;
  overflow-x:hidden; transition:background .3s ease, color .3s ease;
}
a{color:inherit; text-decoration:none;}
button{font-family:inherit;}
img{max-width:100%;}
::selection{background:var(--accent); color:var(--accent-ink);}
.ltr{direction:ltr;}
.num{font-variant-numeric:tabular-nums;}
.muted{color:var(--muted);}
.small{font-size:12.5px;}
.tiny{font-size:11.5px;}
.bold{font-weight:800;}
.center{text-align:center;}
.hide{display:none !important;}
.mt8{margin-top:8px;} .mt12{margin-top:12px;} .mt16{margin-top:16px;} .mt24{margin-top:24px;}
.mb8{margin-bottom:8px;} .mb12{margin-bottom:12px;} .mb16{margin-bottom:16px;}
.row{display:flex; align-items:center; gap:10px;}
.row-between{display:flex; align-items:center; justify-content:space-between; gap:10px;}
.wrap-gap{flex-wrap:wrap;}
.grow{flex:1; min-width:0;}
.ic{width:18px; height:18px; flex:none;}
svg.ic{fill:none; stroke:currentColor; stroke-width:1.9; stroke-linecap:round; stroke-linejoin:round;}

/* ---------- ambient background ---------- */
.bg-fx{position:fixed; inset:0; z-index:-1; overflow:hidden; pointer-events:none;}
.bg-fx .grid{
  position:absolute; inset:0; opacity:.35;
  background-image:linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size:42px 42px; mask-image:radial-gradient(ellipse at 50% 0%, #000 0%, transparent 62%);
  -webkit-mask-image:radial-gradient(ellipse at 50% 0%, #000 0%, transparent 62%);
}
.bg-fx .orb{position:absolute; border-radius:50%; filter:blur(70px); opacity:.5;}
.bg-fx .orb-a{width:420px; height:420px; top:-160px; inset-inline-start:-120px; background:radial-gradient(circle, var(--glow), transparent 70%);}
.bg-fx .orb-b{width:360px; height:360px; top:30%; inset-inline-end:-140px; background:radial-gradient(circle, var(--accent2), transparent 70%); opacity:.18;}
[data-mode="light"] .bg-fx .orb{opacity:.35;}
[data-mode="light"] .bg-fx .grid{opacity:.5;}

/* ---------- top bar ---------- */
.topbar{
  position:sticky; top:0; z-index:60; height:var(--topbar-h);
  background:rgba(var(--bg-rgb),.78); backdrop-filter:blur(16px); -webkit-backdrop-filter:blur(16px);
  border-bottom:1px solid var(--line);
}
.topbar-inner{max-width:var(--wrap); margin:0 auto; height:100%; padding:0 20px; display:flex; align-items:center; gap:18px;}
.brand{display:flex; align-items:center; gap:10px; font-weight:900; font-size:19px; letter-spacing:.2px; white-space:nowrap;}
.brand .mark{
  width:36px; height:36px; border-radius:11px; display:grid; place-items:center;
  background:linear-gradient(135deg, var(--accent), var(--accent2)); color:var(--accent-ink);
  box-shadow:0 0 22px -4px var(--accent);
}
.brand .mark svg{width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:2.2; stroke-linecap:round; stroke-linejoin:round;}
.brand .tag{font-size:10.5px; color:var(--muted); font-weight:700; letter-spacing:1.4px; text-transform:uppercase; display:block; line-height:1; margin-top:2px;}
.topnav{display:flex; align-items:center; gap:4px; margin-inline-start:8px;}
.topnav a{
  padding:8px 13px; border-radius:10px; font-weight:700; font-size:13.5px; color:var(--muted);
  transition:color .15s, background .15s;
}
.topnav a:hover, .topnav a.active{color:var(--text); background:rgba(255,255,255,.05);}
[data-mode="light"] .topnav a:hover, [data-mode="light"] .topnav a.active{background:rgba(15,23,42,.05);}
.topbar-actions{margin-inline-start:auto; display:flex; align-items:center; gap:10px;}
.user-chip{
  display:flex; align-items:center; gap:9px; padding:5px 12px 5px 6px; border-radius:999px;
  background:var(--surface); border:1px solid var(--line); cursor:pointer; transition:border-color .15s;
}
.user-chip:hover{border-color:var(--accent);}
.user-chip .avatar{width:30px; height:30px; font-size:13px;}
.user-chip .uc-text{display:flex; flex-direction:column; line-height:1.25;}
.user-chip .uc-name{font-size:12.5px; font-weight:800; max-width:120px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.user-chip .uc-wallet{font-size:11px; color:var(--accent2); font-weight:700;}
.icon-btn{
  width:40px; height:40px; border-radius:12px; border:1px solid var(--line); background:var(--surface);
  color:var(--text); display:grid; place-items:center; cursor:pointer; transition:border-color .15s, transform .12s;
}
.icon-btn:hover{border-color:var(--accent);}
.icon-btn:active{transform:scale(.94);}
.icon-btn svg{width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.9; stroke-linecap:round; stroke-linejoin:round;}
.only-mobile{display:none;}
@media (max-width:899px){
  .topnav, .only-desktop{display:none;}
  .only-mobile{display:flex;}
  .user-chip .uc-text{display:none;}
  .user-chip{padding:4px;}
  .brand .tag{display:none;}
}

/* ---------- drawer (mobile navigation) ---------- */
.drawer-backdrop{position:fixed; inset:0; z-index:90; background:rgba(0,0,0,.55); opacity:0; pointer-events:none; transition:opacity .25s;}
.drawer-backdrop.show{opacity:1; pointer-events:auto;}
.drawer{
  position:fixed; top:0; bottom:0; inset-inline-end:0; z-index:95; width:min(310px, 86vw);
  background:var(--surface); border-inline-start:1px solid var(--line); box-shadow:var(--shadow);
  transform:translateX(100%); transition:transform .28s cubic-bezier(.32,.72,0,1); display:flex; flex-direction:column;
  padding:18px 16px calc(18px + env(safe-area-inset-bottom));
}
[dir="rtl"] .drawer{transform:translateX(-100%);}
.drawer.show{transform:translateX(0) !important;}
.drawer .drawer-head{display:flex; align-items:center; justify-content:space-between; margin-bottom:14px;}
.drawer .nav-list{display:flex; flex-direction:column; gap:4px;}
.drawer .drawer-foot{margin-top:auto; padding-top:14px; border-top:1px solid var(--line);}

/* ---------- app layout (sidebar + main) ---------- */
.page{max-width:var(--wrap); margin:0 auto; padding:22px 20px 60px; min-height:calc(100vh - var(--topbar-h));}
.app-layout{display:grid; grid-template-columns:var(--sidebar-w) minmax(0,1fr); gap:24px; align-items:start;}
.sidebar{
  position:sticky; top:calc(var(--topbar-h) + 20px); background:var(--surface); border:1px solid var(--line);
  border-radius:var(--radius); padding:14px; display:flex; flex-direction:column; gap:4px;
}
.sidebar .sb-user{display:flex; align-items:center; gap:10px; padding:8px 6px 14px; border-bottom:1px solid var(--line); margin-bottom:8px;}
.sidebar .sb-user .name{font-weight:800; font-size:13.5px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.sidebar .sb-user .sub{font-size:11.5px; color:var(--muted);}
.sidebar .sb-group{font-size:10.5px; letter-spacing:1.2px; text-transform:uppercase; color:var(--muted); font-weight:800; padding:12px 8px 4px;}
.nav-item{
  display:flex; align-items:center; gap:11px; padding:10px 12px; border-radius:12px; font-weight:700; font-size:13.5px;
  color:var(--muted); cursor:pointer; transition:background .15s, color .15s; border:1px solid transparent;
}
.nav-item svg{width:19px; height:19px; fill:none; stroke:currentColor; stroke-width:1.9; stroke-linecap:round; stroke-linejoin:round;}
.nav-item:hover{background:rgba(255,255,255,.04); color:var(--text);}
[data-mode="light"] .nav-item:hover{background:rgba(15,23,42,.04);}
.nav-item.active{background:linear-gradient(90deg, var(--line-soft), transparent); color:var(--text); border-color:var(--line-soft);}
.nav-item.active svg{color:var(--accent);}
.nav-item .cnt{margin-inline-start:auto; font-size:11px; background:var(--well); border:1px solid var(--line); padding:1px 8px; border-radius:999px;}
.nav-item.danger{color:var(--red);}
.app-main{min-width:0;}
@media (max-width:899px){
  .app-layout{display:block;}
  .sidebar{display:none;}
  .page{padding:16px 16px calc(var(--tabs-h) + 30px);}
  body.has-tabs .page{padding-bottom:calc(var(--tabs-h) + 34px);}
}

/* ---------- bottom tabs (mobile, logged in) ---------- */
.bottom-tabs{
  position:fixed; bottom:0; left:0; right:0; z-index:70; display:none; height:calc(var(--tabs-h) + env(safe-area-inset-bottom));
  padding:6px 4px env(safe-area-inset-bottom); background:rgba(var(--bg-rgb),.92); backdrop-filter:blur(18px);
  border-top:1px solid var(--line);
}
.bottom-tabs .tab{
  flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px;
  font-size:10.5px; font-weight:700; color:var(--muted); border-radius:12px; transition:color .15s;
}
.bottom-tabs .tab svg{width:21px; height:21px; fill:none; stroke:currentColor; stroke-width:1.9; stroke-linecap:round; stroke-linejoin:round; transition:transform .2s;}
.bottom-tabs .tab.active{color:var(--accent);}
.bottom-tabs .tab.active svg{transform:translateY(-2px);}
@media (max-width:899px){ body.has-tabs .bottom-tabs{display:flex;} }

/* ---------- page headings ---------- */
.page-head{display:flex; align-items:flex-end; justify-content:space-between; gap:14px; margin:4px 0 18px; flex-wrap:wrap;}
.page-head h1{font-size:22px; font-weight:900; margin:0; line-height:1.4;}
.page-head p{margin:4px 0 0; color:var(--muted); font-size:13px;}
h2.sec{font-size:15px; font-weight:800; margin:22px 0 10px; display:flex; align-items:center; gap:8px;}
h2.sec .ic{color:var(--accent);}
.hint{font-size:12.5px; color:var(--muted); margin:-4px 0 12px;}

/* ---------- cards / panels ---------- */
.card{
  background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); padding:18px;
  box-shadow:0 6px 24px rgba(0,0,0,.18); margin-bottom:14px; position:relative;
}
[data-mode="light"] .card{box-shadow:0 6px 20px rgba(15,23,42,.06);}
.card.flat{box-shadow:none; background:var(--surface2);}
.card.accent{border-color:var(--line-soft); background:linear-gradient(160deg, var(--surface), var(--surface2));}
.card.glow::before{
  content:''; position:absolute; inset:-1px; border-radius:inherit; pointer-events:none;
  background:radial-gradient(420px 120px at 100% 0%, var(--glow), transparent 70%); opacity:.7;
}
.card > *{position:relative;}
.grid-2{display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:14px;}
.grid-3{display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:14px;}
.grid-4{display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:14px;}
@media (max-width:1100px){ .grid-4{grid-template-columns:repeat(2, minmax(0,1fr));} }
@media (max-width:760px){ .grid-3{grid-template-columns:repeat(2, minmax(0,1fr));} }
.grid-2 > *, .grid-3 > *, .grid-4 > *{min-width:0;}
@media (max-width:560px){ .grid-2, .grid-3, .grid-4{grid-template-columns:minmax(0,1fr);} .grid-4.keep2, .grid-2.keep2{grid-template-columns:repeat(2, minmax(0,1fr));} }

.stat{
  background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); padding:16px 18px;
  display:flex; align-items:center; gap:14px; min-width:0;
}
.stat .s-ic{width:44px; height:44px; border-radius:13px; display:grid; place-items:center; background:var(--well); border:1px solid var(--line); color:var(--accent); flex:none;}
.stat .s-ic svg{width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:1.9; stroke-linecap:round; stroke-linejoin:round;}
.stat .s-v{font-size:19px; font-weight:900; line-height:1.3; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.stat .s-l{font-size:12px; color:var(--muted); font-weight:600;}
.stat.small .s-v{font-size:16px;}

/* ---------- buttons ---------- */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px; border:1px solid transparent;
  border-radius:var(--radius-sm); padding:11px 18px; font-size:13.5px; font-weight:800; cursor:pointer;
  transition:transform .12s ease, filter .12s ease, box-shadow .15s ease, border-color .15s, background .15s;
  white-space:nowrap; user-select:none; line-height:1.3;
}
.btn svg{width:17px; height:17px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round;}
.btn:hover{filter:brightness(1.06);}
.btn:active{transform:scale(.97);}
.btn:disabled{opacity:.45; cursor:not-allowed; filter:none; transform:none;}
.btn-primary{background:linear-gradient(90deg, var(--accent), var(--accent2)); color:var(--accent-ink); box-shadow:0 8px 22px -8px var(--accent);}
.btn-outline{background:transparent; border-color:var(--line); color:var(--text);}
.btn-outline:hover{border-color:var(--accent); filter:none;}
.btn-ghost{background:rgba(255,255,255,.05); color:var(--text);}
[data-mode="light"] .btn-ghost{background:rgba(15,23,42,.05);}
.btn-success{background:var(--green); color:#fff;}
.btn-danger{background:rgba(244,63,94,.12); color:var(--red); border-color:rgba(244,63,94,.35);}
.btn-warn{background:rgba(251,191,36,.14); color:var(--yellow); border-color:rgba(251,191,36,.35);}
.btn-sm{padding:7px 12px; font-size:12.5px; border-radius:9px;}
.btn-lg{padding:14px 26px; font-size:15px; border-radius:13px;}
.btn-block{width:100%;}
.btn-row{display:flex; gap:8px; flex-wrap:wrap;}
.btn-row .btn{flex:1;}
.link{color:var(--accent2); cursor:pointer; font-weight:700;}
.link:hover{text-decoration:underline;}

/* ---------- badges / chips / pills ---------- */
.badge{display:inline-flex; align-items:center; gap:4px; padding:3px 10px; border-radius:999px; font-size:11px; font-weight:800; white-space:nowrap;}
.badge-green{background:rgba(34,197,94,.14); color:var(--green);}
.badge-yellow{background:rgba(251,191,36,.14); color:var(--yellow);}
.badge-red{background:rgba(244,63,94,.14); color:var(--red);}
.badge-muted{background:rgba(140,150,170,.16); color:var(--muted);}
.badge-accent{background:var(--line-soft); color:var(--accent);}
.badge-blue{background:rgba(34,211,238,.14); color:var(--accent2);}
.chips{display:flex; gap:8px; flex-wrap:wrap; margin:6px 0 10px;}
.chip{
  display:inline-flex; align-items:center; gap:6px; padding:7px 13px; border-radius:999px; font-size:12.5px; font-weight:700;
  background:var(--surface2); border:1px solid var(--line); cursor:pointer; transition:all .15s; user-select:none;
}
.chip:hover{border-color:var(--accent);}
.chip.active{background:var(--accent); color:var(--accent-ink); border-color:transparent;}
.chip.static{cursor:default;}
.chip svg{width:14px; height:14px; fill:none; stroke:currentColor; stroke-width:2;}

/* ---------- forms ---------- */
.field{margin-bottom:12px;}
.label{display:block; font-size:12.5px; font-weight:700; color:var(--muted); margin-bottom:6px;}
.input, textarea.input, select.input{
  width:100%; background:var(--well); border:1px solid var(--line); color:var(--text); border-radius:var(--radius-sm);
  padding:11px 13px; font-family:inherit; font-size:14px; transition:border-color .15s, box-shadow .15s; outline:none;
}
.input:focus, textarea.input:focus{border-color:var(--accent); box-shadow:0 0 0 3px var(--line-soft);}
.input::placeholder{color:var(--muted); opacity:.7;}
/* Browser autofill (picking a number from history) paints its own opaque
   white/yellow box over the field - repaint it with our own well color and
   text color so it stays inside the theme (WebKit/Blink honour the inset
   box-shadow trick; the 9999s transition defers Chrome's forced bg). */
input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:focus, textarea:-webkit-autofill{
  -webkit-text-fill-color:var(--text); caret-color:var(--text);
  -webkit-box-shadow:0 0 0 1000px var(--well) inset; box-shadow:0 0 0 1000px var(--well) inset;
  transition:background-color 9999s ease-out 0s;
}
input:autofill{background:var(--well); color:var(--text);}
textarea.input{min-height:100px; resize:vertical; line-height:1.8;}
.input.ltr{direction:ltr; text-align:left;}
.input-row{display:flex; gap:8px; align-items:center;}
.input-row .input{margin:0;}
.form-grid{display:grid; grid-template-columns:repeat(auto-fit, minmax(180px,1fr)); gap:10px;}
.switch{
  display:inline-flex; align-items:center; gap:8px; cursor:pointer; user-select:none; font-size:13px; font-weight:700;
}
.switch .sw{width:42px; height:24px; border-radius:999px; background:var(--line); position:relative; transition:background .2s; flex:none;}
.switch .sw::after{content:''; position:absolute; top:3px; inset-inline-start:3px; width:18px; height:18px; border-radius:50%; background:#fff; transition:transform .2s;}
.switch.on .sw{background:var(--green);}
.switch.on .sw::after{transform:translateX(-18px);}
[dir="ltr"] .switch.on .sw::after{transform:translateX(18px);}
.kv{display:flex; justify-content:space-between; gap:12px; padding:10px 0; border-bottom:1px solid var(--line); font-size:13.5px;}
.kv:last-child{border-bottom:none;}
.kv .k{color:var(--muted); flex:none;}
.kv .v{font-weight:700; text-align:left; direction:ltr; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0; max-width:70%;}
.kv .v.rtl{direction:rtl; text-align:right;}
.note-box{
  display:flex; gap:10px; align-items:flex-start; padding:12px 14px; border-radius:var(--radius-sm); font-size:12.5px; line-height:1.9;
  background:var(--well); border:1px dashed var(--line);
}
.note-box svg{width:18px; height:18px; flex:none; margin-top:3px; fill:none; stroke:var(--accent2); stroke-width:2; stroke-linecap:round; stroke-linejoin:round;}
.note-box > span{min-width:0; overflow-wrap:anywhere;}
.note-box.warn{border-color:rgba(251,191,36,.4);}
.note-box.warn svg{stroke:var(--yellow);}
.copy-box{display:flex; gap:8px; align-items:center; background:var(--well); border:1px solid var(--line); border-radius:var(--radius-sm); padding:9px 12px;}
.copy-box{min-width:0;}
.copy-box code{flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:12.5px; direction:ltr; text-align:left; font-family:ui-monospace, Menlo, monospace;}
.search-box{display:flex; align-items:center; gap:8px; background:var(--well); border:1px solid var(--line); border-radius:var(--radius-sm); padding:8px 12px; margin-bottom:12px;}
.search-box:focus-within{border-color:var(--accent);}
.search-box input{flex:1; min-width:0; background:none; border:none; color:var(--text); font-family:inherit; font-size:13.5px; outline:none;}
.search-box svg{width:17px; height:17px; fill:none; stroke:var(--muted); stroke-width:2; stroke-linecap:round;}

/* ---------- progress / avatar / tables ---------- */
.progress{height:8px; border-radius:99px; background:var(--well); overflow:hidden; margin:10px 0 6px;}
.progress > div{height:100%; border-radius:99px; background:linear-gradient(90deg, var(--accent2), var(--accent)); transition:width .5s cubic-bezier(.4,0,.2,1);}
.progress.danger > div{background:linear-gradient(90deg, var(--yellow), var(--red));}
.avatar{
  width:40px; height:40px; border-radius:50%; display:grid; place-items:center; font-weight:900; font-size:15px; flex:none;
  background:linear-gradient(135deg, var(--accent), var(--accent2)); color:var(--accent-ink);
}
.avatar.lg{width:72px; height:72px; font-size:26px; border-radius:22px;}
.table-wrap{overflow-x:auto; -webkit-overflow-scrolling:touch;}
table.tbl{width:100%; border-collapse:collapse; font-size:13px;}
table.tbl th, table.tbl td{padding:10px 8px; text-align:right; border-bottom:1px solid var(--line); white-space:nowrap;}
table.tbl th{color:var(--muted); font-weight:700; font-size:12px;}
table.tbl tr.click{cursor:pointer; transition:background .12s;}
table.tbl tr.click:hover{background:rgba(255,255,255,.03);}
[data-mode="light"] table.tbl tr.click:hover{background:rgba(15,23,42,.03);}
.list-item{display:flex; align-items:center; gap:12px; padding:12px 4px; border-bottom:1px solid var(--line);}
.list-item:last-child{border-bottom:none;}
.list-item.click{cursor:pointer; border-radius:10px; transition:background .12s;}
.list-item.click:hover{background:rgba(255,255,255,.03);}
.empty{text-align:center; color:var(--muted); padding:44px 16px; font-size:14px; line-height:1.9;}
.empty .big{font-size:40px; margin-bottom:8px;}
.tabs{display:flex; gap:4px; background:var(--well); border:1px solid var(--line); border-radius:12px; padding:4px; margin-bottom:16px; overflow-x:auto;}
.tabs .t{flex:1; text-align:center; padding:9px 12px; border-radius:9px; font-size:13px; font-weight:800; color:var(--muted); cursor:pointer; white-space:nowrap; transition:all .15s;}
.tabs .t.active{background:var(--surface); color:var(--text); box-shadow:0 2px 10px rgba(0,0,0,.2);}

/* ---------- plan cards ---------- */
.plan{
  background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); padding:20px; display:flex; flex-direction:column; gap:10px;
  position:relative; overflow:hidden; transition:transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.plan:hover{transform:translateY(-3px); border-color:var(--line-soft); box-shadow:var(--shadow);}
.plan::after{content:''; position:absolute; inset-inline-end:-40px; top:-40px; width:140px; height:140px; border-radius:50%; background:radial-gradient(circle, var(--glow), transparent 70%); pointer-events:none;}
.plan .p-gb{font-size:34px; font-weight:900; line-height:1.1; background:linear-gradient(90deg, var(--accent), var(--accent2)); -webkit-background-clip:text; background-clip:text; color:transparent;}
.plan .p-days{color:var(--muted); font-weight:700; font-size:13px;}
.plan .p-price{font-size:19px; font-weight:900; margin-top:4px;}
.plan .p-price small{font-size:12px; color:var(--muted); font-weight:700;}
.plan ul{list-style:none; padding:0; margin:6px 0 4px; display:flex; flex-direction:column; gap:5px; font-size:12.5px; color:var(--muted);}
.plan ul li{display:flex; align-items:center; gap:7px;}
.plan ul li svg{width:14px; height:14px; fill:none; stroke:var(--green); stroke-width:2.4; stroke-linecap:round; stroke-linejoin:round;}
.plan .p-actions{margin-top:auto; display:flex; gap:8px; flex-wrap:wrap;}
.plan .p-actions .btn{flex:1;}
.plan.featured{border-color:var(--accent);}
/* discounts: struck original + emphasised final + one badge; the plans-page strip; admin cards */
.p-price.disc{display:flex; flex-wrap:wrap; align-items:baseline; gap:8px;}
.p-price.disc s{color:var(--muted); font-weight:600; font-size:.78em; text-decoration-color:var(--red);}
.p-price.disc .p-final{font-size:1.12em; font-weight:900; color:var(--text);}
.badge-discount{background:rgba(244,63,94,.14); color:var(--red); border:1px solid rgba(244,63,94,.3); font-size:10.5px; padding:2px 8px;}
.disc-strip{display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; padding:10px 14px; margin:0 0 14px; border-radius:14px; background:var(--surface2); border:1px dashed var(--line);}
.disc-strip .ds-main{display:flex; align-items:center; gap:8px; font-size:13px; min-width:0;}
.disc-strip .ds-main svg{width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.9; color:var(--accent);}
.disc-strip .ds-code{display:flex; gap:6px; margin:0;}
.disc-strip .ds-code .input{width:150px; padding:8px 10px; margin:0;}
.dgrid{display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:14px;}
@media (max-width:860px){ .dgrid{grid-template-columns:1fr;} }
.dcard{display:flex; flex-direction:column; gap:10px; cursor:pointer; transition:transform .15s, border-color .15s;}
.dcard:hover{transform:translateY(-2px); border-color:var(--accent);}
.dcard .d-head{display:flex; align-items:center; gap:10px;} .dcard .d-head b{flex:1; font-size:15px;}
.dcard .d-ic{width:38px; height:38px; border-radius:12px; display:grid; place-items:center; background:var(--well); border:1px solid var(--line); color:var(--accent); flex:none;}
.dcard .d-ic svg{width:19px; height:19px; fill:none; stroke:currentColor; stroke-width:1.9;}
.dcard .d-chips{display:flex; gap:6px; flex-wrap:wrap;}
.plan .ribbon{position:absolute; top:14px; inset-inline-start:-34px; transform:rotate(-45deg); background:var(--accent); color:var(--accent-ink); font-size:10.5px; font-weight:900; padding:4px 40px; letter-spacing:.5px;}
[dir="rtl"] .plan .ribbon{transform:rotate(45deg);}

/* ---------- service cards ---------- */
.svc{border:1px solid var(--line); border-radius:var(--radius); padding:16px; background:var(--surface); margin-bottom:12px;}
.svc .svc-head{display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap;}
.svc .svc-id{font-weight:900; font-size:15px; direction:ltr; font-family:ui-monospace, Menlo, monospace;}
.loc-list{display:flex; flex-direction:column; gap:8px; margin-top:12px;}
.loc-item{display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; padding:10px 12px; border:1px solid var(--line); border-radius:12px; background:var(--surface2);}
.loc-item .loc-name{font-weight:800; display:flex; align-items:center; gap:8px;}
.loc-item .loc-name svg{width:16px; height:16px; fill:none; stroke:var(--accent); stroke-width:2; stroke-linecap:round;}
.loc-item .loc-actions{display:flex; gap:6px; flex-wrap:wrap;}

/* ---------- orders ---------- */
.order{display:flex; align-items:center; gap:12px; padding:12px 6px; border-bottom:1px solid var(--line); cursor:pointer; border-radius:10px; transition:background .12s;}
.order:hover{background:rgba(255,255,255,.03);}
.order:last-child{border-bottom:none;}
.order .o-ic{width:40px; height:40px; border-radius:12px; display:grid; place-items:center; background:var(--well); border:1px solid var(--line); flex:none; font-size:17px;}
.order .o-main{flex:1; min-width:0;}
.order .o-id{font-weight:900; direction:ltr; text-align:right; font-family:ui-monospace, Menlo, monospace; font-size:13.5px;}
.order .o-sub{font-size:12px; color:var(--muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.order .o-side{text-align:left; display:flex; flex-direction:column; align-items:flex-end; gap:4px;}
.order .o-amt{font-weight:800; font-size:13px;}
.pay-btn{display:inline-flex; align-items:center; gap:8px;}
.pay-btn .cd{font-family:ui-monospace, Menlo, monospace; font-size:12px; opacity:.85; direction:ltr;}

/* ---------- modal (centered dialog on desktop, bottom sheet on phones) ---------- */
.modal-backdrop{
  position:fixed; inset:0; z-index:200; background:rgba(0,0,0,.6); display:flex; align-items:center; justify-content:center;
  padding:20px; opacity:0; pointer-events:none; transition:opacity .22s ease;
}
[data-mode="light"] .modal-backdrop{background:rgba(15,23,42,.45);}
.modal-backdrop.show{opacity:1; pointer-events:auto;}
.modal{
  width:100%; max-width:520px; max-height:88vh; overflow-y:auto; background:var(--surface); border:1px solid var(--line);
  border-radius:20px; padding:22px; box-shadow:var(--shadow); transform:translateY(16px) scale(.98); transition:transform .22s ease;
}
.modal-backdrop.show .modal{transform:none;}
.modal .m-title{font-size:17px; font-weight:900; margin-bottom:14px; display:flex; align-items:center; gap:8px;}
.modal .m-close{margin-inline-start:auto;}
.modal .m-body{font-size:13.5px; line-height:1.9;}
.modal .m-actions{display:flex; gap:8px; margin-top:18px; flex-wrap:wrap;}
.modal .m-actions .btn{flex:1;}
@media (max-width:600px){
  .modal-backdrop{align-items:flex-end; padding:0;}
  .modal{max-width:none; border-radius:22px 22px 0 0; padding:18px 18px calc(22px + env(safe-area-inset-bottom)); transform:translateY(100%); max-height:90vh;}
}
.qr-img{width:100%; max-width:320px; display:block; margin:0 auto; border-radius:16px; background:#fff; padding:12px;}

/* ---------- toast ---------- */
.toast{
  position:fixed; bottom:24px; left:50%; transform:translateX(-50%) translateY(20px); z-index:300;
  background:var(--surface); border:1px solid var(--line); color:var(--text); padding:12px 18px; border-radius:14px;
  font-size:13px; font-weight:700; opacity:0; transition:all .3s cubic-bezier(.34,1.56,.64,1); max-width:88%; text-align:center;
  box-shadow:var(--shadow); pointer-events:none;
}
.toast.show{opacity:1; transform:translateX(-50%) translateY(0);}
.toast.err{border-color:rgba(244,63,94,.55); color:#ffb4c0;}
[data-mode="light"] .toast.err{color:var(--red);}
body.has-tabs .toast{bottom:calc(var(--tabs-h) + 16px);}
@media (min-width:900px){ body.has-tabs .toast{bottom:24px;} }

/* ---------- skeleton ---------- */
.skel{background:linear-gradient(90deg, var(--surface) 25%, var(--surface2) 37%, var(--surface) 63%); background-size:400% 100%; animation:skel 1.3s ease infinite; border-radius:12px;}
@keyframes skel{0%{background-position:100% 50%;} 100%{background-position:0 50%;}}
.skel-card{height:110px; margin-bottom:12px; border-radius:var(--radius);}
.skel-line{height:14px; margin-bottom:8px;}

/* ---------- landing ---------- */
.hero{display:grid; grid-template-columns:1.15fr .85fr; gap:36px; align-items:center; padding:48px 0 34px;}
.hero .eyebrow{display:inline-flex; align-items:center; gap:8px; font-size:12px; font-weight:800; color:var(--accent); background:var(--line-soft); padding:6px 12px; border-radius:999px; margin-bottom:16px;}
.hero .eyebrow .dot{width:7px; height:7px; border-radius:50%; background:var(--accent); box-shadow:0 0 10px var(--accent); animation:pulse 2s infinite;}
@keyframes pulse{0%,100%{opacity:1;} 50%{opacity:.4;}}
.hero h1{font-size:clamp(28px, 4.2vw, 46px); font-weight:900; line-height:1.35; margin:0 0 14px; letter-spacing:-.2px;}
.hero h1 .grad{background:linear-gradient(90deg, var(--accent), var(--accent2)); -webkit-background-clip:text; background-clip:text; color:transparent;}
.hero p{font-size:15px; color:var(--muted); line-height:2; margin:0 0 24px; max-width:560px;}
.hero .hero-cta{display:flex; gap:10px; flex-wrap:wrap;}
.hero .hero-meta{display:flex; gap:22px; flex-wrap:wrap; margin-top:26px;}
.hero .hero-meta div{font-size:12.5px; color:var(--muted);}
.hero .hero-meta b{display:block; font-size:19px; color:var(--text); font-weight:900;}
.hero-visual{position:relative;}
/* ---------- landing "وضعیت شبکه" card ---------- */
.net-card{
  position:relative; overflow:hidden; border-radius:24px; padding:20px 20px 16px;
  background:linear-gradient(160deg, var(--surface), var(--surface2)); border:1px solid var(--line-soft); box-shadow:var(--shadow);
}
.net-card::before{content:''; position:absolute; inset:0; background:radial-gradient(320px 150px at 90% 0%, var(--glow), transparent 70%); pointer-events:none;}
.net-card > *{position:relative;}
.net-head{display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:14px;}
.net-title{display:flex; align-items:center; gap:8px; font-weight:800; font-size:13.5px;}
.net-title svg{color:var(--accent);}
.net-pill{display:inline-flex; align-items:center; gap:6px; padding:4px 10px; border-radius:999px; font-size:11.5px; font-weight:800; background:rgba(34,197,94,.14); color:var(--green);}
.net-pill i{width:7px; height:7px; border-radius:50%; background:var(--green); box-shadow:0 0 10px var(--green); animation:pulse 2s infinite;}
.net-ping{display:flex; align-items:center; gap:14px; flex-wrap:wrap; padding:6px 0 4px;}
.np-val{font-size:46px; font-weight:900; line-height:1; color:var(--accent); font-variant-numeric:tabular-nums; direction:ltr; display:flex; align-items:baseline; gap:4px;}
.np-val small{font-size:14px; color:var(--muted); font-weight:700;}
.np-meta{display:flex; flex-direction:column; line-height:1.5; font-size:12.5px; color:var(--muted);}
.np-meta b{color:var(--text); font-size:13.5px;}
.net-ping .badge{margin-inline-start:auto;}
.net-bars{display:flex; align-items:flex-end; gap:4px; height:58px; margin:12px 0 14px; padding-bottom:4px; border-bottom:1px dashed var(--line);}
.net-bars i{flex:1; border-radius:3px 3px 0 0; background:linear-gradient(180deg, var(--accent), var(--accent2)); opacity:.85; transform-origin:bottom; animation:bar 2.6s ease-in-out infinite;}
@keyframes bar{0%,100%{transform:scaleY(1);} 50%{transform:scaleY(.6);}}
.net-locs{display:flex; flex-direction:column; gap:7px;}
.net-locs .nl{display:flex; align-items:center; gap:10px; font-size:12.5px;}
.net-locs .nl-name{display:flex; align-items:center; gap:6px; font-weight:800; min-width:96px;}
.net-locs .nl-name svg{width:14px; height:14px; color:var(--accent2);}
.net-locs .nl-bar{flex:1; height:6px; border-radius:99px; background:var(--well); overflow:hidden;}
.net-locs .nl-bar i{display:block; height:100%; border-radius:99px; background:linear-gradient(90deg, var(--accent2), var(--accent));}
.net-locs .nl-st{font-size:11px; font-weight:800; color:var(--green); white-space:nowrap;}
.net-foot{display:flex; gap:8px; flex-wrap:wrap; margin-top:14px; padding-top:12px; border-top:1px solid var(--line);}
.net-foot span{display:inline-flex; align-items:center; gap:6px; font-size:11.5px; font-weight:800; color:var(--muted); background:var(--well); border:1px solid var(--line); padding:5px 10px; border-radius:999px;}
.net-foot svg{width:13px; height:13px; color:var(--accent);}
.section{padding:26px 0;}
.section-head{text-align:center; max-width:640px; margin:0 auto 26px;}
.section-head h2{font-size:clamp(20px, 3vw, 28px); font-weight:900; margin:0 0 8px;}
.section-head p{color:var(--muted); margin:0; font-size:14px; line-height:1.9;}
.feature{background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); padding:20px; transition:transform .18s, border-color .18s;}
.feature:hover{transform:translateY(-3px); border-color:var(--line-soft);}
.feature .f-ic{width:46px; height:46px; border-radius:14px; display:grid; place-items:center; background:var(--line-soft); color:var(--accent); margin-bottom:12px;}
.feature .f-ic svg{width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:1.9; stroke-linecap:round; stroke-linejoin:round;}
.feature h3{font-size:15px; margin:0 0 6px; font-weight:800;}
.feature p{margin:0; color:var(--muted); font-size:13px; line-height:1.9;}
.steps{display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:14px; counter-reset:step;}
.step{position:relative; background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); padding:22px 18px 18px;}
.step .n{width:34px; height:34px; border-radius:11px; display:grid; place-items:center; background:linear-gradient(135deg, var(--accent), var(--accent2)); color:var(--accent-ink); font-weight:900; margin-bottom:12px;}
.step h3{font-size:15px; margin:0 0 6px;}
.step p{margin:0; font-size:13px; color:var(--muted); line-height:1.9;}
.faq details{border:1px solid var(--line); border-radius:14px; background:var(--surface); padding:0 16px; margin-bottom:8px;}
.faq summary{cursor:pointer; padding:14px 0; font-weight:800; font-size:14px; list-style:none; display:flex; align-items:center; justify-content:space-between; gap:10px;}
.faq summary::-webkit-details-marker{display:none;}
.faq summary::after{content:'+'; color:var(--accent); font-size:20px; font-weight:400; transition:transform .2s;}
.faq details[open] summary::after{transform:rotate(45deg);}
.faq details p{margin:0; padding:0 0 14px; color:var(--muted); font-size:13.5px; line-height:2; white-space:pre-wrap;}
.cta-band{
  margin:20px 0; border-radius:24px; padding:34px 28px; text-align:center; position:relative; overflow:hidden;
  background:linear-gradient(135deg, var(--surface), var(--surface2)); border:1px solid var(--line-soft);
}
.cta-band::before{content:''; position:absolute; inset:0; background:radial-gradient(500px 200px at 50% 120%, var(--glow), transparent 70%); pointer-events:none;}
.cta-band h2{margin:0 0 8px; font-size:24px; font-weight:900; position:relative;}
.cta-band p{color:var(--muted); margin:0 0 18px; position:relative;}
.cta-band .btn{position:relative;}
.footer{border-top:1px solid var(--line); padding:26px 20px calc(26px + env(safe-area-inset-bottom)); color:var(--muted); font-size:12.5px;}
.footer-inner{max-width:var(--wrap); margin:0 auto; display:flex; align-items:center; justify-content:space-between; gap:14px; flex-wrap:wrap;}
.footer a{color:var(--muted);} .footer a:hover{color:var(--text);}
@media (max-width:899px){
  .hero{grid-template-columns:1fr; padding:26px 0 20px; gap:26px;}
  .hero-visual{margin:0 8px;}
  .steps{grid-template-columns:1fr;}
}

/* ---------- auth (ورود / ثبت‌نام) ---------- */
.auth-wrap{max-width:440px; margin:5vh auto 0; animation:fadeUp .45s cubic-bezier(.16,1,.3,1);}
@keyframes fadeUp{from{opacity:0; transform:translateY(14px);} to{opacity:1; transform:none;}}
.auth-card{background:var(--surface); border:1px solid var(--line); border-radius:24px; padding:30px 26px 24px; box-shadow:var(--shadow); position:relative; overflow:hidden;}
.auth-card::before{content:''; position:absolute; inset:0; background:radial-gradient(360px 140px at 50% 0%, var(--glow), transparent 70%); pointer-events:none;}
.auth-card > *{position:relative;}
.auth-logo{width:60px; height:60px; border-radius:18px; margin:0 auto 12px; display:grid; place-items:center; background:linear-gradient(135deg, var(--accent), var(--accent2)); color:var(--accent-ink); box-shadow:0 0 30px -4px var(--accent);}
.auth-logo svg{width:30px; height:30px; fill:none; stroke:currentColor; stroke-width:2.2; stroke-linecap:round; stroke-linejoin:round;}
.auth-title{font-size:22px; font-weight:900; text-align:center; margin:0 0 6px;}
.auth-sub{font-size:13px; color:var(--muted); text-align:center; line-height:1.9; margin:0 0 20px;}
.steps-ind{display:flex; align-items:center; justify-content:center; gap:6px; margin:0 0 22px;}
.steps-ind .s{display:flex; align-items:center; gap:6px; font-size:11.5px; font-weight:800; color:var(--muted);}
.steps-ind .s i{width:22px; height:22px; border-radius:50%; display:grid; place-items:center; font-style:normal; font-size:11px; background:var(--well); border:1px solid var(--line);}
.steps-ind .s.on{color:var(--text);} .steps-ind .s.on i{background:var(--accent); color:var(--accent-ink); border-color:transparent;}
.steps-ind .s.done i{background:var(--green); color:#fff; border-color:transparent;}
.steps-ind .sep{width:18px; height:1px; background:var(--line);}
.phone-field{display:flex; align-items:center; gap:10px; direction:ltr; height:58px; background:var(--well); border:1.5px solid var(--line); border-radius:14px; padding:0 14px; margin-bottom:12px; transition:border-color .15s, box-shadow .15s;}
.phone-field:focus-within{border-color:var(--accent); box-shadow:0 0 0 3px var(--line-soft);}
.phone-prefix{display:flex; align-items:center; gap:6px; padding-right:12px; border-right:1px solid var(--line); color:var(--accent2); font-size:13px; font-weight:800; white-space:nowrap;}
.phone-prefix svg{width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.8;}
.phone-input{flex:1; min-width:0; background:transparent; border:none; outline:none; color:var(--text); font-family:inherit; font-size:21px; font-weight:800; letter-spacing:2px; font-variant-numeric:tabular-nums;}
.phone-input::placeholder{color:var(--muted); opacity:.55; font-weight:600; letter-spacing:1px;}
.phone-input:-webkit-autofill, .phone-input:-webkit-autofill:focus{
  -webkit-box-shadow:0 0 0 1000px var(--well) inset; box-shadow:0 0 0 1000px var(--well) inset;
  -webkit-text-fill-color:var(--text); border-radius:8px; font-size:21px; font-weight:800;
}
.otp-row{display:flex; gap:8px; direction:ltr; justify-content:center; margin:4px 0 6px;}
.otp-box{width:16%; max-width:52px; height:58px; text-align:center; font-size:22px; font-weight:800; background:var(--well); border:1.5px solid var(--line); border-radius:12px; color:var(--text); font-variant-numeric:tabular-nums; outline:none; font-family:inherit;}
.otp-box:focus{border-color:var(--accent); box-shadow:0 0 0 3px var(--line-soft);}
.auth-foot{font-size:12.5px; color:var(--muted); text-align:center; margin-top:14px; line-height:2;}
.welcome-check{width:74px; height:74px; border-radius:50%; margin:0 auto 14px; display:grid; place-items:center; background:rgba(34,197,94,.14); color:var(--green);}
.welcome-check svg{width:36px; height:36px; fill:none; stroke:currentColor; stroke-width:2.6; stroke-linecap:round; stroke-linejoin:round;}
.checklist{list-style:none; padding:0; margin:14px 0; display:flex; flex-direction:column; gap:8px;}
.checklist li{display:flex; gap:10px; align-items:flex-start; font-size:13px; line-height:1.8; padding:10px 12px; background:var(--well); border:1px solid var(--line); border-radius:12px;}
.checklist li b{color:var(--accent);}

/* ---------- profile ---------- */
.profile-head{display:flex; align-items:center; gap:16px; flex-wrap:wrap;}
.profile-head .ph-name{font-size:19px; font-weight:900;}
.profile-head .ph-sub{font-size:12.5px; color:var(--muted); overflow-wrap:anywhere;}
.profile-head .grow{min-width:0;}
@media (max-width:560px){ .profile-head{flex-direction:column; align-items:flex-start;} .profile-head > .row{width:100%;} .profile-head > .row .btn{flex:1;} }
.identity{display:flex; align-items:center; gap:12px; padding:12px; border:1px solid var(--line); border-radius:14px; background:var(--surface2);}
.identity .id-ic{width:42px; height:42px; border-radius:12px; display:grid; place-items:center; flex:none; font-size:18px; background:var(--well); border:1px solid var(--line);}
.identity.on{border-color:rgba(34,197,94,.4);}
.identity .id-t{font-weight:800; font-size:13.5px;}
.identity .id-s{font-size:12px; color:var(--muted); overflow-wrap:anywhere;}
.identity{flex-wrap:wrap;}
.identity .badge{margin-inline-start:auto;}

/* ---------- agent ---------- */
.logo-picker{position:relative; width:76px; height:76px; border-radius:18px; flex:none; cursor:pointer; overflow:hidden; border:1.5px dashed var(--line); background:var(--well); display:grid; place-items:center; transition:border-color .15s, opacity .15s;}
.logo-picker:hover{border-color:var(--accent);}
.logo-picker.uploading{opacity:.5; pointer-events:none;}
.logo-picker img{width:100%; height:100%; object-fit:cover;}
.logo-picker .ph{font-size:11px; color:var(--muted); font-weight:700; text-align:center;}
.save-bar{position:sticky; bottom:12px; z-index:5; display:flex; align-items:center; justify-content:space-between; gap:10px; padding:10px 14px; border-radius:14px; background:var(--surface); border:1px solid var(--line); box-shadow:var(--shadow); margin-top:14px;}
.save-bar.dirty{border-color:rgba(251,191,36,.4);}
@media (max-width:899px){ .save-bar{bottom:calc(var(--tabs-h) + 10px);} }

/* ---------- tickets (support) ---------- */
.ticket-row{display:flex; align-items:center; gap:12px; padding:12px 6px; border-bottom:1px solid var(--line); cursor:pointer; border-radius:10px; transition:background .12s;}
.ticket-row:hover{background:rgba(255,255,255,.03);}
.ticket-row:last-child{border-bottom:none;}
.ticket-row .t-ic{width:40px; height:40px; border-radius:12px; display:grid; place-items:center; background:var(--well); border:1px solid var(--line); flex:none; position:relative;}
.ticket-row .t-ic svg{width:18px; height:18px; fill:none; stroke:var(--accent); stroke-width:1.9; stroke-linecap:round; stroke-linejoin:round;}
.ticket-row .t-ic .dot{position:absolute; top:-3px; inset-inline-end:-3px; width:11px; height:11px; border-radius:50%; background:var(--red); border:2px solid var(--surface);}
.ticket-row .t-main{flex:1; min-width:0;}
.ticket-row .t-subj{font-weight:800; font-size:13.5px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.ticket-row .t-sub{font-size:11.5px; color:var(--muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.ticket-row .t-side{display:flex; flex-direction:column; align-items:flex-end; gap:4px; flex:none;}
.thread{display:flex; flex-direction:column; gap:10px; padding:4px 0;}
.msg{max-width:86%; padding:10px 14px; border-radius:16px; font-size:13.5px; line-height:1.9; white-space:pre-wrap; overflow-wrap:anywhere; position:relative;}
.msg.user{align-self:flex-start; background:var(--surface2); border:1px solid var(--line); border-end-start-radius:4px;}
.msg.admin{align-self:flex-end; background:linear-gradient(135deg, var(--accent), var(--accent2)); color:var(--accent-ink); border-end-end-radius:4px;}
.msg .m-meta{display:block; font-size:10.5px; opacity:.75; margin-top:5px; font-weight:700;}
.msg img{display:block; max-width:100%; border-radius:12px; margin-top:8px; cursor:zoom-in;}
.thread-wrap{max-height:52vh; overflow-y:auto; padding:6px 4px; border:1px solid var(--line); border-radius:14px; background:var(--well); margin-bottom:12px;}
.reply-box{display:flex; flex-direction:column; gap:8px;}
.reply-box .reply-actions{display:flex; gap:8px; align-items:center; flex-wrap:wrap;}
.file-pick{display:inline-flex; align-items:center; gap:6px; padding:8px 12px; border:1px dashed var(--line); border-radius:10px; font-size:12.5px; font-weight:700; cursor:pointer; color:var(--muted);}
.file-pick:hover{border-color:var(--accent); color:var(--text);}
.file-pick.has{border-style:solid; border-color:var(--green); color:var(--green);}
.file-pick svg{width:15px; height:15px; fill:none; stroke:currentColor; stroke-width:2;}
.status-chip{display:inline-flex; align-items:center; gap:5px; font-size:11px; font-weight:800; padding:3px 9px; border-radius:999px;}
.status-chip.open{background:rgba(251,191,36,.14); color:var(--yellow);}
.status-chip.answered{background:rgba(34,197,94,.14); color:var(--green);}
.status-chip.closed{background:rgba(140,150,170,.16); color:var(--muted);}

/* ---------- payment methods / receipts ---------- */
.pay-methods{display:flex; flex-direction:column; gap:8px; margin:6px 0 4px;}
.pay-method{display:flex; align-items:center; gap:12px; padding:12px 14px; border:1px solid var(--line); border-radius:14px; background:var(--surface2); cursor:pointer; transition:border-color .15s, transform .12s; text-align:right;}
.pay-method:hover{border-color:var(--accent);}
.pay-method:active{transform:scale(.99);}
.pay-method .pm-ic{width:42px; height:42px; border-radius:12px; display:grid; place-items:center; background:var(--well); border:1px solid var(--line); flex:none; color:var(--accent);}
.pay-method .pm-ic svg{width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.9; stroke-linecap:round; stroke-linejoin:round;}
.pay-method .pm-t{font-weight:800; font-size:13.5px;}
.pay-method .pm-s{font-size:11.5px; color:var(--muted);}
.pay-method.disabled{opacity:.45; cursor:not-allowed;}
.card-box{background:var(--well); border:1px solid var(--line); border-radius:14px; padding:14px; margin:10px 0;}
.card-box .cn{font-family:ui-monospace, Menlo, monospace; font-size:20px; font-weight:800; letter-spacing:2px; direction:ltr; text-align:center; margin:6px 0; color:var(--accent);}
.card-box .co{text-align:center; font-size:12.5px; color:var(--muted);}
.receipt-img{max-width:100%; border-radius:12px; border:1px solid var(--line); display:block; margin:8px 0;}
.proof-box{background:var(--well); border:1px dashed var(--line); border-radius:12px; padding:10px 12px; font-size:12.5px; line-height:1.9; white-space:pre-wrap; overflow-wrap:anywhere;}

.btn-paid{
  display:inline-flex; align-items:center; gap:6px; padding:5px 11px; border-radius:8px; font-family:inherit; font-size:11.5px; font-weight:700;
  cursor:pointer; line-height:1.4; background:rgba(34,197,94,.10); color:var(--green); border:1px solid rgba(34,197,94,.30);
  transition:background .15s, border-color .15s, transform .12s; white-space:nowrap;
}
.btn-paid::before{content:''; width:6px; height:6px; border-radius:50%; background:var(--green); flex:none;}
.btn-paid:hover{background:rgba(34,197,94,.18); border-color:var(--green);}
.btn-paid:active{transform:scale(.96);}
.proof-note{font-size:11.5px; font-weight:700; color:var(--muted); display:inline-flex; align-items:center; gap:6px;}
.proof-note::before{content:''; width:6px; height:6px; border-radius:50%; background:var(--yellow); flex:none;}

/* ---------- admins / finance ---------- */
.perm-grid{display:grid; grid-template-columns:repeat(auto-fill, minmax(190px, 1fr)); gap:8px; margin:8px 0 12px;}
.perm{display:flex; align-items:center; gap:8px; padding:9px 11px; border:1px solid var(--line); border-radius:11px; background:var(--surface2); cursor:pointer; font-size:12.5px; font-weight:700; user-select:none;}
.perm input{accent-color:var(--accent); width:16px; height:16px; margin:0;}
.perm.on{border-color:var(--accent);}
.radio-cards{display:flex; flex-direction:column; gap:8px;}
.radio-card{display:flex; align-items:center; gap:12px; padding:12px 14px; border:1px solid var(--line); border-radius:14px; background:var(--surface2); cursor:pointer;}
.radio-card.on{border-color:var(--accent); background:linear-gradient(90deg, var(--line-soft), var(--surface2));}
.radio-card .rc-dot{width:18px; height:18px; border-radius:50%; border:2px solid var(--line); flex:none; display:grid; place-items:center;}
.radio-card.on .rc-dot{border-color:var(--accent);}
.radio-card.on .rc-dot::after{content:''; width:9px; height:9px; border-radius:50%; background:var(--accent);}
.radio-card .rc-t{font-weight:800; font-size:13.5px;}
.radio-card .rc-s{font-size:11.5px; color:var(--muted);}

/* ---------- admin ---------- */
.txt-group summary{cursor:pointer; list-style:none; display:flex; align-items:center; gap:8px; font-size:14px;}
.txt-group summary::-webkit-details-marker{display:none;}
.txt-group summary::before{content:'›'; color:var(--accent); font-size:18px; transition:transform .2s;}
.txt-group[open] summary::before{transform:rotate(90deg);}
.admin-tabs{display:flex; gap:6px; flex-wrap:wrap; margin-bottom:16px;}
.admin-tabs a{padding:8px 14px; border-radius:10px; font-size:13px; font-weight:800; color:var(--muted); background:var(--surface); border:1px solid var(--line); transition:all .15s;}
.admin-tabs a.active, .admin-tabs a:hover{color:var(--text); border-color:var(--accent);}
.mono{font-family:ui-monospace, Menlo, monospace; direction:ltr;}
.pager{display:flex; justify-content:center; margin-top:12px;}

/* ---------- boot ---------- */
.boot{position:fixed; inset:0; z-index:500; background:var(--bg); display:flex; flex-direction:column; align-items:center; justify-content:center; gap:16px; transition:opacity .35s; opacity:1;}
.boot.hide{opacity:0; pointer-events:none;}
.boot .b-logo{width:70px; height:70px; border-radius:22px; display:grid; place-items:center; background:linear-gradient(135deg, var(--accent), var(--accent2)); color:var(--accent-ink); box-shadow:0 0 40px -6px var(--accent); animation:bootPulse 1.6s ease-in-out infinite;}
.boot .b-logo svg{width:34px; height:34px; fill:none; stroke:currentColor; stroke-width:2.2; stroke-linecap:round; stroke-linejoin:round;}
@keyframes bootPulse{0%,100%{transform:scale(1);} 50%{transform:scale(1.07);}}
.boot .b-bar{width:130px; height:4px; border-radius:99px; background:var(--surface); overflow:hidden;}
.boot .b-bar > div{width:40%; height:100%; border-radius:99px; background:linear-gradient(90deg, var(--accent), var(--accent2)); animation:bootBar 1.1s ease-in-out infinite;}
@keyframes bootBar{0%{transform:translateX(-100%);} 100%{transform:translateX(350%);}}
@media (prefers-reduced-motion: reduce){ *{animation:none !important; transition:none !important;} }
