:root {
  --primary: #05c3dd;
  --primary-soft: rgba(5, 195, 221, .14);
  --green: #00e9a3;
  --red: #ff3d5f;
  --yellow: #f6c453;
  --bg: #000;
  --bg-2: #050606;
  --panel: #121212;
  --panel-2: #171717;
  --panel-3: #1c1d1f;
  --line: #242527;
  --line-soft: rgba(255, 255, 255, .07);
  --text: #fff;
  --muted: #9b9b9b;
  --muted-2: #666;
  --sidebar-w: 248px;
  --topbar-h: 64px;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }

/* ---- login ---- */
.login-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at 18% 12%, rgba(5, 195, 221, .12), transparent 30%),
    radial-gradient(circle at 82% 78%, rgba(0, 233, 163, .06), transparent 28%),
    linear-gradient(180deg, #020404 0%, #000 100%);
}
.login-card {
  width: min(440px, 100%);
  margin: auto;
  padding: 36px 32px 32px;
  border-radius: 18px;
  border: 1px solid var(--line-soft);
  background:
    radial-gradient(circle at 10% 0%, rgba(5, 195, 221, .06), transparent 34%),
    linear-gradient(135deg, #141515 0%, #101212 58%, #111514 100%);
  box-shadow: 0 22px 70px rgba(0, 0, 0, .35);
}
.login-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  font-size: 22px;
  font-weight: 900;
}
.login-brand .mark {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: url("../icons/favicon.svg") center / contain no-repeat;
  flex-shrink: 0;
}
.login-card h1 {
  margin: 0 0 28px;
  font-size: 28px;
  font-weight: 900;
}
.login-card .sub {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 14px;
}

/* ---- layout ---- */
.admin-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
}
.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, #0d0e0f 0%, #080909 100%);
  scrollbar-width: thin;
  scrollbar-color: #333 transparent;
}
.admin-sidebar-head {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  font-size: 18px;
  font-weight: 900;
}
.admin-sidebar-head .mark {
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 7px;
  background: url("../icons/favicon.svg") center / contain no-repeat;
  flex-shrink: 0;
}
.admin-nav-section {
  padding: 14px 12px 6px;
}
.admin-nav-title {
  padding: 0 10px 8px;
  color: var(--muted-2);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.admin-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 12px;
  margin-bottom: 4px;
  border-radius: 10px;
  color: #cfcfcf;
  font-size: 14px;
  font-weight: 600;
  transition: background .16s ease, color .16s ease;
}
.admin-nav-link:hover {
  background: rgba(255, 255, 255, .04);
  color: #fff;
}
.admin-nav-link.active {
  background: var(--primary-soft);
  color: var(--primary);
}
.admin-nav-link .ic {
  width: 18px;
  text-align: center;
  opacity: .85;
}
.admin-sidebar-foot {
  padding: 16px 18px 24px;
  border-top: 1px solid var(--line);
  margin-top: 12px;
}
.admin-sidebar-foot small {
  display: block;
  color: var(--muted-2);
  font-size: 12px;
  margin-bottom: 10px;
}
.admin-main-wrap {
  min-width: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
}
.admin-topbar {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 9, 9, .92);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.admin-topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.admin-menu-toggle {
  display: none;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: #fff;
}
.admin-breadcrumb {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.admin-breadcrumb strong {
  color: #fff;
  font-weight: 800;
}
.admin-topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.admin-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: #ddd;
  font-size: 13px;
  font-weight: 700;
}
.admin-pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
}
.admin-logout-btn {
  height: 36px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: #ddd;
  font-size: 13px;
  font-weight: 700;
}
.admin-logout-btn:hover { border-color: var(--red); color: var(--red); }
.admin-content {
  padding: 24px;
  flex: 1;
  width: 100%;
  max-width: none;
  min-width: 0;
}
.admin-content > [data-admin-content] {
  display: block;
  width: 100%;
  max-width: none;
}

