:root,
html[data-theme="dark"] {
  --bg: #050608;
  --surface: #080d12;
  --panel: #0d141b;
  --panel2: #111b24;
  --line: #26333d;
  --line-soft: rgba(255, 255, 255, .08);
  --text: #f5f7fa;
  --muted: #8d9aa7;
  --soft: #b8c3cc;
  --green: #30d158;
  --green2: #91f7b5;
  --cyan: #64d2ff;
  --blue: #0a84ff;
  --amber: #ffd60a;
  --red: #ff453a;
  --shadow: 0 18px 55px rgba(0, 0, 0, .34);
  --shadow-soft: 0 1px 0 rgba(255,255,255,.08) inset, 0 16px 45px rgba(0,0,0,.28);
  --body-bg:
    radial-gradient(circle at 50% -18%, rgba(10, 132, 255, .10), transparent 34%),
    linear-gradient(180deg, #06080b 0%, #050608 46%, #030405 100%);
  --grid-bg:
    linear-gradient(rgba(255, 255, 255, .018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .012) 1px, transparent 1px);
  --top-bg: rgba(6, 12, 17, .86);
  --top-border: rgba(80, 123, 136, .34);
  --panel-bg:
    linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .012)),
    linear-gradient(180deg, rgba(18, 33, 41, .96), rgba(8, 18, 24, .96));
  --flat-bg:
    linear-gradient(180deg, rgba(255, 255, 255, .028), transparent),
    rgba(12, 28, 35, .94);
  --input-bg: rgba(4, 14, 19, .86);
  --input-placeholder: #708985;
  --soft-panel: rgba(4, 15, 20, .62);
  --soft-panel-strong: rgba(8, 24, 31, .92);
  --secondary-bg: rgba(23, 49, 58, .72);
  --secondary-top-bg: rgba(9, 15, 20, .84);
  --primary-bg: linear-gradient(135deg, #0a84ff, #28b7ff);
  --primary-text: #ffffff;
  --error-bg: rgba(255, 69, 58, .14);
  --error-border: rgba(255, 69, 58, .42);
  --error-text: #ffd7dc;
  --warning-bg: rgba(255, 214, 10, .10);
  --warning-border: rgba(255, 214, 10, .34);
  --warning-text: #ffe9a6;
  --r: 8px;
}

* { box-sizing: border-box; }

html { color-scheme: dark; }

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f7fb;
  --surface: #ffffff;
  --panel: #ffffff;
  --panel2: #f7faff;
  --line: #dbe4ef;
  --line-soft: rgba(15, 23, 42, .10);
  --text: #182235;
  --muted: #667387;
  --soft: #334155;
  --green: #22c55e;
  --green2: #15803d;
  --cyan: #0ea5e9;
  --blue: #0a84ff;
  --amber: #d97706;
  --red: #dc2626;
  --shadow: 0 18px 42px rgba(15, 23, 42, .08);
  --shadow-soft: 0 1px 0 rgba(255,255,255,.85) inset, 0 14px 36px rgba(15,23,42,.08);
  --body-bg:
    radial-gradient(circle at 50% -18%, rgba(10, 132, 255, .12), transparent 38%),
    linear-gradient(180deg, #f7faff 0%, #f5f7fb 54%, #eef3f8 100%);
  --grid-bg:
    linear-gradient(rgba(15, 23, 42, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, .028) 1px, transparent 1px);
  --top-bg: rgba(255, 255, 255, .82);
  --top-border: rgba(15, 23, 42, .10);
  --panel-bg:
    linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(248, 251, 255, .96));
  --flat-bg: #ffffff;
  --input-bg: #ffffff;
  --input-placeholder: #93a0b2;
  --soft-panel: rgba(255, 255, 255, .72);
  --soft-panel-strong: #ffffff;
  --secondary-bg: #ffffff;
  --secondary-top-bg: rgba(255, 255, 255, .86);
  --primary-bg: linear-gradient(135deg, #0a84ff, #28b7ff);
  --primary-text: #ffffff;
  --error-bg: #fff1f2;
  --error-border: #fecdd3;
  --error-text: #9f1239;
  --warning-bg: #fffbeb;
  --warning-border: #fde68a;
  --warning-text: #854d0e;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--body-bg);
  color: var(--text);
  font-family: Inter, "Segoe UI", Arial, "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

body.workbench-view {
  height: 100vh;
  overflow: hidden;
}

body.long-term-view {
  height: 100vh;
  overflow: hidden;
}

body.cdk-public-page {
  min-height: 100vh;
  overflow: auto;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: var(--grid-bg);
  background-size: 56px 56px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.72), rgba(0,0,0,.18));
}

html[data-theme="light"] body::before {
  opacity: .5;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.35), rgba(0,0,0,.05));
}

button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .52; }

img, svg, canvas, video { max-width: 100%; }

p, span, small, strong, b, em, code, td, th, button, input, select, textarea {
  min-width: 0;
}

.shell,
.wrap,
#app,
.panel-card,
.card,
.auth-card,
.intro-panel,
.market-panel,
.selector-panel {
  min-width: 0;
  max-width: 100%;
}

.mono,
code,
.detail-text p,
.detail-text code,
.number-box strong,
.sms-box p {
  overflow-wrap: anywhere;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(76, 201, 216, .34);
  outline-offset: 2px;
}

.shell { min-height: 100vh; position: relative; z-index: 1; }

body.workbench-view .shell {
  height: 100vh;
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

body.long-term-view .shell {
  height: 100vh;
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.top {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--top-border);
  background: var(--top-bg);
  backdrop-filter: blur(18px) saturate(130%);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .24);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 190px;
  font-weight: 850;
}

.logo,
.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: block;
  flex: 0 0 auto;
  object-fit: cover;
  color: #031411;
  background: linear-gradient(135deg, var(--green), var(--cyan));
  box-shadow: 0 0 0 1px rgba(255,255,255,.10), 0 10px 24px rgba(50, 209, 127, .18);
}

.logo svg { width: 23px; height: 23px; }
.brand small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; font-weight: 700; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 18px; }

body.workbench-view .top {
  position: relative;
  top: auto;
}

body.workbench-view .wrap {
  width: 100%;
  max-width: none;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  padding: 12px 18px;
}

body.long-term-view .wrap {
  width: 100%;
  max-width: none;
  height: 100%;
  min-height: 0;
  overflow: auto;
  padding: 12px 18px;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
}

.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

body.invite-page {
  min-height: 100vh;
  overflow: auto;
}

.invite-top .btn {
  min-height: 38px;
}

.invite-wrap {
  width: min(980px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 46px 0 64px;
  display: grid;
  gap: 16px;
}

.invite-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 28px;
}

.invite-hero h1 {
  margin: 6px 0 10px;
  font-size: 38px;
  line-height: 1.06;
  letter-spacing: 0;
}

.invite-hero p {
  margin: 0;
  max-width: 640px;
  color: var(--soft);
  line-height: 1.75;
}

.invite-stock {
  flex: 0 0 auto;
  min-width: 112px;
  min-height: 38px;
  display: grid;
  place-items: center;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(50, 209, 127, .42);
  background: rgba(50, 209, 127, .12);
  color: var(--green2);
  font-weight: 850;
}

.invite-stock.low {
  border-color: rgba(245, 187, 80, .45);
  background: rgba(245, 187, 80, .12);
  color: #ffd98a;
}

.invite-stock.empty,
.invite-stock.inactive {
  border-color: rgba(255, 108, 122, .4);
  background: rgba(255, 108, 122, .12);
  color: #ffb0b8;
}

.invite-card {
  padding: 24px;
  display: grid;
  gap: 18px;
}

.invite-result {
  border: 1px solid rgba(98, 212, 232, .28);
  border-radius: var(--r);
  background: rgba(98, 212, 232, .08);
  padding: 18px;
  display: grid;
  gap: 8px;
}

.invite-code {
  width: 100%;
  overflow-wrap: anywhere;
  color: var(--green2);
  font-size: 28px;
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: 0;
}

.invite-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.invite-actions .btn {
  min-height: 44px;
}

.disabled-link {
  pointer-events: none;
  opacity: .55;
}

.invite-rules {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.invite-rule {
  padding: 18px;
  display: grid;
  gap: 8px;
}

.invite-rule strong {
  font-size: 17px;
}

.invite-rule span {
  color: var(--muted);
  line-height: 1.65;
}

.card,
.intro-panel,
.auth-card,
.panel-card {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--panel-bg);
  box-shadow: var(--shadow-soft);
  padding: 16px;
}

.navbtn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 8px;
}

.lang-toggle {
  min-width: 72px;
  justify-content: center;
  letter-spacing: 0;
  white-space: nowrap;
}

.actions .lang-toggle {
  order: 90;
}

.navbtn svg,
.btn svg,
.support-widget svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) 390px;
  gap: 18px;
  align-items: stretch;
}

.login-art {
  min-height: 560px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 30px;
  background:
    linear-gradient(135deg, rgba(98, 212, 232, .14), transparent 34%),
    linear-gradient(180deg, rgba(18, 33, 41, .98), rgba(8, 18, 24, .98));
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 8px 12px 8px 8px;
  background: rgba(255,255,255,.04);
  font-weight: 900;
}

.brand-badge img { width: 32px; height: 32px; border-radius: 8px; }
.login-art h1 { margin: 22px 0 0; font-size: 52px; line-height: 1.05; }
.login-art p { max-width: 720px; color: var(--muted); line-height: 1.7; font-size: 16px; }
.login-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 26px; }
.login-steps span { border: 1px solid var(--line-soft); border-radius: 8px; padding: 13px; color: var(--soft); background: rgba(4,15,20,.62); font-weight: 850; }
.public-entry-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-top: 18px;
  align-items: center;
}
.public-entry-links .linkbtn {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 0 12px;
  background: rgba(4,15,20,.62);
  text-decoration: none;
}

.public-faq {
  grid-column: 1 / -1;
}

.legal-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
}

.legal-line label { display: inline-flex; align-items: center; gap: 8px; }
.legal-line input { width: 18px; height: 18px; accent-color: var(--green); }

.workbench {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

body.workbench-view .workbench {
  height: 100%;
  min-height: 0;
  grid-template-columns: minmax(310px, 360px) minmax(0, 1fr);
  align-items: stretch;
}

.selector-panel {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 16px;
}

body.workbench-view .selector-panel {
  position: static;
  top: auto;
  min-height: 0;
  overflow: hidden;
  grid-template-rows: auto auto minmax(0, 1fr);
}

body.workbench-view .selector-panel .field.section {
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
}

.side-head strong {
  display: block;
  margin-top: 4px;
  font-size: 22px;
}

.service-list,
.country-list {
  display: grid;
  gap: 8px;
}

.service-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 6px 0 10px;
}

.service-tab {
  min-height: 38px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255,255,255,.03);
  font-weight: 850;
}

.service-tab.active {
  color: var(--text);
  border-color: rgba(10,132,255,.62);
  background: rgba(10,132,255,.18);
}

.service-tab.locked {
  opacity: .68;
  cursor: not-allowed;
}

.country-list {
  max-height: 520px;
  overflow: auto;
  padding-right: 4px;
}

body.workbench-view .country-list {
  max-height: none;
  min-height: 0;
}

.pick-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 9px;
  color: var(--text);
  background: rgba(4, 15, 20, .62);
  text-align: left;
}

.pick-row.active {
  border-color: rgba(50,209,127,.72);
  background: rgba(50,209,127,.10);
}

.pick-row.locked {
  opacity: .78;
  border-style: dashed;
}

.pick-row strong,
.pick-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-row small { margin-top: 3px; color: var(--muted); font-size: 12px; }
.lock-note {
  display: inline-flex;
  width: fit-content;
  margin-top: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  color: var(--warning-text);
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
}

.service-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  color: #031411;
  background: linear-gradient(135deg, var(--green), var(--cyan));
  font-weight: 950;
}
.service-mark.service-logo {
  color: #f8fbff;
  background: #0a1117;
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}
.service-mark svg { width: 26px; height: 26px; display: block; fill: currentColor; }
.service-mark.logo-openai { color: #f8fbff; background: linear-gradient(145deg, #090d12, #14202a); }
.service-mark.logo-claude { color: #f5d39d; background: linear-gradient(145deg, #1f1510, #302118); }
.service-mark.logo-google { background: #f8fbff; }
.service-mark.logo-google svg { width: 27px; height: 27px; }
.service-mark.logo-google .g-blue { fill: #4285f4; }
.service-mark.logo-google .g-green { fill: #34a853; }
.service-mark.logo-google .g-yellow { fill: #fbbc05; }
.service-mark.logo-google .g-red { fill: #ea4335; }
.service-mark.logo-amazon { color: #111827; background: linear-gradient(145deg, #fff, #f1f5f9); }
.service-mark.logo-whatsapp { color: #fff; background: linear-gradient(145deg, #25d366, #128c7e); }
.service-mark.logo-telegram { color: #fff; background: linear-gradient(145deg, #2aabee, #168acd); }
.service-mark.logo-apple { color: #f8fafc; background: linear-gradient(145deg, #111827, #334155); }
.service-mark.logo-line { color: #fff; background: linear-gradient(145deg, #06c755, #079a42); }
.service-mark.logo-tiktokdouyin { color: #fff; background: linear-gradient(145deg, #111827, #0ea5e9 55%, #ff2e63); }

.service-lock-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  color: var(--text);
  background: rgba(255,255,255,.035);
}

.service-lock-card.large {
  max-width: 520px;
  margin: 0 auto;
}

.service-lock-card strong {
  font-size: 18px;
}

.service-lock-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.vip-progress {
  display: grid;
  gap: 8px;
}

.vip-progress div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.vip-progress b {
  color: var(--text);
}

.vip-progress i {
  display: block;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255,255,255,.08);
}

.vip-progress em {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
}

.level-service-card {
  margin-top: 14px;
}

.level-service-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.level-service-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.level-service-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.level-service-row {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: rgba(255,255,255,.035);
}

.level-service-row.vip {
  border-color: rgba(59,130,246,.45);
  background: linear-gradient(145deg, rgba(59,130,246,.11), rgba(255,255,255,.035));
}

.level-service-row small {
  color: var(--muted);
  line-height: 1.5;
}

.level-service-row .ok-text {
  color: #5eead4;
}

.service-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.service-chip-list span,
.service-chip-list em {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 999px;
  color: var(--text);
  background: rgba(7,11,16,.58);
  font-style: normal;
  font-weight: 800;
}

.service-chip-list span.locked {
  color: var(--muted);
}

.service-chip-list b {
  padding: 2px 6px;
  border-radius: 999px;
  color: #93c5fd;
  background: rgba(37,99,235,.16);
  font-size: 11px;
}

.market-panel { min-width: 0; }

body.workbench-view .market-panel {
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
  padding-bottom: 92px;
  scrollbar-gutter: stable;
}

body.workbench-view .trade-header h2 { font-size: 28px; }
body.workbench-view .trade-modes { margin-top: 8px; }
body.workbench-view .mode-card { gap: 8px; padding: 10px; }
body.workbench-view .active-order-table {
  overflow-x: visible;
}

body.workbench-view .active-order-table .orders-table,
.compact-orders {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.compact-orders th:nth-child(1),
.compact-orders td:nth-child(1) { width: 156px; }
.compact-orders th:nth-child(3),
.compact-orders td:nth-child(3) { width: 118px; }
.compact-orders th:nth-child(4),
.compact-orders td:nth-child(4) { width: 124px; }
.compact-orders th:nth-child(5),
.compact-orders td:nth-child(5) { width: 210px; }

.compact-orders td {
  min-width: 0;
}

.compact-orders td:not(:last-child) {
  overflow: hidden;
  text-overflow: ellipsis;
}

.compact-actions {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  justify-content: stretch;
  width: 100%;
  pointer-events: auto;
}

.compact-actions .btn.sm {
  min-height: 34px;
  padding: 7px 8px;
  justify-content: center;
  white-space: nowrap;
}

.active-order-list {
  display: grid;
  gap: 8px;
}

.active-order-row {
  padding: 10px;
}

.active-order-main {
  display: grid;
  grid-template-columns: minmax(132px, .8fr) minmax(150px, 1fr) minmax(96px, .58fr) minmax(112px, .64fr) minmax(184px, .95fr);
  align-items: center;
  gap: 8px;
}

.active-status,
.active-phone,
.active-code,
.active-expire {
  min-width: 0;
}

.active-status strong,
.active-status small,
.active-phone strong,
.active-phone small,
.active-code small,
.active-expire small {
  display: block;
}

.active-status strong {
  margin-top: 5px;
}

.active-status small,
.active-phone small,
.active-code small,
.active-expire small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.active-phone strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.active-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  min-width: 0;
  position: relative;
  z-index: 3;
}

.active-actions .btn.sm {
  min-height: 36px;
  padding: 7px 8px;
  justify-content: center;
  white-space: nowrap;
}

.active-detail {
  margin-top: 9px;
}

.trade-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.trade-header h2 {
  margin: 0;
  font-size: 30px;
}

.trade-modes {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.order-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.order-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 14px;
}

.order-tabs button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  color: var(--soft);
  background: rgba(4, 15, 20, .68);
  font-weight: 850;
}

.order-tabs button.active {
  color: #031411;
  border-color: transparent;
  background: var(--green);
}

.order-search-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 110px 110px;
  gap: 10px;
  margin: 0 0 12px;
}

.order-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(4, 13, 18, .62);
}

.orders-table {
  min-width: 980px;
}

.orders-table th {
  text-transform: none;
}

.orders-table td {
  padding: 9px 10px;
  vertical-align: middle;
}

.orders-table td small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.orders-table .timer.small {
  font-size: 15px;
}

.inline-code {
  border: 1px solid rgba(50, 209, 127, .35);
  border-radius: 7px;
  padding: 6px 8px;
  color: var(--green2);
  background: rgba(50, 209, 127, .08);
  font-weight: 900;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  position: relative;
  z-index: 4;
}

.table-actions .btn.sm {
  min-height: 36px;
  min-width: 78px;
  pointer-events: auto;
}

.order-detail-row td {
  padding: 0 10px 10px;
  background: rgba(98, 212, 232, .025);
}

.order-detail-panel {
  display: grid;
  grid-template-columns: minmax(260px, .9fr) minmax(280px, 1.1fr);
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(4, 15, 20, .72);
}

.detail-copy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.detail-text {
  min-width: 0;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(3, 13, 18, .55);
}

.detail-text span,
.detail-text small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.detail-text code,
.detail-text p {
  display: block;
  margin: 6px 0 0;
  color: var(--soft);
  white-space: normal;
  overflow-wrap: anywhere;
}

.receive-limit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.limit-card {
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  color: var(--text);
  background: rgba(4, 15, 20, .72);
  text-align: left;
}

.limit-card.active {
  border-color: rgba(50, 209, 127, .82);
  background: rgba(50, 209, 127, .13);
}

.limit-card strong,
.limit-card span {
  display: block;
}

.limit-card strong {
  font-size: 22px;
}

.limit-card span {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.receive-limit-control {
  display: grid;
  grid-template-columns: minmax(190px, .72fr) minmax(260px, 1.28fr);
  gap: 10px;
  align-items: stretch;
}

.fee-note {
  border: 1px solid rgba(244, 183, 64, .36);
  border-radius: 8px;
  padding: 12px 12px 44px;
  background: rgba(244, 183, 64, .08);
  color: var(--soft);
  line-height: 1.55;
}

.fee-note strong,
.fee-note span {
  display: block;
}

.fee-note span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.active-orders {
  display: grid;
  gap: 14px;
}

.active-bulkbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding: 12px 14px;
}

.active-bulkbar strong,
.active-bulkbar span {
  display: block;
}

.active-bulkbar span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.featured-order { border-color: rgba(98,212,232,.44); }

.order-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.order-meta div {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 10px;
  background: rgba(4, 15, 20, .52);
}

.order-meta span,
.number-box span,
.sms-box span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.order-meta strong { display: block; margin-top: 5px; overflow-wrap: anywhere; }
.order-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
.sms-box em { display: block; margin-top: 7px; color: var(--muted); font-style: normal; }

.api-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1240px;
  margin: 16px auto 0;
}

.api-top h1 {
  margin: 2px 0 8px;
  font-size: 30px;
  letter-spacing: 0;
}

.api-top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.api-top-actions .btn {
  min-height: 42px;
  white-space: nowrap;
}

.api-layout {
  display: grid;
  grid-template-columns: 420px minmax(0, 1fr);
  gap: 14px;
  max-width: 1240px;
  margin: 16px auto 0;
}

.api-shell {
  max-width: 1240px;
  margin: 16px auto 0;
  padding: 14px;
}

.api-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.api-tabs button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--soft);
  background: rgba(5, 20, 26, .78);
  font-weight: 900;
  cursor: pointer;
}

.api-tabs button.active {
  color: #031411;
  border-color: transparent;
  background: linear-gradient(135deg, var(--green), #21c5a1);
  box-shadow: 0 12px 28px rgba(50, 209, 127, .16);
}

.api-tab-panel { display: none; }
.api-tab-panel.active { display: block; }

.api-layout.compact {
  max-width: none;
  margin: 0;
}

.api-docs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.api-card,
.api-status-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.035), transparent),
    rgba(10, 26, 32, .88);
  box-shadow: var(--shadow);
}

.api-card-wide { grid-column: 1 / -1; }

.mini-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.mini-title span {
  color: var(--text);
  font-weight: 900;
  font-size: 16px;
}

.mini-title strong {
  color: var(--muted);
  font-size: 12px;
}

.progress {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255,255,255,.08);
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--cyan));
}

.api-key-create {
  margin-top: 12px;
}

.api-key-cards {
  display: grid;
  gap: 10px;
}

.api-key-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  padding: 12px;
  border: 1px solid rgba(78, 116, 128, .34);
  border-radius: 8px;
  background: rgba(4, 15, 20, .7);
}

.api-key-main {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.api-key-name {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.compact-name {
  min-height: 36px;
  padding: 8px 10px;
  font-size: 12px;
}

.api-key-preview {
  display: block;
  width: 100%;
  max-width: 100%;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  color: var(--text);
  background: rgba(2, 12, 16, .7);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.api-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 7px;
  width: 100%;
  min-width: 0;
}

.api-stat-pill {
  min-height: 58px;
  padding: 8px 9px;
  border: 1px solid rgba(78, 116, 128, .36);
  border-radius: 8px;
  background: rgba(7, 22, 28, .72);
}

.api-stat-pill span,
.api-status-cell small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}

.api-stat-pill strong {
  display: block;
  margin-top: 3px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.2;
  white-space: nowrap;
}

.api-stat-pill small {
  display: block;
  margin-top: 4px;
  color: var(--soft);
  font-size: 11px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.api-status-cell {
  display: grid;
  gap: 5px;
  min-width: 92px;
}

.api-key-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.tab-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 14px;
}

.tab-strip button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 13px;
  color: var(--soft);
  background: rgba(23, 49, 58, .72);
  font-weight: 900;
  cursor: pointer;
}

.tab-strip button.active {
  color: #041612;
  border-color: transparent;
  background: linear-gradient(135deg, var(--green), #21c5a1);
}

.compact-filter {
  align-items: end;
  margin-bottom: 8px;
}

.mini-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  color: var(--soft);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.mini-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--green);
}

.mini-inline {
  display: grid;
  gap: 4px;
  color: var(--soft);
  font-size: 12px;
  font-weight: 850;
}

.setting-inline {
  display: grid;
  gap: 6px;
  min-width: 110px;
}

.user-setting-cell {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(120px, 1fr);
  gap: 8px;
  min-width: 340px;
  align-items: center;
}

.user-setting-cell .tiny-select,
.user-setting-cell .btn {
  width: 100%;
}

.points-adjust-cell {
  grid-template-columns: minmax(110px, .7fr) minmax(100px, .55fr) minmax(220px, 1.4fr) minmax(110px, auto);
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line-soft);
}

.points-reason {
  min-width: 220px;
}

.tiny-select {
  min-height: 32px;
  padding: 6px 8px;
  font-size: 12px;
}

.codeblock {
  margin: 0;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 14px;
  color: var(--soft);
  background: rgba(3, 13, 18, .82);
  overflow: auto;
  line-height: 1.6;
}

.compact-code { padding: 12px; }

.endpoint-list,
.rule-list,
.limit-list {
  display: grid;
  gap: 8px;
}

.endpoint-list div {
  display: grid;
  grid-template-columns: 56px minmax(0, 1.2fr) minmax(120px, .8fr) 46px;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(3, 13, 18, .56);
}

.endpoint-list b {
  color: var(--green);
  font-size: 12px;
}

.endpoint-list code,
.url-format code,
.response-grid code {
  color: var(--soft);
  overflow-wrap: anywhere;
}

.endpoint-list span,
.endpoint-list em,
.rule-list span,
.limit-list span,
.unlock-line span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.endpoint-list em {
  font-style: normal;
  text-align: right;
}

.auth-examples {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.auth-examples code {
  display: block;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--soft);
  background: rgba(3, 13, 18, .62);
  overflow-wrap: anywhere;
}

.url-format {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 12px;
  background: rgba(3, 13, 18, .62);
}

.response-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.response-grid div,
.limit-list div,
.rule-list span {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(3, 13, 18, .52);
}

.response-grid span,
.limit-list span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
}

.response-grid small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.unlock-line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 12px 0 6px;
}

.unlock-line strong {
  color: var(--text);
  font-size: 13px;
}

.limit-list { margin-top: 14px; }

.limit-list strong {
  display: block;
  color: var(--text);
  font-size: 16px;
}

.flat {
  box-shadow: none;
  background: var(--flat-bg);
}
.section { margin-top: 16px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.actions.end { justify-content: flex-end; }
.top .actions {
  justify-content: flex-end;
  overflow-x: visible;
  max-width: calc(100vw - 250px);
  padding-bottom: 0;
}

.top .actions .btn.secondary {
  border-color: var(--line-soft);
  background: var(--secondary-top-bg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}

.top .actions .btn.secondary:hover {
  border-color: color-mix(in srgb, var(--blue) 24%, var(--line));
  background: var(--secondary-bg);
}

.top .actions .btn.secondary.navbtn,
.top .actions .btn.secondary.lang-toggle,
.top .actions .btn.secondary.theme-toggle {
  min-height: 38px;
  border-radius: 999px;
}

.top .actions .btn.secondary.navbtn.active,
.top .actions .btn.secondary.lang-toggle.active {
  color: #f6fbff;
  border-color: rgba(10, 132, 255, .34);
  background: linear-gradient(180deg, rgba(24, 39, 54, .98), rgba(12, 17, 24, .98));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 12px 26px rgba(10, 132, 255, .10);
}

html[data-theme="light"] .top .actions .btn.secondary.navbtn.active,
html[data-theme="light"] .top .actions .btn.secondary.lang-toggle.active {
  color: #ffffff;
  background: linear-gradient(135deg, #0a84ff, #2f9cff);
}

.iconbtn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  color: var(--soft);
  background: rgba(4, 15, 20, .62);
}

.iconbtn svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.batch-field {
  display: grid;
  grid-template-columns: auto 94px;
  align-items: center;
  gap: 10px;
  margin: 12px 0 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.batch-field .input {
  height: 38px;
  text-align: center;
}

.buy-mode-card {
  min-height: 0;
}

.buy-mode-card .offer-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px;
}

.buy-mode-card .offer-top strong,
.buy-mode-card .offer-hint {
  display: block;
  min-width: 0;
}

.buy-mode-card .offer-hint {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.buy-mode-card .buy-controls {
  display: grid;
  grid-template-columns: minmax(118px, auto) 96px minmax(130px, 1fr);
  align-items: end;
  gap: 8px;
}

.buy-mode-card .price-line {
  font-size: 27px;
}

.buy-mode-card .batch-field {
  grid-template-columns: 1fr;
  gap: 4px;
  margin: 0;
}

.buy-mode-card .batch-field .input {
  height: 36px;
}

.buy-mode-card .btn.wide {
  min-height: 38px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(2, 6, 10, .68);
  backdrop-filter: blur(10px);
}

.confirm-card {
  width: min(560px, 100%);
  box-shadow: 0 30px 80px rgba(0,0,0,.55);
}

.confirm-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.confirm-summary div {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 10px;
  background: rgba(3, 13, 18, .58);
}

.confirm-summary span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.confirm-summary strong { overflow-wrap: anywhere; }

.modal-textarea {
  min-height: 110px;
  resize: vertical;
  line-height: 1.5;
}

.auth-layout,
.dashboard-head {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) 380px;
  gap: 16px;
  align-items: stretch;
}

.admin-auth { grid-template-columns: minmax(0, 1.2fr) 420px; }

.intro-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 520px;
  overflow: hidden;
  position: relative;
  background:
    linear-gradient(135deg, rgba(50, 209, 127, .12), transparent 34%),
    linear-gradient(180deg, rgba(18, 33, 41, .98), rgba(8, 18, 24, .98));
}

.intro-panel::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 5px;
  background: linear-gradient(90deg, var(--green), var(--cyan), var(--amber));
  opacity: .78;
}

.intro-panel > * {
  position: relative;
  z-index: 1;
}

.intro-panel h1,
.search-card h2,
.legal-page h2 {
  margin: 0;
  font-size: 38px;
  line-height: 1.08;
  max-width: 860px;
}

.search-card h2 { font-size: 28px; }
.intro-panel p, .muted { color: var(--muted); line-height: 1.58; }
.metric { font-size: 30px; font-weight: 880; line-height: 1.08; }
.metric.small { font-size: 24px; }
.label { color: var(--muted); font-size: 12px; font-weight: 850; text-transform: uppercase; }
.subtle { color: var(--soft); margin-top: 7px; }

.section-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.section-title h3,
.section-title p { margin: 0; }
.section-title p { color: var(--muted); line-height: 1.5; }

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: var(--soft);
  font-size: 13px;
  font-weight: 750;
}

.auth-card .field { cursor: text; }
.auth-card .field > span { pointer-events: none; }
.auth-card .input {
  display: block;
  min-height: 56px;
  line-height: normal;
  position: relative;
  z-index: 2;
}

.field-hint {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.45;
}

.field .seg { width: 100%; }
.field .seg button { flex: 1; min-height: 40px; }
.input.mini { min-width: 98px; min-height: 36px; padding: 7px 9px; font-size: 12px; }
.mini-check { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; color: var(--muted); font-size: 12px; }
.mini-check input { accent-color: var(--green); }

.input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text);
  background: var(--input-bg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .055);
}

.input::placeholder { color: var(--input-placeholder); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--primary-text);
  background: var(--primary-bg);
  font-weight: 900;
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 12px 28px rgba(50, 209, 127, .18);
}

.btn.secondary {
  color: var(--text);
  background: var(--secondary-bg);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.055);
}

.btn.secondary.active {
  color: #031411;
  background: var(--green);
  border-color: transparent;
}

.btn.warn { color: #1c1100; background: var(--amber); }
.btn.bad { color: #270606; background: var(--red); }
.btn.wide, .wide { width: 100%; }
.btn.sm { min-height: 34px; padding: 7px 10px; font-size: 12px; }
.form-btn { align-self: end; min-width: 120px; }
.auth-card .btn.wide { min-height: 56px; }

.seg {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft-panel);
}

.seg button {
  border: 0;
  border-radius: 6px;
  padding: 8px 11px;
  color: var(--muted);
  background: transparent;
  font-weight: 850;
}

.seg button.active {
  color: #031411;
  background: var(--green);
}

.auth-card { align-self: start; }
.auth-tabs { width: 100%; }
.auth-tabs button { flex: 1; min-height: 56px; }

.checkline {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--muted);
  line-height: 1.5;
  font-size: 13px;
}

.checkline input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--green); }
.fineprint { margin: 13px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.linkbtn { border: 0; padding: 0; color: var(--green2); background: transparent; font-weight: 850; text-decoration: underline; }

.refund-warning {
  margin-top: 12px;
  border: 1px solid rgba(244, 183, 64, .36);
  border-radius: 8px;
  padding: 11px 12px;
  color: #ffe0a6;
  background: rgba(244, 183, 64, .10);
  line-height: 1.5;
}

.refund-warning strong {
  display: block;
  margin-bottom: 4px;
  color: #fff1c7;
}

.refund-warning span {
  display: block;
  color: #f4d79b;
  font-size: 12px;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 22px 0;
}

.trust-grid div,
.guide-step,
.number-box,
.sms-box {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.028), transparent),
    rgba(5, 18, 24, .68);
  padding: 12px;
}

.trust-grid strong,
.trust-grid span,
.guide-step strong,
.guide-step span { display: block; }

.trust-grid span,
.guide-step span { margin-top: 5px; color: var(--muted); font-size: 13px; line-height: 1.45; }

.guide { width: 100%; }
.guide-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.guide-compact .guide-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.guide-step b {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  margin-bottom: 8px;
  color: #031411;
  background: var(--green);
}

.pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.pill.ok { color: var(--green2); border-color: rgba(40, 209, 124, .42); background: rgba(40, 209, 124, .08); }
.pill.warn { color: var(--amber); border-color: rgba(244, 183, 64, .42); background: rgba(244, 183, 64, .08); }
.pill.bad { color: var(--red); border-color: rgba(255, 107, 107, .42); background: rgba(255, 107, 107, .08); }
.account-pill {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.account-link {
  cursor: pointer;
  appearance: none;
}
.account-link:hover {
  color: var(--text);
  border-color: rgba(10, 132, 255, .45);
}

.points-link {
  cursor: pointer;
  appearance: none;
  color: #8ff0b2;
  border-color: rgba(34, 197, 94, .38);
  background: linear-gradient(135deg, rgba(22, 163, 74, .14), rgba(14, 165, 233, .06));
}

.points-link:hover {
  color: #d1fae5;
  border-color: rgba(34, 197, 94, .62);
}

.search-input { margin-top: 2px; }

.country-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 126px;
  gap: 8px;
  align-items: center;
}

.country-tools .compact-select {
  width: 100%;
  min-width: 0;
}

.list-note {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--muted);
  background: rgba(4, 15, 20, .46);
  font-size: 12px;
  line-height: 1.45;
}

.list-more {
  min-height: 42px;
  border: 1px solid rgba(50, 209, 127, .38);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--green2);
  background: rgba(50, 209, 127, .08);
  font-weight: 900;
  text-align: center;
}

.list-more:hover {
  border-color: rgba(50, 209, 127, .68);
  background: rgba(50, 209, 127, .13);
}

.tablewrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(4, 13, 18, .58);
}

table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { padding: 13px 10px; border-bottom: 1px solid rgba(78, 116, 128, .26); text-align: left; vertical-align: top; font-size: 13px; }
th { color: var(--muted); background: rgba(5, 18, 24, .92); font-size: 11px; text-transform: uppercase; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: rgba(98, 212, 232, .035); }

.timer { font-variant-numeric: tabular-nums; font-size: 28px; font-weight: 850; color: var(--cyan); }
.mono { font-family: "SF Mono", Consolas, "Liberation Mono", monospace; }
.code { display: inline-block; margin-top: 6px; font-size: 24px; color: var(--green2); }
.number-box, .sms-box { margin-top: 12px; }
.number-box strong { display: block; margin-top: 7px; font-size: 20px; overflow-wrap: anywhere; }
.phone-card strong { font-size: 24px; color: var(--text); }
.number-head,
.active-phone-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}
.number-head span,
.active-phone-head span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}
.phone-card small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.number-box.compact strong { font-size: 12px; line-height: 1.45; color: var(--soft); word-break: break-all; }
.sms-box p { margin: 8px 0; color: var(--soft); line-height: 1.5; overflow-wrap: anywhere; }
.block { display: block; margin-top: 8px; }
.copy-panel {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.copy-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 8px;
  background: rgba(4, 15, 20, .46);
}

.copy-row > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.copy-seg,
.bulk-copy-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.copy-mini {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  color: var(--text);
  background: rgba(23, 49, 58, .72);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.copy-mini svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  flex: 0 0 auto;
}

.copy-mini:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.copy-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid rgba(50, 209, 127, .24);
  border-radius: 999px;
  color: var(--green2);
  background: rgba(50, 209, 127, .09);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
  flex: 0 0 auto;
}

.copy-chip:hover {
  border-color: rgba(10, 132, 255, .34);
  color: #dff0ff;
  background: rgba(10, 132, 255, .10);
}

.copy-chip svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  flex: 0 0 auto;
}

.bulk-copy-actions .btn {
  min-height: 44px;
  white-space: nowrap;
}
.buy-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }

.offer-stack {
  display: grid;
  gap: 12px;
}

.offer-compare {
  padding: 16px;
}

.country-head {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.flag {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(255,255,255,.045);
  font-size: 24px;
}

.country-head strong,
.country-head small {
  display: block;
}

.country-head small {
  margin-top: 3px;
  color: var(--muted);
}

.country-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.country-section-head span {
  display: block;
  color: var(--soft);
  font-size: 13px;
  font-weight: 850;
}

.country-section-head small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.country-refresh {
  align-self: center;
  min-width: 92px;
  border-radius: 999px;
}

.mode-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.mode-card {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 10px;
  background: rgba(4, 15, 20, .62);
}

.mode-card.disabled {
  opacity: .68;
}

.price-line {
  color: var(--green2);
  font-size: 26px;
  line-height: 1;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.mode-card small {
  min-height: 0;
  color: var(--muted);
  line-height: 1.45;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
}

.metric-card {
  min-height: 142px;
}

.metric-card.tone-warn { border-color: rgba(244, 183, 64, .38); }
.metric-card.tone-bad { border-color: rgba(255, 108, 122, .38); }

.admin-dashboard {
  display: grid;
  gap: 14px;
}

.admin-dashboard .dashboard-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background:
    radial-gradient(circle at top right, rgba(50,209,127,.14), transparent 34%),
    linear-gradient(180deg, rgba(19, 35, 43, .98), rgba(8, 18, 24, .98));
  box-shadow: var(--shadow-soft);
}

.admin-dashboard .dashboard-head h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.15;
}

.admin-dashboard .dashboard-head .muted {
  max-width: 760px;
}

.dashboard-kpis {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.dashboard-kpi {
  min-width: 0;
  min-height: 96px;
  border: 1px solid rgba(78, 116, 128, .32);
  border-radius: 8px;
  padding: 11px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.034), transparent),
    rgba(5, 18, 24, .72);
}

.dashboard-kpi span,
.dashboard-kpi small {
  display: block;
  color: var(--muted);
  line-height: 1.35;
}

