/*
  ServerStellar — interface styles.
  Direction: a calm, exact console. Graphite on paper, one accent, hairlines instead of shadows,
  technical values (IPs, ids) set in mono. Spacing on a 4px scale, weights 400–600.
*/

@font-face { font-family: "Vazirmatn"; font-weight: 400; font-display: swap; src: url("../fonts/Vazirmatn-Regular.woff2") format("woff2"); }
@font-face { font-family: "Vazirmatn"; font-weight: 500; font-display: swap; src: url("../fonts/Vazirmatn-Medium.woff2") format("woff2"); }
@font-face { font-family: "Vazirmatn"; font-weight: 600; font-display: swap; src: url("../fonts/Vazirmatn-SemiBold.woff2") format("woff2"); }

:root {
  /* neutral ramp, tinted slightly toward blue-grey */
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f0f2f5;
  --line: rgba(17, 24, 39, .10);
  --line-strong: rgba(17, 24, 39, .18);
  --text: #12161d;
  --text-2: #4b5462;
  --text-3: #727b8a;
  --accent: #3358e0;
  --accent-hover: #2746c0;
  --accent-2: #7c4dff;
  --accent-soft: rgba(51, 88, 224, .09);
  --grad: linear-gradient(135deg, #3358e0 0%, #7c4dff 100%);
  --shadow-sm: 0 1px 2px rgba(17, 24, 39, .06);
  --shadow-md: 0 8px 24px -8px rgba(17, 24, 39, .14), 0 2px 6px rgba(17, 24, 39, .05);
  --shadow-lg: 0 24px 48px -16px rgba(51, 88, 224, .28);
  --sidebar-w: 248px;
  --on-accent: #ffffff;
  --ok: #17803d;
  --warn: #a15c07;
  --err: #c62828;
  --ok-soft: rgba(23, 128, 61, .10);
  --warn-soft: rgba(161, 92, 7, .10);
  --err-soft: rgba(198, 40, 40, .09);

  /* spacing, 4px grid */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s8: 32px; --s10: 40px; --s12: 48px; --s16: 64px; --s20: 80px;

  /* nested radii: container > control > tag */
  --r-lg: 12px; --r-md: 8px; --r-sm: 4px;

  --font: "Vazirmatn", "Vazir", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  --mono: ui-monospace, "SF Mono", Consolas, "Courier New", monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --container: 1120px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0e1116;
  --surface: #151a21;
  --surface-2: #1b212a;
  --line: rgba(255, 255, 255, .09);
  --line-strong: rgba(255, 255, 255, .17);
  --text: #eceff4;
  --text-2: #a7b0bd;
  --text-3: #7c8594;
  --accent: #7f9cff;
  --accent-hover: #9ab2ff;
  --accent-2: #a58bff;
  --accent-soft: rgba(127, 156, 255, .13);
  --grad: linear-gradient(135deg, #5b7cff 0%, #8f6bff 100%);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-md: 0 8px 24px -8px rgba(0, 0, 0, .5);
  --shadow-lg: 0 24px 48px -16px rgba(91, 124, 255, .3);
  --on-accent: #0e1116;
  --ok: #4cc27a;
  --warn: #e0a24a;
  --err: #f27b7b;
  --ok-soft: rgba(76, 194, 122, .13);
  --warn-soft: rgba(224, 162, 74, .13);
  --err-soft: rgba(242, 123, 123, .13);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 14px; line-height: 1.9; font-weight: 400;
  font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased;
}
main { flex: 1; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; line-height: 1.5; }
h1 { font-size: 24px; }
h2 { font-size: 20px; }
h3 { font-size: 16px; }
p { margin: 0; }
b, strong { font-weight: 600; }
a { color: var(--accent); text-decoration: none; transition: color .15s var(--ease); }
a:hover { color: var(--accent-hover); }
img, svg { max-width: 100%; }
img.emoji { width: 1.15em; height: 1.15em; margin: 0 .1em; vertical-align: -.2em; }   /* flags drawn by Twemoji (SS.emoji) in running text */
hr { border: 0; border-top: 1px solid var(--line); margin: var(--s6) 0; }
code, .mono { font-family: var(--mono); direction: ltr; unicode-bidi: plaintext; font-size: 13px; }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r-sm); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ic { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--s6); }
.container.narrow { max-width: 720px; }
.page { padding-block: var(--s10) var(--s16); }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; margin-bottom: var(--s8); }
.page-head p { color: var(--text-2); margin-top: var(--s1); }
.crumb { font-size: 12px; color: var(--text-3); display: inline-block; margin-bottom: var(--s1); }
.crumb:hover { color: var(--text); }