/* ---- common ui ---- */
.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}
.page-head h1 {
  margin: 0 0 6px;
  font-size: 28px;
  font-weight: 900;
}
.page-head p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.btn {
  height: 38px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: #eee;
  font-size: 13px;
  font-weight: 700;
}
.btn:hover { border-color: #3a3c3f; }
.btn.primary {
  border-color: transparent;
  background: linear-gradient(180deg, #08b7d0 0%, #0795aa 100%);
  color: #fff;
}
.btn.danger {
  border-color: rgba(255, 61, 95, .35);
  color: var(--red);
  background: rgba(255, 61, 95, .08);
}
.btn.ghost {
  background: transparent;
}
.btn.sm {
  height: 32px;
  padding: 0 12px;
  font-size: 12px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}
.stat-card {
  padding: 20px;
  border-radius: 14px;
  border: 1px solid var(--line-soft);
  background:
    radial-gradient(circle at 10% 0%, rgba(5, 195, 221, .05), transparent 34%),
    linear-gradient(135deg, #141515 0%, #101212 100%);
}
.stat-card .label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 10px;
}
.stat-card .value {
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
}
.stat-card .delta {
  margin-top: 10px;
  font-size: 12px;
  font-weight: 700;
}
.stat-card .delta.up { color: var(--green); }
.stat-card .delta.down { color: var(--red); }

.panel {
  border-radius: 14px;
  border: 1px solid var(--line-soft);
  background: var(--panel);
  overflow: hidden;
}
.panel + .panel { margin-top: 18px; }
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}
.panel-head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
}
.panel-head-split {
  align-items: flex-start;
}
.panel-sub {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.panel-body { padding: 18px; }

.settings-rule-head,
.settings-rule-row {
  display: grid;
  gap: 12px;
  align-items: center;
}
.settings-rule-head-3,
.settings-rule-row-3 {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 88px;
}
.settings-rule-head-5,
.settings-rule-row-5 {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) 88px;
}
.settings-rule-head-tier,
.settings-rule-row-tier {
  grid-template-columns: minmax(110px, 1.1fr) minmax(88px, .8fr) minmax(88px, .8fr) minmax(72px, .7fr) 72px;
}
.settings-rule-head-featured,
.settings-rule-row-featured {
  grid-template-columns: 72px minmax(160px, 1.4fr) minmax(120px, 1fr) 120px;
}
.featured-preview-list {
  display: grid;
  gap: 10px;
}
.featured-preview-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #101114;
}
.featured-preview-rank {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
}
.featured-preview-main {
  flex: 1 1 220px;
  min-width: 0;
}
.featured-preview-main strong {
  color: #fff;
}
.featured-preview-main small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}
.featured-slot-actions {
  display: flex;
  gap: 6px;
}