.dashboard-kpi strong {
  display: block;
  margin: 7px 0 5px;
  color: var(--text);
  font-size: 22px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.dashboard-kpi.tone-ok { border-color: rgba(50, 209, 127, .34); }
.dashboard-kpi.tone-info { border-color: rgba(98, 212, 232, .34); }
.dashboard-kpi.tone-warn { border-color: rgba(244, 183, 64, .46); background: rgba(42, 31, 12, .42); }
.dashboard-kpi.tone-bad { border-color: rgba(255, 108, 122, .42); }

.dashboard-main {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(310px, .75fr);
  gap: 12px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.dashboard-bottom {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 12px;
}

.dashboard-card {
  min-width: 0;
  padding: 14px;
}

.dashboard-trend {
  min-height: 318px;
}

.trend-summary-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 6px;
}

.trend-summary-strip span {
  min-width: 0;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(4, 15, 20, .56);
}

.trend-summary-strip small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.trend-summary-strip strong {
  display: block;
  margin-top: 3px;
  color: var(--text);
  font-size: 18px;
  line-height: 1;
  white-space: nowrap;
}

.admin-trend-chart {
  display: grid;
  grid-template-columns: repeat(14, minmax(20px, 1fr));
  gap: 9px;
  align-items: end;
  height: 180px;
  padding: 16px 4px 20px;
}

.admin-trend-day {
  position: relative;
  display: flex;
  gap: 2px;
  align-items: end;
  min-width: 0;
  height: 100%;
}

.admin-trend-day small {
  position: absolute;
  right: -4px;
  bottom: -18px;
  left: -4px;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
  white-space: nowrap;
}

.trend-bar {
  display: block;
  flex: 1 1 0;
  height: var(--h, 2%);
  min-height: 2px;
  border-radius: 999px 999px 2px 2px;
}

.trend-bar.topup { background: linear-gradient(180deg, #8ab4ff, #3b82f6); }
.trend-bar.net { background: linear-gradient(180deg, #85f2bf, #32d17f); }
.trend-bar.refund { background: linear-gradient(180deg, #ffd68a, #f4b740); }

.admin-trend-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.trend-day-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  padding: 10px;
  background: rgba(5, 8, 13, .72);
}

.trend-day-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.trend-day-head strong {
  color: var(--text);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.trend-day-head span {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.trend-amount-line {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 70px 42px;
  gap: 7px;
  align-items: center;
  min-width: 0;
}

.trend-amount-line span,
.trend-amount-line small {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.trend-amount-line strong {
  color: var(--text);
  font-size: 12px;
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.trend-amount-line small {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.trend-meter {
  height: 6px;
  min-width: 0;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
}

.trend-meter i {
  display: block;
  width: var(--w, 0%);
  height: 100%;
  border-radius: inherit;
}

.trend-amount-line.topup .trend-meter i { background: #0a84ff; }
.trend-amount-line.net .trend-meter i { background: #30d158; }
.trend-amount-line.refund .trend-meter i { background: #ffd60a; }

.receive-stats-card {
  display: grid;
  gap: 12px;
}

.receive-stat-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.receive-stat-strip span {
  min-width: 0;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 9px 10px;
  background: rgba(5, 8, 13, .62);
}

.receive-stat-strip small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.receive-stat-strip strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 18px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.receive-bucket-list {
  display: grid;
  gap: 9px;
}

.receive-bucket {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.receive-bucket > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.receive-bucket strong {
  color: var(--text);
  font-size: 12px;
  white-space: nowrap;
}

.receive-bucket span {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.receive-bucket i {
  display: block;
  width: 100%;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
}

.receive-bucket i::before {
  display: block;
  width: var(--w, 0%);
  height: 100%;
  border-radius: inherit;
  content: "";
}

.receive-bucket i.warn::before { background: #ffd60a; }
.receive-bucket i.one::before { background: #0a84ff; }
.receive-bucket i.two::before { background: #64d2ff; }
.receive-bucket i.three::before { background: #30d158; }

.action-list,
.dashboard-row-list {
  display: grid;
  gap: 8px;
}

.agent-admin-page,
.agent-top-grid,
.agent-summary-grid,
.agent-list,
.agent-form,
.agent-mini-grid {
  min-width: 0;
}

.agent-admin-page {
  display: grid;
  gap: 14px;
}

.agent-top-grid {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  gap: 12px;
}

.agent-create-card,
.agent-summary-card,
.agent-board {
  padding: 16px;
}

.agent-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
}

.agent-form .form-btn {
  grid-column: 1 / -1;
  justify-self: start;
  min-width: 180px;
}

.agent-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.agent-summary-item {
  border: 1px solid rgba(78, 116, 128, .36);
  border-radius: 8px;
  padding: 10px;
  background: rgba(4, 15, 20, .62);
}

.agent-summary-item span,
.agent-summary-item small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}

.agent-summary-item strong {
  display: block;
  margin: 5px 0 3px;
  color: var(--text);
  font-size: 20px;
  line-height: 1;
  white-space: nowrap;
}

.agent-list {
  display: grid;
  gap: 8px;
}

.agent-name-cell,
.agent-stat-cell,
.agent-money-cell {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.agent-num,
.agent-money-only {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-money-only {
  color: var(--soft);
  font-variant-numeric: tabular-nums;
}

.agent-name-cell strong,
.agent-stat-cell strong,
.agent-money-cell strong {
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-name-cell small,
.agent-name-cell span,
.agent-stat-cell span,
.agent-money-cell span {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-name-cell span {
  width: fit-content;
  border: 1px solid rgba(50, 209, 127, .28);
  border-radius: 999px;
  padding: 2px 7px;
  color: var(--soft);
}

.agent-status-cell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.agent-status-cell .btn {
  min-width: 58px;
}

.agent-rate-pill {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  height: 26px;
  border: 1px solid rgba(50, 209, 127, .28);
  border-radius: 999px;
  padding: 0 8px;
  overflow: hidden;
  color: var(--soft);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-api-table-wrap table {
  min-width: 900px;
  table-layout: fixed;
}

.admin-api-table-wrap th:nth-child(1),
.admin-api-table-wrap td:nth-child(1) { width: 29%; }
.admin-api-table-wrap th:nth-child(2),
.admin-api-table-wrap td:nth-child(2) { width: 13%; }
.admin-api-table-wrap th:nth-child(3),
.admin-api-table-wrap td:nth-child(3) { width: 18%; }
.admin-api-table-wrap th:nth-child(4),
.admin-api-table-wrap td:nth-child(4) { width: 18%; }
.admin-api-table-wrap th:nth-child(5),
.admin-api-table-wrap td:nth-child(5) { width: 8%; }
.admin-api-table-wrap th:nth-child(6),
.admin-api-table-wrap td:nth-child(6) { width: 14%; }

.admin-api-key-cell,
.admin-api-stat {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.admin-api-key-cell strong,
.admin-api-stat strong {
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-api-key-cell span,
.admin-api-stat span {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-row-card {
  display: grid;
  grid-template-columns: minmax(130px, .85fr) minmax(210px, 1.15fr) minmax(210px, 1.15fr) minmax(150px, .78fr) minmax(82px, auto);
  gap: 10px;
  align-items: stretch;
  border: 1px solid rgba(78, 116, 128, .32);
  border-radius: 10px;
  padding: 10px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.028), transparent),
    rgba(4, 15, 20, .68);
}

.agent-identity,
.agent-metric-panel,
.agent-commission-panel,
.agent-row-actions {
  min-width: 0;
}

.agent-identity {
  display: grid;
  align-content: center;
  gap: 4px;
}

.agent-identity strong {
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-identity small {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-identity span {
  width: fit-content;
  border: 1px solid rgba(50, 209, 127, .34);
  border-radius: 999px;
  padding: 2px 7px;
  color: var(--soft);
  font-size: 11px;
}

.agent-metric-panel {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 8px;
  background: rgba(2, 12, 16, .48);
}

.agent-metric-panel > b {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.agent-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.agent-mini-grid span {
  min-width: 0;
}

.agent-mini-grid small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.2;
}

.agent-mini-grid strong {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-commission-panel {
  display: grid;
  align-content: center;
  border: 1px solid rgba(50, 209, 127, .22);
  border-radius: 8px;
  padding: 9px;
  background: rgba(2, 21, 16, .36);
}

.agent-commission-panel small,
.agent-commission-panel span,
.agent-commission-panel em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.agent-commission-panel strong {
  margin: 2px 0;
  color: var(--text);
  font-size: 17px;
  line-height: 1;
  white-space: nowrap;
}

.agent-row-actions {
  display: grid;
  align-content: center;
  justify-items: end;
  gap: 8px;
}

.action-row {
  display: grid;
  grid-template-columns: 10px minmax(92px, .72fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 10px;
  color: var(--text);
  background: rgba(4, 15, 20, .62);
  text-align: left;
}

.action-row small {
  color: var(--muted);
  line-height: 1.35;
}

.action-row b {
  justify-self: end;
  color: var(--soft);
  font-size: 12px;
}

.action-row.tone-warn { border-color: rgba(244, 183, 64, .36); }
.action-row.tone-bad { border-color: rgba(255, 108, 122, .36); }

.dashboard-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
  align-items: center;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 9px 10px;
  background: rgba(4, 15, 20, .56);
}

.dashboard-row span {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-row strong {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.dashboard-row small {
  grid-column: 1 / -1;
  color: var(--muted);
}

.dashboard-price-grid,
.dashboard-protection-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.finance-board {
  padding: 14px;
}

.finance-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.finance-metric {
  min-width: 0;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 10px 11px;
  background: rgba(4, 15, 20, .58);
}

.finance-metric span,
.finance-metric small {
  display: block;
  color: var(--muted);
}

.finance-metric strong {
  display: block;
  margin: 6px 0 4px;
  color: var(--text);
  font-size: 21px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.finance-metric small {
  min-height: 0;
  line-height: 1.45;
}

.finance-metric.tone-ok { border-color: rgba(50, 209, 127, .34); }
.finance-metric.tone-warn { border-color: rgba(244, 183, 64, .42); }
.finance-metric.tone-bad { border-color: rgba(255, 108, 122, .44); }
.finance-metric.tone-info { border-color: rgba(76, 201, 216, .34); }

.finance-detail-grid {
  display: grid;
  grid-template-columns: minmax(340px, 1.25fr) repeat(3, minmax(210px, .72fr));
  gap: 10px;
  margin-top: 12px;
  align-items: start;
}

.finance-panel {
  min-width: 0;
  max-height: 360px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 12px;
  background: rgba(6, 20, 27, .54);
  overflow: hidden;
}

.finance-panel.chart-panel {
  max-height: 290px;
}

.finance-panel .section-title {
  gap: 8px;
}

.finance-panel .section-title h3 {
  font-size: 20px;
}

.finance-scroll {
  max-height: 250px;
  overflow: auto;
  padding-right: 4px;
  overscroll-behavior: contain;
}

.bar-chart {
  display: grid;
  grid-template-columns: repeat(14, minmax(18px, 1fr));
  gap: 7px;
  align-items: end;
  height: 118px;
  padding: 8px 2px 0;
}

.bar-day {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: 1fr auto;
  gap: 2px;
  align-items: end;
  min-width: 0;
  height: 100%;
}

.bar-day small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
  white-space: nowrap;
}

.bar {
  display: block;
  min-height: 2px;
  border-radius: 999px 999px 2px 2px;
}

.bar.topup { background: linear-gradient(180deg, #8ab4ff, #3b82f6); }
.bar.net { background: linear-gradient(180deg, #85f2bf, #32d17f); }
.bar.refund { background: linear-gradient(180deg, #ffd68a, #f4b740); }

.chart-legend {
  display: flex;
  gap: 14px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.chart-legend i {
  width: 9px;
  height: 9px;
  border-radius: 999px;
}

.chart-legend i.topup { background: #3b82f6; }
.chart-legend i.net { background: #32d17f; }
.chart-legend i.refund { background: #f4b740; }

.mini-list {
  display: grid;
  gap: 8px;
}

.mini-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
  align-items: center;
  width: 100%;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 9px 10px;
  color: var(--text);
  background: rgba(4, 15, 20, .42);
  text-align: left;
}

.mini-row.clickable {
  cursor: pointer;
}

.mini-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-row strong {
  font-variant-numeric: tabular-nums;
}

.mini-row small {
  grid-column: 1 / -1;
  color: var(--muted);
}

.admin-shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  overflow-x: hidden;
}

.admin-rail {
  position: sticky;
  top: 96px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: var(--r);
  background:
    linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.018)),
    rgba(9, 18, 24, .92);
  box-shadow: var(--shadow-soft);
  padding: 12px;
}

.rail-title {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 8px 8px 14px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.rail-title strong,
.rail-title small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rail-title small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.rail-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: var(--r);
  color: #02120f;
  background: linear-gradient(135deg, var(--green), var(--cyan));
  font-weight: 950;
  box-shadow: 0 10px 24px rgba(50,209,127,.18);
}

.rail-nav {
  display: grid;
  gap: 6px;
  padding-top: 12px;
}

.rail-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2px;
  width: 100%;
  min-height: 56px;
  border: 1px solid transparent;
  border-radius: var(--r);
  padding: 9px 10px;
  color: var(--text);
  background: transparent;
  text-align: left;
}

.rail-item span,
.rail-item small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rail-item span { font-weight: 900; }
.rail-item small { color: var(--muted); font-size: 12px; }

.rail-item:hover {
  border-color: rgba(98, 212, 232, .25);
  background: rgba(255,255,255,.045);
}

.rail-item.active {
  color: #02120f;
  border-color: transparent;
  background: linear-gradient(135deg, var(--green), #43d8c7);
  box-shadow: 0 12px 28px rgba(50,209,127,.20);
}

.rail-item.active small { color: rgba(2,18,15,.72); }

.admin-content {
  min-width: 0;
  display: grid;
  gap: 16px;
  overflow-x: hidden;
}

.admin-content > .card,
.admin-content > .grid,
.admin-content > .admin-hero,
.admin-content > .section {
  min-width: 0;
}

.admin-loading-card {
  display: grid;
  gap: 14px;
  min-height: 220px;
  align-content: start;
}

.loading-line,
.loading-grid span {
  display: block;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255,255,255,.06), rgba(255,255,255,.12), rgba(255,255,255,.06));
  background-size: 200% 100%;
  animation: loading-shimmer 1.1s linear infinite;
}

.loading-line { height: 18px; }
.loading-line.wide { width: 42%; height: 28px; }
.loading-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.loading-grid span { height: 92px; }

@keyframes loading-shimmer {
  0% { background-position: 0 0; }
  100% { background-position: 200% 0; }
}

.admin-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.055), rgba(255,255,255,.012)),
    radial-gradient(circle at top right, rgba(50,209,127,.16), transparent 36%),
    linear-gradient(180deg, rgba(18,33,41,.98), rgba(8,18,24,.98));
  box-shadow: var(--shadow-soft);
}

.admin-hero h1 {
  margin: 0;
  font-size: 32px;
  line-height: 1.15;
}

.hero-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.ops-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 430px;
  gap: 14px;
}

.status-list,
.recent-list,
.kv-grid,
.price-snapshot {
  display: grid;
  gap: 10px;
}

.status-item,
.recent-row {
  width: 100%;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 12px;
  color: var(--text);
  background: rgba(4, 15, 20, .62);
  text-align: left;
}

.status-item {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.status-item strong,
.status-item small,
.recent-row strong,
.recent-row small {
  display: block;
}

.status-item small,
.recent-row small {
  margin-top: 3px;
  color: var(--muted);
  line-height: 1.4;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--green);
}

.status-dot.warn { background: var(--amber); }
.status-dot.bad { background: var(--red); }

.price-snapshot {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.snapshot-card {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 12px;
  background: rgba(4, 15, 20, .62);
}

.snapshot-card small,
.snapshot-card span {
  display: block;
  color: var(--muted);
  line-height: 1.45;
}

.muted-box { opacity: .72; }

.kv-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.kv-grid div {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 12px;
  background: rgba(4, 15, 20, .62);
}

.kv-grid span,
.kv-grid strong {
  display: block;
}

.kv-grid span {
  color: var(--muted);
  font-size: 12px;
}

.kv-grid strong {
  margin-top: 5px;
  overflow-wrap: anywhere;
}

.recent-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.compact-empty {
  padding: 12px;
}

.compact-filter {
  margin-bottom: 14px;
  align-items: end;
}

.wallet-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  background:
    linear-gradient(135deg, rgba(98, 212, 232, .13), transparent 36%),
    linear-gradient(180deg, rgba(18,33,41,.98), rgba(8,18,24,.98));
  box-shadow: var(--shadow);
}

.wallet-hero h1 {
  margin: 0;
  font-size: 46px;
  line-height: 1;
  font-weight: 930;
}

.wallet-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) 380px;
  gap: 14px;
}

.recharge-shell {
  padding: 16px;
  overflow: hidden;
  max-width: 1120px;
  margin: 0 auto;
}

.recharge-title {
  align-items: center;
  margin-bottom: 14px;
}

.recharge-title h1 {
  margin: 4px 0 0;
  font-size: 28px;
  line-height: 1.08;
  font-weight: 950;
}

.recharge-grid {
  display: grid;
  grid-template-columns: minmax(240px, .72fr) minmax(320px, 1.28fr);
  gap: 12px;
  align-items: stretch;
}

.recharge-left {
  display: grid;
  gap: 12px;
}

.balance-card,
.method-card,
.topup-card,
.current-payment {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(4, 15, 20, .62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .045);
}

.balance-card,
.method-card,
.topup-card {
  padding: 14px;
}

.balance-card span,
.balance-card small,
.pending-order span,
.pending-order small,
.min-pay-box span,
.min-pay-box small {
  display: block;
}

.balance-card span,
.pending-order span,
.min-pay-box span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.balance-card strong {
  display: block;
  margin-top: 6px;
  font-size: 30px;
  line-height: 1;
  font-weight: 950;
}

.balance-card small,
.pending-order small,
.min-pay-box small {
  margin-top: 7px;
  color: var(--muted);
  line-height: 1.55;
}

.method-card h3,
.topup-card h3,
.current-payment h3 {
  margin: 0;
}

.method-pills {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.method-pill {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--soft);
  background: rgba(8, 24, 31, .92);
  font-size: 12px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  text-align: center;
}

.method-pill span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  color: #06130f;
  background: linear-gradient(135deg, var(--green), var(--cyan));
  font-size: 12px;
  font-weight: 950;
  flex: 0 0 auto;
}

.method-pill b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.method-pill.active {
  color: var(--text);
  border-color: rgba(50, 209, 127, .66);
  background: linear-gradient(180deg, rgba(50, 209, 127, .20), rgba(50, 209, 127, .08));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 10px 24px rgba(50,209,127,.12);
}

.method-pill.disabled {
  color: var(--amber);
  border-color: rgba(244, 183, 64, .34);
  background: rgba(244, 183, 64, .08);
  cursor: default;
}

.method-card p,
.current-payment p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.topup-card {
  display: flex;
  flex-direction: column;
}

.recharge-amounts {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.topup-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: end;
  margin-top: 12px;
}

.topup-submit {
  min-height: 46px;
  position: relative;
  z-index: 2;
}

.topup-card .form-error {
  margin-top: 10px;
}

.current-payment {
  display: grid;
  grid-template-columns: minmax(220px, .45fr) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 12px;
  margin-top: 10px;
}

.pending-payment {
  min-width: 0;
}

.pending-empty,
.pending-order {
  min-height: 84px;
  border: 1px dashed var(--line-soft);
  border-radius: 8px;
  padding: 12px;
  background: rgba(8, 24, 31, .62);
}

.pending-empty {
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: var(--muted);
  line-height: 1.55;
}

.pending-empty strong {
  color: var(--text);
}

.pending-empty span {
  margin-top: 6px;
}

.pending-order {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border-style: solid;
}

.pending-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.pending-order strong {
  display: block;
  margin-top: 5px;
  font-size: 26px;
  line-height: 1;
}

.min-pay-box {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 12px;
  background: rgba(4, 15, 20, .62);
}

.min-pay-box strong {
  display: block;
  margin-top: 8px;
  font-size: 24px;
}

.pay-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.pay-steps span {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 11px 12px;
  color: var(--soft);
  background: rgba(4, 15, 20, .58);
  font-weight: 850;
}

.payment-methods {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.payment-method {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 12px;
  color: var(--text);
  background: rgba(4, 15, 20, .62);
  text-align: left;
}

.payment-method strong,
.payment-method small {
  display: block;
}

.payment-method small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.payment-method.active {
  border-color: rgba(50,209,127,.76);
  background: rgba(50,209,127,.10);
}

.price-edit {
  display: grid;
  gap: 4px;
  min-width: 150px;
}

.price-edit small {
  font-size: 11px;
  line-height: 1;
}

.fixed-note {
  color: var(--green2);
}

.compact-select {
  width: auto;
  min-width: 130px;
  min-height: 38px;
  padding: 8px 10px;
}

.amount-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.amount-btn {
  min-height: 58px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  color: var(--text);
  background: rgba(4, 15, 20, .62);
  text-align: left;
  padding: 10px 12px;
}

.amount-btn strong,
.amount-btn span {
  display: block;
}

.amount-btn em {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  margin-bottom: 5px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(48, 209, 88, .34);
  color: var(--ok);
  background: rgba(48, 209, 88, .10);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  line-height: 1;
}

.amount-btn strong {
  font-size: 20px;
}

.amount-btn span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.amount-btn.active {
  border-color: rgba(50,209,127,.76);
  background: rgba(50,209,127,.10);
}

.wallet-rule {
  margin-top: 16px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 12px;
  background: rgba(4, 15, 20, .62);
}

.wallet-rule strong,
.wallet-rule span {
  display: block;
}

.wallet-rule span {
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.5;
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.faq-grid details {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(6, 22, 27, .72);
  padding: 12px;
}

.faq-grid summary {
  cursor: pointer;
  color: var(--text);
  font-weight: 850;
}

.faq-grid p {
  margin: 9px 0 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 13px;
}

.legal-page { max-width: 920px; margin: 0 auto; }
.legal-copy { color: var(--soft); line-height: 1.68; }
.legal-copy h3 { margin: 22px 0 8px; color: var(--text); }
.legal-copy p { margin: 0 0 12px; }

.support-widget {
  position: fixed;
  inset: auto 18px 18px auto;
  z-index: 60;
  pointer-events: none;
}

.support-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  pointer-events: none;
}

.support-panel {
  width: min(312px, calc(100vw - 28px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(10, 24, 29, .97);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .48);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
}

.support-panel.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.support-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.support-title {
  display: flex;
  gap: 10px;
  min-width: 0;
}

.support-title strong,
.support-card strong { display: block; color: var(--text); font-size: 14px; }
.support-title p,
.support-card p { margin: 4px 0 0; color: var(--muted); font-size: 11px; line-height: 1.55; }

.support-icon,
.support-round {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border: 1px solid rgba(76, 201, 216, .28);
  border-radius: 8px;
  color: var(--green2);
  background: rgba(40, 209, 124, .08);
}

.support-icon svg,
.support-round svg,
.support-close svg,
.support-fab svg,
.support-actions svg,
.support-code button svg { width: 18px; height: 18px; }

.support-close {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #06161b;
}

.support-body { padding: 14px; }

.support-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #06161b;
}

.support-tabs button {
  min-height: 40px;
  border: 0;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 850;
}

.support-tabs button.active {
  color: #031411;
  background: var(--green);
  box-shadow: 0 12px 24px rgba(40, 209, 124, .18);
}

.support-card {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid rgba(76, 201, 216, .28);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(40, 209, 124, .08), rgba(76, 201, 216, .06));
}

.support-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.qr-frame {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 8px;
  background: #fff;
}

.qr-frame img {
  display: block;
  width: min(176px, 100%);
  height: auto;
  margin: 0 auto;
  border-radius: 8px;
}

.support-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 14px;
}

.support-primary,
.support-secondary,
.support-code button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
}

.support-primary {
  color: #031411;
  background: linear-gradient(135deg, var(--green), var(--cyan));
}

.support-secondary,
.support-code button {
  border: 1px solid var(--line);
  color: var(--text);
  background: #06161b;
}

.support-code {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(6, 22, 27, .78);
}

.support-code span { display: block; color: var(--muted); font-size: 11px; }
.support-code strong { margin-top: 4px; }
.support-code button { width: 44px; padding: 0; }

.support-fab {
  display: grid;
  grid-template-columns: 42px auto;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 10px;
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px 8px 8px;
  color: var(--text);
  background: rgba(10, 24, 29, .97);
  box-shadow: 0 18px 45px rgba(0, 0, 0, .42);
  pointer-events: auto;
}

.support-fab > span {
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  color: #031411;
  background: linear-gradient(135deg, var(--green), var(--cyan));
}

.support-fab b { font-size: 14px; text-align: left; }
.support-fab small { color: var(--muted); font-size: 11px; text-align: left; }

body.workbench-view .support-widget {
  right: 12px;
  bottom: 12px;
}

body.workbench-view .support-fab {
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
  place-items: center;
  width: 48px;
  min-width: 48px;
  min-height: 48px;
  padding: 3px;
  border-radius: 999px;
}

body.workbench-view .support-fab > span {
  grid-row: auto;
  width: 40px;
  height: 40px;
}

body.workbench-view .support-fab b,
body.workbench-view .support-fab small {
  display: none;
}

.toast {
  position: fixed;
  left: 50%;
  right: auto;
  top: auto;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 90;
  max-width: min(520px, calc(100vw - 32px));
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: var(--soft-panel-strong);
  box-shadow: var(--shadow);
  text-align: center;
}

.hidden { display: none !important; }
.empty { color: var(--muted); border: 1px dashed var(--line); border-radius: 8px; padding: 16px; text-align: center; }

.form-error {
  border: 1px solid var(--error-border);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--error-text);
  background: var(--error-bg);
  font-size: 13px;
  line-height: 1.45;
}

.code-cell,
.row-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.code-cell .mono {
  max-width: 220px;
  overflow-wrap: anywhere;
}

.invite-copy-cell.copied .mono {
  color: var(--green2);
}

.btn.secondary.copied {
  color: #031411;
  border-color: transparent;
  background: linear-gradient(135deg, var(--green), #43d8c7);
}

.copy-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border: 1px solid rgba(50, 209, 127, .42);
  border-radius: 999px;
  padding: 3px 8px;
  color: var(--green2);
  background: rgba(50, 209, 127, .09);
  font-size: 11px;
  font-weight: 900;
}

.key-reveal {
  display: grid;
  grid-template-columns: minmax(160px, .72fr) minmax(220px, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid rgba(50, 209, 127, .34);
  border-radius: 8px;
  background: rgba(50, 209, 127, .08);
}

.key-reveal .btn {
  position: relative;
  z-index: 2;
  pointer-events: auto;
  min-width: 74px;
}

.key-reveal small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.key-reveal code {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  color: var(--text);
  background: rgba(2, 13, 16, .78);
  user-select: all;
}

.notice {
  margin-top: 14px;
  border: 1px solid var(--warning-border);
  border-radius: 8px;
  background: var(--warning-bg);
  color: var(--warning-text);
  padding: 11px 12px;
  line-height: 1.55;
  font-size: 13px;
}

.notice.compact {
  margin: 0 0 14px;
}

.notice-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 180;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(0, 0, 0, .48);
}

.notice-modal {
  width: min(560px, 100%);
  max-height: min(680px, calc(100vh - 32px));
  overflow: auto;
  overscroll-behavior: contain;
}

.notice-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.notice-modal-head h3 {
  margin: 2px 0 0;
  font-size: 21px;
  line-height: 1.25;
}

.notice-modal-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

.login-notice-lines {
  display: grid;
  gap: 7px;
  padding-left: 20px;
}

.login-notice-lines li {
  color: var(--soft);
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  background: var(--panel-2);
  cursor: pointer;
}

.icon-btn:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.icon-btn svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.wide-field {
  grid-column: 1 / -1;
}

.textarea {
  min-height: 128px;
  resize: vertical;
}

.workbench-rules {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
}

.workbench-rules li {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  list-style: none;
  color: var(--soft);
  font-size: 12.5px;
  line-height: 1.45;
}

.workbench-rules li::before {
  content: "";
  width: 5px;
  height: 5px;
  margin-top: .58em;
  border-radius: 999px;
  flex: 0 0 auto;
  background: rgba(100, 210, 255, .82);
}

.pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,.08);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.pager span {
  min-width: 132px;
  text-align: center;
  white-space: nowrap;
}

@media (prefers-reduced-motion: no-preference) {
  .btn, .seg button, .card, .auth-card, .intro-panel, .rail-item { transition: border-color .16s, background .16s, box-shadow .16s; }
  .btn:hover:not(:disabled) { transform: translateY(-1px); }
  .support-panel, .support-fab, .support-close, .support-tabs button { transition: transform .18s, opacity .18s, border-color .18s, background .18s; }
  .support-fab:hover, .support-close:hover { transform: translateY(-1px); border-color: rgba(76, 201, 216, .45); }
}

@media (max-width: 1120px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-rail { position: static; }
  .rail-nav { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .admin-dashboard .dashboard-head,
  .dashboard-main,
  .dashboard-bottom { grid-template-columns: 1fr; }
  .dashboard-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .agent-top-grid,
  .agent-row-card { grid-template-columns: 1fr; }
  .agent-form { grid-template-columns: 1fr 1fr; }
  .agent-summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .agent-row-actions { grid-template-columns: 1fr auto; justify-items: stretch; }
  .auth-layout, .dashboard-head, .admin-auth, .login-shell, .workbench, .api-layout, .api-tabs { grid-template-columns: 1fr; }
  .api-top { align-items: flex-start; flex-direction: column; }
  .api-top-actions { width: 100%; justify-content: flex-start; }
  .ops-layout, .admin-hero, .wallet-layout, .wallet-hero, .recharge-grid, .current-payment, .finance-detail-grid { grid-template-columns: 1fr; }
  .hero-actions { justify-content: flex-start; }
  .intro-panel { min-height: auto; }
  .login-art { min-height: auto; }
  .selector-panel { position: static; }
  body.workbench-view .wrap { overflow: auto; }
  body.workbench-view .workbench { grid-template-columns: 1fr; height: auto; }
  body.workbench-view .selector-panel { overflow: visible; }
  body.workbench-view .selector-panel .field.section { display: block; }
  body.workbench-view .country-list { max-height: 420px; }
  body.workbench-view .market-panel { overflow: visible; padding-right: 0; }
  .active-order-main { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  .active-actions { grid-column: 1 / -1; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .top .actions { max-width: 100%; justify-content: flex-start; }
  .order-detail-panel { grid-template-columns: 1fr; }
  .api-key-card { grid-template-columns: 1fr; }
  .api-key-actions { grid-template-columns: 1fr auto; align-items: center; justify-items: stretch; }
  .api-key-name { min-width: 0; }
  .api-stat-grid { grid-template-columns: repeat(2, minmax(110px, 1fr)); min-width: 260px; }
  .invite-actions, .invite-rules { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .g2, .g3, .g4, .guide-grid, .guide-compact .guide-grid, .trust-grid, .faq-grid, .mode-grid, .metric-grid, .finance-grid, .price-snapshot, .kv-grid, .amount-grid, .login-steps, .pay-steps, .payment-methods, .method-pills, .trade-modes, .order-grid, .order-meta, .topup-row, .api-docs, .response-grid, .confirm-summary { grid-template-columns: 1fr; }
  .endpoint-list div { grid-template-columns: 48px minmax(0, 1fr); }
  .endpoint-list div span, .endpoint-list div em { grid-column: 1 / -1; text-align: left; }
  .rail-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rail-item { min-height: 52px; }
  .dashboard-kpis,
  .dashboard-grid,
  .dashboard-price-grid,
  .agent-summary-grid,
  .dashboard-protection-grid { grid-template-columns: 1fr; }
  .admin-dashboard .dashboard-head h1 { font-size: 25px; }
  .admin-trend-chart { height: 160px; gap: 5px; overflow-x: auto; }
  .admin-trend-day { min-width: 28px; }
  .trend-summary-strip,
  .agent-form,
  .agent-mini-grid,
  .agent-row-actions { grid-template-columns: 1fr; }
  .action-row { grid-template-columns: 10px minmax(0, 1fr) auto; }
  .action-row small { grid-column: 2 / -1; }
  .top { align-items: flex-start; flex-direction: column; padding: 12px 14px; }
  .wrap { padding: 16px; }
  .login-art h1 { font-size: 36px; }
  .intro-panel h1, .legal-page h2 { font-size: 30px; }
  .wallet-hero h1 { font-size: 38px; }
  .recharge-title h1 { font-size: 30px; }
  .admin-hero h1 { font-size: 26px; }
  .search-card h2 { font-size: 24px; }
  .section-title { flex-direction: column; }
  .row, .buy-row { align-items: flex-start; flex-direction: column; }
  .country-head { grid-template-columns: 42px minmax(0, 1fr); }
  .country-head .pill { grid-column: 1 / -1; }
  .country-section-head { flex-direction: column; }
  .country-refresh { width: 100%; min-width: 0; }
  .copy-row { grid-template-columns: 1fr; align-items: stretch; }
  .copy-row > span { margin-bottom: 2px; }
  .copy-seg, .bulk-copy-actions, .detail-copy-grid, .receive-limit-grid, .receive-limit-control { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .copy-mini, .bulk-copy-actions .btn { min-height: 44px; white-space: normal; }
  .copy-mini span, .bulk-copy-actions .btn span { overflow-wrap: anywhere; }
  .copy-chip { min-height: 44px; }
  .form-btn { width: 100%; align-self: stretch; }
  .timer { font-size: 24px; }
  .toast { left: 14px; right: 14px; bottom: 14px; max-width: none; transform: none; }
  .support-widget { left: 14px; right: 14px; bottom: 14px; }
  .support-stack { align-items: flex-end; }
  .support-panel { width: 100%; }
  .support-fab { max-width: calc(100vw - 28px); }
  .pager { justify-content: center; flex-wrap: wrap; }
  .api-key-name { grid-template-columns: 1fr; min-width: 0; }
  .api-stat-grid { grid-template-columns: 1fr; min-width: 0; }
  .api-key-actions { grid-template-columns: 1fr; }
  .api-top-actions { justify-content: stretch; }
  .api-top-actions .btn { flex: 1 1 150px; }
  .key-reveal { grid-template-columns: 1fr; }
  .key-reveal .btn { width: 100%; min-height: 44px; }
  .orders-table { min-width: 920px; }
  .order-tabs button { flex: 1 1 calc(50% - 8px); }
  .order-search-row { grid-template-columns: 1fr; }
  .active-order-main { grid-template-columns: 1fr; }
  .active-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .invite-wrap { width: min(100% - 24px, 980px); padding: 24px 0 42px; }
  .invite-hero { flex-direction: column; padding: 22px; }
  .invite-hero h1 { font-size: 30px; }
  .invite-actions, .invite-rules { grid-template-columns: 1fr; }
  .invite-code { font-size: 22px; }
}

@media (max-width: 560px) {
  .receive-limit-control { grid-template-columns: 1fr; }
}

/* User 20260601d: dual theme and compact responsive user workspace */
body:not(.admin-view):not(.agent-view) .wrap {
  width: min(100% - 28px, 1280px);
  max-width: 1280px;
}

body.workbench-view:not(.admin-view):not(.agent-view) .wrap {
  width: min(100% - 24px, 1280px);
  max-width: 1280px;
  margin: 0 auto;
  padding: 10px 0 14px;
}

body:not(.admin-view):not(.agent-view) .top {
  min-width: 0;
}

body:not(.admin-view):not(.agent-view) .brand {
  min-width: 0;
}

body:not(.admin-view):not(.agent-view) .brand > div {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body:not(.admin-view):not(.agent-view) .actions {
  min-width: 0;
}

body:not(.admin-view):not(.agent-view) .btn,
body:not(.admin-view):not(.agent-view) .copy-mini,
body:not(.admin-view):not(.agent-view) .method-pill,
body:not(.admin-view):not(.agent-view) .amount-btn,
body:not(.admin-view):not(.agent-view) .pick-row,
body:not(.admin-view):not(.agent-view) .api-tabs button {
  touch-action: manipulation;
}

body:not(.admin-view):not(.agent-view) .btn:active,
body:not(.admin-view):not(.agent-view) .copy-mini:active,
body:not(.admin-view):not(.agent-view) .pick-row:active {
  transform: translateY(1px);
}

body:not(.admin-view):not(.agent-view) .selector-panel {
  gap: 12px;
  padding: 14px;
}

body:not(.admin-view):not(.agent-view) .side-head strong {
  font-size: 20px;
}

body:not(.admin-view):not(.agent-view) .service-list,
body:not(.admin-view):not(.agent-view) .country-list {
  gap: 7px;
}

body:not(.admin-view):not(.agent-view) .pick-row {
  grid-template-columns: 38px minmax(0, 1fr);
  min-height: 54px;
  padding: 8px;
}

body:not(.admin-view):not(.agent-view) .service-mark,
body:not(.admin-view):not(.agent-view) .flag {
  width: 38px;
  height: 38px;
  border-radius: 9px;
}

body:not(.admin-view):not(.agent-view) .service-mark svg {
  width: 23px;
  height: 23px;
}

body:not(.admin-view):not(.agent-view) .country-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(128px, .45fr);
  gap: 8px;
}

body:not(.admin-view):not(.agent-view) .trade-header {
  padding: 16px;
  align-items: center;
}

body.workbench-view:not(.admin-view):not(.agent-view) .trade-header h2 {
  font-size: clamp(23px, 2.3vw, 30px);
}

body:not(.admin-view):not(.agent-view) .workbench-rules {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px 14px;
  padding: 10px 12px;
}

body:not(.admin-view):not(.agent-view) .workbench-rules li {
  font-size: 12px;
}

body:not(.admin-view):not(.agent-view) .trade-modes {
  gap: 10px;
}

body:not(.admin-view):not(.agent-view) .buy-mode-card {
  padding: 12px;
}

body:not(.admin-view):not(.agent-view) .buy-mode-card .buy-controls {
  grid-template-columns: minmax(96px, .42fr) 92px minmax(150px, 1fr);
  align-items: end;
}

body:not(.admin-view):not(.agent-view) .buy-mode-card .price-line {
  font-size: 26px;
}

body:not(.admin-view):not(.agent-view) .buy-mode-card .btn.wide {
  min-height: 42px;
}

body:not(.admin-view):not(.agent-view) .active-order-row {
  padding: 9px 10px;
}

body:not(.admin-view):not(.agent-view) .active-order-main {
  grid-template-columns: minmax(120px, .74fr) minmax(170px, 1fr) minmax(110px, .62fr) minmax(128px, .66fr) minmax(220px, .98fr);
}

body:not(.admin-view):not(.agent-view) .active-actions .btn.sm,
body:not(.admin-view):not(.agent-view) .table-actions .btn.sm {
  min-height: 38px;
}

body:not(.admin-view):not(.agent-view) .order-table-wrap {
  overflow-x: hidden;
}

body:not(.admin-view):not(.agent-view) .orders-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

body:not(.admin-view):not(.agent-view) .orders-table th,
body:not(.admin-view):not(.agent-view) .orders-table td {
  overflow-wrap: anywhere;
}

body:not(.admin-view):not(.agent-view) .orders-table th:nth-child(1),
body:not(.admin-view):not(.agent-view) .orders-table td:nth-child(1) { width: 94px; }
body:not(.admin-view):not(.agent-view) .orders-table th:nth-child(2),
body:not(.admin-view):not(.agent-view) .orders-table td:nth-child(2) { width: 130px; }
body:not(.admin-view):not(.agent-view) .orders-table th:nth-child(5),
body:not(.admin-view):not(.agent-view) .orders-table td:nth-child(5) { width: 64px; }
body:not(.admin-view):not(.agent-view) .orders-table th:nth-child(6),
body:not(.admin-view):not(.agent-view) .orders-table td:nth-child(6) { width: 118px; }
body:not(.admin-view):not(.agent-view) .orders-table th:nth-child(7),
body:not(.admin-view):not(.agent-view) .orders-table td:nth-child(7) { width: 74px; }
body:not(.admin-view):not(.agent-view) .orders-table th:nth-child(8),
body:not(.admin-view):not(.agent-view) .orders-table td:nth-child(8) { width: 226px; }

body:not(.admin-view):not(.agent-view) .wallet-layout,
body:not(.admin-view):not(.agent-view) .recharge-grid {
  align-items: stretch;
}

body:not(.admin-view):not(.agent-view) .recharge-shell {
  width: min(100%, 1120px);
}

body:not(.admin-view):not(.agent-view) .balance-card {
  min-height: 150px;
}

body:not(.admin-view):not(.agent-view) .method-card {
  min-height: 164px;
}

body:not(.admin-view):not(.agent-view) .amount-btn {
  min-height: 54px;
}

body:not(.admin-view):not(.agent-view) .refund-warning,
body:not(.admin-view):not(.agent-view) .wallet-rule,
body:not(.admin-view):not(.agent-view) .notice {
  overflow-wrap: anywhere;
}

body:not(.admin-view):not(.agent-view) .api-shell,
body:not(.admin-view):not(.agent-view) .api-top {
  width: min(100%, 1240px);
}

body:not(.admin-view):not(.agent-view) .api-layout.compact {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  gap: 14px;
}

body:not(.admin-view):not(.agent-view) .api-key-card {
  contain: layout paint;
}

body:not(.admin-view):not(.agent-view) .api-key-main {
  grid-template-columns: minmax(220px, .9fr) minmax(160px, .6fr);
}

body:not(.admin-view):not(.agent-view) .api-stat-grid {
  grid-template-columns: repeat(3, minmax(132px, 1fr));
}

body:not(.admin-view):not(.agent-view) .support-widget {
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
}

body:not(.admin-view):not(.agent-view) .support-fab {
  box-shadow: 0 18px 46px rgba(0, 0, 0, .28);
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .login-art {
  background:
    linear-gradient(135deg, rgba(10,132,255,.10), transparent 38%),
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(247,250,255,.98));
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .brand-badge,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .login-steps span,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .public-entry-links .linkbtn,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .pick-row,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .mode-card,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .order-table-wrap,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .order-detail-panel,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .detail-text,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .balance-card,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .method-card,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .topup-card,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .current-payment,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .pending-empty,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .pending-order,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .min-pay-box,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .kv-grid div,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .api-card,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .api-status-card,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .api-key-card,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .api-stat-pill,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .faq-grid details {
  background: rgba(255, 255, 255, .88);
  border-color: var(--line);
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .top {
  box-shadow: 0 10px 30px rgba(15, 23, 42, .08);
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .pill {
  background: rgba(255, 255, 255, .72);
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .pill.ok,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .copy-chip,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .inline-code {
  color: #166534;
  background: rgba(34, 197, 94, .10);
  border-color: rgba(34, 197, 94, .34);
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .method-pill,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .amount-btn,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .tab-strip button,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .order-tabs button,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .copy-mini,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .iconbtn {
  background: #ffffff;
  border-color: var(--line);
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .method-pill.active,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .amount-btn.active,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .pick-row.active {
  color: var(--text);
  background: rgba(10, 132, 255, .08);
  border-color: rgba(10, 132, 255, .34);
  box-shadow: 0 10px 28px rgba(10, 132, 255, .08);
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .api-tabs button.active,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .order-tabs button.active,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .seg button.active,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .btn.secondary.active {
  color: #ffffff;
  background: var(--primary-bg);
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .codeblock,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) pre,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .key-reveal code,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .api-key-preview {
  color: #172033;
  background: #f8fafc;
  border-color: var(--line);
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .notice {
  background: rgba(217, 119, 6, .08);
  border-color: rgba(217, 119, 6, .24);
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .notice.info {
  background: rgba(10, 132, 255, .08);
  border-color: rgba(10, 132, 255, .24);
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .logo,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .brand-icon {
  box-shadow: 0 0 0 1px rgba(15,23,42,.08), 0 12px 28px rgba(10,132,255,.16);
}

@media (max-width: 1180px) {
  body:not(.admin-view):not(.agent-view) .top {
    align-items: flex-start;
  }

  body:not(.admin-view):not(.agent-view) .top .actions {
    max-width: 100%;
    justify-content: flex-start;
  }

  body:not(.admin-view):not(.agent-view) .workbench-rules {
    grid-template-columns: 1fr;
  }

  body:not(.admin-view):not(.agent-view) .buy-mode-card .buy-controls {
    grid-template-columns: minmax(90px, .4fr) 88px minmax(130px, 1fr);
  }

  body:not(.admin-view):not(.agent-view) .active-order-main {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body:not(.admin-view):not(.agent-view) .api-layout.compact {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  body.workbench-view:not(.admin-view):not(.agent-view),
  body.workbench-view:not(.admin-view):not(.agent-view) .shell {
    height: auto;
    min-height: 100vh;
    overflow: auto;
  }

  body:not(.admin-view):not(.agent-view) .top {
    position: sticky;
    gap: 10px;
  }

  body:not(.admin-view):not(.agent-view) .top .actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }

  body:not(.admin-view):not(.agent-view) .top .actions .pill,
  body:not(.admin-view):not(.agent-view) .top .actions .btn {
    min-width: 0;
    width: 100%;
  }

  body:not(.admin-view):not(.agent-view) .top .actions .pill {
    justify-content: center;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  body:not(.admin-view):not(.agent-view) .login-shell,
  body:not(.admin-view):not(.agent-view) .workbench,
  body:not(.admin-view):not(.agent-view) .recharge-grid,
  body:not(.admin-view):not(.agent-view) .wallet-layout,
  body:not(.admin-view):not(.agent-view) .api-docs,
  body:not(.admin-view):not(.agent-view) .current-payment {
    grid-template-columns: 1fr;
  }

  body:not(.admin-view):not(.agent-view) .orders-table,
  body:not(.admin-view):not(.agent-view) .orders-table thead,
  body:not(.admin-view):not(.agent-view) .orders-table tbody,
  body:not(.admin-view):not(.agent-view) .orders-table tr,
  body:not(.admin-view):not(.agent-view) .orders-table td {
    display: block;
    width: 100%;
  }

  body:not(.admin-view):not(.agent-view) .orders-table thead {
    display: none;
  }

  body:not(.admin-view):not(.agent-view) .orders-table tr {
    padding: 10px;
    border-bottom: 1px solid var(--line-soft);
  }

  body:not(.admin-view):not(.agent-view) .orders-table td {
    padding: 5px 0;
  }

  body:not(.admin-view):not(.agent-view) .order-detail-row td {
    padding: 6px 0 0;
  }

  body:not(.admin-view):not(.agent-view) .table-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  body:not(.admin-view):not(.agent-view) .wrap,
  body.workbench-view:not(.admin-view):not(.agent-view) .wrap {
    width: min(100% - 20px, 1280px);
    padding-left: 0;
    padding-right: 0;
  }

  body:not(.admin-view):not(.agent-view) .top {
    padding: 10px;
  }

  body:not(.admin-view):not(.agent-view) .brand {
    width: 100%;
  }

  body:not(.admin-view):not(.agent-view) .top .actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body:not(.admin-view):not(.agent-view) .navbtn {
    padding: 8px 9px;
  }

  body:not(.admin-view):not(.agent-view) .navbtn span,
  body:not(.admin-view):not(.agent-view) .theme-toggle span {
    font-size: 12px;
  }

  body:not(.admin-view):not(.agent-view) .login-art,
  body:not(.admin-view):not(.agent-view) .auth-card,
  body:not(.admin-view):not(.agent-view) .panel-card,
  body:not(.admin-view):not(.agent-view) .card {
    padding: 14px;
  }

  body:not(.admin-view):not(.agent-view) .login-art h1 {
    font-size: 32px;
  }

  body:not(.admin-view):not(.agent-view) .country-tools,
  body:not(.admin-view):not(.agent-view) .buy-mode-card .buy-controls,
  body:not(.admin-view):not(.agent-view) .active-order-main,
  body:not(.admin-view):not(.agent-view) .active-actions,
  body:not(.admin-view):not(.agent-view) .copy-seg,
  body:not(.admin-view):not(.agent-view) .detail-copy-grid,
  body:not(.admin-view):not(.agent-view) .api-key-main,
  body:not(.admin-view):not(.agent-view) .api-stat-grid,
  body:not(.admin-view):not(.agent-view) .method-pills,
  body:not(.admin-view):not(.agent-view) .amount-grid,
  body:not(.admin-view):not(.agent-view) .recharge-amounts {
    grid-template-columns: 1fr;
  }

  body:not(.admin-view):not(.agent-view) .btn,
  body:not(.admin-view):not(.agent-view) .btn.sm,
  body:not(.admin-view):not(.agent-view) .copy-mini,
  body:not(.admin-view):not(.agent-view) .copy-chip,
  body:not(.admin-view):not(.agent-view) .method-pill,
  body:not(.admin-view):not(.agent-view) .amount-btn,
  body:not(.admin-view):not(.agent-view) .api-tabs button,
  body:not(.admin-view):not(.agent-view) .order-tabs button {
    min-height: 44px;
  }

  body:not(.admin-view):not(.agent-view) .support-widget {
    right: 10px;
    bottom: 10px;
    left: auto;
  }

  body:not(.admin-view):not(.agent-view) .support-fab {
    width: 56px;
    height: 56px;
    min-width: 56px;
    padding: 0;
    border-radius: 50%;
  }

  body:not(.admin-view):not(.agent-view) .support-fab b,
  body:not(.admin-view):not(.agent-view) .support-fab small {
    display: none;
  }
}

/* Admin 20260529k: scoped graphite operations console */
body.admin-view {
  --bg: #050608;
  --surface: #080b10;
  --panel: #0b0f14;
  --panel2: #111820;
  --line: rgba(255,255,255,.08);
  --line-soft: rgba(255,255,255,.06);
  --text: #f5f7fa;
  --muted: #8b96a5;
  --soft: #c8d0da;
  --green: #30d158;
  --green2: #8ff0b1;
  --cyan: #64d2ff;
  --blue: #0a84ff;
  --amber: #ffd60a;
  --red: #ff453a;
  --shadow: none;
  --shadow-soft: none;
  min-width: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at top right, rgba(10,132,255,.08), transparent 34%),
    linear-gradient(180deg, #050608 0%, #07090d 100%);
}

body.admin-view::before {
  opacity: .2;
  background:
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.014) 1px, transparent 1px);
  background-size: 72px 72px;
}

body.admin-view .top {
  border-bottom-color: rgba(255,255,255,.08);
  background: rgba(5,6,8,.78);
  box-shadow: none;
}

body.admin-view .wrap {
  width: min(100% - 32px, 1480px);
  max-width: 1480px;
  overflow-x: hidden;
}

body.admin-view .admin-shell {
  grid-template-columns: 232px minmax(0, 1fr);
  gap: 18px;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body.admin-view .admin-mobile-tabs {
  display: none;
}

body.admin-view .admin-content {
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}

body.admin-view,
body.admin-view #app,
body.admin-view .wrap,
body.admin-view .admin-shell,
body.admin-view .admin-content {
  overflow-x: hidden;
}

body.admin-view .card,
body.admin-view .admin-rail,
body.admin-view .auth-card,
body.admin-view .intro-panel {
  border-color: rgba(255,255,255,.08);
  background:
    linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.012)),
    rgba(11,15,20,.92);
  box-shadow: none;
}

body.admin-view .admin-rail {
  top: 86px;
  padding: 10px;
}

body.admin-view .rail-title {
  grid-template-columns: 38px minmax(0, 1fr);
  padding: 8px 7px 12px;
}

body.admin-view .rail-mark,
body.admin-view .logo,
body.admin-view .brand-icon {
  background: linear-gradient(135deg, #0a84ff, #64d2ff);
  box-shadow: none;
}

body.admin-view .rail-item {
  min-height: 48px;
  border-radius: 8px;
  padding: 8px 10px;
}

body.admin-view .rail-item span {
  font-weight: 840;
}

body.admin-view .rail-item small {
  display: none;
}

body.admin-view .rail-item:hover {
  border-color: rgba(10,132,255,.34);
  background: rgba(10,132,255,.09);
}

body.admin-view .rail-item.active {
  color: #fff;
  border-color: rgba(10,132,255,.52);
  background: linear-gradient(180deg, rgba(10,132,255,.88), rgba(10,96,210,.88));
  box-shadow: none;
}

body.admin-view .btn {
  border-color: rgba(10,132,255,.42);
  background: linear-gradient(180deg, #168cff, #0a74df);
  color: #fff;
  box-shadow: none;
}

body.admin-view .btn.secondary {
  border-color: rgba(255,255,255,.10);
  background: rgba(17,24,32,.95);
  color: var(--text);
}

body.admin-view .btn.bad {
  border-color: rgba(255,69,58,.35);
  background: rgba(255,69,58,.16);
  color: #ffb7b3;
}

body.admin-view .pill.ok {
  color: #8ff0b1;
  border-color: rgba(48,209,88,.34);
  background: rgba(48,209,88,.09);
}

body.admin-view .pill.warn {
  color: #ffe486;
  border-color: rgba(255,214,10,.35);
  background: rgba(255,214,10,.09);
}

body.admin-view .pill.bad {
  color: #ffaaa4;
  border-color: rgba(255,69,58,.36);
  background: rgba(255,69,58,.10);
}

body.admin-view .pill.neutral {
  color: var(--soft);
  border-color: rgba(255,255,255,.12);
  background: rgba(255,255,255,.045);
}

body.admin-view .tab-strip button {
  border-color: rgba(255,255,255,.10);
  background: rgba(17,24,32,.95);
  color: var(--soft);
}

body.admin-view .tab-strip button.active {
  color: #fff;
  border-color: rgba(10,132,255,.45);
  background: linear-gradient(180deg, rgba(10,132,255,.90), rgba(10,96,210,.88));
}

body.admin-view .input {
  border-color: rgba(255,255,255,.10);
  background: rgba(5,8,12,.95);
}

body.admin-view .tablewrap {
  max-width: 100%;
  overflow-x: hidden;
  border-color: rgba(255,255,255,.08);
  background: rgba(5,8,12,.58);
}

body.admin-view table {
  min-width: 0;
}

body.admin-view th,
body.admin-view td {
  border-bottom-color: rgba(255,255,255,.07);
}

body.admin-view th {
  color: var(--muted);
  background: rgba(8,11,16,.94);
  text-transform: none;
}

.admin-page-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: end;
  width: 100%;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  padding: 18px;
  background:
    radial-gradient(circle at top right, rgba(10,132,255,.13), transparent 42%),
    linear-gradient(180deg, rgba(17,24,32,.88), rgba(9,13,18,.88));
}

.admin-page-head h1 {
  margin: 3px 0 6px;
  font-size: 28px;
  line-height: 1.12;
}

.admin-page-head p:not(.label) {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.admin-page-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.tg-status-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(142px, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.tg-status-strip > div {
  min-width: 0;
  min-height: 82px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(7,11,16,.74);
}

.tg-status-strip span,
.tg-status-strip small {
  display: block;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tg-status-strip strong {
  display: block;
  margin: 5px 0;
  min-width: 0;
  color: var(--text);
  font-size: 21px;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tg-admin-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
  padding: 6px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  background: rgba(5,8,12,.58);
}

.tg-admin-tabs button {
  display: grid;
  gap: 3px;
  min-height: 54px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--soft);
  background: transparent;
  text-align: left;
}

.tg-admin-tabs button strong,
.tg-admin-tabs button span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tg-admin-tabs button strong {
  color: inherit;
  font-size: 14px;
}

.tg-admin-tabs button span {
  color: var(--muted);
  font-size: 11px;
}

.tg-admin-tabs button.active {
  color: #fff;
  border-color: rgba(10,132,255,.42);
  background: rgba(10,132,255,.18);
}

.tg-admin-body {
  min-width: 0;
}

.tg-admin-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px;
}

.tg-admin-panel {
  min-width: 0;
  padding: 16px;
}

.tg-span-5 { grid-column: span 5; }
.tg-span-6 { grid-column: span 6; }
.tg-span-7 { grid-column: span 7; }
.tg-span-12 { grid-column: 1 / -1; }

.tg-step-list,
.tg-user-list,
.tg-settings-form,
.tg-form-section {
  display: grid;
  gap: 10px;
}

.tg-setup-line,
.tg-user-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px;
  padding: 10px;
  background: rgba(5,8,12,.62);
}

.tg-setup-line.is-ok {
  border-color: rgba(48,209,88,.24);
}

.tg-step-state {
  display: grid;
  place-items: center;
  min-height: 34px;
  border: 1px solid rgba(255,214,10,.34);
  border-radius: 999px;
  color: var(--amber);
  background: rgba(255,214,10,.08);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.tg-setup-line.is-ok .tg-step-state {
  border-color: rgba(48,209,88,.34);
  color: var(--green2);
  background: rgba(48,209,88,.08);
}

.tg-step-main,
.tg-user-row > div:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.tg-step-main strong,
.tg-user-row strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tg-step-main span,
.tg-user-row span {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.tg-step-actions,
.tg-user-actions,
.tg-action-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.tg-user-filter-bar {
  margin: 10px 0 12px;
}

.tg-user-stats-table .admin-data-table td {
  vertical-align: middle;
}

.tg-user-cell,
.tg-num-cell,
.tg-user-state {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.tg-user-cell strong,
.tg-num-cell strong {
  min-width: 0;
  color: var(--text);
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tg-user-cell span,
.tg-num-cell span {
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tg-num-cell strong {
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.tg-user-state {
  grid-template-columns: repeat(2, max-content);
  align-items: center;
}

.tg-value-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.tg-value-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 8px;
  align-items: center;
  min-width: 0;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px;
  padding: 10px;
  background: rgba(5,8,12,.58);
}

.tg-value-box span,
.tg-value-box strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tg-value-box span {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.tg-value-box strong {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
}

.tg-value-box.is-empty strong {
  color: var(--muted);
  font-family: inherit;
}

.tg-choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.tg-choice {
  display: grid;
  gap: 4px;
  min-height: 58px;
  min-width: 0;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px;
  padding: 10px;
  color: var(--soft);
  background: rgba(5,8,12,.72);
  text-align: left;
}

.tg-choice strong,
.tg-choice span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tg-choice span {
  color: var(--muted);
  font-size: 11px;
}

.tg-choice.active {
  color: #fff;
  border-color: rgba(10,132,255,.46);
  background: rgba(10,132,255,.18);
}

.tg-form-section {
  padding: 12px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px;
  background: rgba(5,8,12,.45);
}

.tg-form-section h4 {
  margin: 0;
  font-size: 14px;
}

@media (max-width: 1180px) {
  .tg-status-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tg-span-5,
  .tg-span-6,
  .tg-span-7 { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .tg-status-strip,
  .tg-admin-tabs,
  .tg-value-grid,
  .tg-choice-grid {
    grid-template-columns: 1fr;
  }

  .tg-setup-line,
  .tg-user-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .tg-step-state {
    justify-self: start;
    padding: 0 12px;
  }

  .tg-step-actions,
  .tg-user-actions,
  .tg-action-row {
    justify-content: stretch;
  }

  .tg-step-actions .btn,
  .tg-step-actions a.btn,
  .tg-user-actions .btn,
  .tg-action-row .btn {
    flex: 1 1 100%;
  }

  .tg-user-state {
    grid-template-columns: 1fr;
  }
}

.admin-filter-bar,
.admin-command-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 10px;
  align-items: end;
}

.admin-command-form {
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(150px, auto);
}

.public-service-list {
  display: grid;
  gap: 10px;
}

.public-service-row {
  display: grid;
  grid-template-columns: minmax(160px, 1.1fr) repeat(5, minmax(110px, 1fr)) auto auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  background: rgba(7, 11, 16, .62);
}

.public-service-row.muted-row {
  opacity: .82;
}

.service-config-main {
  display: grid;
  gap: 5px;
  min-width: 0;
  align-self: center;
}

.service-config-main strong,
.service-config-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-config-main small {
  color: var(--muted);
  font-size: 12px;
}

.compact-field {
  gap: 5px;
  min-width: 0;
}

.compact-field .input {
  min-height: 38px;
  padding: 8px 10px;
}

.service-enabled {
  align-self: center;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.settings-sections {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.settings-subsection {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  background: rgba(7,11,16,.6);
}

.settings-subsection .compact-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.settings-actions,
.login-notice-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.login-notice-editor {
  margin-top: 14px;
}

.gpt-lines-admin {
  margin-top: 14px;
}

.gpt-lines-stats .detail-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.gpt-lines-list {
  display: grid;
  gap: 8px;
  max-height: 320px;
  overflow: auto;
  padding-right: 2px;
}

.gpt-line-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto minmax(190px, .8fr) auto;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(255,255,255,.035);
}

.gpt-line-row strong,
.gpt-line-row small {
  display: block;
}

.gpt-line-row small {
  color: var(--muted);
  font-size: 11px;
}

.login-notice-editor .notice-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.settings-grid .form-btn {
  min-height: 42px;
}

.admin-row-list {
  display: grid;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.admin-object-row {
  display: grid;
  grid-template-columns: minmax(190px, 1.15fr) minmax(210px, 1.25fr) minmax(210px, 1.25fr) minmax(150px, .9fr) minmax(130px, auto);
  gap: 10px;
  align-items: center;
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  padding: 10px;
  background: rgba(7,11,16,.86);
  contain: layout paint;
  content-visibility: auto;
  contain-intrinsic-size: 120px;
}

.order-object-row {
  grid-template-columns: minmax(105px,.7fr) minmax(210px,1.15fr) minmax(160px,.9fr) minmax(82px,.45fr) minmax(150px,.85fr) minmax(92px,.45fr) minmax(88px,auto);
}

.api-object-row {
  grid-template-columns: minmax(220px,1.35fr) repeat(3, minmax(185px,1fr)) minmax(145px,.72fr);
}

.user-object-row {
  grid-template-columns: minmax(220px,1.15fr) repeat(3, minmax(180px,1fr)) minmax(78px,.45fr) minmax(94px,auto);
}

.admin-object-row.is-dirty {
  border-color: rgba(10,132,255,.45);
  box-shadow: 0 0 0 1px rgba(10,132,255,.16) inset;
}

.object-line {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.object-line strong,
.numeric-cell strong,
.money-cell {
  overflow: hidden;
  color: var(--text);
  font-weight: 850;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.object-line small,
.numeric-cell small,
.status-actions small {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.object-line .agent-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 22px;
  margin-top: 2px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 999px;
  padding: 2px 8px;
  background: rgba(255,255,255,.035);
  color: var(--soft);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0;
}

.object-line .agent-chip.ok {
  border-color: rgba(48, 209, 88, .28);
  background: rgba(48, 209, 88, .08);
  color: #9fe9b6;
}

.object-line .agent-chip.warn {
  border-color: rgba(255, 214, 10, .25);
  background: rgba(255, 214, 10, .08);
  color: #f4d36b;
}

.object-line .agent-chip.info {
  max-width: 100%;
  border-color: rgba(10,132,255,.24);
  background: rgba(10,132,255,.08);
  color: #9dccff;
}

.user-summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.user-summary-strip > div {
  min-width: 0;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  padding: 10px 12px;
  background: rgba(255,255,255,.025);
}

.user-summary-strip span,
.user-summary-strip small {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-summary-strip strong {
  display: block;
  margin: 4px 0 2px;
  color: var(--text);
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.08;
  font-variant-numeric: tabular-nums;
}

.stat-pack {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  min-width: 0;
}

.stat-pack span {
  min-width: 0;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 8px;
  padding: 7px 8px;
  background: rgba(255,255,255,.025);
}

.stat-pack small {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stat-pack strong {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.status-actions {
  display: grid;
  justify-items: end;
  gap: 7px;
  min-width: 0;
}

.row-detail {
  grid-column: 1 / -1;
  min-width: 0;
}

.row-detail summary,
.json-detail summary {
  width: fit-content;
  min-height: 30px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 8px;
  padding: 6px 10px;
  color: var(--soft);
  background: rgba(255,255,255,.035);
  cursor: pointer;
  font-weight: 800;
  list-style: none;
}

.row-detail summary::-webkit-details-marker,
.json-detail summary::-webkit-details-marker {
  display: none;
}

.row-detail[open] summary {
  margin-bottom: 10px;
  border-color: rgba(10,132,255,.34);
  color: #b8d8ff;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 10px;
  background: rgba(0,0,0,.16);
}

.detail-grid div {
  min-width: 0;
}

.detail-grid span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.detail-grid strong {
  display: block;
  margin-top: 3px;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
}

.audit-mini-list {
  display: grid;
  gap: 7px;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 10px;
  background: rgba(0,0,0,.12);
}

.audit-mini-title {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.audit-mini-row {
  display: grid;
  grid-template-columns: minmax(150px, .9fr) minmax(110px, .6fr) minmax(220px, 1.5fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 8px;
  background: rgba(255,255,255,.025);
}

.audit-mini-row span,
.audit-mini-row small {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--muted);
}

.audit-mini-row strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 13px;
}

.admin-data-table {
  width: 100%;
  table-layout: fixed;
}

.admin-data-table td {
  vertical-align: middle;
}

.numeric-cell {
  display: grid;
  gap: 3px;
  min-width: 0;
}

body.admin-view .dashboard-kpis {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

body.admin-view .dashboard-kpi {
  min-height: 88px;
  border-color: rgba(255,255,255,.08);
  background: rgba(11,15,20,.88);
}

body.admin-view .dashboard-kpi.tone-ok,
body.admin-view .dashboard-kpi.tone-info,
body.admin-view .dashboard-kpi.tone-warn,
body.admin-view .dashboard-kpi.tone-bad {
  border-color: rgba(255,255,255,.10);
}

body.admin-view .dashboard-main {
  grid-template-columns: minmax(0, 1.55fr) minmax(300px,.72fr);
}

body.admin-view .dashboard-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body.admin-view .dashboard-trend {
  min-height: 380px;
}

body.admin-view .admin-trend-chart {
  height: 230px;
  gap: 12px;
}

body.admin-view .agent-top-grid {
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
}

body.admin-view .agent-summary-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body.admin-view .agent-table-wrap table,
body.admin-view .admin-api-table-wrap table {
  min-width: 0;
}

body.admin-view .agent-table-wrap th,
body.admin-view .agent-table-wrap td {
  position: static;
  width: auto;
  text-align: left;
}

body.admin-view .admin-login-only {
  grid-template-columns: minmax(320px, 440px);
  justify-content: center;
  align-items: start;
  padding-top: clamp(18px, 8vh, 72px);
}

body.admin-view .admin-login-card {
  width: 100%;
}

body.agent-view {
  --bg: #050608;
  --surface: #090d12;
  --panel: #0f151c;
  --panel2: #141c25;
  --line: rgba(255,255,255,.10);
  --line-soft: rgba(255,255,255,.08);
  --text: #f5f7fa;
  --muted: #8e99a8;
  --soft: #cbd5e1;
  --green: #30d158;
  --cyan: #64d2ff;
  --blue: #0a84ff;
  background:
    radial-gradient(circle at 78% -10%, rgba(10,132,255,.14), transparent 31%),
    linear-gradient(180deg, #050608 0%, #070a0f 48%, #030406 100%);
}

body.agent-view::before {
  opacity: .28;
  background:
    linear-gradient(rgba(255,255,255,.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 64px 64px;
}

body.agent-view .top {
  border-bottom-color: rgba(255,255,255,.08);
  background: rgba(5, 6, 8, .88);
  box-shadow: none;
}

body.agent-view .card,
body.agent-view .auth-card,
body.agent-view .admin-rail,
body.agent-view .intro-panel {
  border-color: rgba(255,255,255,.09);
  background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.016)), rgba(10,15,20,.92);
  box-shadow: none;
}

body.agent-view .admin-hero {
  border-color: rgba(255,255,255,.09);
  background:
    radial-gradient(circle at top right, rgba(10,132,255,.17), transparent 35%),
    linear-gradient(180deg, rgba(17,24,32,.96), rgba(9,13,18,.96));
  box-shadow: none;
}

body.agent-view .btn {
  color: #fff;
  background: linear-gradient(135deg, #0a84ff, #3b8cff);
  box-shadow: 0 12px 28px rgba(10,132,255,.18);
}

body.agent-view .btn.secondary {
  color: var(--text);
  border-color: rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  box-shadow: none;
}

body.agent-view .pill.ok,
body.agent-view .pill.warn,
body.agent-view .pill.bad,
body.agent-view .pill {
  border-color: rgba(255,255,255,.12);
  background: rgba(255,255,255,.055);
}

body.agent-view .pill.ok {
  color: #30d158;
  border-color: rgba(48,209,88,.34);
  background: rgba(48,209,88,.10);
}

body.agent-view .rail-mark,
body.agent-view .logo,
body.agent-view .brand-icon {
  color: #fff;
  background: linear-gradient(135deg, #0a84ff, #64d2ff);
  box-shadow: 0 12px 26px rgba(10,132,255,.18);
}

body.agent-view .rail-item.active {
  color: #fff;
  border-color: rgba(10,132,255,.45);
  background: rgba(10,132,255,.18);
  box-shadow: none;
}

body.agent-view .rail-item.active small {
  color: rgba(255,255,255,.72);
}

body.agent-view .input {
  border-color: rgba(255,255,255,.12);
  background: rgba(3,6,10,.76);
}

body.agent-view table th {
  background: rgba(255,255,255,.035);
}

body.agent-view tbody tr:hover td {
  background: rgba(10,132,255,.055);
}

.json-detail pre {
  max-height: 260px;
  overflow: auto;
  margin: 8px 0 0;
  padding: 10px;
  border-radius: 8px;
  background: rgba(0,0,0,.24);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

@media (max-width: 1280px) {
  body.admin-view .wrap {
    width: min(100% - 24px, 1280px);
  }

  body.admin-view .admin-shell {
    grid-template-columns: 210px minmax(0,1fr);
  }

  .admin-object-row,
  .order-object-row,
  .api-object-row,
  .user-object-row {
    grid-template-columns: minmax(220px,1fr) minmax(240px,1fr) minmax(180px,.8fr);
  }

  .status-actions {
    justify-items: start;
  }
}

@media (max-width: 980px) {
  body.admin-view .admin-shell,
  body.admin-view .dashboard-main,
  body.admin-view .agent-top-grid {
    grid-template-columns: 1fr;
  }

  body.admin-view .admin-rail {
    position: static;
  }

  body.admin-view .rail-nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .admin-page-head,
  .admin-filter-bar,
  .admin-command-form,
  .settings-grid,
  .fingerprint-cdk-create-form,
  .fingerprint-cdk-code-row,
  .admin-object-row,
  .order-object-row,
  .api-object-row,
  .user-object-row {
    grid-template-columns: 1fr;
  }

  .fingerprint-cdk-create-form .wide-field {
    grid-column: auto;
  }

  body.admin-view .dashboard-kpis,
  body.admin-view .dashboard-grid,
  body.admin-view .agent-summary-grid,
  .user-summary-strip,
  .detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  body.admin-view .wrap {
    width: 100%;
    padding: 12px;
  }

  body.admin-view .rail-nav,
  body.admin-view .dashboard-kpis,
  body.admin-view .dashboard-grid,
  body.admin-view .agent-summary-grid,
  .user-summary-strip,
  .stat-pack,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .audit-mini-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  body.admin-view {
    overflow-x: hidden;
  }

  body.admin-view .top {
    position: static;
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 10px 12px;
  }

  body.admin-view .brand {
    min-width: 0;
  }

  body.admin-view .brand small {
    display: none;
  }

  body.admin-view .top .actions {
    max-width: 100%;
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
  }

  body.admin-view .top .actions .btn,
  body.admin-view .top .actions .pill,
  body.admin-view .top .actions .input {
    flex: 0 0 auto;
  }

  body.admin-view .wrap {
    width: 100%;
    max-width: none;
    padding: 10px;
  }

  body.admin-view .admin-shell {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  body.admin-view .admin-rail {
    display: none;
  }

  body.admin-view .admin-mobile-tabs {
    position: sticky;
    top: 0;
    z-index: 30;
    display: grid;
    gap: 8px;
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 12px;
    padding: 8px;
    background: rgba(5,6,8,.92);
    backdrop-filter: blur(18px);
    box-shadow: 0 12px 32px rgba(0,0,0,.25);
  }

  body.admin-view .mobile-tab-current {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 24px;
    padding: 0 4px;
    color: var(--soft);
    font-size: 12px;
    font-weight: 900;
  }

  body.admin-view .mobile-tab-current::after {
    content: '左右滑动切换';
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
  }

  body.admin-view .mobile-tab-row {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    padding-bottom: 3px;
    scrollbar-width: thin;
  }

  body.admin-view .mobile-tab {
    flex: 0 0 auto;
    scroll-snap-align: start;
    min-width: 74px;
    min-height: 42px;
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 10px;
    padding: 0 14px;
    background: rgba(17,24,32,.96);
    color: var(--soft);
    font-size: 14px;
    font-weight: 900;
    white-space: nowrap;
  }

  body.admin-view .mobile-tab.active {
    color: #fff;
    border-color: rgba(10,132,255,.55);
    background: linear-gradient(180deg, rgba(10,132,255,.96), rgba(10,96,210,.92));
  }

  body.admin-view .admin-page-head {
    grid-template-columns: 1fr;
    padding: 14px;
    gap: 12px;
  }

  body.admin-view .admin-page-head h1 {
    font-size: 22px;
  }

  body.admin-view .admin-page-head p:not(.label) {
    font-size: 13px;
  }

  body.admin-view .admin-page-actions {
    justify-content: flex-start;
  }

  body.admin-view .admin-page-actions .btn,
  body.admin-view .form-btn,
  body.admin-view .row-actions .btn {
    width: 100%;
    min-height: 44px;
  }

  body.admin-view .card,
  body.admin-view .auth-card,
  body.admin-view .intro-panel {
    border-radius: 10px;
    padding: 14px;
  }

  body.admin-view .section-title {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
  }

  body.admin-view .section-title h3 {
    font-size: 18px;
  }

  body.admin-view .section-title p,
  body.admin-view .field-hint {
    font-size: 12px;
  }

  body.admin-view .admin-filter-bar,
  body.admin-view .admin-command-form,
  body.admin-view .settings-grid,
  body.admin-view .agent-form {
    grid-template-columns: 1fr;
  }

  body.admin-view .input,
  body.admin-view .btn {
    min-height: 44px;
  }

  body.admin-view .admin-object-row,
  body.admin-view .order-object-row,
  body.admin-view .api-object-row,
  body.admin-view .user-object-row,
  body.admin-view .agent-object-row {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px;
  }

  body.admin-view .stat-pack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.admin-view .status-actions {
    width: 100%;
    justify-items: stretch;
  }

  body.admin-view .status-actions .btn {
    width: 100%;
  }

  body.admin-view .tablewrap {
    overflow: visible;
    border: 0;
    background: transparent;
  }

  body.admin-view .admin-data-table,
  body.admin-view .admin-data-table thead,
  body.admin-view .admin-data-table tbody,
  body.admin-view .admin-data-table tr,
  body.admin-view .admin-data-table th,
  body.admin-view .admin-data-table td {
    display: block;
    width: 100%;
  }

  body.admin-view .admin-data-table thead {
    display: none;
  }

  body.admin-view .admin-data-table tr {
    margin-bottom: 10px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 10px;
    padding: 8px;
    background: rgba(7,11,16,.86);
  }

  body.admin-view .admin-data-table td {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    border-bottom: 1px solid rgba(255,255,255,.06);
    padding: 9px 4px;
    font-size: 13px;
  }

  body.admin-view .admin-data-table td:last-child {
    border-bottom: 0;
  }

  body.admin-view .admin-data-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
  }

  body.admin-view .code-cell,
  body.admin-view .row-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    gap: 8px;
  }

  body.admin-view .price-edit {
    display: grid;
    gap: 6px;
  }

  body.admin-view .price-edit .input,
  body.admin-view .input.mini {
    width: 100%;
  }

  body.admin-view .pager {
    justify-content: stretch;
  }

  body.admin-view .pager .btn {
    flex: 1 1 120px;
  }

  body.admin-view .admin-login-only {
    grid-template-columns: 1fr;
    padding-top: 10px;
  }
}

@media (max-width: 420px) {
  body.admin-view .stat-pack,
  body.admin-view .dashboard-kpis,
  body.admin-view .dashboard-grid,
  body.admin-view .agent-summary-grid,
  body.admin-view .detail-grid {
    grid-template-columns: 1fr;
  }

  body.admin-view .admin-data-table td {
    grid-template-columns: 1fr;
    gap: 5px;
  }
}

/* User 20260601e: cleaner brand/nav, wallet tabs and safer responsive panels. */
body:not(.admin-view):not(.agent-view) .top .actions .btn.secondary.navbtn {
  gap: 7px;
  padding: 8px 13px;
  min-width: 0;
  white-space: nowrap;
}

body:not(.admin-view):not(.agent-view) .top .actions .btn.secondary.navbtn.active {
  color: var(--primary-text);
  border-color: rgba(10, 132, 255, .52);
  background: var(--primary-bg);
  box-shadow: 0 10px 28px rgba(10, 132, 255, .18);
}

body:not(.admin-view):not(.agent-view) .top .actions .pill.ok {
  color: var(--green2);
  border-color: rgba(48, 209, 88, .30);
  background: rgba(48, 209, 88, .09);
}

body:not(.admin-view):not(.agent-view) .brand-icon,
body:not(.admin-view):not(.agent-view) .brand-badge img {
  border-radius: 14px;
  background: transparent;
  object-fit: cover;
}

body:not(.admin-view):not(.agent-view) .wallet-shell {
  width: min(100%, 1180px);
}

body:not(.admin-view):not(.agent-view) .wallet-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0 14px;
  padding: 6px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(0, 0, 0, .10);
}

body:not(.admin-view):not(.agent-view) .wallet-tab-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--soft);
  background: transparent;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

body:not(.admin-view):not(.agent-view) .wallet-tab-btn svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body:not(.admin-view):not(.agent-view) .wallet-tab-btn:hover {
  color: var(--text);
  border-color: var(--line-soft);
  background: var(--secondary-bg);
}

body:not(.admin-view):not(.agent-view) .wallet-tab-btn.active {
  color: var(--primary-text);
  background: var(--primary-bg);
  border-color: rgba(10, 132, 255, .38);
  box-shadow: 0 12px 26px rgba(10, 132, 255, .16);
}

body:not(.admin-view):not(.agent-view) .wallet-tab-panel {
  display: grid;
  gap: 14px;
  min-height: 320px;
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: var(--soft-panel);
}

body:not(.admin-view):not(.agent-view) .wallet-tab-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

body:not(.admin-view):not(.agent-view) .wallet-tab-heading h3 {
  margin: 0 0 4px;
  font-size: 22px;
}

body:not(.admin-view):not(.agent-view) .wallet-tab-heading p {
  margin: 0;
  color: var(--muted);
}

body:not(.admin-view):not(.agent-view) .wallet-tab-heading > svg {
  width: 28px;
  height: 28px;
  color: var(--cyan);
  flex: 0 0 auto;
}

body:not(.admin-view):not(.agent-view) .wallet-summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

body:not(.admin-view):not(.agent-view) .wallet-summary-strip > div {
  display: grid;
  gap: 6px;
  padding: 12px;
  min-height: 70px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: var(--input-bg);
}

body:not(.admin-view):not(.agent-view) .wallet-summary-strip > div span {
  color: var(--muted);
  font-size: 12px;
}

body:not(.admin-view):not(.agent-view) .wallet-summary-strip > div strong {
  font-size: 16px;
}

body:not(.admin-view):not(.agent-view) .wallet-narrow-form {
  max-width: 520px;
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .wallet-tabs,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .wallet-tab-panel,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .wallet-summary-strip > div {
  background: rgba(255, 255, 255, .88);
  border-color: var(--line);
}

@media (max-width: 900px) {
  body:not(.admin-view):not(.agent-view) .wallet-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body:not(.admin-view):not(.agent-view) .wallet-summary-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  body:not(.admin-view):not(.agent-view) .top .actions .btn.secondary.navbtn {
    padding: 8px 7px;
  }

  body:not(.admin-view):not(.agent-view) .top .actions .btn.secondary.navbtn span {
    font-size: 11.5px;
  }

  body:not(.admin-view):not(.agent-view) .wallet-tabs,
  body:not(.admin-view):not(.agent-view) .wallet-summary-strip {
    grid-template-columns: 1fr;
  }
}

/* User 20260601f: public landing polish, light-theme cleanup and API layout guardrails. */
body:not(.admin-view):not(.agent-view) .public-hero {
  justify-content: flex-start;
  gap: 18px;
  min-height: 560px;
  overflow: hidden;
}

body:not(.admin-view):not(.agent-view) .public-hero .brand-badge {
  margin-bottom: 8px;
}

body:not(.admin-view):not(.agent-view) .hero-kicker {
  margin: 0;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

body:not(.admin-view):not(.agent-view) .public-hero h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(38px, 5vw, 64px);
  line-height: 1.02;
}

body:not(.admin-view):not(.agent-view) .public-hero .hero-copy {
  max-width: 760px;
  margin: 0;
  font-size: 16px;
  line-height: 1.75;
}

body:not(.admin-view):not(.agent-view) .seo-service-strip,
body:not(.admin-view):not(.agent-view) .seo-link-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body:not(.admin-view):not(.agent-view) .seo-service-strip span,
body:not(.admin-view):not(.agent-view) .seo-link-grid a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  color: var(--soft);
  background: rgba(255, 255, 255, .045);
  text-decoration: none;
  font-weight: 850;
}

body:not(.admin-view):not(.agent-view) .seo-link-grid a {
  color: var(--text);
  background: rgba(10, 132, 255, .12);
  border-color: rgba(10, 132, 255, .26);
}

body:not(.admin-view):not(.agent-view) .seo-step-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 8px;
}

body:not(.admin-view):not(.agent-view) .seo-step-grid div {
  display: grid;
  gap: 8px;
  min-height: 96px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(255, 255, 255, .045);
}

body:not(.admin-view):not(.agent-view) .seo-step-grid b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  color: var(--primary-text);
  background: var(--primary-bg);
}

body:not(.admin-view):not(.agent-view) .seo-step-grid span {
  color: var(--soft);
  font-weight: 850;
  line-height: 1.45;
}

body:not(.admin-view):not(.agent-view) .api-card,
body:not(.admin-view):not(.agent-view) .api-status-card,
body:not(.admin-view):not(.agent-view) .api-key-card {
  overflow: hidden;
}

body:not(.admin-view):not(.agent-view) .api-tabs button {
  overflow-wrap: anywhere;
}

body:not(.admin-view):not(.agent-view) .api-key-main,
body:not(.admin-view):not(.agent-view) .api-key-actions,
body:not(.admin-view):not(.agent-view) .api-stat-grid {
  max-width: 100%;
}

body:not(.admin-view):not(.agent-view) .api-stat-pill {
  min-width: 0;
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .public-hero {
  background:
    linear-gradient(135deg, rgba(10, 132, 255, .11), transparent 42%),
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,251,255,.98));
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .seo-service-strip span,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .seo-step-grid div,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .seo-link-grid a,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .api-tabs button:not(.active),
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .wallet-tab-btn:not(.active),
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .btn.secondary:not(.active),
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .api-stat-pill,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .api-key-card,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .api-status-card,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .api-card {
  color: var(--text);
  background: #ffffff;
  border-color: var(--line);
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .seo-service-strip span,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .seo-step-grid span,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .api-tabs button:not(.active) {
  color: #172033;
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .seo-link-grid a {
  color: #0759b8;
  background: rgba(10, 132, 255, .08);
  border-color: rgba(10, 132, 255, .22);
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .api-tabs button.active,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .wallet-tab-btn.active {
  color: #ffffff;
  background: var(--primary-bg);
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .orders-table th {
  color: #475569;
  background: #f8fafc;
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .orders-table td {
  color: var(--text);
  background: #ffffff;
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .refund-warning,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .wallet-rule,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .notice {
  color: #92400e;
  background: #fffbeb;
  border-color: #f6d58a;
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .notice.info {
  color: #0759b8;
  background: #eff6ff;
  border-color: #bfdbfe;
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .api-stat-pill small,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .api-status-cell small,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .endpoint-list span,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .response-grid small {
  color: #64748b;
}

@media (max-width: 900px) {
  body:not(.admin-view):not(.agent-view) .seo-step-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  body:not(.admin-view):not(.agent-view) .public-hero {
    min-height: auto;
    padding: 22px;
  }

  body:not(.admin-view):not(.agent-view) .seo-step-grid {
    grid-template-columns: 1fr;
  }
}

/* User settings and public landing refinements */
body:not(.admin-view):not(.agent-view) .public-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 26px;
}

body:not(.admin-view):not(.agent-view) .public-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

body:not(.admin-view):not(.agent-view) .hero-stat-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 28px 0;
}

body:not(.admin-view):not(.agent-view) .hero-stat-row > div,
body:not(.admin-view):not(.agent-view) .public-feature-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--soft-panel);
  padding: 16px;
}

body:not(.admin-view):not(.agent-view) .hero-stat-row strong {
  display: block;
  color: var(--text);
  font-size: 28px;
  line-height: 1;
}

body:not(.admin-view):not(.agent-view) .hero-stat-row span,
body:not(.admin-view):not(.agent-view) .public-feature-card span {
  color: var(--muted);
  font-size: 13px;
}

body:not(.admin-view):not(.agent-view) .public-feature-card strong {
  display: block;
  margin-bottom: 14px;
}

body:not(.admin-view):not(.agent-view) .public-feature-card div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}

body:not(.admin-view):not(.agent-view) .public-feature-card span {
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 8px 10px;
  background: var(--flat-bg);
}

body:not(.admin-view):not(.agent-view) .settings-page {
  max-width: 1180px;
  margin: 24px auto;
}

body:not(.admin-view):not(.agent-view) .settings-account-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0 12px;
}

body:not(.admin-view):not(.agent-view) .settings-account-strip span {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--flat-bg);
}

body:not(.admin-view):not(.agent-view) .settings-account-strip small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

body:not(.admin-view):not(.agent-view) .settings-account-strip strong {
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

body:not(.admin-view):not(.agent-view) .settings-account-strip .accent {
  border-color: rgba(34, 197, 94, .30);
  background: linear-gradient(135deg, rgba(22, 163, 74, .13), rgba(14, 165, 233, .06));
}

body:not(.admin-view):not(.agent-view) .settings-account-strip .accent strong {
  color: var(--green2);
}

body:not(.admin-view):not(.agent-view) .settings-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 14px;
  scrollbar-width: thin;
}

body:not(.admin-view):not(.agent-view) .settings-tabs button {
  flex: 0 0 auto;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 16px;
  color: var(--text);
  background: var(--secondary-bg);
  font-weight: 800;
  cursor: pointer;
}

body:not(.admin-view):not(.agent-view) .settings-tabs button.active {
  border-color: transparent;
  color: var(--primary-text);
  background: var(--primary-bg);
}

body:not(.admin-view):not(.agent-view) .settings-two-col,
body:not(.admin-view):not(.agent-view) .level-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, .78fr);
  gap: 14px;
}

body:not(.admin-view):not(.agent-view) .settings-card,
body:not(.admin-view):not(.agent-view) .level-rule {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--flat-bg);
  padding: 16px;
}

body:not(.admin-view):not(.agent-view) .settings-card .btn {
  min-height: 44px;
}

body:not(.admin-view):not(.agent-view) .fee-note {
  display: grid;
  gap: 10px;
  color: var(--warning-text);
  border-color: var(--warning-border);
  background: var(--warning-bg);
}

body:not(.admin-view):not(.agent-view) .level-hero {
  align-items: center;
  margin-bottom: 14px;
}

body:not(.admin-view):not(.agent-view) .level-meter-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--soft);
}

body:not(.admin-view):not(.agent-view) .level-meter-head strong {
  color: var(--text);
}

body:not(.admin-view):not(.agent-view) .progress {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(128, 139, 153, .24);
}

body:not(.admin-view):not(.agent-view) .progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--primary-bg);
}

body:not(.admin-view):not(.agent-view) .level-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

body:not(.admin-view):not(.agent-view) .level-rule {
  display: grid;
  gap: 6px;
}

body:not(.admin-view):not(.agent-view) .level-rule.active {
  border-color: var(--blue);
  box-shadow: 0 0 0 1px rgba(10,132,255,.18) inset;
}

body:not(.admin-view):not(.agent-view) .level-rule span {
  color: var(--muted);
  font-size: 13px;
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .toast {
  color: var(--text);
  background: #ffffff;
  border-color: var(--line);
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .form-error {
  color: var(--error-text);
  background: var(--error-bg);
  border-color: var(--error-border);
}

@media (max-width: 760px) {
  body:not(.admin-view):not(.agent-view) .public-topline,
  body:not(.admin-view):not(.agent-view) .level-meter-head {
    align-items: flex-start;
    flex-direction: column;
  }
  body:not(.admin-view):not(.agent-view) .hero-stat-row,
  body:not(.admin-view):not(.agent-view) .settings-two-col,
  body:not(.admin-view):not(.agent-view) .level-hero,
  body:not(.admin-view):not(.agent-view) .level-grid {
    grid-template-columns: 1fr;
  }
}

/* User 20260606a: Apple Tech user UI refresh. UI-only overrides; backend rules unchanged. */
:root,
html[data-theme="dark"] {
  --bg: #030406;
  --surface: #070a0f;
  --panel: #0b1017;
  --panel2: #111820;
  --line: rgba(255, 255, 255, .10);
  --line-soft: rgba(255, 255, 255, .065);
  --text: #f7f9fc;
  --muted: #8f9aaa;
  --soft: #c6d0dd;
  --green: #30d158;
  --green2: #8ff5b7;
  --cyan: #64d2ff;
  --blue: #0a84ff;
  --amber: #ffd60a;
  --red: #ff453a;
  --body-bg:
    radial-gradient(circle at 72% -10%, rgba(10, 132, 255, .16), transparent 34%),
    radial-gradient(circle at 18% 12%, rgba(100, 210, 255, .08), transparent 28%),
    linear-gradient(180deg, #05070a 0%, #030406 58%, #020304 100%);
  --top-bg: rgba(5, 7, 10, .82);
  --panel-bg:
    linear-gradient(180deg, rgba(255, 255, 255, .052), rgba(255, 255, 255, .018)),
    rgba(12, 17, 24, .92);
  --flat-bg: rgba(8, 12, 18, .82);
  --soft-panel: rgba(11, 16, 23, .72);
  --soft-panel-strong: rgba(13, 20, 29, .94);
  --secondary-bg: rgba(18, 28, 39, .78);
  --input-bg: rgba(5, 9, 13, .92);
  --primary-bg: linear-gradient(135deg, #0a84ff, #2cc5ff);
  --shadow: 0 20px 60px rgba(0, 0, 0, .38);
  --shadow-soft: 0 1px 0 rgba(255, 255, 255, .08) inset, 0 18px 44px rgba(0, 0, 0, .24);
}

html[data-theme="light"] {
  --bg: #eef4fb;
  --surface: #ffffff;
  --panel: #ffffff;
  --panel2: #f7fbff;
  --line: rgba(15, 23, 42, .12);
  --line-soft: rgba(15, 23, 42, .08);
  --text: #172033;
  --muted: #667386;
  --soft: #334155;
  --body-bg:
    radial-gradient(circle at 70% -10%, rgba(10, 132, 255, .14), transparent 36%),
    linear-gradient(180deg, #f8fbff 0%, #eef4fb 100%);
  --top-bg: rgba(255, 255, 255, .88);
  --panel-bg: linear-gradient(180deg, rgba(255,255,255,.98), rgba(246,250,255,.98));
  --flat-bg: #ffffff;
  --soft-panel: rgba(255, 255, 255, .78);
  --soft-panel-strong: #ffffff;
  --secondary-bg: rgba(255, 255, 255, .84);
  --input-bg: #ffffff;
}

body:not(.admin-view):not(.agent-view) {
  background: var(--body-bg);
}

body:not(.admin-view):not(.agent-view)::before {
  background:
    linear-gradient(rgba(255, 255, 255, .026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .018) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: .55;
}

body:not(.admin-view):not(.agent-view) .top {
  min-height: 66px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--top-bg);
  backdrop-filter: blur(18px);
  box-shadow: none;
}

body:not(.admin-view):not(.agent-view) .brand {
  gap: 12px;
  letter-spacing: 0;
}

body:not(.admin-view):not(.agent-view) .brand-icon {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  box-shadow: 0 0 0 1px rgba(255,255,255,.12), 0 12px 30px rgba(10,132,255,.24);
}

body:not(.admin-view):not(.agent-view) .brand small {
  color: var(--muted);
  font-weight: 650;
}

body:not(.admin-view):not(.agent-view) .top .actions {
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

body:not(.admin-view):not(.agent-view) .top .actions .btn,
body:not(.admin-view):not(.agent-view) .top .actions .pill {
  min-height: 40px;
  border-radius: 999px;
  border-color: var(--line);
  background: rgba(255, 255, 255, .045);
  box-shadow: none;
}

body:not(.admin-view):not(.agent-view) .top .actions .btn.secondary.navbtn {
  gap: 8px;
  min-width: 0;
  padding: 0 16px;
  color: var(--soft);
  font-weight: 850;
}

body:not(.admin-view):not(.agent-view) .top .actions .btn.secondary.navbtn svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.2;
}

body:not(.admin-view):not(.agent-view) .top .actions .btn.secondary.navbtn.active {
  color: #fff;
  border-color: rgba(10, 132, 255, .65);
  background: var(--primary-bg);
  box-shadow: 0 12px 28px rgba(10, 132, 255, .24);
}

body:not(.admin-view):not(.agent-view) .top .actions .pill.ok {
  color: #b8ffd0;
  border-color: rgba(48, 209, 88, .32);
  background: rgba(48, 209, 88, .10);
}

body:not(.admin-view):not(.agent-view) .account-pill {
  color: var(--soft);
  background: rgba(255,255,255,.05);
}

body:not(.admin-view):not(.agent-view) .wrap,
body:not(.admin-view):not(.agent-view) .settings-page,
body:not(.admin-view):not(.agent-view) .wallet-page,
body:not(.admin-view):not(.agent-view) .api-page,
body:not(.admin-view):not(.agent-view) .orders-page {
  width: min(1280px, calc(100vw - 32px));
  margin-left: auto;
  margin-right: auto;
}

body.workbench-view:not(.admin-view):not(.agent-view) .wrap {
  width: min(1320px, calc(100vw - 28px));
}

body:not(.admin-view):not(.agent-view) .panel-card,
body:not(.admin-view):not(.agent-view) .selector-panel,
body:not(.admin-view):not(.agent-view) .market-panel,
body:not(.admin-view):not(.agent-view) .mode-card,
body:not(.admin-view):not(.agent-view) .auth-card,
body:not(.admin-view):not(.agent-view) .topup-card,
body:not(.admin-view):not(.agent-view) .settings-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel-bg);
  box-shadow: var(--shadow-soft);
}

body:not(.admin-view):not(.agent-view) .login-shell {
  width: min(1280px, calc(100vw - 32px));
  margin: 28px auto 46px;
  grid-template-columns: minmax(0, 1.35fr) minmax(360px, .62fr);
  align-items: start;
  gap: 18px;
}

body:not(.admin-view):not(.agent-view) .login-art {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  min-height: 520px;
  padding: 36px;
  background:
    radial-gradient(circle at 76% 18%, rgba(100, 210, 255, .22), transparent 24%),
    radial-gradient(circle at 26% 10%, rgba(10, 132, 255, .24), transparent 28%),
    linear-gradient(145deg, rgba(18, 29, 41, .96), rgba(7, 11, 16, .96));
}

body:not(.admin-view):not(.agent-view) .login-art::before,
body:not(.admin-view):not(.agent-view) .login-art::after {
  content: "";
  position: absolute;
  pointer-events: none;
  opacity: .55;
}

body:not(.admin-view):not(.agent-view) .login-art::before {
  inset: 0;
  background:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(120deg, transparent 0%, #000 28%, #000 72%, transparent 100%);
  animation: nexsms-grid-drift 14s linear infinite;
}

body:not(.admin-view):not(.agent-view) .login-art::after {
  width: 320px;
  height: 320px;
  right: -80px;
  bottom: -110px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(10,132,255,.28), transparent 66%);
  animation: nexsms-pulse 5s ease-in-out infinite;
}

@keyframes nexsms-grid-drift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(40px, 40px, 0); }
}

@keyframes nexsms-pulse {
  0%, 100% { transform: scale(.95); opacity: .36; }
  50% { transform: scale(1.06); opacity: .64; }
}

body:not(.admin-view):not(.agent-view) .public-hero h1 {
  max-width: 720px;
  font-size: clamp(44px, 6vw, 76px);
  line-height: .98;
  letter-spacing: 0;
}

body:not(.admin-view):not(.agent-view) .hero-copy {
  max-width: 760px;
  color: var(--soft);
}

body:not(.admin-view):not(.agent-view) .brand-badge,
body:not(.admin-view):not(.agent-view) .hero-stat-row > div,
body:not(.admin-view):not(.agent-view) .public-feature-card {
  backdrop-filter: blur(12px);
  background: rgba(255,255,255,.06);
}

body:not(.admin-view):not(.agent-view) .auth-card {
  padding: 20px;
  border-radius: 20px;
}

body:not(.admin-view):not(.agent-view) input,
body:not(.admin-view):not(.agent-view) select,
body:not(.admin-view):not(.agent-view) textarea {
  border-radius: 12px;
  border-color: var(--line);
  background: var(--input-bg);
}

body:not(.admin-view):not(.agent-view) input:focus,
body:not(.admin-view):not(.agent-view) select:focus,
body:not(.admin-view):not(.agent-view) textarea:focus {
  border-color: rgba(10,132,255,.72);
  box-shadow: 0 0 0 4px rgba(10,132,255,.14);
}

body:not(.admin-view):not(.agent-view) .btn.primary,
body:not(.admin-view):not(.agent-view) .buy-btn,
body:not(.admin-view):not(.agent-view) .topup-submit {
  border-color: transparent;
  background: var(--primary-bg);
  color: #fff;
  box-shadow: 0 14px 32px rgba(10,132,255,.18);
}

body:not(.admin-view):not(.agent-view) .btn.secondary,
body:not(.admin-view):not(.agent-view) .copy-btn,
body:not(.admin-view):not(.agent-view) .order-action {
  border-color: var(--line);
  background: rgba(255,255,255,.045);
  color: var(--text);
}

body:not(.admin-view):not(.agent-view) .workbench {
  gap: 14px;
  grid-template-columns: minmax(310px, 360px) minmax(0, 1fr);
}

body:not(.admin-view):not(.agent-view) .selector-panel {
  padding: 16px;
}

body:not(.admin-view):not(.agent-view) .service-tabs,
body:not(.admin-view):not(.agent-view) .wallet-tabs,
body:not(.admin-view):not(.agent-view) .api-tabs,
body:not(.admin-view):not(.agent-view) .settings-tabs,
body:not(.admin-view):not(.agent-view) .order-tabs {
  border-radius: 16px;
  padding: 4px;
  gap: 4px;
  background: rgba(255,255,255,.035);
  border: 1px solid var(--line-soft);
}

body:not(.admin-view):not(.agent-view) .service-tab,
body:not(.admin-view):not(.agent-view) .wallet-tabs button,
body:not(.admin-view):not(.agent-view) .api-tabs button,
body:not(.admin-view):not(.agent-view) .settings-tabs button,
body:not(.admin-view):not(.agent-view) .order-tabs button {
  min-height: 38px;
  border-radius: 12px;
  border: 0;
  background: transparent;
  color: var(--muted);
}

body:not(.admin-view):not(.agent-view) .service-tab.active,
body:not(.admin-view):not(.agent-view) .wallet-tabs button.active,
body:not(.admin-view):not(.agent-view) .api-tabs button.active,
body:not(.admin-view):not(.agent-view) .settings-tabs button.active,
body:not(.admin-view):not(.agent-view) .order-tabs button.active {
  color: #fff;
  background: var(--primary-bg);
  box-shadow: 0 10px 22px rgba(10,132,255,.18);
}

body:not(.admin-view):not(.agent-view) .pick-row {
  min-height: 58px;
  border-radius: 14px;
  border-color: var(--line-soft);
  background: rgba(255,255,255,.035);
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}

body:not(.admin-view):not(.agent-view) .pick-row:hover {
  transform: translateY(-1px);
  border-color: rgba(10,132,255,.38);
}

body:not(.admin-view):not(.agent-view) .pick-row.active {
  border-color: rgba(10,132,255,.72);
  background: linear-gradient(135deg, rgba(10,132,255,.18), rgba(100,210,255,.08));
  box-shadow: 0 0 0 1px rgba(10,132,255,.12) inset;
}

body:not(.admin-view):not(.agent-view) .service-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #0f1724;
  box-shadow: 0 1px 0 rgba(255,255,255,.12) inset;
}

body:not(.admin-view):not(.agent-view) .country-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(112px, auto) auto;
  gap: 8px;
  align-items: end;
}

body:not(.admin-view):not(.agent-view) .trade-header {
  padding: 18px 20px;
  border-radius: 16px;
  background:
    radial-gradient(circle at 92% 16%, rgba(10,132,255,.18), transparent 28%),
    var(--panel-bg);
}

body:not(.admin-view):not(.agent-view) .trade-header h2 {
  font-size: clamp(28px, 3.4vw, 42px);
  letter-spacing: 0;
}

body:not(.admin-view):not(.agent-view) .workbench-rules {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 12px 16px;
  gap: 8px 18px;
  border-color: rgba(255,214,10,.24);
  background: rgba(255,214,10,.065);
}

body:not(.admin-view):not(.agent-view) .workbench-rules li {
  line-height: 1.45;
  font-size: 13px;
}

body:not(.admin-view):not(.agent-view) .trade-modes {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

body:not(.admin-view):not(.agent-view) .mode-card {
  min-height: auto;
  padding: 14px;
}

body:not(.admin-view):not(.agent-view) .mode-card h3 {
  margin: 0;
}

body:not(.admin-view):not(.agent-view) .mode-card .price {
  font-size: 32px;
  color: #8ff5b7;
}

body:not(.admin-view):not(.agent-view) .buy-controls {
  display: grid;
  grid-template-columns: minmax(92px, 130px) minmax(0, 1fr);
  gap: 10px;
  align-items: end;
  margin-top: 12px;
}

body:not(.admin-view):not(.agent-view) .buy-controls .buy-btn {
  min-height: 44px;
}

body:not(.admin-view):not(.agent-view) .active-bulkbar,
body:not(.admin-view):not(.agent-view) .active-order-row {
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.018));
}

body:not(.admin-view):not(.agent-view) .active-order-row {
  min-height: 86px;
  border-color: var(--line-soft);
}

body:not(.admin-view):not(.agent-view) .active-order-main {
  grid-template-columns: minmax(150px, .9fr) minmax(170px, 1fr) minmax(140px, .8fr) minmax(110px, .55fr) minmax(220px, .9fr);
  gap: 12px;
}

body:not(.admin-view):not(.agent-view) .active-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(98px, 1fr));
  gap: 8px;
  position: relative;
  z-index: 2;
}

body:not(.admin-view):not(.agent-view) .active-actions .btn,
body:not(.admin-view):not(.agent-view) .active-actions button {
  min-height: 40px;
  border-radius: 10px;
}

body:not(.admin-view):not(.agent-view) .code-pill {
  border-color: rgba(48,209,88,.34);
  background: rgba(48,209,88,.12);
  color: #9effbf;
}

body:not(.admin-view):not(.agent-view) .orders-table {
  overflow: hidden;
  border-radius: 14px;
}

body:not(.admin-view):not(.agent-view) .orders-table table {
  width: 100%;
  table-layout: fixed;
}

body:not(.admin-view):not(.agent-view) .orders-table th,
body:not(.admin-view):not(.agent-view) .orders-table td {
  overflow-wrap: anywhere;
}

body:not(.admin-view):not(.agent-view) .order-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(82px, 1fr));
  gap: 8px;
}

body:not(.admin-view):not(.agent-view) .recharge-shell,
body:not(.admin-view):not(.agent-view) .api-shell,
body:not(.admin-view):not(.agent-view) .settings-page .panel-card,
body:not(.admin-view):not(.agent-view) .orders-page .panel-card {
  border-radius: 18px;
}

body:not(.admin-view):not(.agent-view) .amount-grid,
body:not(.admin-view):not(.agent-view) .payment-methods,
body:not(.admin-view):not(.agent-view) .method-pills {
  gap: 10px;
}

body:not(.admin-view):not(.agent-view) .method-pill {
  min-height: 44px;
  border-radius: 14px;
}

body:not(.admin-view):not(.agent-view) .toast {
  right: max(18px, env(safe-area-inset-right));
  bottom: max(92px, env(safe-area-inset-bottom));
  border-radius: 14px;
  background: rgba(18, 25, 34, .96);
  box-shadow: 0 18px 42px rgba(0,0,0,.32);
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) {
  color: var(--text);
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .top .actions .btn,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .top .actions .pill,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .btn.secondary,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .copy-btn,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .order-action {
  background: rgba(255,255,255,.88);
  color: var(--text);
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .pick-row,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .mode-card,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .active-order-row,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .active-bulkbar {
  background: rgba(255,255,255,.88);
  color: var(--text);
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .workbench-rules {
  color: #39465a;
  background: #fff8e7;
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .codeblock,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) pre,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) code {
  color: #172033;
  background: #f6f9fd;
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .toast {
  color: #172033;
  background: #ffffff;
}

@media (prefers-reduced-motion: reduce) {
  body:not(.admin-view):not(.agent-view) .login-art::before,
  body:not(.admin-view):not(.agent-view) .login-art::after,
  body:not(.admin-view):not(.agent-view) * {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

@media (max-width: 1100px) {
  body:not(.admin-view):not(.agent-view) .top {
    align-items: flex-start;
    flex-direction: column;
  }

  body:not(.admin-view):not(.agent-view) .top .actions {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  body:not(.admin-view):not(.agent-view) .login-shell,
  body:not(.admin-view):not(.agent-view) .workbench {
    grid-template-columns: 1fr;
  }

  body:not(.admin-view):not(.agent-view) .selector-panel {
    position: relative;
    top: auto;
  }

  body:not(.admin-view):not(.agent-view) .active-order-main {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  body:not(.admin-view):not(.agent-view) .wrap,
  body:not(.admin-view):not(.agent-view) .settings-page,
  body:not(.admin-view):not(.agent-view) .wallet-page,
  body:not(.admin-view):not(.agent-view) .api-page,
  body:not(.admin-view):not(.agent-view) .orders-page,
  body.workbench-view:not(.admin-view):not(.agent-view) .wrap {
    width: min(100vw - 18px, 100%);
  }

  body:not(.admin-view):not(.agent-view) .login-art {
    min-height: auto;
    padding: 22px;
  }

  body:not(.admin-view):not(.agent-view) .public-hero h1 {
    font-size: clamp(36px, 12vw, 54px);
  }

  body:not(.admin-view):not(.agent-view) .country-tools,
  body:not(.admin-view):not(.agent-view) .trade-modes,
  body:not(.admin-view):not(.agent-view) .workbench-rules,
  body:not(.admin-view):not(.agent-view) .buy-controls,
  body:not(.admin-view):not(.agent-view) .active-order-main {
    grid-template-columns: 1fr;
  }

  body:not(.admin-view):not(.agent-view) .top .actions .btn.secondary.navbtn span {
    display: inline;
  }

  body:not(.admin-view):not(.agent-view) .active-actions,
  body:not(.admin-view):not(.agent-view) .order-actions {
    grid-template-columns: 1fr 1fr;
  }

  body:not(.admin-view):not(.agent-view) .orders-table {
    overflow-x: auto;
  }
}
/* User 20260606b: polish brand, icons, nav rhythm, compact workbench. */
body:not(.admin-view):not(.agent-view) {
  background:
    radial-gradient(circle at 74% 0%, rgba(10, 132, 255, .14), transparent 30%),
    radial-gradient(circle at 18% 18%, rgba(100, 210, 255, .06), transparent 24%),
    linear-gradient(180deg, #030507 0%, #020304 100%);
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) {
  background:
    radial-gradient(circle at 74% 0%, rgba(10, 132, 255, .12), transparent 32%),
    radial-gradient(circle at 18% 18%, rgba(100, 210, 255, .10), transparent 26%),
    linear-gradient(180deg, #f8fbff 0%, #eef4fb 100%);
}

body:not(.admin-view):not(.agent-view)::after {
  content: "";
  position: fixed;
  inset: 66px 0 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(115deg, transparent 0 22%, rgba(10, 132, 255, .055) 22.2% 22.7%, transparent 23% 100%),
    linear-gradient(65deg, transparent 0 42%, rgba(100, 210, 255, .035) 42.2% 42.55%, transparent 43% 100%),
    radial-gradient(circle at 50% 8%, rgba(10, 132, 255, .12), transparent 34%);
  opacity: .72;
}

@media (prefers-reduced-motion: no-preference) {
  body:not(.admin-view):not(.agent-view)::after {
    animation: nexsms-tech-breathe 9s ease-in-out infinite;
  }
}

@keyframes nexsms-tech-breathe {
  0%, 100% { opacity: .54; transform: translate3d(0, 0, 0); }
  50% { opacity: .78; transform: translate3d(0, 4px, 0); }
}

body:not(.admin-view):not(.agent-view) .brand-icon {
  border-radius: 13px;
  background: #061018;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, .14),
    0 0 0 5px rgba(10, 132, 255, .08),
    0 14px 30px rgba(10, 132, 255, .22);
}

body:not(.admin-view):not(.agent-view) .top {
  min-height: 62px;
  padding: 9px 18px;
}

body:not(.admin-view):not(.agent-view) .top .actions {
  gap: 7px;
}

body:not(.admin-view):not(.agent-view) .top-account-group,
body:not(.admin-view):not(.agent-view) .nav-cluster,
body:not(.admin-view):not(.agent-view) .nav-utility {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

body:not(.admin-view):not(.agent-view) .nav-cluster {
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, .075);
  border-radius: 18px;
  background: rgba(255, 255, 255, .035);
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .nav-cluster {
  border-color: rgba(15, 23, 42, .10);
  background: rgba(255, 255, 255, .72);
}

body:not(.admin-view):not(.agent-view) .top .actions .btn,
body:not(.admin-view):not(.agent-view) .top .actions .pill {
  min-height: 36px;
  border-radius: 14px;
}

body:not(.admin-view):not(.agent-view) .top .actions .btn.secondary.navbtn {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 13px;
  font-size: 14px;
  color: rgba(231, 237, 245, .84);
  background: transparent;
}

body:not(.admin-view):not(.agent-view) .nav-cluster .btn.secondary.navbtn {
  border-color: transparent;
}

body:not(.admin-view):not(.agent-view) .top .actions .btn.secondary.navbtn svg {
  width: 17px;
  height: 17px;
  stroke-width: 2;
}

body:not(.admin-view):not(.agent-view) .top .actions .btn.secondary.navbtn.active {
  border-color: rgba(10, 132, 255, .58);
  background: linear-gradient(135deg, #0a84ff, #27bfff);
  box-shadow: 0 10px 24px rgba(10, 132, 255, .20);
}

body:not(.admin-view):not(.agent-view) .top .actions .pill {
  padding: 0 12px;
  font-size: 12px;
  color: rgba(231, 237, 245, .82);
  background: rgba(255,255,255,.045);
}

body:not(.admin-view):not(.agent-view) .top .actions .pill.ok {
  min-height: 34px;
  color: #a6f4bc;
}

body:not(.admin-view):not(.agent-view) .top .actions .pill.points-link {
  color: #8ff0b2;
  border-color: rgba(34, 197, 94, .38);
  background: linear-gradient(135deg, rgba(22, 163, 74, .16), rgba(14, 165, 233, .07));
}

body:not(.admin-view):not(.agent-view) .top .actions .pill.points-link:hover {
  color: #d1fae5;
  border-color: rgba(34, 197, 94, .62);
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .top .actions .pill,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .top .actions .btn.secondary.navbtn {
  color: #182235;
  background: transparent;
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .top .actions .pill.points-link {
  color: #047857;
  border-color: rgba(5, 150, 105, .30);
  background: linear-gradient(135deg, rgba(209, 250, 229, .78), rgba(224, 242, 254, .62));
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .top .actions .btn.secondary.navbtn.active {
  color: #fff;
}

body:not(.admin-view):not(.agent-view) .theme-toggle span {
  max-width: 40px;
}

body:not(.admin-view):not(.agent-view) .service-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
}

body:not(.admin-view):not(.agent-view) .service-logo.logo-claude {
  color: #f0c998;
  background: linear-gradient(145deg, #2b1b12, #0c1118);
}

body:not(.admin-view):not(.agent-view) .service-logo.logo-amazon {
  color: #121820;
  background: linear-gradient(180deg, #ffffff, #edf2f7);
}

body:not(.admin-view):not(.agent-view) .service-logo.logo-amazon .amazon-smile {
  fill: #ff9900;
}

body:not(.admin-view):not(.agent-view) .trade-header {
  padding: 14px 16px;
  min-height: 132px;
  background:
    radial-gradient(circle at 92% 16%, rgba(10,132,255,.22), transparent 28%),
    linear-gradient(145deg, rgba(18, 35, 52, .92), rgba(9, 13, 19, .96));
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .trade-header {
  background:
    radial-gradient(circle at 92% 16%, rgba(10,132,255,.10), transparent 30%),
    linear-gradient(145deg, #ffffff, #f5f9ff);
}

body:not(.admin-view):not(.agent-view) .trade-header h2 {
  margin-top: 8px;
  font-size: clamp(26px, 2.7vw, 34px);
  line-height: 1.12;
}

body:not(.admin-view):not(.agent-view) .trade-header p {
  max-width: 860px;
  margin-top: 10px;
  font-size: 14px;
}

body:not(.admin-view):not(.agent-view) .workbench-rules {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 9px 12px;
  gap: 5px 18px;
  border-radius: 13px;
  background: rgba(255, 214, 10, .045);
}

body:not(.admin-view):not(.agent-view) .workbench-rules li {
  font-size: 12px;
  line-height: 1.34;
}

body:not(.admin-view):not(.agent-view) .workbench-rules li::before {
  top: .58em;
  width: 4px;
  height: 4px;
}

body:not(.admin-view):not(.agent-view) .trade-modes {
  gap: 10px;
}

body:not(.admin-view):not(.agent-view) .mode-card {
  padding: 12px;
  border-radius: 14px;
}

body:not(.admin-view):not(.agent-view) .mode-card .price {
  font-size: 28px;
}

body:not(.admin-view):not(.agent-view) .buy-controls {
  grid-template-columns: minmax(84px, 110px) minmax(0, 1fr);
  margin-top: 8px;
}

body:not(.admin-view):not(.agent-view) .buy-controls .buy-btn {
  min-height: 40px;
}

body:not(.admin-view):not(.agent-view) .active-bulkbar {
  padding: 10px 12px;
}

@media (max-width: 1180px) {
  body:not(.admin-view):not(.agent-view) .top .actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  body:not(.admin-view):not(.agent-view) .nav-cluster {
    order: 3;
  }
}

@media (max-width: 760px) {
  body:not(.admin-view):not(.agent-view) .nav-cluster,
  body:not(.admin-view):not(.agent-view) .top-account-group,
  body:not(.admin-view):not(.agent-view) .nav-utility {
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }

  body:not(.admin-view):not(.agent-view) .workbench-rules {
    grid-template-columns: 1fr;
  }

  body:not(.admin-view):not(.agent-view) .trade-header {
    min-height: auto;
  }

  body:not(.admin-view):not(.agent-view) .settings-account-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .market-mode-tabs {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  body:not(.admin-view):not(.agent-view) .settings-account-strip {
    grid-template-columns: 1fr;
  }
}

/* User 20260606c: reduce workbench visual noise and put decision details on purchase cards. */
body:not(.admin-view):not(.agent-view) {
  background:
    linear-gradient(180deg, #05080b 0%, #030506 48%, #020304 100%);
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) {
  background:
    linear-gradient(180deg, #f8fbff 0%, #eef4fb 100%);
}

body:not(.admin-view):not(.agent-view)::after {
  display: none;
}

body.workbench-view:not(.admin-view):not(.agent-view)::before {
  opacity: .28;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.42), rgba(0,0,0,.08));
}

body:not(.admin-view):not(.agent-view) .service-logo.logo-claude,
.service-mark.logo-claude {
  color: #d97732;
  background: linear-gradient(145deg, #20140e, #0d1118);
}

body:not(.admin-view):not(.agent-view) .service-logo.logo-claude svg,
.service-mark.logo-claude svg {
  width: 28px;
  height: 28px;
  filter: drop-shadow(0 4px 10px rgba(217, 119, 50, .28));
}

body:not(.admin-view):not(.agent-view) .trade-header {
  min-height: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.012)),
    rgba(8, 16, 22, .94);
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .trade-header {
  background: rgba(255, 255, 255, .92);
}

body:not(.admin-view):not(.agent-view) .trade-heading {
  min-width: 0;
}

body:not(.admin-view):not(.agent-view) .trade-header h2 {
  margin-top: 4px;
  font-size: clamp(20px, 2vw, 24px);
  line-height: 1.2;
}

body:not(.admin-view):not(.agent-view) .trade-header p {
  max-width: 620px;
  margin-top: 5px;
  font-size: 13px;
}

body:not(.admin-view):not(.agent-view) .trade-steps {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

body:not(.admin-view):not(.agent-view) .trade-steps span {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  color: var(--soft);
  background: rgba(255,255,255,.035);
  font-size: 12px;
  font-weight: 760;
  white-space: nowrap;
}

body:not(.admin-view):not(.agent-view) .workbench-rules {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 0;
  border: 0;
  background: transparent;
}

body:not(.admin-view):not(.agent-view) .rule-card {
  min-height: 86px;
  display: grid;
  align-content: start;
  gap: 5px;
  padding: 10px 11px;
  border: 1px solid rgba(255, 255, 255, .085);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.038), rgba(255,255,255,.014)),
    rgba(7, 14, 20, .84);
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .rule-card {
  border-color: rgba(15, 23, 42, .10);
  background: rgba(255, 255, 255, .82);
}

body:not(.admin-view):not(.agent-view) .rule-card strong {
  color: var(--text);
  font-size: 13px;
  line-height: 1.25;
}

body:not(.admin-view):not(.agent-view) .rule-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.42;
}

body:not(.admin-view):not(.agent-view) .rules-detail {
  border: 1px solid rgba(255, 255, 255, .085);
  border-radius: 10px;
  background: rgba(255, 255, 255, .026);
  overflow: hidden;
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .rules-detail {
  border-color: rgba(15, 23, 42, .10);
  background: rgba(255, 255, 255, .72);
}

body:not(.admin-view):not(.agent-view) .rules-detail summary {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  cursor: pointer;
  color: var(--text);
  font-size: 13px;
  font-weight: 820;
  list-style: none;
}

body:not(.admin-view):not(.agent-view) .rules-detail summary::-webkit-details-marker {
  display: none;
}

body:not(.admin-view):not(.agent-view) .rules-detail summary::before {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(-45deg);
  transition: transform .18s ease;
}

body:not(.admin-view):not(.agent-view) .rules-detail[open] summary::before {
  transform: rotate(45deg);
}

body:not(.admin-view):not(.agent-view) .rules-detail summary small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

body:not(.admin-view):not(.agent-view) .rules-detail ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 16px;
  margin: 0;
  padding: 0 12px 12px 28px;
}

body:not(.admin-view):not(.agent-view) .rules-detail li {
  color: var(--soft);
  font-size: 12px;
  line-height: 1.42;
}

body:not(.admin-view):not(.agent-view) .trade-modes {
  gap: 10px;
}

body:not(.admin-view):not(.agent-view) .buy-mode-card {
  min-height: 126px;
  padding: 12px;
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.016)),
    rgba(8, 14, 20, .92);
}

body:not(.admin-view):not(.agent-view) .buy-mode-card.is-high {
  border-color: rgba(48, 209, 88, .25);
}

body:not(.admin-view):not(.agent-view) .buy-mode-card .offer-top {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

body:not(.admin-view):not(.agent-view) .offer-label {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  color: var(--text);
  font-size: 15px;
  font-weight: 850;
}

body:not(.admin-view):not(.agent-view) .offer-market {
  display: block;
  margin-top: 3px;
  color: #eaf2ff;
  font-size: 12.5px;
  line-height: 1.28;
  font-weight: 760;
  overflow-wrap: anywhere;
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .offer-market {
  color: #182235;
}

body:not(.admin-view):not(.agent-view) .buy-mode-card .offer-hint {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.28;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

body:not(.admin-view):not(.agent-view) .offer-badges {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 5px;
  flex-wrap: wrap;
}

body:not(.admin-view):not(.agent-view) .pill.neutral {
  color: var(--soft);
  border-color: var(--line-soft);
  background: rgba(255,255,255,.045);
}

body:not(.admin-view):not(.agent-view) .stock-pill {
  max-width: 126px;
}

body:not(.admin-view):not(.agent-view) .buy-mode-card .buy-controls {
  grid-template-columns: minmax(86px, .34fr) 88px minmax(150px, 1fr);
  align-items: end;
  gap: 9px;
  margin-top: 9px;
}

body:not(.admin-view):not(.agent-view) .buy-mode-card .price-line {
  color: #8ff5b7;
  font-size: 25px;
}

body:not(.admin-view):not(.agent-view) .buy-mode-card .batch-field {
  gap: 3px;
}

body:not(.admin-view):not(.agent-view) .buy-mode-card .batch-field .input {
  height: 34px;
}

body:not(.admin-view):not(.agent-view) .buy-mode-card .btn.wide {
  min-height: 38px;
}

@media (max-width: 1180px) {
  body:not(.admin-view):not(.agent-view) .workbench-rules {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  body:not(.admin-view):not(.agent-view) .trade-header {
    grid-template-columns: 1fr;
  }

  body:not(.admin-view):not(.agent-view) .trade-steps {
    justify-content: flex-start;
  }

  body:not(.admin-view):not(.agent-view) .workbench-rules,
  body:not(.admin-view):not(.agent-view) .trade-modes {
    grid-template-columns: 1fr;
  }

  body:not(.admin-view):not(.agent-view) .rules-detail summary {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  body:not(.admin-view):not(.agent-view) .rules-detail summary::before {
    display: none;
  }

  body:not(.admin-view):not(.agent-view) .rules-detail ul {
    grid-template-columns: 1fr;
  }

  body:not(.admin-view):not(.agent-view) .buy-mode-card .offer-top {
    grid-template-columns: 1fr;
  }

  body:not(.admin-view):not(.agent-view) .offer-badges {
    justify-content: flex-start;
  }

  body:not(.admin-view):not(.agent-view) .buy-mode-card .buy-controls {
    grid-template-columns: 1fr 1fr;
  }

  body:not(.admin-view):not(.agent-view) .buy-mode-card .price-line,
  body:not(.admin-view):not(.agent-view) .buy-mode-card .btn.wide {
    grid-column: 1 / -1;
  }
}

/* User 20260606d: unified AI raster brand icon and consistent utility buttons. */
.brand-icon,
.brand-badge img,
.seo-brand img {
  object-fit: cover;
  background: #050a0f;
}

body:not(.admin-view):not(.agent-view) .brand-icon,
body:not(.admin-view):not(.agent-view) .brand-badge img {
  border-radius: 10px;
  background: #050a0f;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, .10),
    0 8px 22px rgba(0, 0, 0, .28);
}

body:not(.admin-view):not(.agent-view) .nav-utility {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

body:not(.admin-view):not(.agent-view) .nav-utility .btn.secondary.navbtn {
  flex: 0 0 82px;
  width: 82px;
  min-width: 82px;
  height: 38px;
  min-height: 38px;
  justify-content: center;
  gap: 7px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
}

body:not(.admin-view):not(.agent-view) .nav-utility .btn.secondary.navbtn svg {
  flex: 0 0 15px;
  width: 15px;
  height: 15px;
}

body:not(.admin-view):not(.agent-view) .nav-utility .btn.secondary.navbtn span,
body:not(.admin-view):not(.agent-view) .nav-utility .btn.secondary.lang-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

@media (max-width: 760px) {
  body:not(.admin-view):not(.agent-view) .nav-utility .btn.secondary.navbtn {
    flex-basis: 78px;
    width: 78px;
    min-width: 78px;
    padding: 0 8px;
  }

  body:not(.admin-view):not(.agent-view) .nav-utility .btn.secondary.navbtn span {
    display: inline-flex;
  }
}

/* Digital store / free tools */
.market-page .section-title { align-items: flex-start; }
.market-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:14px; margin-top:16px; }
.market-card { display:flex; flex-direction:column; gap:12px; padding:16px; border:1px solid var(--line-soft); border-radius:18px; background:linear-gradient(145deg, rgba(255,255,255,.055), rgba(255,255,255,.025)); box-shadow:var(--shadow-soft); }
.market-card-head { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; }
.market-card-head h3 { margin:0 0 4px; font-size:18px; }
.market-card-head p, .market-desc { margin:0; color:var(--muted); line-height:1.55; }
.market-card-head strong { white-space:nowrap; color:var(--accent-strong); font-size:18px; }
.market-meta { display:flex; flex-wrap:wrap; gap:8px; }
.market-meta span { display:inline-flex; align-items:center; min-height:28px; padding:5px 9px; border:1px solid rgba(255,255,255,.1); border-radius:999px; color:var(--muted); background:rgba(7,11,16,.42); font-size:12px; font-weight:800; }
.market-history { margin-top:16px; }
.market-order-row { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 0; border-top:1px solid var(--line-soft); }
.market-order-row span { display:grid; gap:3px; }
.market-order-row small { color:var(--muted); }
.market-order-row .positive { color:var(--success); font-weight:900; text-align:right; }
.market-order-row .negative { color:var(--danger); font-weight:900; text-align:right; }
.fingerprint-feature-list { margin:0; padding:0; display:grid; gap:7px; list-style:none; color:var(--text); font-size:13px; line-height:1.45; }
.fingerprint-feature-list li { position:relative; padding-left:18px; overflow-wrap:anywhere; }
.fingerprint-feature-list li::before { content:""; position:absolute; left:0; top:.62em; width:7px; height:7px; border-radius:999px; background:var(--accent-strong); box-shadow:0 0 0 3px rgba(50,209,127,.12); }
.fingerprint-feature-list.compact { gap:5px; color:var(--muted); font-size:12px; }
.fingerprint-product-card .market-card-head strong { color:var(--success); }
.fingerprint-buy-foot { grid-template-columns:minmax(92px, .8fr) minmax(118px, 1fr); align-items:center; gap:10px; padding:10px; border-color:rgba(75, 162, 255, .22); background:linear-gradient(135deg, rgba(8, 14, 24, .86), rgba(10, 21, 34, .72)); }
.fingerprint-buy-box { grid-template-columns:minmax(96px, .75fr) minmax(120px, .95fr) minmax(130px, 1fr); }
.fingerprint-price-box { display:grid; gap:2px; min-width:0; }
.fingerprint-price-box span,
.fingerprint-price-box small { color:var(--muted); font-size:12px; font-weight:800; }
.fingerprint-price-box strong { color:var(--success); font-size:22px; line-height:1.05; white-space:nowrap; }
.fingerprint-buy-actions { display:flex; justify-content:flex-end; min-width:0; }
.fingerprint-buy-actions .btn { width:100%; min-height:46px; padding-inline:12px; white-space:normal; }
.fingerprint-product-card .row-actions { display:none; }
.fingerprint-detail-actions { display:none; }
.market-order-actions { display:flex; align-items:center; justify-content:flex-end; gap:8px; flex-wrap:wrap; }
.market-cdk-code { display:inline-flex; width:max-content; max-width:100%; padding:5px 8px; border:1px solid var(--line-soft); border-radius:8px; color:var(--accent-strong); background:rgba(7,11,16,.48); overflow-wrap:anywhere; white-space:normal; }
.fingerprint-order-row { align-items:flex-start; }
.purchase-confirm-backdrop { position:fixed; inset:0; z-index:95; display:flex; align-items:center; justify-content:center; padding:18px; background:rgba(0,0,0,.68); backdrop-filter:blur(12px); }
.purchase-confirm-modal { position:relative; width:min(440px, 94vw); display:grid; gap:16px; padding:20px; border:1px solid rgba(75, 162, 255, .34); border-radius:18px; background:linear-gradient(180deg, rgba(18,27,37,.98), rgba(8,13,20,.98)); box-shadow:0 28px 90px rgba(0,0,0,.5); }
.purchase-confirm-head { display:grid; gap:6px; padding-right:36px; }
.purchase-confirm-head h3,
.purchase-confirm-head p { margin:0; }
.purchase-confirm-head h3 { font-size:22px; line-height:1.2; }
.purchase-confirm-head p { color:var(--muted); line-height:1.45; }
.purchase-confirm-summary { display:grid; gap:8px; padding:12px; border:1px solid var(--line-soft); border-radius:12px; background:rgba(255,255,255,.035); }
.purchase-confirm-summary div { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.purchase-confirm-summary span { color:var(--muted); font-size:12px; font-weight:850; }
.purchase-confirm-summary strong { color:var(--text); text-align:right; overflow-wrap:anywhere; }
.purchase-confirm-summary div:last-child strong { color:var(--success); font-size:20px; }
.purchase-confirm-note { margin:0; color:var(--muted); line-height:1.55; font-size:13px; }
.purchase-confirm-actions { display:flex; justify-content:flex-end; gap:10px; }
@media (max-width: 520px) {
  .fingerprint-buy-box {
    grid-template-columns: 1fr;
  }
  .fingerprint-buy-actions {
    justify-content: stretch;
  }
}
.market-admin-form { overflow:hidden; }
.market-page .section-title { margin-bottom: 8px; }
.market-grid { grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); }
.market-card { padding:14px; }
.market-thumb { height:130px; border-radius:16px; display:flex; align-items:flex-end; justify-content:flex-start; padding:12px; color:#fff; font-weight:900; letter-spacing:.04em; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.market-thumb span { display:inline-flex; align-items:center; padding:4px 8px; border-radius:999px; background:rgba(0,0,0,.38); backdrop-filter: blur(10px); font-size:12px; }
.store-thumb { background:linear-gradient(145deg, rgba(37,99,235,.9), rgba(14,165,233,.65)); }
.tool-thumb { background:linear-gradient(145deg, rgba(16,185,129,.9), rgba(59,130,246,.65)); }
.market-card-head h3 { font-size:16px; line-height:1.25; }
.market-card-head p { font-size:12px; }
.market-meta span { font-size:11px; }
.market-desc { display:none; }
.market-tabs { display:flex; flex-wrap:wrap; gap:8px; margin:12px 0 10px; }
.market-tabs button { min-width:54px; min-height:34px; border:1px solid var(--line-soft); border-radius:999px; color:var(--muted); background:rgba(255,255,255,.045); font-weight:900; cursor:pointer; }
.market-tabs button.active { color:#fff; border-color:rgba(59,130,246,.75); background:linear-gradient(135deg,#2563eb,#0ea5e9); box-shadow:0 10px 24px rgba(37,99,235,.24); }
.market-thumb { width:100%; border:0; cursor:pointer; overflow:hidden; position:relative; }
.market-thumb img, .market-modal-image img { width:100%; height:100%; object-fit:cover; display:block; border-radius:inherit; }
.market-thumb:hover { transform:translateY(-1px); filter:brightness(1.05); }
.market-modal-backdrop { position:fixed; inset:0; z-index:80; display:flex; align-items:center; justify-content:center; padding:18px; background:rgba(0,0,0,.72); backdrop-filter:blur(14px); }
.market-modal { position:relative; display:grid; grid-template-columns:minmax(220px,360px) minmax(280px,420px); gap:18px; width:min(860px,96vw); max-height:88vh; overflow:auto; padding:18px; border:1px solid var(--line-soft); border-radius:24px; background:var(--panel); box-shadow:0 30px 90px rgba(0,0,0,.45); }
.market-modal-image { min-height:260px; border-radius:20px; display:flex; align-items:flex-end; padding:14px; color:#fff; font-weight:900; }
.market-modal-body { display:flex; flex-direction:column; gap:14px; }
.market-modal-body h2 { margin:0; font-size:clamp(26px,4vw,44px); line-height:1.08; }
.market-detail-desc { color:var(--text); line-height:1.7; margin:0; white-space:pre-line; overflow-wrap:anywhere; }
.modal-x { position:absolute; top:10px; right:10px; width:36px; height:36px; border:1px solid var(--line-soft); border-radius:999px; display:grid; place-items:center; color:var(--text); background:rgba(255,255,255,.08); cursor:pointer; }
.modal-x svg { width:18px; height:18px; }
@media (max-width: 760px) { .market-modal { grid-template-columns:1fr; } .market-modal-image { min-height:180px; } }

/* User 20260612c: marketplace-style 商品 / 免费工具 UX. */
.market-page {
  display: grid;
  gap: 12px;
  overflow: hidden;
}

.market-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(59, 130, 246, .22);
  border-radius: 18px;
  background:
    radial-gradient(circle at 82% 8%, rgba(59, 130, 246, .28), transparent 32%),
    linear-gradient(135deg, rgba(15, 23, 42, .74), rgba(2, 8, 23, .38));
}

.market-hero h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -.04em;
}

.market-hero .muted {
  max-width: 720px;
  margin-top: 3px;
  line-height: 1.45;
  font-size: 13px;
}

.market-hero-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.market-points-chip {
  min-width: 112px;
  padding: 7px 10px;
  border: 1px solid rgba(34, 197, 94, .32);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(22, 163, 74, .18), rgba(14, 165, 233, .08));
}

.market-points-chip span,
.market-points-note small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.market-points-chip strong {
  display: block;
  margin-top: 2px;
  color: var(--green2);
  font-size: 20px;
  line-height: 1;
}

.market-points-note {
  display: flex;
  align-items: center;
  gap: 6px 10px;
  flex-wrap: wrap;
  padding: 8px 12px;
  border: 1px solid rgba(34, 197, 94, .18);
  border-radius: 14px;
  background: rgba(6, 78, 59, .14);
  color: var(--muted);
}

.market-points-note strong {
  color: var(--text);
}

.market-points-note span {
  flex: 1 1 360px;
}

.market-points-buy {
  display: grid;
  grid-template-columns: minmax(180px, .7fr) minmax(320px, 1.3fr);
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid rgba(59, 130, 246, .18);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(37, 99, 235, .10), rgba(16, 185, 129, .07));
}

.market-points-buy strong {
  display: block;
  color: var(--text);
  font-size: 15px;
}

.market-points-buy span,
.market-points-buy small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.points-buy-form {
  display: grid;
  grid-template-columns: minmax(110px, 150px) minmax(130px, 1fr) auto auto;
  gap: 8px;
  align-items: end;
}

.compact-field {
  margin: 0;
}

.points-buy-total {
  display: grid;
  gap: 2px;
  min-height: 44px;
  padding: 6px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(2, 8, 23, .28);
}

.points-buy-confirm {
  grid-column: span 2;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-height: 44px;
  padding: 6px 8px;
  border: 1px solid rgba(34, 197, 94, .26);
  border-radius: 12px;
  background: rgba(6, 78, 59, .14);
}

.points-buy-confirm span {
  flex: 1 1 auto;
  color: var(--text);
  font-weight: 800;
}

.points-buy-total strong {
  color: var(--green2);
  line-height: 1;
}

.market-controls {
  display: grid;
  gap: 8px;
}

.market-mode-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 4px;
  border: 1px solid rgba(59, 130, 246, .20);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(15, 23, 42, .80), rgba(2, 8, 23, .50));
}

.market-mode-tabs button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--muted);
  background: transparent;
  font-weight: 950;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}

.market-mode-tabs button:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, .11);
  background: rgba(255, 255, 255, .045);
}

.market-mode-tabs button.active {
  color: #fff;
  border-color: rgba(59, 130, 246, .55);
  background: linear-gradient(135deg, rgba(37, 99, 235, .95), rgba(14, 165, 233, .86));
  box-shadow: 0 14px 30px rgba(37, 99, 235, .24);
}

.market-mode-tabs small {
  min-width: 22px;
  padding: 2px 7px;
  border-radius: 999px;
  color: rgba(255,255,255,.88);
  background: rgba(255,255,255,.14);
  font-size: 11px;
}

.market-tabs {
  margin: 0;
  padding: 4px;
  border: 1px solid var(--line-soft);
  border-radius: 15px;
  background: rgba(2, 8, 23, .34);
}

.market-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 999px;
}

.market-tabs button small {
  min-width: 20px;
  padding: 2px 6px;
  border-radius: 999px;
  color: rgba(255,255,255,.86);
  background: rgba(255,255,255,.12);
  font-size: 11px;
}

.market-filter-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(150px, 210px) auto;
  gap: 8px;
  align-items: center;
}

.market-filter-row .input {
  min-height: 38px;
}

.layout-toggle {
  display: inline-flex;
  padding: 4px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: rgba(255,255,255,.04);
}

.layout-toggle button {
  min-height: 34px;
  padding: 7px 11px;
  border: 0;
  border-radius: 10px;
  color: var(--muted);
  background: transparent;
  font-weight: 900;
  cursor: pointer;
}

.layout-toggle button.active {
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
}

.market-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.market-card {
  gap: 0;
  padding: 0;
  overflow: hidden;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.025)),
    rgba(6, 10, 16, .82);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.market-card:hover {
  transform: translateY(-2px);
  border-color: rgba(96, 165, 250, .42);
  box-shadow: 0 24px 60px rgba(2, 8, 23, .34);
}

.market-card.locked {
  border-style: dashed;
  opacity: .9;
}

.market-card-body {
  display: grid;
  gap: 9px;
  padding: 11px;
}

.market-thumb {
  height: 118px;
  border-radius: 0;
}

.market-kicker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: none;
}

.market-card-head h3 {
  font-size: 15px;
}

.market-card-head p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.market-card-head strong {
  color: var(--green2);
  font-size: 17px;
}

.market-card-foot,
.market-buy-box {
  display: grid;
  grid-template-columns: minmax(116px, auto) 1fr;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line-soft);
  border-radius: 13px;
  background: rgba(2, 8, 23, .38);
}

.market-buy-box {
  grid-template-columns: minmax(90px, .65fr) minmax(140px, auto) minmax(90px, .65fr);
}

.market-buy-box > div {
  display: grid;
  gap: 4px;
}

.market-buy-box span,
.market-total {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.market-buy-box strong {
  color: var(--green2);
  font-size: 22px;
}

.market-card-foot.fingerprint-buy-foot {
  grid-template-columns: minmax(64px, .56fr) minmax(92px, 1fr);
  gap: 10px;
  padding: 10px;
  border-color: rgba(75, 162, 255, .24);
  background: linear-gradient(135deg, rgba(8, 14, 24, .9), rgba(10, 21, 34, .74));
}

.market-buy-box.fingerprint-buy-box {
  grid-template-columns: minmax(96px, .72fr) minmax(120px, .95fr) minmax(132px, 1fr);
  border-color: rgba(75, 162, 255, .24);
  background: linear-gradient(135deg, rgba(8, 14, 24, .9), rgba(10, 21, 34, .74));
}

.fingerprint-price-box {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.fingerprint-price-box span,
.fingerprint-price-box small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.fingerprint-price-box strong {
  color: var(--green2);
  font-size: 22px;
  line-height: 1.05;
  white-space: nowrap;
}

.fingerprint-buy-actions {
  display: flex;
  min-width: 0;
  justify-content: flex-end;
}

.fingerprint-buy-actions .btn {
  width: 100%;
  min-height: 44px;
  padding-inline: 10px;
  white-space: normal;
}

.fingerprint-product-card .row-actions,
.fingerprint-detail-actions {
  display: none;
}

@media (max-width: 520px) {
  .market-buy-box.fingerprint-buy-box {
    grid-template-columns: 1fr;
  }
}

.quantity-compact {
  display: inline-grid;
  grid-template-columns: 30px 52px 30px;
  align-items: center;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255,255,255,.035);
}

.quantity-compact.large {
  grid-template-columns: 42px 72px 42px;
}

.quantity-compact button {
  min-height: 32px;
  border: 0;
  color: var(--text);
  background: rgba(255,255,255,.055);
  font-size: 18px;
  font-weight: 950;
  cursor: pointer;
}

.quantity-compact button:disabled {
  opacity: .35;
  cursor: not-allowed;
}

.quantity-compact .input {
  min-height: 32px;
  padding: 0 4px;
  border: 0;
  border-left: 1px solid var(--line-soft);
  border-right: 1px solid var(--line-soft);
  border-radius: 0;
  text-align: center;
  font-weight: 900;
}

.market-total {
  justify-self: end;
  color: var(--green2);
  font-size: 12px;
}

.market-table table {
  min-width: 860px;
}

.market-table td strong,
.market-table td small {
  display: block;
}

.market-table td small {
  margin-top: 4px;
  color: var(--muted);
}

.market-modal {
  width: min(960px, 96vw);
  grid-template-columns: minmax(260px, 420px) minmax(300px, 1fr);
}

.market-modal-image {
  min-height: 360px;
}

.market-modal-body {
  gap: 16px;
}

.gpt-checkout-thumb {
  background:
    radial-gradient(circle at 18% 18%, rgba(34, 197, 94, .32), transparent 30%),
    linear-gradient(135deg, #2563eb, #0f766e 58%, #111827);
}

.gpt-checkout-inline {
  display: grid;
  grid-template-columns: minmax(190px, 340px) minmax(0, 1fr);
  gap: 16px;
  padding: 18px;
  border: 1px solid rgba(59, 130, 246, .22);
  border-radius: 22px;
  background:
    radial-gradient(circle at 92% 4%, rgba(34, 197, 94, .14), transparent 34%),
    linear-gradient(135deg, rgba(15, 23, 42, .82), rgba(2, 8, 23, .46));
  box-shadow: 0 18px 46px rgba(2, 8, 23, .24);
}

.gpt-checkout-inline-art {
  min-height: 470px;
  display: grid;
  align-items: stretch;
  padding: 0;
  border-radius: 20px;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 18%, rgba(129, 140, 248, .18), transparent 30%),
    linear-gradient(135deg, #2f2f2f 0%, #2b2b2b 48%, #111827 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}

.gpt-plan-preview-card {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 24px 24px 18px;
  min-height: 100%;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,0) 42%),
    #303030;
}

.gpt-plan-preview-card h4 {
  margin: 0;
  font-size: 26px;
  line-height: 1.12;
  letter-spacing: -.035em;
}

.gpt-plan-preview-card p {
  margin: 2px 0 0;
  font-size: 12px;
  color: rgba(255,255,255,.9);
  font-weight: 900;
}

.gpt-plan-preview-card ul {
  display: grid;
  gap: 11px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.gpt-plan-preview-card li {
  position: relative;
  padding-left: 25px;
  color: rgba(255,255,255,.92);
  font-size: 12px;
  font-weight: 850;
}

.gpt-plan-preview-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  width: 13px;
  height: 13px;
  border-radius: 999px;
  border: 1px solid rgba(167, 139, 250, .9);
  box-shadow: inset 0 0 0 3px rgba(167, 139, 250, .18);
}

.gpt-plan-preview-divider {
  height: 1px;
  margin: 10px 0 2px;
  background: rgba(255,255,255,.18);
}

.gpt-plan-preview-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  color: rgba(255,255,255,.92);
  font-size: 12px;
  font-weight: 850;
}

.gpt-plan-preview-row b {
  color: #fff;
  font-weight: 950;
  text-align: right;
}

.gpt-plan-preview-cta {
  margin-top: 8px;
  display: grid;
  place-items: center;
  min-height: 44px;
  border-radius: 999px;
  color: #0b0b0b;
  background: #f8fafc;
  font-weight: 950;
  box-shadow: 0 14px 30px rgba(2, 8, 23, .22);
}

.gpt-checkout-inline-body {
  display: grid;
  gap: 12px;
  align-content: start;
}

.gpt-checkout-inline-body h3 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.06;
  letter-spacing: -.05em;
}

.gpt-token-field textarea {
  min-height: 128px;
  max-height: 220px;
  overflow: auto;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.gpt-checkout-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: rgba(2, 8, 23, .32);
}

.gpt-checkout-tabs button {
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 11px;
  color: var(--muted);
  background: transparent;
  font-weight: 900;
  cursor: pointer;
}

.gpt-checkout-tabs button.active {
  color: #fff;
  border-color: rgba(34, 197, 94, .42);
  background: linear-gradient(135deg, rgba(37, 99, 235, .94), rgba(16, 185, 129, .82));
}

.gpt-checkout-note,
.gpt-checkout-help,
.gpt-checkout-result {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(34, 197, 94, .20);
  border-radius: 14px;
  background: rgba(6, 78, 59, .14);
}

.gpt-checkout-note strong,
.gpt-checkout-result-head strong {
  color: var(--text);
}

.gpt-checkout-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.gpt-checkout-stats span {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 12px;
  background: rgba(15, 23, 42, .38);
}

.gpt-checkout-stats b {
  color: var(--text);
  font-size: 16px;
}

.gpt-checkout-stats small {
  color: var(--muted);
  font-size: 11px;
}

.gpt-checkout-help summary {
  cursor: pointer;
  color: var(--accent-strong);
  font-weight: 900;
}

.gpt-checkout-help div {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
  white-space: pre-line;
}

.gpt-checkout-note span,
.gpt-checkout-result small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.gpt-checkout-result-head,
.copy-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

.gpt-checkout-result-head {
  justify-content: space-between;
}

.copy-line .input {
  flex: 1 1 auto;
  min-width: 0;
}

.market-ledger-pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 10px;
}

.market-ledger-pager span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

@media (max-width: 820px) {
  .market-hero,
  .market-filter-row,
  .market-card-foot,
  .market-buy-box,
  .market-points-buy,
  .points-buy-form,
  .gpt-checkout-tabs,
  .copy-line {
    grid-template-columns: 1fr;
  }
  .points-buy-confirm {
    grid-column: auto;
    align-items: stretch;
    flex-direction: column;
  }
  .market-hero {
    display: grid;
  }
  .market-hero-actions,
  .market-total {
    justify-self: stretch;
  }
  .market-hero-actions {
    display: grid;
  }
  .market-points-chip {
    width: 100%;
  }
  .market-filter-row .layout-toggle {
    width: 100%;
  }
  .layout-toggle button {
    flex: 1;
  }
  .market-modal {
    grid-template-columns: 1fr;
  }
  .market-modal-image {
    min-height: 210px;
  }
  .gpt-checkout-inline {
    grid-template-columns: 1fr;
  }
  .gpt-checkout-inline-art {
    min-height: auto;
  }
  .gpt-plan-preview-card {
    min-height: auto;
    padding: 20px;
  }
  .copy-line {
    display: grid;
  }
}

/* User 20260613e: light theme contrast for 商品 / 免费工具 pages. */
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-page {
  color: #0f172a;
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-hero {
  border-color: rgba(37, 99, 235, .18);
  background:
    radial-gradient(circle at 84% 6%, rgba(59, 130, 246, .18), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, .98), rgba(239, 246, 255, .92));
  box-shadow: 0 18px 42px rgba(15, 23, 42, .08);
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-hero h2,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-card-head h3,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-modal-body h2,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-detail-desc {
  color: #0f172a;
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-hero .label,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-hero .muted,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-card-head p,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-kicker,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-desc,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-buy-box span,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-table td small {
  color: #475569;
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-mode-tabs,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-tabs,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .layout-toggle {
  border-color: rgba(148, 163, 184, .32);
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 10px 28px rgba(15, 23, 42, .06);
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-mode-tabs button,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-tabs button,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .layout-toggle button {
  color: #475569;
  background: rgba(248, 250, 252, .96);
  border-color: rgba(226, 232, 240, .95);
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-mode-tabs button:hover,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-tabs button:hover,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .layout-toggle button:hover {
  color: #0f172a;
  border-color: rgba(37, 99, 235, .28);
  background: #ffffff;
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-mode-tabs button.active,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-tabs button.active,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .layout-toggle button.active {
  color: #ffffff;
  border-color: rgba(37, 99, 235, .48);
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  box-shadow: 0 12px 26px rgba(37, 99, 235, .22);
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-mode-tabs small,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-tabs button small {
  color: #334155;
  background: rgba(226, 232, 240, .9);
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-mode-tabs button.active small,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-tabs button.active small {
  color: #ffffff;
  background: rgba(255, 255, 255, .22);
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-card {
  border-color: rgba(203, 213, 225, .88);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(248, 250, 252, .96)),
    #ffffff;
  box-shadow: 0 16px 36px rgba(15, 23, 42, .08);
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-card:hover {
  border-color: rgba(37, 99, 235, .34);
  box-shadow: 0 20px 46px rgba(15, 23, 42, .12);
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-card.locked {
  border-color: rgba(148, 163, 184, .75);
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(248,250,252,.94));
  opacity: 1;
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-card-head strong,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-total,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-points-chip strong {
  color: #16a34a;
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-meta span,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-card-foot,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-buy-box,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .quantity-compact {
  color: #475569;
  border-color: rgba(203, 213, 225, .9);
  background: rgba(248, 250, 252, .92);
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .quantity-compact button {
  color: #0f172a;
  background: rgba(226, 232, 240, .65);
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-points-chip {
  border-color: rgba(22, 163, 74, .22);
  background: linear-gradient(135deg, rgba(220, 252, 231, .82), rgba(239, 246, 255, .82));
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-points-note {
  color: #475569;
  border-color: rgba(22, 163, 74, .18);
  background: rgba(240, 253, 244, .72);
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-points-note strong {
  color: #14532d;
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-points-buy,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .points-buy-total,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .gpt-checkout-inline,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .gpt-checkout-tabs,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .gpt-checkout-stats span,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .points-buy-confirm,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .gpt-checkout-note,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .gpt-checkout-help,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .gpt-checkout-result {
  color: #0f172a;
  border-color: rgba(203, 213, 225, .9);
  background: rgba(248, 250, 252, .92);
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-points-buy strong,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .gpt-checkout-inline-body h3,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .gpt-checkout-stats b,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .points-buy-confirm span,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .gpt-checkout-note strong,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .gpt-checkout-result-head strong {
  color: #0f172a;
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-points-buy span,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-points-buy small,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .gpt-checkout-stats small,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-ledger-pager span,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .gpt-checkout-note span,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .gpt-checkout-help div,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .gpt-checkout-result small {
  color: #475569;
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .gpt-checkout-tabs button {
  color: #475569;
  background: #ffffff;
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .gpt-checkout-tabs button.active {
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #10b981);
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-modal {
  color: #0f172a;
  border-color: rgba(203, 213, 225, .95);
  background: #ffffff;
  box-shadow: 0 30px 90px rgba(15, 23, 42, .22);
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .modal-x {
  color: #0f172a;
  border-color: rgba(203, 213, 225, .95);
  background: rgba(255, 255, 255, .92);
}

/* User 20260612b: compact non-blocking workbench announcement and flexible number-window labels. */
.soft-countdown {
  display: inline-flex;
  align-items: center;
  color: var(--accent-strong);
  font-weight: 950;
}

.mini-announcement {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(56, 189, 248, .22);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(14, 165, 233, .14), rgba(16, 185, 129, .07)),
    rgba(7, 11, 16, .58);
  box-shadow: 0 14px 34px rgba(2, 8, 23, .22);
}

.mini-announcement-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.mini-announcement-head > div {
  display: grid;
  gap: 3px;
}

.mini-announcement-head strong {
  color: var(--text);
  font-size: 15px;
}

.mini-announcement-head span,
.mini-announcement-grid span,
.mini-announcement-detail {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.mini-announcement .icon-btn {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
}

.mini-announcement-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.mini-announcement-grid > div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, .075);
  border-radius: 14px;
  background: rgba(5, 8, 12, .34);
}

.mini-announcement-grid b {
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-announcement-detail {
  border-top: 1px solid rgba(255, 255, 255, .08);
  padding-top: 8px;
}

.mini-announcement-detail summary {
  width: fit-content;
  cursor: pointer;
  color: var(--accent-strong);
  font-weight: 900;
}

.mini-announcement-detail ul {
  display: grid;
  gap: 4px;
  margin: 8px 0 0;
  padding-left: 18px;
}

html[data-theme="light"] .mini-announcement {
  background:
    linear-gradient(135deg, rgba(14, 165, 233, .10), rgba(16, 185, 129, .05)),
    rgba(255, 255, 255, .86);
  box-shadow: 0 14px 32px rgba(15, 23, 42, .08);
}

html[data-theme="light"] .mini-announcement-grid > div {
  background: rgba(255, 255, 255, .58);
}

@media (max-width: 980px) {
  .mini-announcement-grid {
    grid-template-columns: 1fr;
  }
}

/* Admin 20260612d: clearer 商品 / 免费工具 management workbench. */
.market-admin-shell {
  display: grid;
  grid-template-columns: minmax(300px, 390px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.market-admin-metrics {
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  gap: 10px;
}

.market-admin-metrics .metric-card {
  min-height: 104px;
  padding: 14px;
}

.market-admin-metrics .metric {
  font-size: clamp(22px, 2.2vw, 30px);
}

.market-admin-list-card,
.market-admin-editor-card {
  min-width: 0;
}

.market-admin-list-card {
  position: sticky;
  top: 82px;
  max-height: calc(100vh - 108px);
  overflow: hidden;
  display: grid;
  gap: 12px;
}

.market-admin-type-tabs,
.market-admin-filters,
.market-admin-create-row,
.market-editor-guide,
.market-editor-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.market-admin-type-tabs {
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.035);
}

.market-admin-type-tabs button {
  flex: 1 1 120px;
  min-height: 40px;
  border: 0;
  border-radius: 10px;
  padding: 8px 10px;
  color: var(--muted);
  background: transparent;
  font-weight: 950;
  cursor: pointer;
}

.market-admin-type-tabs button.active {
  color: var(--text);
  background: linear-gradient(135deg, rgba(10,132,255,.28), rgba(48,209,88,.14));
  box-shadow: inset 0 0 0 1px rgba(100,210,255,.22);
}

.market-admin-type-tabs small {
  margin-left: 5px;
  color: var(--soft);
}

.market-admin-filters {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 108px 118px auto;
}

.market-admin-create-row {
  justify-content: space-between;
  padding-top: 2px;
}

.market-admin-list {
  display: grid;
  gap: 8px;
  overflow: auto;
  padding-right: 2px;
}

.market-admin-row-wrap {
  position: relative;
  display: grid;
}

.market-admin-row {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  align-items: start;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  padding: 12px;
  color: var(--text);
  background: rgba(4, 14, 19, .58);
  text-align: left;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}

.market-admin-row-delete {
  position: absolute;
  right: 10px;
  bottom: 10px;
  min-height: 30px;
  padding: 4px 9px;
}

.market-admin-row:hover,
.market-admin-row.active {
  border-color: rgba(100,210,255,.45);
  background: rgba(10,132,255,.10);
}

.market-admin-row:active {
  transform: translateY(1px);
}

.market-admin-row-main,
.market-admin-row-side,
.market-admin-row-meta {
  min-width: 0;
}

.market-admin-row-main strong,
.market-admin-row-main small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.market-admin-row-main small,
.market-admin-row-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.market-admin-row-side {
  display: grid;
  justify-items: end;
  gap: 6px;
}

.market-admin-row-side b {
  color: var(--green2);
  font-size: 13px;
}

.market-admin-row-meta {
  grid-column: 1 / -1;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.market-admin-row-meta span {
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 4px 7px;
  background: rgba(255,255,255,.035);
}

.market-editor-form {
  border: 0;
  padding: 0;
  background: transparent;
}

.market-editor-title {
  align-items: flex-start;
}

.market-editor-title > div {
  min-width: 0;
}

.market-editor-guide {
  margin: 10px 0 14px;
}

.market-editor-guide span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--muted);
  background: rgba(255,255,255,.035);
  font-size: 12px;
  font-weight: 900;
}

.market-editor-guide b {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  color: #04131d;
  background: var(--cyan);
  font-size: 11px;
}

.market-editor-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.market-editor-grid .wide-field {
  grid-column: 1 / -1;
}

.market-editor-actions {
  justify-content: flex-end;
  margin-top: 14px;
}

@media (max-width: 1080px) {
  .market-admin-shell {
    grid-template-columns: 1fr;
  }
  .market-admin-list-card {
    position: relative;
    top: auto;
    max-height: none;
  }
}

@media (max-width: 720px) {
  .market-admin-filters,
  .market-editor-grid {
    grid-template-columns: 1fr;
  }
}

/* User 20260613f: hard light-mode override for user 商品 / 免费工具 pages. */
html[data-theme="light"] body:not(.admin-view):not(.agent-view) section.panel-card.market-page,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-store-page,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-tools-page {
  color: #0f172a !important;
  background: rgba(255, 255, 255, .94) !important;
  border-color: rgba(203, 213, 225, .86) !important;
  box-shadow: 0 20px 56px rgba(15, 23, 42, .10) !important;
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-page .market-hero {
  color: #0f172a !important;
  border-color: rgba(37, 99, 235, .20) !important;
  background:
    radial-gradient(circle at 84% 8%, rgba(37, 99, 235, .16), transparent 34%),
    linear-gradient(135deg, #ffffff 0%, #eff6ff 100%) !important;
  box-shadow: 0 14px 36px rgba(15, 23, 42, .08) !important;
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-page .market-mode-tabs,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-page .market-tabs,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-page .layout-toggle {
  border-color: rgba(203, 213, 225, .92) !important;
  background: #f8fafc !important;
  box-shadow: none !important;
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-page .market-mode-tabs button:not(.active),
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-page .market-tabs button:not(.active),
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-page .layout-toggle button:not(.active) {
  color: #475569 !important;
  border-color: rgba(226, 232, 240, .98) !important;
  background: #ffffff !important;
  box-shadow: none !important;
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-page .market-mode-tabs button.active,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-page .market-tabs button.active,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-page .layout-toggle button.active {
  color: #ffffff !important;
  border-color: rgba(37, 99, 235, .58) !important;
  background: linear-gradient(135deg, #2563eb, #0ea5e9) !important;
  box-shadow: 0 12px 24px rgba(37, 99, 235, .20) !important;
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-page .market-card {
  color: #0f172a !important;
  border-color: rgba(203, 213, 225, .92) !important;
  background: #ffffff !important;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .10) !important;
  opacity: 1 !important;
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-page .market-card-body,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-page .market-card-foot,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-page .market-buy-box {
  color: #0f172a !important;
  border-color: rgba(226, 232, 240, .98) !important;
  background: #ffffff !important;
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-page .settings-card.market-history,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-page .market-history,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-page .tablewrap.market-table,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-page .empty {
  color: #0f172a !important;
  border-color: rgba(203, 213, 225, .92) !important;
  background: #ffffff !important;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .07) !important;
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-page .empty {
  color: #64748b !important;
  border-style: dashed !important;
  background: #f8fafc !important;
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-page .market-order-row {
  border-color: rgba(226, 232, 240, .95) !important;
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-page .market-order-row strong,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-page .market-table td strong,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-page .market-table th {
  color: #0f172a !important;
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-page .market-order-row small,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-page .market-table td small {
  color: #64748b !important;
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-page .market-table table {
  color: #0f172a !important;
  background: #ffffff !important;
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-page .market-table th,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-page .market-table td {
  border-color: rgba(226, 232, 240, .95) !important;
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-page .input,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-page input,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-page select,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-page textarea {
  color: #0f172a !important;
  border-color: rgba(203, 213, 225, .95) !important;
  background: #ffffff !important;
  box-shadow: inset 0 1px 0 rgba(15, 23, 42, .03) !important;
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-page .input::placeholder,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-page input::placeholder,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-page textarea::placeholder {
  color: #94a3b8 !important;
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-page .market-card.locked,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-page .market-tool-card.title-only {
  background: #ffffff !important;
  border-color: rgba(148, 163, 184, .82) !important;
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-page .market-hero h2,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-page .market-card-head h3,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-page .market-modal h2 {
  color: #0f172a !important;
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-page .market-hero .label,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-page .market-hero .muted,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-page .market-kicker,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-page .market-card-head p,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-page .market-desc {
  color: #475569 !important;
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-page .market-meta span,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-page .quantity-compact {
  color: #475569 !important;
  border-color: rgba(203, 213, 225, .94) !important;
  background: #f8fafc !important;
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-page .quantity-compact button {
  color: #0f172a !important;
  background: #e2e8f0 !important;
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-page .market-card-head strong,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-page .market-total,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-page .market-points-chip strong {
  color: #16a34a !important;
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-page .market-points-chip {
  border-color: rgba(22, 163, 74, .28) !important;
  background: #f0fdf4 !important;
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-page .market-points-note {
  color: #475569 !important;
  border-color: rgba(22, 163, 74, .22) !important;
  background: #f0fdf4 !important;
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-modal {
  color: #0f172a !important;
  border-color: rgba(203, 213, 225, .95) !important;
  background: #ffffff !important;
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .top .actions .btn.secondary.navbtn:not(.active),
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .top .actions .pill:not(.ok):not(.points-link) {
  color: #182235 !important;
  border-color: rgba(203, 213, 225, .82) !important;
  background: rgba(255, 255, 255, .84) !important;
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .top .actions .btn.secondary.navbtn:not(.active) svg {
  color: #182235 !important;
  stroke: currentColor !important;
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .top .actions .btn.secondary.navbtn.active,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .top .actions .btn.secondary.navbtn.active span,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .top .actions .btn.secondary.navbtn.active svg {
  color: #ffffff !important;
  stroke: currentColor !important;
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .top .actions .pill.points-link {
  color: #047857 !important;
  border-color: rgba(5, 150, 105, .34) !important;
  background: #ecfdf5 !important;
}

/* User 20260613g: compact wallet recharge payment methods. */
body:not(.admin-view):not(.agent-view) .recharge-grid {
  align-items: start !important;
}

body:not(.admin-view):not(.agent-view) .recharge-left {
  align-content: start !important;
  align-items: start !important;
  grid-template-rows: auto auto !important;
}

body:not(.admin-view):not(.agent-view) .balance-card,
body:not(.admin-view):not(.agent-view) .method-card {
  width: 100%;
  align-self: start !important;
}

body:not(.admin-view):not(.agent-view) .method-card {
  min-height: 0 !important;
  padding: 14px !important;
}

body:not(.admin-view):not(.agent-view) .method-card h3 {
  font-size: 20px;
  line-height: 1.2;
}

body:not(.admin-view):not(.agent-view) .method-pills {
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px !important;
  margin-top: 10px;
}

body:not(.admin-view):not(.agent-view) .method-pill {
  flex: 0 0 auto;
  min-width: 88px;
  max-width: 100%;
  min-height: 38px !important;
  padding: 7px 10px;
  border-radius: 14px !important;
  justify-content: flex-start;
  gap: 7px;
  line-height: 1;
}

body:not(.admin-view):not(.agent-view) .method-pill span {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
}

body:not(.admin-view):not(.agent-view) .method-pill b {
  max-width: none;
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
  font-size: 13px;
  line-height: 1;
}

body:not(.admin-view):not(.agent-view) .method-card p {
  margin-top: 10px;
  max-width: 34em;
  font-size: 12px;
  line-height: 1.45;
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .method-pill {
  color: #172033 !important;
  border-color: rgba(203, 213, 225, .90) !important;
  background: #ffffff !important;
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .method-pill.active {
  color: #052e1b !important;
  border-color: rgba(16, 185, 129, .58) !important;
  background: linear-gradient(180deg, rgba(16, 185, 129, .18), rgba(16, 185, 129, .08)) !important;
}

@media (max-width: 760px) {
  body:not(.admin-view):not(.agent-view) .method-pill {
    flex: 1 1 calc(50% - 8px);
    min-width: 132px;
  }
}

@media (max-width: 980px) {
  .gpt-lines-stats .detail-grid,
  .gpt-line-row {
    grid-template-columns: 1fr;
  }
}


/* One-time SMS workbench */
.one-time-page {
  display: grid;
  gap: 14px;
}
.one-time-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, .92fr);
  gap: 14px;
  align-items: stretch;
}
.one-time-service-card,
.one-time-live-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid rgba(56, 189, 248, .22);
  border-radius: 20px;
  background:
    radial-gradient(circle at 12% 0%, rgba(34, 211, 238, .14), transparent 34%),
    linear-gradient(135deg, rgba(15, 23, 42, .88), rgba(2, 6, 23, .82));
}
.one-time-service-card h2 {
  margin: 6px 0 8px;
  font-size: clamp(26px, 3vw, 38px);
  letter-spacing: -.03em;
}
.one-time-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: #7dd3fc;
  font-weight: 900;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.one-time-kicker span {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 5px rgba(34, 197, 94, .12);
}
.one-time-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 16px 0 12px;
}
.one-time-flow div {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 14px;
  background: rgba(2, 6, 23, .38);
}
.one-time-flow b {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: linear-gradient(135deg, #2563eb, #22c55e);
  color: white;
  font-size: 12px;
}
.one-time-flow span {
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}
.one-time-rule-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.one-time-rule-grid span {
  display: grid;
  gap: 4px;
  padding: 10px 11px;
  border: 1px solid rgba(148, 163, 184, .16);
  border-radius: 14px;
  background: rgba(2, 6, 23, .34);
}
.one-time-rule-grid strong { color: #86efac; font-size: 16px; }
.one-time-rule-grid small { color: var(--muted); font-size: 11px; }
.one-time-warning,
.one-time-note {
  border: 1px solid rgba(34, 197, 94, .22);
  background: rgba(6, 78, 59, .16);
  color: var(--text);
  border-radius: 16px;
  padding: 11px 13px;
  font-size: 12px;
}
.one-time-warning {
  display: grid;
  gap: 4px;
  margin-top: 12px;
}
.one-time-warning strong,
.one-time-note strong { color: #86efac; white-space: nowrap; }
.one-time-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.one-time-live-card {
  display: grid;
  gap: 12px;
}
.one-time-live-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}
.one-time-live-head div { display: grid; gap: 4px; }
.one-time-live-head span,
.one-time-recent-sms small { color: var(--muted); font-size: 12px; }
.one-time-live-head strong { font-size: 20px; }
.one-time-live-head em {
  font-style: normal;
  color: #86efac;
  font-weight: 900;
  padding: 7px 10px;
  border: 1px solid rgba(34, 197, 94, .22);
  border-radius: 999px;
  background: rgba(34, 197, 94, .08);
}
.one-time-current {
  display: grid;
  grid-template-columns: 1.25fr .9fr;
  gap: 10px;
}
.one-time-current > div,
.one-time-empty-live,
.one-time-recent-sms {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, .16);
  border-radius: 16px;
  background: rgba(2, 6, 23, .34);
}
.one-time-current small { color: var(--muted); }
.one-time-current strong {
  font-size: clamp(18px, 2.4vw, 28px);
  line-height: 1.1;
  word-break: break-all;
}
.one-time-empty-live strong { color: var(--text); }
.one-time-empty-live span,
.one-time-recent-sms p,
.one-time-recent-sms span { color: var(--muted); margin: 0; }
.one-time-recent-code {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.one-time-recent-code strong {
  color: #86efac;
  font-size: 24px;
  letter-spacing: .04em;
}
.one-time-recent-sms pre {
  margin: 0;
  max-height: 96px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text);
}
.one-time-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: rgba(6, 78, 59, .12);
}
.one-time-search-row { margin: 0; }
.one-time-orders {
  display: grid;
  gap: 10px;
}
.one-time-order-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.25fr) minmax(170px, 1fr) minmax(130px, .75fr) minmax(150px, .75fr);
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, .16);
  border-radius: 18px;
  background: rgba(15, 23, 42, .68);
}
.one-time-order-main,
.one-time-phone-box,
.one-time-code-box,
.one-time-wait-box {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.one-time-phone-box strong,
.one-time-code-box strong,
.one-time-wait-box strong {
  word-break: break-all;
  font-size: 15px;
}
.one-time-order-row small { color: var(--muted); }
.one-time-sms-detail {
  grid-column: 1 / -1;
  border-top: 1px solid rgba(148, 163, 184, .12);
  padding-top: 8px;
}
.one-time-sms-detail summary { cursor: pointer; color: var(--muted); }
.one-time-sms-detail pre {
  margin: 8px 0 0;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text);
}
.one-time-admin-shell {
  display: grid;
  grid-template-columns: minmax(360px, .9fr) minmax(480px, 1.1fr);
  gap: 16px;
  align-items: start;
}
.one-time-admin-tabs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(148, 163, 184, .14);
  border-radius: 18px;
  background: rgba(15, 23, 42, .56);
}
.one-time-admin-tabs button {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  border: 1px solid rgba(148, 163, 184, .12);
  border-radius: 13px;
  background: rgba(2, 6, 23, .34);
  color: var(--muted);
  font-weight: 900;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, color .18s ease;
}
.one-time-admin-tabs button:hover,
.one-time-admin-tabs button.active {
  border-color: rgba(56, 189, 248, .5);
  background: linear-gradient(135deg, rgba(37, 99, 235, .75), rgba(14, 165, 233, .55));
  color: #fff;
}
.one-time-admin-tabs small {
  min-width: 22px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255,255,255,.14);
  color: inherit;
}
.one-time-admin-body {
  display: grid;
  gap: 14px;
}
.one-time-overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.one-time-admin-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.one-time-config-card,
.one-time-list-card { min-width: 0; }
.one-time-settings-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fingerprint-cdk-create-card,
.fingerprint-cdk-code-card { min-width: 0; }
.fingerprint-cdk-create-form {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.fingerprint-cdk-create-form .wide-field {
  grid-column: span 2;
}
.fingerprint-cdk-create-actions {
  min-height: 42px;
}
.fingerprint-cdk-create-actions .muted {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.fingerprint-cdk-code-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.fingerprint-cdk-code-textarea {
  width: 100%;
  min-height: 132px;
  max-height: 260px;
  resize: vertical;
  margin: 0 0 10px;
  padding: 12px;
  border: 1px solid rgba(100, 210, 255, .22);
  border-radius: 10px;
  background: rgba(2, 6, 23, .48);
  color: var(--text);
  font: 700 13px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  outline: none;
}
.fingerprint-cdk-code-list {
  display: grid;
  gap: 8px;
  max-height: 420px;
  overflow: auto;
  padding-right: 4px;
}
.fingerprint-cdk-code-row {
  display: grid;
  grid-template-columns: minmax(260px, 1.35fr) minmax(220px, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, .12);
  border-radius: 10px;
  background: rgba(2, 6, 23, .34);
  min-width: 0;
}
.fingerprint-cdk-code-row.compact {
  padding: 8px 10px;
}
.fingerprint-cdk-code-main,
.fingerprint-cdk-code-meta {
  min-width: 0;
}
.fingerprint-cdk-code-main {
  display: grid;
  gap: 3px;
}
.fingerprint-cdk-code-main strong {
  font-size: 13px;
  overflow-wrap: anywhere;
}
.fingerprint-cdk-code-main span,
.fingerprint-cdk-code-meta span {
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fingerprint-cdk-code-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.fingerprint-cdk-code-row .btn {
  white-space: nowrap;
}
.fingerprint-cdk-scope-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: -4px 0 8px;
  padding: 9px 12px;
  border: 1px solid rgba(100, 210, 255, .18);
  border-radius: 10px;
  background: rgba(10, 132, 255, .08);
  color: var(--muted);
  font-size: 12px;
}
.fingerprint-cdk-scope-note strong {
  color: var(--text);
}
.fingerprint-cdk-batch-actions {
  margin-top: 10px;
}
.fingerprint-cdk-batch-actions .danger-soft {
  color: #ffd7dc;
  border-color: rgba(255, 69, 58, .34);
  background: rgba(255, 69, 58, .10);
}
.fingerprint-cdk-batch-actions .danger-soft:disabled {
  color: var(--muted);
  border-color: rgba(148, 163, 184, .12);
  background: rgba(148, 163, 184, .06);
}
.one-time-admin-row {
  grid-template-columns: minmax(150px, 1fr) minmax(220px, 1fr) minmax(260px, 1.2fr) minmax(260px, auto);
}
.one-time-order-admin-row {
  grid-template-columns: minmax(190px, 1.1fr) minmax(220px, .95fr) minmax(220px, .95fr) minmax(230px, 1fr) minmax(140px, auto);
}
.one-time-filter-bar {
  grid-template-columns: minmax(220px, 1fr) minmax(180px, .7fr) minmax(180px, .7fr) minmax(190px, auto);
}
.one-time-pool-summary {
  margin-top: 10px;
}
.one-time-number-list { max-height: 760px; overflow: auto; padding-right: 4px; }
.one-time-number-list.small-list { max-height: 520px; }
.long-term-page {
  display: grid;
  gap: 10px;
  width: min(1160px, 100%);
  margin: 0 auto;
  padding: 12px;
  min-height: 0;
}
.long-term-layout {
  display: grid;
  grid-template-columns: minmax(320px, .84fr) minmax(0, 1.16fr);
  gap: 10px;
  align-items: start;
  min-height: 0;
}
.long-term-buy,
.long-term-list,
.long-term-message {
  min-width: 0;
  border-radius: 12px;
  border: 1px solid var(--line-soft);
  background: var(--soft-panel);
  padding: 12px;
  min-height: 0;
}
.long-term-list-body {
  display: grid;
  gap: 8px;
  max-height: 62vh;
  overflow: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
.lt-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
  padding: 10px 11px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: rgba(2, 6, 23, .26);
}
.lt-row.expanded {
  background: rgba(15, 23, 42, .38);
}
.lt-main {
  display: grid;
  gap: 7px;
  min-width: 0;
}
.lt-head,
.lt-sms-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}
.lt-head strong,
.lt-sms strong {
  min-width: 0;
  overflow-wrap: anywhere;
}
.lt-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.lt-meta span {
  padding: 4px 7px;
  border: 1px solid rgba(148, 163, 184, .16);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
}
.lt-sms {
  display: grid;
  gap: 6px;
}
.lt-sms small {
  color: var(--muted);
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.lt-sms-actions,
.lt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}
.lt-actions .btn,
.lt-sms-actions .btn {
  min-height: 32px;
  padding: 6px 9px;
  font-size: 12px;
}
.lt-detail {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  margin-top: 2px;
  padding-top: 9px;
  border-top: 1px solid rgba(148, 163, 184, .14);
  min-width: 0;
}
.lt-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}
.lt-detail-grid span,
.lt-detail-url,
.lt-detail-message {
  border: 1px solid rgba(148, 163, 184, .14);
  border-radius: 9px;
  background: rgba(2, 6, 23, .22);
}
.lt-detail-grid span {
  display: grid;
  gap: 3px;
  padding: 7px 8px;
  min-width: 0;
}
.lt-detail-grid b,
.lt-detail-url strong {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.lt-detail-grid em,
.lt-detail-url small,
.lt-detail-message small {
  color: var(--text);
  font-style: normal;
  overflow-wrap: anywhere;
}
.lt-detail-url {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 8px;
  min-width: 0;
}
.lt-detail-url > div,
.lt-detail-messages {
  min-width: 0;
}
.lt-detail-messages {
  display: grid;
  gap: 7px;
  max-height: 220px;
  overflow: auto;
  scrollbar-width: thin;
}
.lt-detail-message {
  display: grid;
  gap: 5px;
  padding: 8px 9px;
}
.lt-detail-message > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.lt-detail-message span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.long-term-page .section-title h2 {
  font-size: 22px;
  line-height: 1.15;
}

.long-term-page .section-title p,
.long-term-page .lt-price small,
.long-term-page .lt-message-row small,
.long-term-page .lt-message-row span {
  overflow-wrap: anywhere;
}
.long-term-buy .lt-buy-box {
  display: grid;
  gap: 10px;
}
.long-term-buy .lt-plan-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.lt-buy-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas:
    "qty total"
    "buy buy";
  gap: 10px;
  align-items: end;
  margin-top: 10px;
}
.lt-buy-controls > .btn {
  grid-area: buy;
  width: 100%;
}
.lt-qty-line {
  grid-area: qty;
}
.lt-buy-total {
  grid-area: total;
}
.lt-qty-line,
.lt-buy-total {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.lt-qty-line > span,
.lt-buy-total > span {
  color: var(--muted);
  font-size: 12px;
}
.lt-qty-control {
  min-height: 40px;
}
.lt-qty-control .input {
  min-width: 0;
  text-align: center;
}
.lt-buy-total {
  padding: 8px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: rgba(2, 6, 23, .22);
}
.lt-buy-total strong {
  font-size: 18px;
  line-height: 1.1;
}
.lt-buy-total small {
  color: var(--muted);
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.lt-buy-notice {
  display: grid;
  gap: 5px;
  margin-top: 12px;
  padding: 10px 11px;
  border: 1px solid rgba(245, 158, 11, .24);
  border-radius: 10px;
  background: rgba(245, 158, 11, .07);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.lt-buy-notice strong {
  color: var(--text);
  font-size: 13px;
}
.lt-buy-notice p {
  margin: 0;
  overflow-wrap: anywhere;
}
.lt-list-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  max-width: 100%;
}
.lt-list-actions .compact-select {
  flex: 1 1 190px;
  width: min(240px, 100%);
  min-width: 170px;
}
.lt-list-actions .btn {
  flex: 0 0 auto;
}
.lt-plan-card {
  display: grid;
  gap: 8px;
  min-width: 0;
}
.lt-plan-select {
  display: grid;
  gap: 5px;
  width: 100%;
  min-height: 116px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: rgba(2, 6, 23, .28);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.lt-plan-card.active .lt-plan-select {
  border-color: rgba(56, 189, 248, .62);
  background: rgba(14, 116, 144, .18);
  box-shadow: inset 0 0 0 1px rgba(56, 189, 248, .2);
}
.lt-plan-card.disabled .lt-plan-select {
  opacity: .68;
}
.lt-plan-select span {
  color: var(--muted);
  font-size: 13px;
}
.lt-plan-select strong {
  font-size: 26px;
  line-height: 1.1;
}
.lt-plan-select small {
  color: var(--muted);
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.long-term-buy .lt-price {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: rgba(2, 6, 23, .28);
}
.long-term-buy .lt-price strong {
  font-size: 24px;
}
@media (max-width: 620px) {
  .long-term-buy .lt-plan-grid {
    grid-template-columns: 1fr;
  }
  .lt-buy-controls {
    grid-template-areas:
      "qty"
      "total"
      "buy";
    grid-template-columns: 1fr;
  }
  .lt-list-actions {
    width: 100%;
    justify-content: stretch;
  }
  .lt-list-actions .compact-select,
  .lt-list-actions .btn {
    flex: 1 1 100%;
  }
}
.long-term-message .lt-message-list {
  display: grid;
  gap: 8px;
}
.lt-message-row {
  display: grid;
  gap: 4px;
  padding: 8px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: rgba(2, 6, 23, .22);
}
.lt-message-row small,
.lt-message-row span {
  color: var(--muted);
  overflow-wrap: anywhere;
}
.admin-safe-pre {
  margin: 10px 0 0;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, .12);
  border-radius: 12px;
  background: rgba(2, 6, 23, .35);
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}


/* One-time SMS compact refresh */
.compact-one-time-page {
  padding: 16px;
}
.one-time-user-split {
  display: grid;
  grid-template-columns: minmax(300px, .72fr) minmax(520px, 1.28fr);
  gap: 14px;
  align-items: start;
}
.one-time-buy-panel,
.one-time-list-panel {
  min-width: 0;
  border: 1px solid rgba(56, 189, 248, .2);
  border-radius: 20px;
  background:
    radial-gradient(circle at 10% 0%, rgba(34, 211, 238, .12), transparent 35%),
    linear-gradient(135deg, rgba(15, 23, 42, .82), rgba(2, 6, 23, .72));
  box-shadow: 0 18px 44px rgba(0, 0, 0, .18);
}
.one-time-buy-panel {
  position: sticky;
  top: 84px;
  display: grid;
  gap: 10px;
  padding: 16px;
}
.one-time-buy-panel h2 {
  margin: 0;
  font-size: clamp(23px, 2.3vw, 32px);
  letter-spacing: -.03em;
}

.one-time-short-copy {
  max-width: 38ch;
  line-height: 1.55;
}
.one-time-mini-flow {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: -2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.one-time-mini-flow span {
  padding: 6px 9px;
  border: 1px solid rgba(148, 163, 184, .14);
  border-radius: 999px;
  background: rgba(2, 6, 23, .28);
}
.one-time-mini-flow i {
  width: 16px;
  height: 1px;
  background: rgba(148, 163, 184, .32);
}
.compact-flow {
  margin: 4px 0 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.compact-flow div {
  grid-template-columns: auto 1fr;
  align-items: center;
  padding: 9px 10px;
}
.compact-flow b {
  width: 22px;
  height: 22px;
}
.compact-rules span {
  padding: 9px 10px;
}
.compact-warning,
.compact-note {
  margin: 0;
  padding: 9px 11px;
  line-height: 1.5;
}
.compact-note {
  border-color: rgba(148, 163, 184, .14);
  background: rgba(15, 23, 42, .34);
}
.one-time-list-panel {
  display: grid;
  gap: 10px;
  padding: 14px;
}
.one-time-list-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}
.one-time-list-head p {
  margin: 0 0 3px;
  color: #7dd3fc;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.one-time-list-head h3 {
  margin: 0;
  font-size: 20px;
}
.one-time-list-head em {
  flex: none;
  min-width: 74px;
  text-align: center;
  font-style: normal;
  color: #86efac;
  font-weight: 900;
  padding: 7px 10px;
  border: 1px solid rgba(34, 197, 94, .22);
  border-radius: 999px;
  background: rgba(34, 197, 94, .08);
}
.one-time-current-mini {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, .16);
  border-radius: 16px;
  background: rgba(2, 6, 23, .34);
}
.one-time-current-mini > div:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.one-time-current-mini small,
.one-time-current-mini span {
  color: var(--muted);
}
.one-time-current-mini strong {
  color: #86efac;
  font-size: clamp(18px, 2vw, 24px);
  word-break: break-all;
}
.one-time-mini-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.compact-search {
  grid-template-columns: minmax(220px, 1fr) minmax(92px, auto) minmax(92px, auto);
  margin: 0;
}
.compact-order-list {
  gap: 8px;
}
.compact-one-time-row {
  grid-template-columns: minmax(155px, .78fr) minmax(150px, .78fr) minmax(110px, .5fr) minmax(135px, .58fr);
  padding: 11px 12px;
  border-radius: 16px;
}
.one-time-row-title {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}
.one-time-row-title strong {
  min-width: 0;
}
.one-time-kpi-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}
.one-time-kpi-strip div {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid rgba(148, 163, 184, .14);
  border-radius: 16px;
  background: rgba(15, 23, 42, .6);
}
.one-time-kpi-strip small {
  color: var(--muted);
  font-weight: 800;
}
.one-time-kpi-strip strong {
  color: var(--text);
  font-size: 22px;
  line-height: 1.05;
}
.one-time-kpi-strip span {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  white-space: normal;
}
.one-time-dense-row {
  display: grid;
  grid-template-columns: minmax(210px, .78fr) minmax(0, 1.55fr) minmax(150px, auto);
  gap: 12px;
  align-items: start;
  padding: 12px;
}
.one-time-dense-main {
  display: grid;
  gap: 8px;
  min-width: 0;
}
.one-time-dense-main > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.one-time-dense-main strong {
  font-size: 16px;
  word-break: break-all;
}
.one-time-dense-main span {
  color: var(--muted);
  font-size: 12px;
}
.one-time-dense-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(118px, 1fr));
  gap: 8px;
  min-width: 0;
}
.one-time-dense-meta div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid rgba(148, 163, 184, .12);
  border-radius: 12px;
  background: rgba(2, 6, 23, .26);
}
.one-time-dense-meta small {
  color: var(--muted);
  font-size: 11px;
}
.one-time-dense-meta strong {
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  word-break: break-word;
}
.one-time-full-time {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

html[data-theme="light"] body:not(.admin-view):not(.agent-view) .one-time-page .one-time-service-card,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .one-time-page .one-time-live-card,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .one-time-page .one-time-order-row,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .one-time-page .one-time-current > div,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .one-time-page .one-time-empty-live,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .one-time-page .one-time-recent-sms,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .one-time-page .one-time-flow div,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .one-time-page .one-time-rule-grid span {
  background: rgba(255, 255, 255, .92);
  border-color: rgba(15, 23, 42, .12);
  color: #0f172a;
}
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .one-time-page .one-time-warning,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .one-time-page .one-time-note {
  background: rgba(248, 250, 252, .96);
  border-color: rgba(15, 23, 42, .12);
  color: #1f2937;
}
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .one-time-page h2,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .one-time-page strong {
  color: #0f172a;
}
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .one-time-page small,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .one-time-page .muted {
  color: #475569;
}


html[data-theme="light"] body:not(.admin-view):not(.agent-view) .one-time-page .one-time-buy-panel,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .one-time-page .one-time-list-panel,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .one-time-page .one-time-current-mini {
  background: rgba(255, 255, 255, .94);
  border-color: rgba(15, 23, 42, .12);
  color: #0f172a;
}
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .one-time-page .one-time-list-head p,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .one-time-page .one-time-kicker {
  color: #0369a1;
}
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .one-time-page .compact-note {
  background: rgba(241, 245, 249, .9);
  border-color: rgba(15, 23, 42, .12);
}
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .one-time-page .one-time-mini-flow span {
  background: rgba(241, 245, 249, .95);
  border-color: rgba(15, 23, 42, .12);
  color: #334155;
}

@media (max-width: 980px) {
  .one-time-workbench,
  .one-time-user-split,
  .one-time-admin-shell,
  .one-time-overview-grid,
  .one-time-order-row,
  .one-time-order-admin-row { grid-template-columns: 1fr; }
  .one-time-admin-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .one-time-buy-panel { position: static; }
  .one-time-kpi-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .one-time-dense-row,
  .one-time-dense-meta { grid-template-columns: 1fr; }
  .one-time-flow,
  .one-time-rule-grid,
  .one-time-current { grid-template-columns: 1fr; }
  .one-time-admin-row,
  .one-time-filter-bar { grid-template-columns: 1fr; }
}


/* =====================================================================
   NexSMS Premium Redesign Layer — v20260619b
   A bold, visible design-system upgrade shared by user / admin / agent.
   Visual-only: refined radius scale, layered depth, premium nav,
   stronger type hierarchy, polished cards/buttons/inputs/tables.
   No DOM, layout-grid template, copy, business-logic, or API changes.
   Fully reversible by removing this block.
   ===================================================================== */

/* ---- 0. Refined design tokens ---------------------------------------- */
:root, html[data-theme="dark"] {
  --r: 14px;                 /* default card radius (was 8px) */
  --r-sm: 11px;              /* controls / inner blocks */
  --r-xs: 9px;
  --ring: rgba(10, 132, 255, .55);
  --elev-1: 0 1px 0 rgba(255,255,255,.06) inset, 0 8px 24px rgba(0,0,0,.30);
  --elev-2: 0 1px 0 rgba(255,255,255,.07) inset, 0 20px 48px rgba(0,0,0,.42);
  --hairline: rgba(255,255,255,.10);
}
html[data-theme="light"] {
  --r: 14px;
  --r-sm: 11px;
  --r-xs: 9px;
  --elev-1: 0 1px 0 rgba(255,255,255,.9) inset, 0 8px 22px rgba(15,23,42,.07);
  --elev-2: 0 1px 0 rgba(255,255,255,.9) inset, 0 20px 44px rgba(15,23,42,.10);
  --hairline: rgba(15,23,42,.10);
}

/* ---- 1. Crisp type + premium scrollbars ------------------------------ */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "tnum" 1, "cv01" 1;
}
h1, h2, h3 { letter-spacing: -0.018em; }

* { scrollbar-width: thin; scrollbar-color: rgba(120,140,158,.42) transparent; }
html[data-theme="light"] * { scrollbar-color: rgba(100,116,139,.42) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  border-radius: 999px; border: 2px solid transparent; background-clip: padding-box;
  background-color: rgba(120,140,158,.34);
}
::-webkit-scrollbar-thumb:hover { background-color: rgba(150,170,188,.58); }
html[data-theme="light"] ::-webkit-scrollbar-thumb { background-color: rgba(100,116,139,.32); }

/* ---- 2. Surface & depth: cards / panels ------------------------------ */
.card, .intro-panel, .auth-card, .panel-card {
  border-radius: var(--r);
  border: 1px solid var(--line);
  box-shadow: var(--elev-1);
  padding: 20px;
}
.panel-card { position: relative; }
/* subtle top sheen for premium glass feel (dark only) */
body:not(.admin-view) .panel-card::after,
body:not(.admin-view) .api-card::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,.05), transparent 24%);
  opacity: .8;
}
html[data-theme="light"] body:not(.admin-view) .panel-card::after,
html[data-theme="light"] body:not(.admin-view) .api-card::after { display: none; }

.api-card, .api-status-card { border-radius: var(--r); box-shadow: var(--elev-1); }
.login-art { border-radius: calc(var(--r) + 4px); box-shadow: var(--elev-2), inset 0 1px 0 rgba(255,255,255,.06); }

/* ---- 3. Refined radius on controls & inner blocks -------------------- */
.btn, .input, .navbtn, .service-tab, .order-tabs button, .api-tabs button,
.tab-strip button, .pick-row, .limit-card, .order-table-wrap, .api-key-card,
.api-key-preview, .order-meta div, .detail-text, .order-detail-panel,
.service-lock-card, .api-stat-pill, .receive-limit-control .limit-card,
.compact-name, .api-key-name .input {
  border-radius: var(--r-sm);
}
.service-mark, .service-mark.service-logo { border-radius: var(--r-sm); }

/* ---- 4. Premium top bar + navigation --------------------------------- */
.top {
  padding: 12px 22px;
  border-bottom: 1px solid var(--top-border);
  box-shadow: 0 14px 38px rgba(0,0,0,.30);
}
body:not(.admin-view):not(.agent-view) .top .actions {
  gap: 10px;
}
/* brand mark gets a softer premium glow */
.logo, .brand-icon {
  border-radius: 11px;
  box-shadow: 0 0 0 1px rgba(255,255,255,.10), 0 10px 26px rgba(50,209,127,.22);
}
.brand { font-size: 15px; }

/* segmented nav cluster: clearer container, smoother items */
body:not(.admin-view):not(.agent-view) .nav-cluster {
  padding: 4px; border-radius: 999px;
  background: rgba(255,255,255,.045);
  border: 1px solid var(--hairline);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .nav-cluster {
  background: rgba(15,23,42,.04); border-color: rgba(15,23,42,.08);
}
body:not(.admin-view):not(.agent-view) .nav-cluster .btn.secondary.navbtn {
  min-height: 36px; padding: 0 13px; border-radius: 999px;
  border-color: transparent; background: transparent; color: var(--soft); font-weight: 800;
}
body:not(.admin-view):not(.agent-view) .nav-cluster .btn.secondary.navbtn:hover {
  color: var(--text); background: rgba(255,255,255,.06);
}
body:not(.admin-view):not(.agent-view) .top .actions .btn.secondary.navbtn.active {
  color: #fff; border-color: transparent;
  background: linear-gradient(135deg, #0a84ff, #2bbbff);
  box-shadow: 0 8px 22px rgba(10,132,255,.38), inset 0 1px 0 rgba(255,255,255,.25);
}

/* account / points / balance chips: refined, elegant */
body:not(.admin-view):not(.agent-view) .top .actions .pill {
  min-height: 36px; padding: 0 13px; border-radius: 999px; font-weight: 800;
  border: 1px solid var(--hairline); background: rgba(255,255,255,.04);
}
body:not(.admin-view):not(.agent-view) .top .actions .pill.ok {
  border-color: rgba(48,209,88,.34); background: rgba(48,209,88,.10);
}

/* ---- 5. Buttons ------------------------------------------------------ */
.btn {
  min-height: 44px; padding: 11px 18px; font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.20), 0 10px 26px rgba(10,132,255,.26);
}
.btn.sm { min-height: 36px; padding: 8px 12px; border-radius: var(--r-xs); }
.btn.secondary {
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 4px 12px rgba(0,0,0,.16);
}
.btn:not(:disabled):hover { transform: translateY(-1px); filter: saturate(1.05); }
.btn:not(:disabled):active { transform: translateY(0); }
.btn:not(.secondary):not(.warn):not(.bad):not(:disabled):hover {
  box-shadow: inset 0 1px 0 rgba(255,255,255,.26), 0 16px 34px rgba(10,132,255,.36);
}
.btn.secondary:not(:disabled):hover { border-color: rgba(120,150,170,.5); }

/* ---- 6. Inputs ------------------------------------------------------- */
.input {
  min-height: 46px;
  transition: border-color .16s ease, box-shadow .18s ease, background-color .16s ease;
}
.input:hover:not(:focus) { border-color: rgba(120,150,170,.5); }
.input:focus { border-color: var(--ring); box-shadow: 0 0 0 4px rgba(10,132,255,.16); outline: none; }

/* ---- 7. Eyebrow labels / section headers ----------------------------- */
.label, .side-head .label, .trade-heading .label {
  letter-spacing: .14em; font-size: 11px; color: var(--cyan);
}
.section-title h2, .trade-header h2 { letter-spacing: -.02em; }

/* ---- 8. Pills / badges / chips --------------------------------------- */
.pill, .badge { border-radius: 999px; font-weight: 800; }
.inline-code { border-radius: var(--r-xs); }

/* ---- 9. Tables: premium readability ---------------------------------- */
.order-table-wrap, .orders-table { border-radius: var(--r-sm); overflow: hidden; }
th { letter-spacing: .08em; }
tbody tr { transition: background-color .14s ease; }
tbody tr:hover > td { background: rgba(255,255,255,.03); }
html[data-theme="light"] tbody tr:hover > td { background: rgba(10,132,255,.05); }
.order-detail-row:hover > td { background: rgba(98,212,232,.025); }

/* ---- 10. Selectable rows / mode + limit cards ------------------------ */
.pick-row { padding: 11px; }
.pick-row:not(.active):not(.locked):hover {
  border-color: rgba(120,150,170,.42); background: rgba(255,255,255,.05); transform: translateY(-1px);
}
.pick-row.active {
  border-color: rgba(50,209,127,.7);
  background: linear-gradient(135deg, rgba(50,209,127,.14), rgba(50,209,127,.05));
  box-shadow: 0 8px 22px rgba(50,209,127,.12);
}
.limit-card:not(.active):hover { border-color: rgba(120,150,170,.42); transform: translateY(-1px); }

/* ---- 11. One-time page (and similar stat tiles) premium polish ------- */
.one-time-rule-grid span,
.order-meta div {
  border: 1px solid var(--hairline);
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(2,6,23,.34));
  border-radius: var(--r-sm);
  padding: 12px;
}
.one-time-rule-grid strong { font-size: 18px; }
.one-time-current-mini {
  border-radius: var(--r-sm);
  background: linear-gradient(135deg, rgba(10,132,255,.10), rgba(2,6,23,.42));
  border: 1px solid var(--hairline);
}
.one-time-current-mini.active {
  border-color: rgba(48,209,88,.4);
  background: linear-gradient(135deg, rgba(48,209,88,.14), rgba(2,6,23,.42));
}
.one-time-order-row {
  border-radius: var(--r-sm);
  transition: border-color .16s ease, background-color .16s ease, transform .14s ease;
}
.one-time-order-row:hover { border-color: rgba(120,150,170,.4); transform: translateY(-1px); }
.one-time-list-head em {
  border-radius: 999px;
}
.one-time-phone-box strong, .one-time-code-box strong { letter-spacing: .01em; }

/* ---- 12. Unified micro-interaction transitions ----------------------- */
.btn, .navbtn, .pill, .pick-row, .service-tab, .order-tabs button,
.api-tabs button, .tab-strip button, .limit-card, .copy-btn, .copy-chip,
.linkbtn, details > summary {
  transition: background-color .18s ease, background .18s ease, border-color .18s ease,
              color .16s ease, box-shadow .2s ease, transform .14s ease;
}
.navbtn:not(.active):not(:disabled):hover { transform: translateY(-1px); }
.pill:not(:disabled):hover { transform: translateY(-1px); }

/* ---- 13. Toast / overlay depth --------------------------------------- */
.toast { border-radius: var(--r-sm); box-shadow: 0 18px 48px rgba(0,0,0,.42); backdrop-filter: blur(10px) saturate(130%); }

/* ---- 14. Accessibility: reduced motion ------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .btn, .navbtn, .pill, .pick-row, .service-tab, .order-tabs button, .api-tabs button,
  .tab-strip button, .limit-card, .copy-btn, .copy-chip, .linkbtn, .input,
  .one-time-order-row, details > summary, tbody tr {
    transition: none !important;
  }
  .btn:hover, .navbtn:hover, .pill:hover, .pick-row:hover, .limit-card:hover,
  .one-time-order-row:hover { transform: none !important; }
}


/* =====================================================================
   NexSMS Premium Redesign — v20260619c additions
   Safe, CSS-only refinements driven by the full page-by-page audit:
   disabled/async feedback, code/JSON overflow safety, admin responsive
   tables (data-label aware), and clearer admin settings form boundaries.
   ===================================================================== */

/* c1) Honest disabled / async-pending feedback (no fake "active" glow) */
.btn:disabled, .btn[disabled] {
  box-shadow: none !important;
  transform: none !important;
  filter: grayscale(.35) opacity(.92);
}
.btn.secondary:disabled, .btn.secondary[disabled] { filter: none; }
/* a button whose label switches to a working state reads as busy */
.btn[disabled][data-action="buy"],
.btn[disabled][data-action="create-one-time-order"],
.btn[disabled][data-action="refresh-market"] { cursor: progress; }

/* c2) Code & JSON blocks never break layout on small screens */
.codeblock, pre { overflow-x: auto; max-width: 100%; }
.json-detail pre, .row-detail pre, details pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* c3) Admin data tables -> stacked cards on phones (data-label aware).
   Only applies to compactTable() output (.admin-data-table), which carries
   a data-label on every cell, so no header meaning is lost. */
@media (max-width: 760px) {
  body.admin-view .admin-data-table {
    min-width: 0;
    table-layout: auto;
    border: 0;
  }
  body.admin-view .admin-data-table thead {
    position: absolute;
    width: 1px; height: 1px;
    margin: -1px; padding: 0; border: 0;
    overflow: hidden; clip: rect(0 0 0 0);
  }
  body.admin-view .admin-data-table tr {
    display: block;
    margin-bottom: 10px;
    padding: 6px 12px;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: rgba(255, 255, 255, .025);
  }
  html[data-theme="light"] body.admin-view .admin-data-table tr {
    background: rgba(15, 23, 42, .02);
  }
  body.admin-view .admin-data-table td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 7px 0;
    border: 0;
    border-bottom: 1px solid var(--line-soft);
    text-align: right;
  }
  body.admin-view .admin-data-table tr td:last-child { border-bottom: 0; }
  body.admin-view .admin-data-table td::before {
    content: attr(data-label);
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .04em;
    text-align: left;
    text-transform: uppercase;
  }
  body.admin-view .admin-data-table td:empty { display: none; }
}

/* c4) Admin settings: give each save-group a clear card boundary so
   operators can see exactly which group a save button belongs to. */
body.admin-view .settings-sections > form {
  position: relative;
  padding: 16px 16px 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, .02);
}
html[data-theme="light"] body.admin-view .settings-sections > form {
  background: rgba(15, 23, 42, .015);
}
body.admin-view .settings-sections > form::before {
  content: "";
  position: absolute;
  left: 0; top: 12px; bottom: 12px;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--blue), var(--cyan));
  opacity: .7;
}

/* c5) Market (shop) sections: clearer vertical rhythm between blocks */
.market-page > .market-controls { margin-top: 14px; }
.market-page > .market-grid { margin-top: 14px; }
.market-page > .market-history { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line-soft); }


/* =====================================================================
   NexSMS Admin Premium Layer — v20260619d
   Complete UI/UX polish for the admin console. Visual-only: refined
   rail nav, KPI cards, dense object rows, stat tiles, data tables,
   filter bars, market-admin master-detail, and page headers.
   No new features, no behavior/confirm changes, no DOM/class changes.
   ===================================================================== */

/* d1) Navigation rail: cleaner depth + smoother item feedback */
body.admin-view .admin-rail {
  border-radius: var(--r);
  box-shadow: var(--elev-1);
  padding: 14px;
}
body.admin-view .rail-mark { border-radius: var(--r-sm); }
body.admin-view .rail-item {
  border-radius: var(--r-sm);
  min-height: 52px;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease,
              box-shadow .18s ease, transform .14s ease;
}
body.admin-view .rail-item:hover { transform: translateX(2px); }
body.admin-view .rail-item.active {
  box-shadow: 0 10px 26px rgba(50,209,127,.24), inset 0 1px 0 rgba(255,255,255,.3);
}

/* d2) Page header hierarchy */
body.admin-view .admin-dashboard .dashboard-head h1,
body.admin-view .admin-page-header h1,
body.admin-view .card > .section-title h3 { letter-spacing: -.02em; }
body.admin-view .admin-page-header .label,
body.admin-view .label { letter-spacing: .14em; color: var(--cyan); }

/* d3) KPI cards: unified radius, depth, hover, bigger numerics */
body.admin-view .dashboard-kpi,
body.admin-view .metric-card {
  border-radius: var(--r-sm);
  box-shadow: var(--elev-1);
  transition: border-color .16s ease, box-shadow .18s ease, transform .14s ease;
}
body.admin-view .dashboard-kpi:hover,
body.admin-view .metric-card:hover {
  border-color: rgba(120,150,170,.42);
  transform: translateY(-1px);
}
body.admin-view .dashboard-kpi strong {
  font-size: 24px;
  letter-spacing: -.02em;
}

/* d4) Cards / dashboard panels: consistent premium surface */
body.admin-view .card,
body.admin-view .dashboard-card,
body.admin-view .admin-public-services-card,
body.admin-view .market-admin-list-card,
body.admin-view .market-admin-editor-card {
  border-radius: var(--r);
  box-shadow: var(--elev-1);
}

/* d5) Dense object rows: rounded + clear hover affordance */
body.admin-view .admin-object-row {
  border-radius: var(--r-sm);
  transition: border-color .15s ease, background-color .15s ease, transform .14s ease;
}
body.admin-view .admin-object-row:hover {
  border-color: rgba(120,150,170,.34);
  background: rgba(255,255,255,.03);
}
html[data-theme="light"] body.admin-view .admin-object-row:hover {
  background: rgba(10,132,255,.04);
}

/* d6) Stat tiles + summary strips: softer, premium */
body.admin-view .stat-pack span {
  border-radius: var(--r-xs);
  background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.02));
}
body.admin-view .user-summary-strip > div,
body.admin-view .trend-summary-strip > div { border-radius: var(--r-sm); }

/* d7) Data tables: refined header + rounded frame */
body.admin-view .admin-data-table { border-radius: var(--r-sm); overflow: hidden; }
body.admin-view .admin-data-table th {
  letter-spacing: .08em;
  background: rgba(5,18,24,.96);
}
html[data-theme="light"] body.admin-view .admin-data-table th { background: rgba(15,23,42,.04); }

/* d8) Filter bars + command forms: cohesive controls */
body.admin-view .admin-filter-bar,
body.admin-view .admin-command-form {
  border-radius: var(--r-sm);
}

/* d9) Market-admin master/detail: rounder rows, clearer selection */
body.admin-view .market-admin-row { border-radius: var(--r-sm); }
body.admin-view .market-admin-row.active {
  border-color: rgba(100,210,255,.6);
  box-shadow: 0 8px 22px rgba(10,132,255,.16), inset 0 0 0 1px rgba(100,210,255,.18);
}
body.admin-view .market-admin-type-tabs { border-radius: 999px; padding: 4px; }
body.admin-view .market-admin-type-tabs button { border-radius: 999px; }

/* d10) Tabs / segmented strips in admin: smoother, rounded */
body.admin-view .tab-strip button,
body.admin-view .order-tabs button { border-radius: var(--r-sm); transition: background-color .16s ease, color .16s ease, border-color .16s ease, transform .14s ease; }
body.admin-view .tab-strip button:not(.active):hover,
body.admin-view .order-tabs button:not(.active):hover { transform: translateY(-1px); }

/* d11) Buttons in admin keep depth but never glow when disabled */
body.admin-view .btn { box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 8px 20px rgba(10,132,255,.20); }
body.admin-view .btn.secondary { box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 4px 12px rgba(0,0,0,.18); }
body.admin-view .btn:disabled,
body.admin-view .btn[disabled] { box-shadow: none !important; transform: none !important; }

/* d12) Mobile rail tabs: snap + breathing room */
@media (max-width: 980px) {
  body.admin-view .mobile-tab-row { scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
  body.admin-view .mobile-tab-row > * { scroll-snap-align: start; }
}


/* ---- d13) Proportions & rhythm: how a dense ops console should breathe ---
   The current admin packs KPIs/panels into rigid 7- and 4-column grids that
   cramp on anything below a wide desktop. Switch to fluid auto-fit grids with
   sane minimums, normalize the spacing scale, and give content room. */
body.admin-view .dashboard-kpis {
  grid-template-columns: repeat(auto-fit, minmax(158px, 1fr));
  gap: 10px;
}
body.admin-view .dashboard-grid {
  grid-template-columns: repeat(auto-fit, minmax(248px, 1fr));
  gap: 12px;
}
body.admin-view .market-admin-metrics {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
/* KPI internals: stronger value-vs-label hierarchy */
body.admin-view .dashboard-kpi span,
body.admin-view .metric-card .label { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
body.admin-view .dashboard-kpi strong { margin: 8px 0 4px; }

/* Content gets a touch more padding so dense rows don't touch the frame */
body.admin-view .admin-content,
body.admin-view #admin-content { min-width: 0; }
body.admin-view .card { padding: 18px; }

/* Section titles: consistent rhythm above content blocks */
body.admin-view .card > .section-title { margin-bottom: 14px; }

/* Tighten the rail to a more refined width on large screens */
@media (min-width: 1240px) {
  body.admin-view .admin-shell { grid-template-columns: 236px minmax(0, 1fr); gap: 20px; }
}


/* =====================================================================
   NexSMS Admin Design-System Shift — v20260619e
   The opinionated redesign: ONE interactive accent (Apple-blue), green
   reserved for brand mark + positive status only, a revenue hero metric,
   and a finalized proportion/type rhythm. Visual-only, no new behavior.
   ===================================================================== */

/* e1) Single interactive accent = blue. Retire green/cyan from chrome
   (active nav, active tabs). Brand mark + tone-ok status keep green. */
body.admin-view .rail-item:hover {
  border-color: rgba(10,132,255,.30);
  background: rgba(10,132,255,.07);
}
body.admin-view .rail-item.active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #0a84ff, #2bbbff);
  box-shadow: 0 10px 26px rgba(10,132,255,.30), inset 0 1px 0 rgba(255,255,255,.28);
}
body.admin-view .rail-item.active small { color: rgba(255,255,255,.82); }

body.admin-view .market-admin-type-tabs button.active,
body.admin-view .tab-strip button.active,
body.admin-view .order-tabs button.active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #0a84ff, #2bbbff);
}

/* e2) Revenue hero metric — the dashboard now leads with one big number. */
@media (min-width: 760px) {
  body.admin-view .dashboard-kpi:first-child { grid-column: span 2; }
}
body.admin-view .dashboard-kpi:first-child {
  min-height: 118px;
  display: grid;
  align-content: center;
  border-color: rgba(48,209,88,.40);
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(48,209,88,.12), transparent 55%),
    linear-gradient(180deg, rgba(255,255,255,.04), rgba(5,18,24,.82));
}
body.admin-view .dashboard-kpi:first-child span {
  font-size: 12px; letter-spacing: .1em; text-transform: uppercase;
}
body.admin-view .dashboard-kpi:first-child strong {
  font-size: clamp(30px, 3.4vw, 40px);
  letter-spacing: -.025em;
  margin: 10px 0 6px;
}
body.admin-view .dashboard-kpi:first-child small { font-size: 12px; }

/* e3) Focus rings use the single accent everywhere in admin */
body.admin-view button:focus-visible,
body.admin-view input:focus-visible,
body.admin-view select:focus-visible,
body.admin-view textarea:focus-visible {
  outline: 3px solid rgba(10,132,255,.4);
  outline-offset: 2px;
}
body.admin-view .input:focus {
  border-color: var(--ring);
  box-shadow: 0 0 0 4px rgba(10,132,255,.16);
  outline: none;
}

/* e4) Type rhythm: clear 3-tier scale on admin headers/labels */
body.admin-view .admin-dashboard .dashboard-head h1,
body.admin-view .admin-page-header h1 { font-size: 26px; line-height: 1.12; }
body.admin-view .admin-dashboard .dashboard-head .muted,
body.admin-view .admin-page-header .muted { font-size: 13px; line-height: 1.5; }
body.admin-view .card > .section-title h3 { font-size: 17px; letter-spacing: -.01em; }
body.admin-view .card > .section-title p { font-size: 12.5px; }

/* e5) is-dirty (unsaved) rows use the accent, consistent with focus */
body.admin-view .admin-object-row.is-dirty {
  border-color: rgba(10,132,255,.5);
  box-shadow: 0 0 0 1px rgba(10,132,255,.18) inset, 0 8px 22px rgba(10,132,255,.12);
}


/* =====================================================================
   NexSMS One-Time (一次性接码) page layout & UI redesign — v20260619f
   The page exists to deliver ONE thing fast: the login code. So the
   code becomes the hero (big, copyable), each history row emphasizes
   its code, the repeated service name is quieted, and panels/actions
   get a cleaner premium rhythm. Visual-only, DOM/handlers unchanged.
   ===================================================================== */

/* Panels: cleaner neutral-premium surface (less cyan wash) */
body:not(.admin-view) .one-time-buy-panel,
body:not(.admin-view) .one-time-list-panel {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(8,18,24,.94));
  box-shadow: var(--elev-1);
}

/* Buy panel: tighter hierarchy + prominent primary action */
.one-time-buy-panel { padding: 18px; gap: 12px; }
.one-time-buy-panel h2 { font-size: clamp(22px, 2.2vw, 28px); }
.one-time-rule-grid.compact-rules { gap: 10px; }
.one-time-rule-grid.compact-rules span { padding: 12px; border-radius: var(--r-sm); }
.one-time-rule-grid.compact-rules strong { font-size: 18px; }
.one-time-actions { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin-top: 14px; }
.one-time-actions .btn { min-height: 46px; }

/* List panel head */
.one-time-list-panel { padding: 16px; gap: 14px; }
.one-time-list-head h3 { font-size: 19px; letter-spacing: -.01em; }
.one-time-list-head em { min-height: 34px; display: inline-flex; align-items: center; }

/* HERO: the current/latest code is the star of the page */
.one-time-current-mini {
  align-items: center;
  padding: 18px 20px;
  border-radius: var(--r);
  border: 1px solid var(--hairline);
  background: linear-gradient(135deg, rgba(10,132,255,.10), rgba(2,6,23,.55));
}
.one-time-current-mini.done {
  border-color: rgba(48,209,88,.38);
  background: linear-gradient(135deg, rgba(48,209,88,.15), rgba(2,6,23,.55));
}
.one-time-current-mini.active {
  border-color: rgba(10,132,255,.42);
  background: linear-gradient(135deg, rgba(10,132,255,.15), rgba(2,6,23,.55));
}
.one-time-current-mini.done strong {
  font-size: clamp(32px, 5vw, 44px);
  letter-spacing: .1em;
  color: #b8ffce;
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
}
.one-time-current-mini.active strong { font-size: clamp(20px, 2.6vw, 28px); }
.one-time-current-mini small { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.one-time-mini-actions .btn { min-height: 42px; }

/* History rows: clean cards, quiet repeated service name, LOUD code */
.one-time-orders.compact-order-list { gap: 10px; }
.compact-one-time-row {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr) minmax(0, 1.05fr) minmax(0, .9fr);
  padding: 14px 16px;
  border-radius: var(--r);
  border: 1px solid var(--hairline);
  background: rgba(8,18,24,.6);
  transition: border-color .15s ease, background-color .15s ease, transform .14s ease;
}
.compact-one-time-row:hover { border-color: rgba(120,150,170,.4); transform: translateY(-1px); }
.compact-one-time-row .one-time-row-title { gap: 8px; align-items: center; }
.compact-one-time-row .one-time-row-title strong {
  font-size: 12px;
  font-weight: 700;
  color: var(--soft);
}
.compact-one-time-row .one-time-code-box {
  border: 1px solid rgba(48,209,88,.26);
  border-radius: var(--r-sm);
  padding: 8px 10px;
  background: rgba(48,209,88,.06);
}
.compact-one-time-row .one-time-code-box strong {
  font-size: 20px;
  color: #b8ffce;
  letter-spacing: .04em;
  font-variant-numeric: tabular-nums;
}
.compact-one-time-row .one-time-phone-box strong { font-size: 15px; }
.compact-one-time-row .btn.sm { min-height: 32px; }
.one-time-sms-detail { border-radius: var(--r-sm); }

/* Responsive: stack the row neatly on small screens */
@media (max-width: 760px) {
  .compact-one-time-row { grid-template-columns: 1fr 1fr; }
  .compact-one-time-row .one-time-order-main { grid-column: 1 / -1; }
  .one-time-actions { grid-template-columns: 1fr; }
}


/* =====================================================================
   NexSMS Scale Refinement — v20260619g
   Dial back the earlier size inflation: premium = refined proportions,
   not "bigger". Tightens radius, card padding, control heights, and
   oversized hero headings across user + admin. Visual-only.
   ===================================================================== */
:root, html[data-theme="dark"], html[data-theme="light"] {
  --r: 12px;
  --r-sm: 10px;
}

/* Cards & controls: compact, refined */
.card, .intro-panel, .auth-card, .panel-card { padding: 16px; }
body.admin-view .card { padding: 16px; }
.btn { min-height: 40px; padding: 9px 15px; }
.btn.sm { min-height: 32px; padding: 7px 11px; }
.input { min-height: 42px; }
.auth-card .btn.wide { min-height: 50px; }

/* Headings: confident, not oversized */
body:not(.admin-view) .market-page .market-hero h2 { font-size: clamp(21px, 2vw, 27px); }
.login-art h1 { font-size: clamp(33px, 4.2vw, 46px); }
.trade-header h2 { font-size: clamp(22px, 2.1vw, 27px); }
.one-time-buy-panel h2 { font-size: clamp(21px, 2vw, 26px); }

/* Market cards align to the refined radius */
.market-card { border-radius: var(--r); }

/* Shop hero/section breathing without bloat */
body:not(.admin-view) .market-hero { padding: 16px 18px; }
.market-page.panel-card { padding: 16px; }


/* =====================================================================
   NexSMS Data-Presentation Polish — v20260619h
   Every place that shows numbers: aligned tabular numerals, rounded
   crisp bar charts, unified data-tile surfaces, tidy row lists.
   Visual-only across user + admin.
   ===================================================================== */

/* h1) Tabular numerals so columns of numbers line up cleanly */
.receive-stat-strip strong, .receive-bucket span, .dashboard-row strong,
.finance-metric strong, .dashboard-kpi strong, .metric, .metric-card .metric,
.stat-pack strong, .api-stat-pill strong, .user-summary-strip strong,
.money-cell, .numeric-cell strong, .trend-summary-strip strong,
.market-total, .points-buy-total strong, .one-time-rule-grid strong,
.api-stat-grid strong, .order-meta strong {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* h2) Bar charts: fully rounded, crisp fills */
.receive-bucket i, .trend-meter, .progress, .vip-progress i {
  border-radius: 999px;
  overflow: hidden;
}
.receive-bucket i::before, .trend-meter i, .progress span, .vip-progress em {
  border-radius: 999px;
}
.receive-bucket i, .trend-meter { background: rgba(255,255,255,.07); }
html[data-theme="light"] .receive-bucket i,
html[data-theme="light"] .trend-meter { background: rgba(15,23,42,.08); }

/* h3) Data tiles: one unified rounded surface with subtle depth */
.receive-stat-strip span,
.finance-metric,
.dashboard-protection-grid > div,
.dashboard-price-grid > div,
.trend-summary-strip > div {
  border-radius: var(--r-sm);
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.014));
}
html[data-theme="light"] .receive-stat-strip span,
html[data-theme="light"] .finance-metric,
html[data-theme="light"] .dashboard-protection-grid > div,
html[data-theme="light"] .dashboard-price-grid > div,
html[data-theme="light"] .trend-summary-strip > div {
  background: rgba(15,23,42,.02);
}

/* h4) Row lists (ledger / channels / top users): tidy + scannable hover */
.dashboard-row {
  border-radius: var(--r-xs);
  padding: 9px 10px;
  transition: background-color .14s ease;
}
.dashboard-row:hover { background: rgba(255,255,255,.03); }
html[data-theme="light"] .dashboard-row:hover { background: rgba(10,132,255,.045); }
.dashboard-row strong { color: var(--text); }

/* h5) User data tiles align to the same system */
.api-stat-pill, .order-meta div {
  border-radius: var(--r-sm);
}
.api-stat-pill strong { letter-spacing: -.01em; }

/* h6) Receive-stat strip: clearer value/label hierarchy */
.receive-stat-strip strong { font-size: 18px; letter-spacing: -.01em; }
.receive-stat-strip small { font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }


/* =====================================================================
   NexSMS Shop compact cards (match Free Tools) — v20260619i
   Problem: .market-grid used auto-fit + 1fr, so with only 1-2 products
   each card STRETCHED to full width with an oversized image. Free Tools
   looks good only because it has 4 items. Fix: auto-fill keeps cards at
   a compact, tool-sized width regardless of item count, and the product
   image + description are shrunk to match the Free Tools page.
   ===================================================================== */
body:not(.admin-view) .market-page .market-grid {
  grid-template-columns: repeat(auto-fill, minmax(228px, 264px));
  justify-content: start;
  gap: 12px;
}

/* Shrink product/tool thumbnail + tighten card to the Free Tools rhythm */
body:not(.admin-view) .market-page .market-thumb { height: 110px; }
body:not(.admin-view) .market-page .market-card { padding: 13px; gap: 10px; }
body:not(.admin-view) .market-page .market-card-head h3 { font-size: 15px; line-height: 1.25; }
body:not(.admin-view) .market-page .market-card-head strong { font-size: 15px; }

/* Clamp the product description to 2 lines so cards stay short */
body:not(.admin-view) .market-page .market-card-head p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 12px;
}

/* Compact meta + footer so the buy controls don't balloon the card */
body:not(.admin-view) .market-page .market-meta span { font-size: 11px; }
body:not(.admin-view) .market-page .market-card-foot { gap: 8px; }
body:not(.admin-view) .market-page .quantity-compact button { min-height: 30px; }

/* On phones, allow cards to fill the row width again */
@media (max-width: 560px) {
  body:not(.admin-view) .market-page .market-grid {
    grid-template-columns: 1fr;
  }
}


/* =====================================================================
   NexSMS GPT link generator — compact merge — v20260619j
   The panel wasted a whole 470px decorative "Plus 计划" column (it is
   aria-hidden filler with a FAKE cta div, no real control) and used a
   44px title. Drop the decorative art, collapse to ONE compact column,
   shrink the title, and cap the form width so it reads as a tidy card.
   All real controls (token / PLUS·TEAM tabs / region / generate) kept.
   ===================================================================== */
body:not(.admin-view) .gpt-checkout-inline {
  grid-template-columns: 1fr;
  gap: 12px;
  max-width: 660px;
}
body:not(.admin-view) .gpt-checkout-inline-art { display: none; }
body:not(.admin-view) .gpt-checkout-inline-body { gap: 10px; }
body:not(.admin-view) .gpt-checkout-inline-body h3 { font-size: clamp(20px, 2.1vw, 26px); }
body:not(.admin-view) .gpt-checkout-stats { gap: 8px; }
body:not(.admin-view) .gpt-checkout-stats b { font-size: 15px; }
body:not(.admin-view) .gpt-checkout-stats span { padding: 8px 10px; border-radius: var(--r-sm); }
body:not(.admin-view) .gpt-checkout-tabs button { min-height: 36px; }
body:not(.admin-view) .gpt-token-field .textarea { min-height: 96px; }


/* =====================================================================
   NexSMS Shop points records folded — v20260619k
   In 积分兑换 mode the 链接生成记录 + 积分流水 + 兑换记录 sections stacked
   and stretched the page. They are now merged into ONE collapsed
   "我的积分记录" fold so the main shop view stays short.
   ===================================================================== */
.shop-records-fold {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: rgba(8,18,24,.5);
  overflow: hidden;
}
html[data-theme="light"] .shop-records-fold { background: rgba(15,23,42,.02); }
.shop-records-fold > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  cursor: pointer;
  list-style: none;
  font-weight: 800;
}
.shop-records-fold > summary::-webkit-details-marker { display: none; }
.shop-records-fold > summary small { color: var(--muted); font-weight: 600; font-size: 12px; }
.shop-records-fold > summary::after {
  content: "▾";
  margin-left: auto;
  color: var(--muted);
  transition: transform .18s ease;
}
.shop-records-fold[open] > summary::after { transform: rotate(180deg); }
.shop-records-fold .shop-records-body {
  display: grid;
  gap: 12px;
  padding: 0 14px 14px;
}
.shop-records-fold .market-history,
.shop-records-fold .market-generation-history { margin-top: 0; border-top: 0; }


/* =====================================================================
   NexSMS Light-mode button text contrast fix — v20260619l
   In light mode an existing higher-specificity rule forced nav buttons
   to background:transparent, while the active rule kept color:#fff —
   so the active nav label was white-on-light (invisible). Restore the
   blue fill behind the white label, and harden active-tab contrast.
   ===================================================================== */
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .top .actions .btn.secondary.navbtn.active {
  color: #fff !important;
  background: linear-gradient(135deg, #0a84ff, #2bbbff) !important;
  border-color: transparent !important;
  box-shadow: 0 8px 20px rgba(10,132,255,.28) !important;
}

/* Same guard ONLY for tabs whose active fill is a solid blue (white label
   is correct there). Tabs with a light tint or green fill keep dark text. */
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .market-mode-tabs button.active,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .gpt-checkout-tabs button.active {
  color: #fff !important;
}

/* Admin active rail/tabs use a solid blue fill (v…e) → keep white label */
html[data-theme="light"] body.admin-view .rail-item.active,
html[data-theme="light"] body.admin-view .tab-strip button.active,
html[data-theme="light"] body.admin-view .order-tabs button.active,
html[data-theme="light"] body.admin-view .market-admin-type-tabs button.active {
  color: #fff !important;
}


/* =====================================================================
   NexSMS Admin overview layout refinement — v20260619m
   The dashboard rows stretched every panel to the tallest one, so a
   near-empty panel ("充值方式 / 暂无数据") became a big empty box. Let
   panels take their natural height and compact empty states.
   ===================================================================== */
body.admin-view .dashboard-grid,
body.admin-view .dashboard-bottom { align-items: start; }

body.admin-view .dashboard-card .compact-empty,
body.admin-view .dashboard-card .empty {
  padding: 16px;
  border-radius: var(--r-sm);
  color: var(--muted);
  background: rgba(255,255,255,.02);
  text-align: center;
}
html[data-theme="light"] body.admin-view .dashboard-card .compact-empty,
html[data-theme="light"] body.admin-view .dashboard-card .empty {
  background: rgba(15,23,42,.02);
}

/* Keep the tall 收码统计 bucket list from dominating: cap + scroll if huge */
body.admin-view .receive-bucket-list { gap: 8px; }
body.admin-view .dashboard-row-list { gap: 7px; }


/* =====================================================================
   NexSMS Admin sub-tabs — v20260619n
   Real structural fix: long admin pages are split into sub-tabs so each
   view is ~one screen instead of one long scroll. Sub-tabs reuse the
   .tab-strip styling (blue active from v…e).
   ===================================================================== */
body.admin-view .admin-subtabs {
  margin: 6px 0 4px;
  flex-wrap: wrap;
}
body.admin-view .admin-subtabs button { min-width: 96px; }


/* =====================================================================
   NexSMS Login / Landing premium redesign — v20260619p
   Top-market, Apple-grade public entry: balanced large headline, glass
   auth card, refined stat tiles + feature pills, ambient depth.
   Visual-only (no copy/DOM change) → no vendor/internal info exposed.
   ===================================================================== */

/* Ambient premium backdrop for the public entry */
body:not(.admin-view):not(.agent-view) .login-shell {
  position: relative;
  gap: 22px;
  align-items: stretch;
}

/* Hero panel: deeper, cleaner, more whitespace */
body:not(.admin-view):not(.agent-view) .public-hero {
  border-radius: 22px;
  padding: 38px 40px;
  gap: 20px;
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(10,132,255,.18), transparent 46%),
    radial-gradient(90% 80% at 100% 8%, rgba(48,209,88,.10), transparent 50%),
    linear-gradient(180deg, rgba(16,24,33,.96), rgba(6,11,16,.98));
  box-shadow: var(--elev-2);
}
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .public-hero {
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(10,132,255,.12), transparent 46%),
    radial-gradient(90% 80% at 100% 8%, rgba(48,209,88,.08), transparent 50%),
    linear-gradient(180deg, #ffffff, #f3f7fc);
}

/* Headline: balanced, confident, Apple-grade type */
body:not(.admin-view):not(.agent-view) .public-hero h1 {
  font-size: clamp(38px, 4.6vw, 58px);
  line-height: 1.04;
  letter-spacing: -.03em;
  font-weight: 900;
  text-wrap: balance;
  max-width: 16ch;
}
body:not(.admin-view):not(.agent-view) .hero-kicker {
  letter-spacing: .16em;
  font-size: 12px;
  color: var(--cyan);
}
body:not(.admin-view):not(.agent-view) .public-hero .hero-copy {
  font-size: 16px;
  line-height: 1.7;
  color: var(--soft);
  max-width: 52ch;
}

/* Stat tiles + feature card: refined glass */
body:not(.admin-view):not(.agent-view) .hero-stat-row > div,
body:not(.admin-view):not(.agent-view) .public-feature-card {
  border-radius: 16px;
  border: 1px solid var(--hairline);
  background: rgba(255,255,255,.05);
  backdrop-filter: blur(14px) saturate(130%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}
body:not(.admin-view):not(.agent-view) .hero-stat-row strong {
  font-size: 30px; letter-spacing: -.02em; font-variant-numeric: tabular-nums;
}
body:not(.admin-view):not(.agent-view) .public-feature-card span {
  background: rgba(255,255,255,.04);
}

/* Auth card: premium glass, generous, focused */
body:not(.admin-view):not(.agent-view) .auth-card {
  border-radius: 20px;
  padding: 22px;
  border: 1px solid var(--hairline);
  background:
    linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.015)),
    rgba(10,16,22,.7);
  backdrop-filter: blur(20px) saturate(135%);
  box-shadow: var(--elev-2);
}
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .auth-card {
  background: rgba(255,255,255,.92);
}
body:not(.admin-view):not(.agent-view) .auth-tabs {
  gap: 6px; padding: 5px; border-radius: 14px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--hairline);
}
body:not(.admin-view):not(.agent-view) .auth-tabs button {
  min-height: 46px; border-radius: 11px; border: 0; background: transparent;
  color: var(--soft); font-weight: 800;
}
body:not(.admin-view):not(.agent-view) .auth-tabs button.active {
  color: #fff;
  background: linear-gradient(135deg, #0a84ff, #2bbbff);
  box-shadow: 0 8px 20px rgba(10,132,255,.30);
}
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .auth-tabs button.active { color: #fff; }
body:not(.admin-view):not(.agent-view) .auth-card .input {
  min-height: 50px; border-radius: 13px;
}
body:not(.admin-view):not(.agent-view) .auth-card .btn.wide {
  min-height: 52px; border-radius: 13px;
  background: linear-gradient(135deg, #0a84ff, #2bbbff);
  box-shadow: 0 12px 30px rgba(10,132,255,.34);
}

/* User-API admin rows: a touch denser/cleaner stat tiles */
body.admin-view .api-admin-list .stat-pack { gap: 5px; }
body.admin-view .api-admin-list .stat-pack span { padding: 6px 7px; }


/* =====================================================================
   NexSMS Login / Landing — Apple-grade finish — v20260619r
   Elevates the parts that still read generic: the capability card pills
   and the numbered step flow, plus final hero/auth composition.
   Visual-only; no copy/DOM change; no vendor/internal strings.
   ===================================================================== */

/* Hero: a hairline rhythm + refined brand badge */
body:not(.admin-view):not(.agent-view) .public-hero .brand-badge {
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: rgba(255,255,255,.05);
  backdrop-filter: blur(10px);
}
body:not(.admin-view):not(.agent-view) .public-actions .btn.sm {
  border-radius: 999px;
}

/* Capability card: glass panel with refined accent chips */
body:not(.admin-view):not(.agent-view) .public-feature-card {
  border-radius: 18px;
  padding: 18px;
}
body:not(.admin-view):not(.agent-view) .public-feature-card strong {
  display: block;
  margin-bottom: 14px;
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--cyan);
}
body:not(.admin-view):not(.agent-view) .public-feature-card div { gap: 10px; }
body:not(.admin-view):not(.agent-view) .public-feature-card span {
  position: relative;
  min-height: 40px;
  display: flex;
  align-items: center;
  padding: 8px 14px 8px 30px;
  border-radius: 12px;
  border: 1px solid var(--hairline);
  background: rgba(255,255,255,.04);
  color: var(--text);
  font-weight: 700;
  transition: border-color .16s ease, background-color .16s ease, transform .14s ease;
}
body:not(.admin-view):not(.agent-view) .public-feature-card span::before {
  content: "";
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  width: 7px; height: 7px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--green), var(--cyan));
  box-shadow: 0 0 0 4px rgba(48,209,88,.12);
}
body:not(.admin-view):not(.agent-view) .public-feature-card span:hover {
  border-color: rgba(120,150,170,.42);
  background: rgba(255,255,255,.06);
  transform: translateY(-1px);
}

/* Numbered step flow: connected premium stepper */
body:not(.admin-view):not(.agent-view) .public-flow {
  gap: 10px;
  margin-top: 18px;
}
body:not(.admin-view):not(.agent-view) .public-flow div {
  align-content: start;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--hairline);
  background: rgba(255,255,255,.04);
  transition: border-color .16s ease, transform .14s ease;
}
body:not(.admin-view):not(.agent-view) .public-flow div:hover {
  border-color: rgba(120,150,170,.42);
  transform: translateY(-1px);
}
body:not(.admin-view):not(.agent-view) .public-flow b {
  width: 30px; height: 30px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #0a84ff, #2bbbff);
  box-shadow: 0 8px 18px rgba(10,132,255,.32);
  font-weight: 900;
}
body:not(.admin-view):not(.agent-view) .public-flow span {
  color: var(--text);
  font-weight: 800;
}

/* Auth card: refined helper/links row + checkbox line */
body:not(.admin-view):not(.agent-view) .auth-card .legal-line,
body:not(.admin-view):not(.agent-view) .auth-card .checkline {
  margin-top: 4px;
  font-size: 12.5px;
}
body:not(.admin-view):not(.agent-view) .auth-card .field > span {
  font-size: 12px;
  letter-spacing: .02em;
  color: var(--muted);
}

/* Light-mode parity for the new glass chips */
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .public-feature-card span,
html[data-theme="light"] body:not(.admin-view):not(.agent-view) .public-flow div {
  background: rgba(15,23,42,.03);
  border-color: rgba(15,23,42,.10);
}


/* =====================================================================
   NexSMS Trae-style ambient background — v20260619s
   Deep near-black canvas with soft colorful aurora glows (blue / indigo
   / cyan + a green brand hint), shared by the login page and the whole
   post-login app. Subtle transform-only drift (GPU-cheap, no repaint),
   disabled under reduced-motion. Visual-only.
   ===================================================================== */
:root, html[data-theme="dark"] {
  --body-bg:
    radial-gradient(62% 52% at 16% -4%, rgba(10,132,255,.20), transparent 60%),
    radial-gradient(54% 48% at 86% 2%, rgba(124,92,255,.17), transparent 60%),
    radial-gradient(46% 42% at 98% 64%, rgba(100,210,255,.13), transparent 60%),
    radial-gradient(50% 46% at 48% 108%, rgba(48,209,88,.10), transparent 62%),
    linear-gradient(180deg, #07080c 0%, #06070b 48%, #030308 100%);
}

/* Living aurora layer (behind all content) */
body::after {
  content: "";
  position: fixed;
  inset: -25%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(closest-side, rgba(10,132,255,.18), transparent 70%),
    radial-gradient(closest-side, rgba(124,92,255,.16), transparent 70%),
    radial-gradient(closest-side, rgba(100,210,255,.12), transparent 70%);
  background-repeat: no-repeat;
  background-size: 58% 58%, 50% 52%, 46% 46%;
  background-position: 8% -6%, 92% 6%, 60% 104%;
  filter: blur(36px);
  opacity: .9;
  will-change: transform;
  animation: nexAurora 22s ease-in-out infinite alternate;
}
@keyframes nexAurora {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(1.5%, 2%, 0) scale(1.06); }
}
html[data-theme="light"] body::after { display: none; }

/* Keep the grid + content above the aurora */
body::before { z-index: 0; }
.shell { z-index: 1; }

/* Login surfaces read crisp on the aurora: slightly stronger glass */
body:not(.admin-view):not(.agent-view) .public-hero {
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(10,132,255,.16), transparent 46%),
    radial-gradient(90% 80% at 100% 8%, rgba(124,92,255,.14), transparent 50%),
    linear-gradient(180deg, rgba(12,18,26,.86), rgba(6,10,15,.92));
  backdrop-filter: blur(8px);
}

@media (prefers-reduced-motion: reduce) {
  body::after { animation: none !important; }
}


/* =====================================================================
   NexSMS Trae glow — visible glassmorphism — v20260619v
   The aurora was hidden because login panels were near-opaque. Trae's
   look is FROSTED GLASS OVER A VIVID GLOW: boost the aurora, then make
   the login hero + auth card translucent so the colour shows through.
   ===================================================================== */

/* Stronger, more vivid living aurora (dark theme) */
body::after {
  inset: -30%;
  opacity: 1;
  filter: blur(48px) saturate(135%);
  background:
    radial-gradient(closest-side, rgba(10,132,255,.34), transparent 70%),
    radial-gradient(closest-side, rgba(124,92,255,.30), transparent 70%),
    radial-gradient(closest-side, rgba(64,210,255,.22), transparent 72%),
    radial-gradient(closest-side, rgba(48,209,88,.16), transparent 72%);
  background-repeat: no-repeat;
  background-size: 64% 64%, 56% 58%, 50% 50%, 44% 46%;
  background-position: 6% -8%, 96% 4%, 50% 50%, 70% 108%;
}

/* Login hero: frosted glass so the glow reads THROUGH it */
body:not(.admin-view):not(.agent-view) .public-hero {
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(10,132,255,.20), transparent 48%),
    radial-gradient(90% 80% at 100% 4%, rgba(124,92,255,.18), transparent 52%),
    linear-gradient(180deg, rgba(12,18,26,.46), rgba(6,10,15,.58));
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  border: 1px solid rgba(255,255,255,.10);
}

/* Auth card: translucent glass (kept readable for inputs) */
body:not(.admin-view):not(.agent-view) .auth-card {
  background:
    linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02)),
    rgba(10,16,22,.5);
  backdrop-filter: blur(26px) saturate(140%);
  -webkit-backdrop-filter: blur(26px) saturate(140%);
}

/* Inner login tiles stay glassy too so nothing looks like a flat black box */
body:not(.admin-view):not(.agent-view) .hero-stat-row > div,
body:not(.admin-view):not(.agent-view) .public-feature-card,
body:not(.admin-view):not(.agent-view) .public-flow div {
  background: rgba(255,255,255,.05);
  backdrop-filter: blur(12px) saturate(130%);
  -webkit-backdrop-filter: blur(12px) saturate(130%);
}

/* Headline gets a faint glow lift (Trae-style luminous type) */
body:not(.admin-view):not(.agent-view) .public-hero h1 {
  text-shadow: 0 2px 40px rgba(10,132,255,.35);
}

/* App shell (post-login): let the aurora breathe behind the top bar */
body:not(.admin-view):not(.agent-view) .top {
  background: linear-gradient(180deg, rgba(8,12,18,.74), rgba(8,12,18,.5));
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
}


/* =====================================================================
   NexSMS Trae glow — bold & unmistakable — v20260619w
   Prior glow relied on backdrop blur over a dim aurora (too subtle).
   This paints a clearly colourful glow DIRECTLY on the hero + a gradient
   headline, so the Trae look is obvious without depending on blur.
   ===================================================================== */

/* Hero: a visibly colourful dark canvas (blue + violet glow on near-black) */
body:not(.admin-view):not(.agent-view) .public-hero {
  background:
    radial-gradient(78% 66% at 16% -6%, rgba(10,132,255,.48), transparent 56%),
    radial-gradient(70% 64% at 102% 8%, rgba(138,99,255,.42), transparent 56%),
    radial-gradient(62% 60% at 60% 112%, rgba(48,209,88,.20), transparent 60%),
    linear-gradient(180deg, #0b1426 0%, #0a0f1c 60%, #080b16 100%) !important;
  border: 1px solid rgba(124,150,255,.20);
}

/* Headline: luminous gradient text (Trae signature) */
body:not(.admin-view):not(.agent-view) .public-hero h1 {
  background: linear-gradient(104deg, #ffffff 0%, #9fd0ff 42%, #b9a3ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  text-shadow: none;
}

/* Auth card: clearly tinted premium glass */
body:not(.admin-view):not(.agent-view) .auth-card {
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(138,99,255,.16), transparent 55%),
    linear-gradient(180deg, rgba(18,26,40,.78), rgba(10,14,24,.82)) !important;
  border: 1px solid rgba(124,150,255,.22);
}

/* Brand badge + kicker get a touch of the accent */
body:not(.admin-view):not(.agent-view) .hero-kicker {
  color: #b9a3ff;
}

/* App body base a hair lighter so the post-login aurora is visible too */
html[data-theme="dark"] .top {
  border-bottom: 1px solid rgba(124,150,255,.16);
}


/* =====================================================================
   NexSMS Trae living aurora — app-wide + animated — v20260619x
   Post-login showed no glow because dense cards were opaque over the
   aurora. Now: a bolder ANIMATED aurora (Trae 动图 feel) + translucent
   dark-glass panels so the moving colour tints through every page.
   Dark theme only; light theme keeps solid surfaces.
   ===================================================================== */

/* Bolder, clearly-moving aurora */
html[data-theme="dark"] body::after {
  animation: nexAuroraMove 26s ease-in-out infinite alternate;
}
@keyframes nexAuroraMove {
  0%   { transform: translate3d(-2.5%, -1.5%, 0) scale(1);    }
  50%  { transform: translate3d(2.5%,  2.5%, 0) scale(1.10); }
  100% { transform: translate3d(-1.5%, 1.5%, 0) scale(1.05); }
}

/* A second slow-rotating glow layer for a living, Trae-like canvas */
html[data-theme="dark"] body::before {
  background:
    var(--grid-bg),
    radial-gradient(40% 36% at 78% 30%, rgba(138,99,255,.16), transparent 70%),
    radial-gradient(34% 32% at 22% 72%, rgba(10,132,255,.14), transparent 72%);
  background-size: 56px 56px, 100% 100%, 100% 100%;
  animation: nexGlowDrift 32s ease-in-out infinite alternate;
}
@keyframes nexGlowDrift {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-2%, -2%, 0); }
}

/* Translucent dark-glass panels so the moving aurora tints through the
   whole post-login app (cheap: no per-panel blur, the aurora is pre-blurred). */
html[data-theme="dark"] .panel-card {
  background:
    linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.012)),
    rgba(11, 18, 26, .80);
}
html[data-theme="dark"] body.admin-view .card,
html[data-theme="dark"] body.admin-view .dashboard-card,
html[data-theme="dark"] body.admin-view .admin-rail {
  background:
    linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.010)),
    rgba(11, 18, 26, .82);
}
/* Dense object rows / tables a touch translucent too */
html[data-theme="dark"] body.admin-view .admin-object-row {
  background: rgba(9, 15, 22, .72);
}

/* Login hero: animate its own glow so the entry feels alive */
html[data-theme="dark"] body:not(.admin-view):not(.agent-view) .public-hero {
  background-size: 160% 160%, 160% 160%, 140% 140%, 100% 100%;
  animation: nexHeroGlow 18s ease-in-out infinite alternate;
}
@keyframes nexHeroGlow {
  from { background-position: 0% 0%, 100% 0%, 50% 100%, 0 0; }
  to   { background-position: 20% 10%, 80% 20%, 60% 90%, 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  html[data-theme="dark"] body::after,
  html[data-theme="dark"] body::before,
  html[data-theme="dark"] body:not(.admin-view):not(.agent-view) .public-hero {
    animation: none !important;
  }
}


/* =====================================================================
   NexSMS centered premium login layout — v20260619y
   Restructured renderAuth: brand row → centered hero (gradient headline
   + stat chips) → centered glass auth card → condensed feature/step row
   → FAQ. A focused, modern landing+login on the living aurora.
   ===================================================================== */
body:not(.admin-view):not(.agent-view) .auth-page {
  width: min(1060px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 22px;
  padding: 4px 0 48px;
}
body:not(.admin-view):not(.agent-view) .auth-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
body:not(.admin-view):not(.agent-view) .auth-hero {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 14px;
  padding: 14px 0 2px;
}
body:not(.admin-view):not(.agent-view) .auth-hero h1 {
  margin: 0;
  max-width: 19ch;
  font-size: clamp(40px, 6.2vw, 68px);
  line-height: 1.03;
  letter-spacing: -.03em;
  font-weight: 900;
  background: linear-gradient(104deg, #ffffff 0%, #9fd0ff 44%, #b9a3ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
body:not(.admin-view):not(.agent-view) .auth-hero .hero-copy {
  margin: 0;
  max-width: 56ch;
  color: var(--soft);
  font-size: 16px;
  line-height: 1.7;
}
body:not(.admin-view):not(.agent-view) .auth-stat-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 2px;
}
body:not(.admin-view):not(.agent-view) .auth-stat-chips span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: rgba(255, 255, 255, .05);
  backdrop-filter: blur(10px);
  color: var(--soft);
  font-weight: 700;
}
body:not(.admin-view):not(.agent-view) .auth-stat-chips strong {
  color: var(--text);
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}
body:not(.admin-view):not(.agent-view) .auth-card-centered {
  width: min(448px, 100%);
  margin: 2px auto 0;
}
body:not(.admin-view):not(.agent-view) .auth-extras {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 16px;
  align-items: start;
}
@media (max-width: 760px) {
  body:not(.admin-view):not(.agent-view) .auth-extras { grid-template-columns: 1fr; }
  body:not(.admin-view):not(.agent-view) .auth-top { justify-content: center; }
}


/* =====================================================================
   NexSMS login-notice modal premium redesign — v20260619z
   The "接码前请先确认" popup used a dated olive warn-box with bullets.
   Now: premium glass dialog, accent eyebrow, and a clean checked list
   (gradient dot markers) instead of the heavy amber border. Visual-only.
   ===================================================================== */
.notice-modal-backdrop {
  background: rgba(3, 6, 12, .68);
  backdrop-filter: blur(12px) saturate(120%);
  -webkit-backdrop-filter: blur(12px) saturate(120%);
}
.notice-modal {
  width: min(560px, 94vw);
  border-radius: 20px;
  padding: 22px;
  border: 1px solid rgba(124,150,255,.20);
  background:
    radial-gradient(120% 70% at 100% 0%, rgba(138,99,255,.14), transparent 55%),
    linear-gradient(180deg, rgba(18,26,40,.92), rgba(10,14,24,.94));
  box-shadow: var(--elev-2);
}
.notice-modal-head { align-items: flex-start; }
.notice-modal-head .label {
  color: var(--cyan);
  letter-spacing: .16em;
  font-size: 11px;
}
.notice-modal-head h3 {
  margin: 6px 0 0;
  font-size: 22px;
  letter-spacing: -.02em;
}
.notice-modal-head .icon-btn {
  border-radius: 12px;
  border: 1px solid var(--hairline);
  background: rgba(255,255,255,.04);
  transition: background-color .15s ease, border-color .15s ease;
}
.notice-modal-head .icon-btn:hover { background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.2); }

/* Clean checked list, no olive box */
.notice.login-notice-lines {
  margin: 16px 0 0;
  list-style: none;
  display: grid;
  gap: 11px;
  padding: 16px;
  border: 1px solid var(--hairline) !important;
  border-radius: 14px;
  background: rgba(255,255,255,.03) !important;
  color: var(--soft) !important;
  max-height: 56vh;
  overflow: auto;
}
.notice.login-notice-lines li {
  position: relative;
  padding-left: 28px;
  line-height: 1.6;
}
.notice.login-notice-lines li::before {
  content: "";
  position: absolute;
  left: 8px;
  top: .62em;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--green), var(--cyan));
  box-shadow: 0 0 0 4px rgba(48,209,88,.12);
}
.notice-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}
.notice-modal-actions .btn { min-width: 132px; min-height: 44px; }

html[data-theme="light"] .notice-modal {
  background: linear-gradient(180deg, #ffffff, #f5f8fd);
  border-color: rgba(15,23,42,.10);
}
html[data-theme="light"] .notice.login-notice-lines {
  background: rgba(15,23,42,.02) !important;
  color: #334155 !important;
}


/* =====================================================================
   NexSMS Agent login — centered premium (mirror of user login) — v20260619z2
   The agent login was excluded from the user-login redesign. Apply the
   same centered .auth-page treatment + aurora glass to body.agent-view.
   ===================================================================== */
body.agent-view .auth-page {
  width: min(1060px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 22px;
  padding: 4px 0 48px;
}
body.agent-view .auth-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
body.agent-view .auth-hero { display: grid; justify-items: center; text-align: center; gap: 14px; padding: 14px 0 2px; }
body.agent-view .auth-hero h1 {
  margin: 0;
  max-width: 19ch;
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.04;
  letter-spacing: -.03em;
  font-weight: 900;
  background: linear-gradient(104deg, #ffffff 0%, #9fd0ff 44%, #b9a3ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
body.agent-view .auth-hero p {
  margin: 0;
  max-width: 56ch;
  color: var(--soft);
  font-size: 16px;
  line-height: 1.7;
}
body.agent-view .hero-kicker {
  margin: 0;
  color: var(--cyan);
  font-weight: 900;
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
}
body.agent-view .auth-stat-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
body.agent-view .auth-stat-chips span {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: rgba(255,255,255,.05);
  backdrop-filter: blur(10px);
  color: var(--soft);
  font-weight: 700;
}
body.agent-view .auth-card-centered { width: min(448px, 100%); margin: 2px auto 0; }
html[data-theme="dark"] body.agent-view .auth-card {
  border: 1px solid rgba(124,150,255,.20);
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(138,99,255,.14), transparent 55%),
    linear-gradient(180deg, rgba(18,26,40,.78), rgba(10,14,24,.82));
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  border-radius: 20px;
}
html[data-theme="dark"] body.agent-view .top {
  background: linear-gradient(180deg, rgba(8,12,18,.74), rgba(8,12,18,.5));
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
}


/* =====================================================================
   NexSMS GPT link generator — compact merge v2 — v20260620b
   The tool was still too tall (big title + 3 stat boxes + long desc +
   help + tall textarea). Tighten everything into a compact panel.
   ===================================================================== */
body:not(.admin-view) .gpt-checkout-inline { max-width: 600px; }
body:not(.admin-view) .gpt-checkout-inline-body { gap: 8px; }
body:not(.admin-view) .gpt-checkout-inline-body h3 { font-size: clamp(18px, 1.8vw, 22px); }

/* Merge the meta + stats into one tight, low-profile info row */
body:not(.admin-view) .gpt-checkout-inline-body .market-meta { gap: 6px; }
body:not(.admin-view) .gpt-checkout-inline-body .market-meta span { font-size: 11px; padding: 3px 9px; }
body:not(.admin-view) .gpt-checkout-stats { gap: 6px; }
body:not(.admin-view) .gpt-checkout-stats span { padding: 6px 8px; border-radius: var(--r-xs); }
body:not(.admin-view) .gpt-checkout-stats b { font-size: 14px; }
body:not(.admin-view) .gpt-checkout-stats small { font-size: 10px; }

/* Trim the description + help to a compact hint */
body:not(.admin-view) .gpt-checkout-inline-body .market-detail-desc {
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}
body:not(.admin-view) .gpt-checkout-help summary { min-height: 36px; padding: 7px 11px; font-size: 12px; }

/* Smaller token box + tighter controls */
body:not(.admin-view) .gpt-token-field .textarea { min-height: 70px; }
body:not(.admin-view) .gpt-token-field > span { font-size: 12px; }
body:not(.admin-view) .gpt-checkout-tabs button { min-height: 34px; font-size: 12.5px; }
body:not(.admin-view) .gpt-checkout-inline .field > span { font-size: 12px; }
body:not(.admin-view) .gpt-checkout-inline .row-actions .btn { min-height: 40px; }


/* =====================================================================
   NexSMS Shop topbar merge — v20260620e
   The 商品 hero and the 购买积分 box were two stacked full-width rows.
   Merge them side-by-side into one row (hero left, buy-points right) to
   reclaim vertical space; stack only on narrow screens.
   ===================================================================== */
body:not(.admin-view) .market-topbar {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, .85fr);
  gap: 14px;
  align-items: stretch;
}
/* both cells become equal-height cards in the same row */
body:not(.admin-view) .market-topbar > .market-hero { margin: 0; height: 100%; }
body:not(.admin-view) .market-topbar > .market-points-buy {
  margin: 0;
  height: 100%;
  align-content: center;
}
/* compact the buy-points box for the narrower right column */
body:not(.admin-view) .market-topbar .market-points-buy {
  grid-template-columns: 1fr;
  gap: 10px;
}
body:not(.admin-view) .market-topbar .points-buy-form {
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 10px;
}
@media (max-width: 880px) {
  body:not(.admin-view) .market-topbar { grid-template-columns: 1fr; }
}

/* Orders page: keep fixed Telegram support away from pagination/actions. */
body.orders-view:not(.admin-view):not(.agent-view) .wrap {
  padding-bottom: max(132px, calc(18px + env(safe-area-inset-bottom)));
}

body.orders-view:not(.admin-view):not(.agent-view) .support-fab {
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
  place-items: center;
  width: 52px;
  min-width: 52px;
  height: 52px;
  min-height: 52px;
  padding: 5px;
  border-radius: 999px;
}

body.orders-view:not(.admin-view):not(.agent-view) .support-fab > span {
  grid-row: auto;
  width: 40px;
  height: 40px;
}

body.orders-view:not(.admin-view):not(.agent-view) .support-fab b,
body.orders-view:not(.admin-view):not(.agent-view) .support-fab small {
  display: none;
}

@media (max-width: 760px) {
  body.orders-view:not(.admin-view):not(.agent-view) .wrap {
    padding-bottom: max(148px, calc(18px + env(safe-area-inset-bottom)));
  }
}
/* CDK user and public redemption surfaces */
.cdk-user-page { display: grid; gap: 16px; }
.cdk-stat-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
.cdk-stat-strip > div {
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  padding: 12px;
  background: var(--soft-panel);
}
.cdk-stat-strip span,
.cdk-block-head span { display: block; color: var(--muted); font-size: 12px; }
.cdk-stat-strip strong { display: block; margin-top: 4px; font-size: 22px; }
.cdk-tabs { width: max-content; max-width: 100%; }
.cdk-buy-grid {
  display: grid;
  grid-template-columns: minmax(260px, .9fr) minmax(320px, 1.1fr);
  gap: 14px;
  align-items: start;
}
.cdk-buy-left,
.cdk-buy-right,
.cdk-redeem-panel {
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  background: var(--soft-panel);
  padding: 14px;
  display: grid;
  gap: 12px;
}
.cdk-block-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.cdk-block-head strong { font-size: 15px; }
.cdk-picker-list {
  display: grid;
  gap: 8px;
  max-height: 320px;
  overflow: auto;
  padding-right: 4px;
}
.cdk-service-tabs { margin-bottom: 0; }
.country-list-mini { max-height: 380px; }
.cdk-offer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cdk-offer-card {
  text-align: left;
  min-height: 112px;
  border: 1px solid var(--line-soft);
}
.cdk-offer-card.active {
  border-color: rgba(100, 210, 255, .72);
  box-shadow: 0 0 0 2px rgba(100, 210, 255, .14);
}
.cdk-offer-card strong { display: block; margin: 8px 0 4px; font-size: 24px; }
.cdk-meta-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.cdk-meta-panel .wide-field { grid-column: 1 / -1; }
.cdk-qty-panel {
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
}
.cdk-total {
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  padding: 12px;
  background: var(--soft-panel-strong);
}
.cdk-total span,
.cdk-total small { display: block; color: var(--muted); }
.cdk-total strong { display: block; margin: 4px 0; font-size: 24px; }
.cdk-generated { display: grid; gap: 10px; }
.cdk-generated-actions,
.cdk-redeem-actions,
.cdk-toolbar .order-search-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cdk-code-list { display: grid; gap: 8px; max-height: 260px; overflow: auto; }
.cdk-code-list > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  padding: 8px;
  background: var(--input-bg);
}
.cdk-table code,
.cdk-code-list code { overflow-wrap: anywhere; }
.cdk-batch-cell {
  display: grid;
  gap: 3px;
  min-width: 150px;
}
.cdk-batch-cell strong,
.cdk-batch-cell small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cdk-batch-cell small {
  color: var(--muted);
  font-size: 12px;
}
.cdk-redeem-panel { grid-template-columns: minmax(0, 1fr) auto; }
.cdk-rules { grid-column: 1 / -1; }

.cdk-public-shell {
  width: min(1040px, calc(100vw - 24px));
  margin: 0 auto;
  padding: 18px 0 28px;
}
.cdk-public-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 850;
}
.brand-badge img {
  width: 34px;
  height: 34px;
  border-radius: 8px;
}
.cdk-gate-shell {
  min-height: calc(100svh - 46px);
  display: grid;
  place-items: start center;
  padding-top: clamp(54px, 18vh, 150px);
}
.cdk-gate-panel {
  width: min(520px, 100%);
  display: grid;
  gap: 12px;
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  padding: 16px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}
.cdk-gate-title {
  display: grid;
  gap: 2px;
}
.cdk-gate-title h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1.15;
}
.cdk-gate-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}
.cdk-gate-row .input {
  min-height: 42px;
  font-size: 15px;
  letter-spacing: 0;
}
.cdk-gate-help {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.cdk-workbench {
  display: grid;
  gap: 10px;
}
.cdk-order-card {
  display: grid;
  grid-template-columns: minmax(145px, .72fr) minmax(210px, 1fr) minmax(190px, .9fr) minmax(165px, .78fr) minmax(236px, .96fr);
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  padding: 12px;
  background: linear-gradient(145deg, rgba(255,255,255,.08), rgba(255,255,255,.035));
  box-shadow: var(--shadow-soft);
}
.cdk-order-status,
.cdk-order-cell {
  min-width: 0;
  display: grid;
  gap: 4px;
}
.cdk-order-status strong,
.cdk-order-status small,
.cdk-order-status code,
.cdk-order-cell strong,
.cdk-order-cell small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cdk-order-status .pill {
  width: fit-content;
}
.cdk-order-status strong {
  font-size: 17px;
  line-height: 1.12;
}
.cdk-order-status small,
.cdk-order-cell span,
.cdk-order-cell small {
  color: var(--muted);
  font-size: 12px;
}
.cdk-order-status code {
  width: fit-content;
  max-width: 100%;
  color: var(--soft);
  font-size: 12px;
}
.cdk-order-cell strong {
  font-size: 19px;
  line-height: 1.16;
}
.cdk-order-time strong {
  color: #6bd6ff;
  font-size: 22px;
}
.cdk-cell-actions,
.cdk-panel-actions,
.cdk-order-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}
.cdk-order-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(112px, 1fr));
}
.cdk-cell-actions .btn,
.cdk-panel-actions .btn,
.cdk-order-actions .btn {
  min-height: 34px;
  justify-content: center;
  padding-inline: 8px;
  font-size: 13px;
}
.cdk-cell-actions .btn span,
.cdk-panel-actions .btn span,
.cdk-order-actions .btn span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cdk-workbench-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, .72fr);
  grid-template-areas:
    "number status"
    "sms status";
  gap: 10px;
  align-items: start;
}
.cdk-number-card { grid-area: number; }
.cdk-sms-card { grid-area: sms; }
.cdk-status-card { grid-area: status; }
.cdk-status-card,
.cdk-number-card,
.cdk-sms-card { display: grid; gap: 10px; }
.cdk-hints {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.cdk-hints p {
  margin: 0;
}
.status-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}
.status-head strong,
.status-head span { overflow-wrap: anywhere; }
.status-head > span { color: var(--muted); font-size: 12px; }
.compact-title { margin-bottom: 0; }
.compact-title h2 {
  font-size: 20px;
  line-height: 1.18;
}
.compact-title {
  gap: 10px;
}
.compact-title > div {
  min-width: 0;
}
.compact-title .cdk-panel-actions {
  justify-content: flex-end;
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}
.detail-grid > div {
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  padding: 8px;
  background: var(--soft-panel);
}
.detail-grid span { display: block; color: var(--muted); font-size: 12px; margin-bottom: 3px; }
.detail-grid strong { overflow-wrap: anywhere; }
.cdk-message-list {
  display: grid;
  gap: 7px;
  max-height: 300px;
  overflow: auto;
}
.cdk-message-list > div {
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  padding: 9px;
  background: var(--input-bg);
}
.cdk-message-list p { margin: 6px 0; color: var(--soft); overflow-wrap: anywhere; }
.cdk-message-list small { color: var(--muted); }
.cdk-order-card svg,
.cdk-public-page .btn svg { width: 16px; height: 16px; flex: 0 0 auto; }

.cdk-public-shell {
  width: min(1224px, calc(100vw - 28px));
  padding-top: 10px;
}
.cdk-workbench {
  width: 100%;
  max-width: 1224px;
  margin: 0 auto;
}
.cdk-redemption-card {
  border: 1px solid rgba(125, 211, 252, .18);
  border-radius: 8px;
  background: rgba(5, 18, 22, .84);
  box-shadow: 0 20px 60px rgba(0,0,0,.34);
  overflow: hidden;
}
.cdk-card-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(125, 211, 252, .14);
  background: rgba(255,255,255,.035);
}
.cdk-card-toolbar > div {
  min-width: 0;
}
.cdk-card-toolbar strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 13px;
  color: var(--soft);
}
.cdk-order-table-head,
.cdk-order-main-row {
  display: grid;
  grid-template-columns: minmax(86px, .62fr) minmax(130px, .95fr) minmax(170px, 1.22fr) minmax(120px, .8fr) minmax(70px, .48fr) minmax(140px, .94fr) minmax(160px, .86fr);
  gap: 14px;
  align-items: center;
}
.cdk-order-table-head {
  min-height: 40px;
  padding: 0 14px;
  color: var(--muted);
  font-size: 12px;
  border-bottom: 1px solid rgba(125, 211, 252, .12);
  background: rgba(5, 18, 22, .5);
}
.cdk-order-main-row {
  min-height: 112px;
  padding: 18px 14px;
  border-bottom: 1px solid rgba(125, 211, 252, .14);
}
.cdk-row-cell {
  min-width: 0;
  display: grid;
  gap: 5px;
}
.cdk-row-cell strong {
  color: var(--text);
  font-size: 15px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.cdk-row-cell small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.cdk-status-cell .pill {
  width: fit-content;
  min-width: 80px;
  justify-content: center;
}
.cdk-count-cell strong {
  font-size: 17px;
}
.cdk-time-cell strong {
  color: #38bdf8;
  font-size: 17px;
}
.cdk-action-stack {
  display: grid;
  gap: 8px;
  align-self: stretch;
  align-content: center;
}
.cdk-action-stack .btn {
  width: 100%;
  min-height: 38px;
  justify-content: center;
}
.cdk-action-stack .btn span {
  white-space: normal;
  overflow-wrap: anywhere;
}
.cdk-order-detail-row {
  display: grid;
  grid-template-columns: minmax(360px, .86fr) minmax(0, 1fr);
  grid-template-areas:
    "copy info"
    "copy messages"
    "copy hints";
  gap: 10px;
  padding: 10px;
}
.cdk-copy-panel {
  grid-area: copy;
  display: grid;
  gap: 10px;
  align-content: start;
}
.cdk-copy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.cdk-copy-grid .btn {
  min-height: 44px;
  justify-content: center;
  background: rgba(20, 83, 95, .42);
  border-color: rgba(125, 211, 252, .18);
}
.cdk-copy-grid .btn:disabled {
  opacity: .46;
}
.cdk-sms-preview,
.cdk-info-panel,
.cdk-message-panel,
.cdk-hints {
  border: 1px solid rgba(125, 211, 252, .13);
  border-radius: 8px;
  background: rgba(0, 0, 0, .16);
}
.cdk-sms-preview {
  min-height: 110px;
  padding: 12px;
  display: grid;
  gap: 5px;
}
.cdk-sms-preview span,
.cdk-message-panel > span,
.cdk-info-panel span {
  color: var(--muted);
  font-size: 12px;
}
.cdk-sms-preview strong {
  font-size: 18px;
  overflow-wrap: anywhere;
}
.cdk-sms-preview small {
  color: var(--soft);
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.cdk-info-panel {
  grid-area: info;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
}
.cdk-info-panel > div {
  min-width: 0;
  padding: 10px;
  border-right: 1px solid rgba(125, 211, 252, .1);
  border-bottom: 1px solid rgba(125, 211, 252, .1);
}
.cdk-info-panel strong {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.cdk-message-panel {
  grid-area: messages;
  padding: 10px;
  display: grid;
  gap: 8px;
}
.cdk-message-list {
  max-height: 190px;
}
.cdk-hints {
  grid-area: hints;
  padding: 9px 10px;
}

@media (max-width: 860px) {
  .cdk-stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cdk-buy-grid,
  .cdk-redeem-panel,
  .cdk-qty-panel { grid-template-columns: 1fr; }
  .cdk-order-table-head {
    display: none;
  }
  .cdk-order-main-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    min-height: 0;
  }
  .cdk-row-cell {
    min-height: 66px;
    padding: 10px;
    border: 1px solid rgba(125, 211, 252, .12);
    border-radius: 8px;
    background: rgba(0,0,0,.14);
  }
  .cdk-row-cell::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12px;
  }
  .cdk-action-stack {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .cdk-order-detail-row {
    grid-template-columns: 1fr;
    grid-template-areas:
      "copy"
      "info"
      "messages"
      "hints";
  }
  .cdk-info-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .cdk-order-card {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .cdk-order-actions {
    grid-column: 1 / -1;
  }
  .cdk-workbench-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "number"
      "sms"
      "status";
  }
}

@media (max-width: 560px) {
  .cdk-public-shell { width: min(100vw - 16px, 1040px); padding: 10px 0 20px; }
  .cdk-public-top { margin-bottom: 8px; }
  .cdk-gate-shell { min-height: calc(100svh - 30px); padding-top: 24vh; }
  .cdk-gate-panel { padding: 12px; }
  .cdk-gate-row,
  .detail-grid,
  .cdk-offer-grid,
  .cdk-meta-panel,
  .cdk-code-list > div { grid-template-columns: 1fr; }
  .cdk-card-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
  .cdk-card-toolbar .btn {
    width: 100%;
    justify-content: center;
  }
  .cdk-order-main-row,
  .cdk-action-stack,
  .cdk-copy-grid,
  .cdk-info-panel {
    grid-template-columns: 1fr;
  }
  .cdk-order-card,
  .cdk-order-actions { grid-template-columns: 1fr; }
  .cdk-panel-actions,
  .cdk-cell-actions { width: 100%; }
  .cdk-panel-actions .btn,
  .cdk-cell-actions .btn { flex: 1 1 120px; }
  .cdk-stat-strip { grid-template-columns: 1fr; }

  body.long-term-view .wrap {
    overflow: auto;
    padding: 10px 10px 14px;
  }
  .long-term-page {
    width: 100%;
    padding: 10px;
  }
  .long-term-layout {
    grid-template-columns: 1fr;
  }
  .long-term-list-body {
    max-height: none;
  }
  .lt-row {
    grid-template-columns: 1fr;
  }
  .lt-actions {
    justify-content: flex-start;
  }
  .lt-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .lt-detail-url {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 340px) {
  .cdk-panel-actions .btn,
  .cdk-cell-actions .btn { flex-basis: 100%; }
  .lt-detail-grid {
    grid-template-columns: 1fr;
  }
}

/* User 20260626: low-height workbench scrolling + compact CDK management. */
@media (min-width: 901px) {
  body.workbench-view:not(.admin-view):not(.agent-view),
  body.workbench-view:not(.admin-view):not(.agent-view) .shell {
    height: 100dvh;
  }

  body.workbench-view:not(.admin-view):not(.agent-view) .workbench,
  body.workbench-view:not(.admin-view):not(.agent-view) .selector-panel {
    min-height: 0;
  }

  body.workbench-view:not(.admin-view):not(.agent-view) .selector-panel {
    height: 100%;
    max-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }

  body.workbench-view:not(.admin-view):not(.agent-view) .selector-panel .field,
  body.workbench-view:not(.admin-view):not(.agent-view) .selector-panel .field.section {
    min-height: 0;
  }

  body.workbench-view:not(.admin-view):not(.agent-view) .country-list {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }
}

@media (min-width: 901px) and (max-height: 780px) {
  body.workbench-view:not(.admin-view):not(.agent-view) .wrap {
    padding-top: 8px;
    padding-bottom: 8px;
  }

  body.workbench-view:not(.admin-view):not(.agent-view) .selector-panel {
    gap: 9px;
    padding: 12px;
    align-content: start;
  }

  body.workbench-view:not(.admin-view):not(.agent-view) .side-head strong {
    font-size: 18px;
  }

  body.workbench-view:not(.admin-view):not(.agent-view) .service-tabs {
    margin: 4px 0 7px;
  }

  body.workbench-view:not(.admin-view):not(.agent-view) .pick-row {
    min-height: 50px;
    padding: 7px 8px;
    border-radius: 12px;
  }

  body.workbench-view:not(.admin-view):not(.agent-view) .service-mark {
    width: 35px;
    height: 35px;
    border-radius: 10px;
  }

  body.workbench-view:not(.admin-view):not(.agent-view) .selector-panel .field.section {
    display: block;
    overflow: visible;
  }

  body.workbench-view:not(.admin-view):not(.agent-view) .country-list {
    min-height: 190px;
    max-height: 260px;
  }
}

@media (min-width: 901px) {
  body.long-term-view,
  body.long-term-view .shell {
    height: 100dvh;
  }

  body.long-term-view .wrap {
    height: 100%;
    max-width: none;
    overflow: auto;
    scrollbar-gutter: stable;
    -webkit-overflow-scrolling: touch;
  }

  body.long-term-view .long-term-page {
    min-height: 0;
  }

  body.long-term-view .long-term-layout {
    align-items: start;
  }

  body.long-term-view .long-term-list-body {
    max-height: 56vh;
  }
}

@media (min-width: 901px) and (max-height: 780px) {
  body.long-term-view .wrap {
    padding-top: 8px;
    padding-bottom: 8px;
  }

  body.long-term-view .long-term-page {
    gap: 8px;
    padding: 8px;
  }

  body.long-term-view .long-term-layout {
    gap: 8px;
  }

  body.long-term-view .long-term-list-body {
    max-height: 52vh;
  }

  body.long-term-view .long-term-page .section-title h2 {
    font-size: 20px;
  }
}

body:not(.admin-view):not(.agent-view) .cdk-user-page {
  width: min(1120px, 100%);
  margin: 0 auto;
  gap: 10px;
  padding: 14px;
  border-radius: 12px;
}

body:not(.admin-view):not(.agent-view) .cdk-user-page .section-title {
  gap: 10px;
}

body:not(.admin-view):not(.agent-view) .cdk-user-page .section-title h2 {
  font-size: 24px;
  line-height: 1.18;
}

body:not(.admin-view):not(.agent-view) .cdk-user-page .section-title p {
  font-size: 13px;
  line-height: 1.45;
}

body:not(.admin-view):not(.agent-view) .cdk-user-page .section-title .actions .btn,
body:not(.admin-view):not(.agent-view) .cdk-user-page .btn {
  min-height: 36px;
  padding: 7px 10px;
  border-radius: 10px;
  font-size: 13px;
}

body.long-term-view .top {
  position: sticky;
}

body.long-term-view .workbench {
  display: block;
}

body.long-term-view .wrap > .panel-card {
  min-height: 0;
}

body:not(.admin-view):not(.agent-view) .cdk-stat-strip {
  gap: 8px;
}

body:not(.admin-view):not(.agent-view) .cdk-stat-strip > div {
  padding: 9px 10px;
  border-radius: 10px;
}

body:not(.admin-view):not(.agent-view) .cdk-stat-strip span,
body:not(.admin-view):not(.agent-view) .cdk-block-head span {
  font-size: 11px;
}

body:not(.admin-view):not(.agent-view) .cdk-stat-strip strong {
  margin-top: 2px;
  font-size: 19px;
}

body:not(.admin-view):not(.agent-view) .cdk-tabs {
  border-radius: 12px;
}

@media (min-width: 861px) {
  body:not(.admin-view):not(.agent-view) .cdk-buy-grid {
    grid-template-columns: minmax(250px, .82fr) minmax(320px, 1fr);
  }
}

body:not(.admin-view):not(.agent-view) .cdk-buy-grid {
  gap: 10px;
}

body:not(.admin-view):not(.agent-view) .cdk-buy-left,
body:not(.admin-view):not(.agent-view) .cdk-buy-right,
body:not(.admin-view):not(.agent-view) .cdk-redeem-panel {
  gap: 9px;
  padding: 10px;
  border-radius: 10px;
}

body:not(.admin-view):not(.agent-view) .cdk-block-head {
  gap: 8px;
}

body:not(.admin-view):not(.agent-view) .cdk-block-head strong {
  font-size: 14px;
}

body:not(.admin-view):not(.agent-view) .cdk-service-tabs .service-tab {
  min-height: 34px;
  border-radius: 10px;
  font-size: 13px;
}

body:not(.admin-view):not(.agent-view) .cdk-picker-list {
  gap: 6px;
  max-height: 246px;
}

body:not(.admin-view):not(.agent-view) .country-list-mini {
  max-height: 252px;
}

body:not(.admin-view):not(.agent-view) .cdk-picker-list .pick-row {
  min-height: 48px;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 8px;
  padding: 6px 8px;
  border-radius: 11px;
}

body:not(.admin-view):not(.agent-view) .cdk-picker-list .service-mark,
body:not(.admin-view):not(.agent-view) .cdk-picker-list .flag {
  width: 34px;
  height: 34px;
  border-radius: 10px;
}

body:not(.admin-view):not(.agent-view) .cdk-picker-list .pick-row strong {
  font-size: 13.5px;
}

body:not(.admin-view):not(.agent-view) .cdk-picker-list .pick-row small {
  font-size: 11px;
}

body:not(.admin-view):not(.agent-view) .cdk-offer-grid {
  gap: 9px;
}

body:not(.admin-view):not(.agent-view) .cdk-offer-card {
  min-height: 86px;
  padding: 10px;
  border-radius: 10px;
}

body:not(.admin-view):not(.agent-view) .cdk-offer-card strong {
  margin: 4px 0 3px;
  font-size: 20px;
}

body:not(.admin-view):not(.agent-view) .cdk-offer-card small,
body:not(.admin-view):not(.agent-view) .cdk-meta-panel .field > span,
body:not(.admin-view):not(.agent-view) .cdk-qty-panel .field > span {
  font-size: 11px;
}

body:not(.admin-view):not(.agent-view) .cdk-meta-panel,
body:not(.admin-view):not(.agent-view) .cdk-qty-panel {
  gap: 8px;
}

body:not(.admin-view):not(.agent-view) .cdk-meta-panel .input,
body:not(.admin-view):not(.agent-view) .cdk-qty-panel .input {
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 9px;
  font-size: 13px;
}

body:not(.admin-view):not(.agent-view) .cdk-qty-panel {
  grid-template-columns: minmax(136px, 210px) minmax(0, 1fr);
}

body:not(.admin-view):not(.agent-view) .cdk-total {
  padding: 10px;
  border-radius: 10px;
}

body:not(.admin-view):not(.agent-view) .cdk-total strong {
  margin: 2px 0;
  font-size: 20px;
}

body:not(.admin-view):not(.agent-view) .cdk-generated {
  gap: 8px;
}

body:not(.admin-view):not(.agent-view) .cdk-code-list {
  gap: 6px;
  max-height: 190px;
}

body:not(.admin-view):not(.agent-view) .cdk-code-list > div {
  padding: 7px;
  border-radius: 9px;
}