.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.small { font-size: 12px; }
.center { text-align: center; }
.stack { display: grid; gap: var(--s4); }
.stack-lg { display: grid; gap: var(--s8); }
.row { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.grid { display: grid; gap: var(--s4); }
.grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 860px) { .grid.c3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .grid.c2, .grid.c3 { grid-template-columns: 1fr; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  height: 40px; padding: 0 var(--s4); border-radius: var(--r-md);
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--text);
  font: inherit; font-weight: 500; cursor: pointer; white-space: nowrap;
  transition: background-color .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease), opacity .15s var(--ease), transform .1s var(--ease);
}
.btn:hover { background: var(--surface-2); color: var(--text); }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-accent); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--surface-2); color: var(--text); }
.btn.danger { color: var(--err); }
.btn.danger:hover { background: var(--err-soft); color: var(--err); }
.btn.danger.solid { background: var(--err); border-color: var(--err); color: #fff; }
.btn.danger.solid:hover { background: var(--err); opacity: .9; color: #fff; }
.btn.sm { height: 32px; padding: 0 var(--s3); font-size: 13px; }
.btn.lg { height: 48px; padding: 0 var(--s6); font-size: 16px; }
.btn.block { width: 100%; }
.g-logo { width: 18px; height: 18px; flex: none; }
.btn.primary .g-logo { box-sizing: content-box; padding: 3px; background: #fff; border-radius: 50%; }
.btn:disabled, .btn[aria-busy="true"] { opacity: .5; cursor: not-allowed; pointer-events: none; }
.btn .spin { width: 16px; height: 16px; border-width: 2px; border-top-color: currentColor; }

/* ---------- Forms ---------- */
.field { display: grid; gap: var(--s2); }
.field > label, .label { font-weight: 500; color: var(--text); }
.input, .textarea, .field input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), .field textarea, .field select, .select {
  width: 100%; height: 40px; padding: 0 var(--s3);
  border: 1px solid var(--line-strong); border-radius: var(--r-md);
  background: var(--surface); color: var(--text); font: inherit;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.textarea, .field textarea { height: auto; min-height: 128px; padding: var(--s3); resize: vertical; line-height: 1.9; }
.input:hover, .field input:hover { border-color: var(--text-3); }
.input:focus, .textarea:focus, .field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
::placeholder { color: var(--text-3); }
.field input[type="email"], .field input[type="password"], .input[dir="ltr"] { direction: ltr; text-align: left; }
.field input[type="email"]::placeholder, .field input[type="password"]::placeholder { direction: rtl; text-align: right; }
.hint { font-size: 12px; color: var(--text-3); }
.errorlist { list-style: none; margin: 0; padding: 0; color: var(--err); font-size: 12px; }
.check { display: flex; align-items: center; gap: var(--s2); color: var(--text-2); cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); margin: 0; }
.input-group { position: relative; }
/* Room for the button inside the field. !important: the form rule above (.field input:not(...)) outranks any plain selector.
   An LTR field (password, email) on an RTL page keeps the room on the left, where the page's end puts the button. */
.input-group .input { padding-inline-end: var(--s10) !important; }
[dir="rtl"] .input-group .input[dir="ltr"], [dir="rtl"] .input-group input[type="password"], [dir="rtl"] .input-group input[type="email"] {
  padding-right: var(--s3) !important; padding-left: var(--s10) !important;
}
.input-group .icon-btn { position: absolute; inset-inline-end: var(--s1); top: var(--s1); }
.input-affix { display: flex; }
.input-affix .input { border-start-end-radius: 0; border-end-end-radius: 0; }
.input-affix .affix { display: grid; place-items: center; padding: 0 var(--s4); color: var(--text-2); background: var(--surface-2); border: 1px solid var(--line-strong); border-inline-start: 0; border-radius: var(--r-md) 0 0 var(--r-md); }

/* Custom dropdown mirroring a native select */
.dd { position: relative; width: 100%; }
.dd-native { position: absolute; inset-inline: 0; bottom: 0; width: 100%; height: 1px; opacity: 0; pointer-events: none; }
.dd-btn { width: 100%; height: 40px; padding: 0 var(--s3); display: flex; align-items: center; justify-content: space-between; gap: var(--s2); font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-md); cursor: pointer; text-align: start; transition: border-color .15s var(--ease), box-shadow .15s var(--ease); }
.dd-btn:hover { border-color: var(--text-3); }
.dd-btn:focus-visible, .dd-btn[aria-expanded="true"] { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.dd-btn .ic { color: var(--text-3); width: 12px; height: 12px; }
.dd-label.placeholder { color: var(--text-3); }
.dd-label img.emoji, .dd-item img.emoji { width: 1.25em; height: 1.25em; vertical-align: -.25em; margin-inline-end: var(--s2); }
.dd-list { position: absolute; z-index: 60; top: calc(100% + var(--s1)); inset-inline: 0; max-height: 280px; overflow-y: auto; padding: var(--s1); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-md); }
.dd-item { padding: 0 var(--s3); line-height: 36px; border-radius: var(--r-sm); cursor: pointer; display: flex; align-items: center; }
.dd-item:hover { background: var(--surface-2); }
.dd-item[aria-selected="true"] { background: var(--accent-soft); color: var(--accent); font-weight: 500; }
.dd-item.disabled { opacity: .4; cursor: not-allowed; }
.dd-group { padding: var(--s3) var(--s3) var(--s1); font-size: 12px; color: var(--text-3); }

/* ---------- Surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s6); }
.card.flush { padding: 0; overflow: hidden; }
a.card { color: inherit; display: block; transition: border-color .15s var(--ease); }
a.card:hover { border-color: var(--line-strong); color: inherit; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s4); }
.card-head h3 { font-size: 14px; font-weight: 600; }
.kv { display: grid; grid-template-columns: 128px 1fr; gap: var(--s3) var(--s4); }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.kv-list { display: grid; }
.kv-row { display: flex; justify-content: space-between; gap: var(--s4); padding: var(--s3) 0; border-bottom: 1px solid var(--line); }
.kv-row:last-child { border-bottom: 0; }
.kv-row > :first-child { color: var(--text-3); }
@media (max-width: 560px) { .kv { grid-template-columns: 1fr; gap: 0; } .kv dd { margin-bottom: var(--s3); } }

.stat { display: grid; gap: var(--s1); }
.stat .label { color: var(--text-3); font-weight: 400; }
.stat .value { font-size: 24px; font-weight: 500; line-height: 1.5; }
.stat .value small { font-size: 12px; color: var(--text-3); }

/* ---------- Tags ---------- */
.badge { display: inline-flex; align-items: center; gap: var(--s2); line-height: 20px; padding: 0 var(--s2); border-radius: var(--r-sm); font-size: 12px; font-weight: 500; background: var(--surface-2); color: var(--text-2); }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.err { background: var(--err-soft); color: var(--err); }
.badge.accent { background: var(--accent-soft); color: var(--accent); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; display: inline-block; flex: none; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; }
.table th { text-align: start; font-weight: 400; font-size: 12px; color: var(--text-3); padding: var(--s3) var(--s5); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: var(--s4) var(--s5); border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--surface-2); }
.table a.row-link { color: var(--text); font-weight: 500; }
.table a.row-link:hover { color: var(--accent); }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: var(--s6); border-bottom: 1px solid var(--line); margin-bottom: var(--s6); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { padding: var(--s3) 0; font: inherit; color: var(--text-2); background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; white-space: nowrap; transition: color .15s var(--ease); }
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--text); font-weight: 500; }
.tab-panel[hidden] { display: none; }