.settings-rule-head {
  margin-bottom: 10px;
  padding: 0 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.settings-rule-list {
  display: grid;
  gap: 10px;
}
.settings-empty {
  margin: 0;
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.referral-tree-root {
  display: grid;
  gap: 12px;
}
.referral-tree-node {
  display: grid;
  gap: 10px;
}
.referral-tree-children {
  display: grid;
  gap: 10px;
  margin-left: calc(var(--depth, 1) * 18px);
  padding-left: 14px;
  border-left: 1px dashed rgba(5, 195, 221, .25);
}
.referral-tree-card {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #121315;
}
.referral-tree-card strong {
  color: var(--primary);
}
.referral-tree-card small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.ann-i18n-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 18px 0 14px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.ann-i18n-section {
  margin-top: 4px;
}
.ann-lang-tabs {
  margin-bottom: 12px;
}
.ann-lang-panel {
  display: none;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #101114;
}
.ann-lang-panel.open {
  display: block;
}
.ann-lang-panel .field + .field {
  margin-top: 12px;
}
.ann-lang-panel .field label {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ann-lang-badge {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(5, 195, 221, .12);
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
}
.ann-lang-badge.missing {
  background: rgba(255, 180, 60, .12);
  color: #ffb43c;
}

.settings-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.settings-tab {
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #121315;
  color: #cfcfcf;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.settings-tab:hover {
  border-color: rgba(5, 195, 221, .35);
  color: #fff;
}
.settings-tab.active {
  border-color: rgba(5, 195, 221, .45);
  background: var(--primary-soft);
  color: var(--primary);
}
.settings-tab-panel {
  display: none;
}
.settings-tab-panel.open {
  display: block;
}
.settings-tab-panel.panel + .settings-tab-panel.panel.open {
  margin-top: 0;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}
.field {
  display: grid;
  gap: 6px;
}
/* 避免 .field { display:grid } 盖掉 HTML hidden，导致登录分步字段关不掉 */
[hidden] {
  display: none !important;
}
.login-error {
  display: none;
  margin: 0 0 4px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 61, 95, .4);
  background: rgba(255, 61, 95, .12);
  color: #ff8a9a;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
}
.login-error.show {
  display: block;
}
.field label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.input, .select {
  height: 38px;
  min-width: 160px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0d0e0f;
  color: #fff;
  outline: none;
}
.input:focus, .select:focus { border-color: rgba(5, 195, 221, .55); }
.textarea {
  min-height: 120px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0d0e0f;
  color: #fff;
  resize: vertical;
  outline: none;
}

.table-wrap { overflow-x: auto; }
.data-table {
  width: 100%;
  border-collapse: collapse;
}
.data-table th,
.data-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  white-space: nowrap;
}
.data-table th {
  color: var(--muted);
  font-weight: 700;
  background: rgba(255, 255, 255, .02);
}
.data-table td { color: #e8e8e8; }
.data-table tr:hover td { background: rgba(255, 255, 255, .02); }
.data-table .actions {
  display: flex;
  gap: 8px;
}

.badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}
.badge.green { background: rgba(0, 233, 163, .12); color: var(--green); }
.badge.red { background: rgba(255, 61, 95, .12); color: var(--red); }
.badge.yellow { background: rgba(246, 196, 83, .12); color: var(--yellow); }
.badge.cyan { background: var(--primary-soft); color: var(--primary); }
.badge.gray { background: rgba(255, 255, 255, .06); color: #bbb; }

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.form-grid .full { grid-column: 1 / -1; }

.empty {
  padding: 48px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 14px;
  color: var(--muted);
  font-size: 13px;
}
.pagination-meta {
  flex: 0 0 auto;
  white-space: nowrap;
  writing-mode: horizontal-tb;
}
.pagination .pages {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  flex: 1 1 auto;
  min-width: 0;
}
.page-btn {
  min-width: 32px;
  width: auto;
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: #ddd;
  flex: 0 0 auto;
}
.page-btn.active {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}
.page-btn:disabled {
  opacity: .35;
  cursor: not-allowed;
}

/* ---- dashboard extras ---- */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
#dashPending.quick-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.quick-card {
  padding: 18px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel-2);
}
.quick-card h3 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 800;
}
.quick-card p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.split-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: stretch;
}
.panel-dash-side {
  display: flex;
  flex-direction: column;
  height: min(520px, 70vh);
  min-height: 0;
}
.panel-dash-side .panel-head {
  flex-shrink: 0;
}
.panel-dash-side .panel-body-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, .22) transparent;
}
.panel-dash-side .panel-body-scroll::-webkit-scrollbar {
  width: 6px;
}
.panel-dash-side .panel-body-scroll::-webkit-scrollbar-track {
  background: transparent;
}
.panel-dash-side .panel-body-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, .22);
  border-radius: 999px;
}
.panel-dash-side .panel-body-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, .35);
}
.panel-dash-side .panel-body-scroll::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}
.activity-list {
  display: grid;
  gap: 12px;
}
.activity-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.activity-item:last-child { border-bottom: 0; padding-bottom: 0; }
.activity-item strong { font-size: 14px; }
.activity-item span { color: var(--muted); font-size: 12px; }