/* ---------- Messages ---------- */
.alert { display: flex; gap: var(--s3); align-items: flex-start; padding: var(--s3) var(--s4); border-radius: var(--r-md); background: var(--surface-2); color: var(--text-2); }
.alert.ok { background: var(--ok-soft); color: var(--ok); }
.alert.warn { background: var(--warn-soft); color: var(--warn); }
.alert.err { background: var(--err-soft); color: var(--err); }
.alert.info { background: var(--accent-soft); color: var(--accent); }
.toasts { position: fixed; z-index: 200; bottom: var(--s6); inset-inline-start: var(--s6); display: grid; gap: var(--s2); width: min(380px, calc(100vw - 48px)); }
.toast { display: flex; gap: var(--s3); align-items: flex-start; padding: var(--s3) var(--s4); border-radius: var(--r-md); background: var(--text); color: var(--bg); animation: rise .2s var(--ease); cursor: pointer; }
.toast .ic { margin-top: 5px; }
.toast.out { opacity: 0; transform: translateY(8px); transition: opacity .2s var(--ease), transform .2s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

dialog.modal { border: 1px solid var(--line-strong); border-radius: var(--r-lg); padding: 0; width: min(440px, calc(100vw - 32px)); background: var(--surface); color: var(--text); }
dialog.modal::backdrop { background: rgba(10, 12, 16, .5); }
dialog.modal[open] { animation: rise .2s var(--ease); }
.modal-body { padding: var(--s6) var(--s6) var(--s2); display: grid; gap: var(--s3); }
.modal-foot { display: flex; gap: var(--s2); padding: var(--s4) var(--s6) var(--s6); }
.secret-box { display: flex; align-items: center; gap: var(--s2); padding: var(--s3); border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--surface-2); }
.secret-box code { flex: 1; overflow-wrap: anywhere; user-select: all; }

/* ---------- States ---------- */
.spin { width: 16px; height: 16px; border: 2px solid var(--line-strong); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { background: var(--surface-2); border-radius: var(--r-md); }

/* Third-party captcha widget: reserve its size and show a card until it has loaded */
.captcha-box { position: relative; min-height: 78px; }
.captcha-box .captcha-widget { position: relative; z-index: 1; }
.captcha-ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: var(--s2); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2); color: var(--text-2); font-size: .875rem; }
.captcha-box.is-ready .captcha-ph { display: none; }
.empty { text-align: center; padding: var(--s16) var(--s5); color: var(--text-2); }
.empty h3 { color: var(--text); margin-bottom: var(--s1); }
.empty .btn { margin-top: var(--s5); }

.meter { height: 4px; border-radius: 2px; background: var(--surface-2); overflow: hidden; }
.meter > span { display: block; width: 100%; height: 100%; background: var(--accent); transform-origin: right; transform: scaleX(var(--p, 0)); transition: transform .4s var(--ease); }
.meter.warn > span { background: var(--warn); } .meter.err > span { background: var(--err); }

/* ---------- Create-server wizard ---------- */
.options { display: grid; grid-template-columns: repeat(auto-fill, minmax(192px, 1fr)); gap: var(--s3); }
.option {
  text-align: start; padding: var(--s4); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-md); cursor: pointer; font: inherit; color: var(--text);
  display: grid; gap: var(--s1); transition: border-color .15s var(--ease), background-color .15s var(--ease);
}
.option:hover { border-color: var(--line-strong); }
.option[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.option.pay-method { grid-template-columns: auto 1fr; align-items: center; gap: var(--s3); cursor: pointer; }
.option.pay-method input { accent-color: var(--accent); margin: 0; }
.option.pay-method:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.option .t { font-weight: 500; display: flex; align-items: center; gap: var(--s2); }
.option .s { font-size: 12px; color: var(--text-2); }
.option .p { font-weight: 500; margin-top: var(--s2); padding-top: var(--s3); border-top: 1px solid var(--line); }
.specs { margin: var(--s2) 0 0; display: grid; }
.specs > div { display: flex; justify-content: space-between; gap: var(--s3); padding: var(--s1) 0; font-size: 12px; }
.specs dt { color: var(--text-3); }
.specs dd { margin: 0; font-weight: 500; text-align: end; }
.option[aria-pressed="true"] .p, .option[aria-pressed="true"] .specs { border-color: var(--line-strong); }
.option img.emoji { width: 20px; height: 20px; }
.os-logo { width: 24px; height: 24px; object-fit: contain; flex: none; }
.os-logo.on-dark { box-sizing: border-box; padding: 3px; border-radius: var(--r-md); background: #12161d; }
.os-logo.mono-tile { display: grid; place-items: center; border-radius: var(--r-sm); background: var(--surface-2); color: var(--text-2); font-size: 12px; font-weight: 600; }
.option[disabled] { opacity: .5; cursor: not-allowed; }
.option .why { color: var(--warn); font-size: 12px; line-height: 1.5; }
.option[disabled]:has(.why) { opacity: 1; }
.option[disabled]:has(.why) > :not(.why) { opacity: .5; }

.seg { display: inline-flex; padding: var(--s1); gap: var(--s1); background: var(--surface-2); border-radius: var(--r-md); flex-wrap: wrap; }
.seg button { border: 0; background: none; font: inherit; padding: 0 var(--s3); line-height: 28px; border-radius: var(--r-sm); color: var(--text-2); cursor: pointer; transition: background-color .15s var(--ease), color .15s var(--ease); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); font-weight: 500; }

.steps { display: grid; gap: var(--s10); }
.step { display: grid; grid-template-columns: 24px 1fr; gap: var(--s4); transition: opacity .2s var(--ease); }
.step-n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 500; color: var(--text-3); border: 1px solid var(--line-strong); }
.step.done .step-n { background: var(--text); color: var(--bg); border-color: var(--text); }
.step.active .step-n { border-color: var(--accent); color: var(--accent); }
.step.locked { opacity: .4; pointer-events: none; }
.step h3 { margin-bottom: var(--s4); line-height: 24px; }
.create-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--s10); align-items: start; }
.summary { position: sticky; top: 80px; }
@media (max-width: 920px) { .create-layout { grid-template-columns: 1fr; } .summary { position: static; } }