/* ---- modal / toast ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, .65);
}
.modal-overlay.open { display: grid; }
.modal {
  width: min(560px, 100%);
  max-height: 90vh;
  overflow: auto;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 24px 80px rgba(0, 0, 0, .5);
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.modal::-webkit-scrollbar {
  display: none;
}
.modal.modal-lg { width: min(720px, 100%); }
.modal.modal-sm { width: min(420px, 100%); }
.modal-tabs {
  display: flex;
  gap: 8px;
  padding: 0 18px 14px;
  border-bottom: 1px solid var(--line);
}
.modal-tab {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
}
.modal-tab.active,
.modal-tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, .05);
}
.modal-tab.active { color: var(--primary); background: var(--primary-soft); }
.modal-hint {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.modal-foot-split {
  justify-content: space-between;
}
.modal-foot-actions {
  display: flex;
  gap: 10px;
}
.data-table input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}
.modal-head h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
}
.modal-close {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 20px;
}
.modal-body { padding: 18px; }
.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 18px 18px;
}

.kyc-detail-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 18px;
}
.kyc-meta-item {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #121315;
}
.kyc-meta-item span {
  color: var(--muted);
  font-size: 12px;
}
.kyc-meta-item strong {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.kyc-reject-box {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 28, 65, .35);
  background: rgba(255, 28, 65, .08);
}
.kyc-reject-box strong {
  display: block;
  margin-bottom: 6px;
  color: #ff6b84;
  font-size: 13px;
}
.kyc-reject-box p {
  margin: 0;
  color: #f0d0d6;
  font-size: 13px;
  line-height: 1.55;
}
.kyc-doc-section {
  margin-top: 18px;
}
.kyc-doc-section h4 {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 700;
}
.kyc-doc-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.kyc-doc-card {
  margin: 0;
}
.kyc-doc-preview {
  aspect-ratio: 4 / 3;
  display: grid;
  place-content: center;
  gap: 8px;
  padding: 12px;
  border-radius: 10px;
  border: 1px dashed #3a3d42;
  background: linear-gradient(180deg, #17191c 0%, #101113 100%);
  text-align: center;
}
.kyc-doc-type {
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
}
.kyc-doc-label {
  color: var(--muted);
  font-size: 12px;
}
.kyc-doc-card figcaption {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.balance-accounts-cell {
  min-width: 420px;
  color: #cfcfcf;
  font-size: 12px;
  line-height: 1.55;
}
.balance-adjust-user {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 18px;
  margin-bottom: 14px;
}
.balance-adjust-list {
  display: grid;
  gap: 12px;
}
.balance-adjust-row {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(220px, 1.2fr);
  gap: 14px;
  align-items: end;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #121315;
}
.balance-adjust-label {
  display: grid;
  gap: 4px;
}
.balance-adjust-label strong {
  font-size: 14px;
}
.balance-adjust-label small {
  color: var(--muted);
  font-size: 12px;
}
.balance-adjust-input {
  margin: 0;
}
.balance-adjust-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(5, 195, 221, .25);
  background: rgba(5, 195, 221, .08);
}
.balance-adjust-total span {
  color: var(--muted);
  font-size: 13px;
}
.balance-adjust-total strong {
  color: var(--primary);
  font-size: 16px;
}
.balance-adjust-note {
  margin-top: 14px;
}

.toast-wrap {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 120;
  display: grid;
  gap: 8px;
}
.toast {
  min-width: 240px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #17181a;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .35);
  animation: toast-in .2s ease;
}
.toast.success { border-color: rgba(0, 233, 163, .35); }
.toast.error { border-color: rgba(255, 61, 95, .35); }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1100px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split-panels, .grid-2, .quick-grid { grid-template-columns: 1fr; }
  .panel-dash-side { height: min(420px, 60vh); }
}
@media (max-width: 900px) {
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 50;
    width: min(var(--sidebar-w), 86vw);
    transform: translateX(-105%);
    transition: transform .2s ease;
  }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-menu-toggle { display: inline-grid; place-items: center; }
  .form-grid { grid-template-columns: 1fr; }
}