/* Left-to-right interface (English) */
[dir="ltr"] .meter > span { transform-origin: left; }
[dir="ltr"] .input-affix .affix { border-radius: 0 var(--r-md) var(--r-md) 0; border-inline-start: 1px solid var(--line-strong); border-inline-end: 0; }
[dir="ltr"] .input-affix .input { border-radius: var(--r-md) 0 0 var(--r-md); }
[dir="ltr"] .field input[type="email"]::placeholder, [dir="ltr"] .field input[type="password"]::placeholder { direction: ltr; text-align: left; }

/* ---------- Card-to-card payment ---------- */
.pay-total { padding: var(--s4); border: 1px solid var(--accent); background: var(--accent-soft); border-radius: var(--r-md); margin-bottom: var(--s4); }
.pay-total .label { color: var(--accent); }
.pay-total-num { font-size: 28px; font-weight: 600; line-height: 1.6; }
.pay-total-num[data-copy], .pay-card-num[data-copy] { cursor: pointer; border-radius: var(--r-sm); transition: background-color .15s var(--ease); }
.pay-total-num[data-copy]:hover, .pay-card-num[data-copy]:hover { background: var(--surface); }
.pay-card { padding: var(--s4); border: 1px solid var(--line-strong); border-radius: var(--r-md); margin-bottom: var(--s4); }
.pay-card .label { display: block; margin-bottom: var(--s2); color: var(--text-2); }
.pay-card-num { font-size: 18px; letter-spacing: .06em; direction: ltr; unicode-bidi: isolate; display: inline-block; }
.pay-breakdown { margin-top: var(--s4); padding: var(--s3) var(--s4); background: var(--surface-2); border-radius: var(--r-md); display: grid; gap: var(--s1); color: var(--text-2); }
.pay-breakdown b { color: var(--text); }

/* ---------- Auth ---------- */
.auth { min-height: calc(100vh - 120px); display: grid; place-items: center; padding: var(--s12) var(--s5); }
.auth-box { width: 100%; max-width: 400px; }
.auth-box h1 { font-size: 24px; }
.auth-box .sub { color: var(--text-2); margin: var(--s2) 0 var(--s8); }
.auth-box.center h1, .auth-box.center .sub { text-align: center; }
.divider { display: flex; align-items: center; gap: var(--s3); color: var(--text-3); font-size: 12px; margin: var(--s5) 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.captcha-row { display: flex; gap: var(--s2); align-items: center; }
.captcha-row img { height: 40px; border-radius: var(--r-md); border: 1px solid var(--line); background: #fff; }

/* ---------- Tickets ---------- */
.thread { display: grid; gap: var(--s3); }
.msg { max-width: 80%; padding: var(--s3) var(--s4); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.me { margin-inline-start: auto; background: var(--accent-soft); border-color: transparent; }
.msg .meta { font-size: 12px; color: var(--text-3); margin-bottom: var(--s1); display: flex; gap: var(--s3); }
.composer { display: flex; gap: var(--s2); align-items: flex-end; }
.composer .textarea { min-height: 40px; height: 40px; max-height: 160px; }

/* ---------- Misc ---------- */
.copy-line { display: inline-flex; align-items: center; gap: var(--s1); }
.copy-btn { border: 0; background: none; cursor: pointer; color: var(--text-3); padding: var(--s1); border-radius: var(--r-sm); display: inline-grid; transition: color .15s var(--ease); }
.copy-btn:hover { color: var(--text); }
.danger-zone { border-color: color-mix(in srgb, var(--err) 28%, var(--line)); }
.toolbar { display: flex; gap: var(--s3); flex-wrap: wrap; margin-bottom: var(--s4); align-items: center; }
.toolbar .input { max-width: 280px; }
.price { font-weight: 500; }
@media (prefers-reduced-motion: reduce) { * { animation-duration: .001ms !important; transition-duration: .001ms !important; } html { scroll-behavior: auto; } }
