﻿* { box-sizing: border-box; }
:root {
  --bg: #f0f4f8;
  --surface: #ffffff;
  --surface-2: #f7f9fc;
  --surface-3: #eef2f7;
  --ink: #0d1b2a;
  --ink-2: #1e293b;
  --muted: #475569;
  --muted-2: #64748b;
  --line: #e2e8f0;
  --line-2: #f1f5f9;
  --brand: #4f46e5;
  --brand-dark: #4338ca;
  --brand-light: #6366f1;
  --brand-soft: #eef2ff;
  --brand-glow: rgba(79, 70, 229, 0.18);
  --accent: #4f46e5;
  --accent-soft: #eef2ff;
  --warning: #f59e0b;
  --danger: #ef4444;
  --danger-soft: #fef2f2;
  --ok: #10b981;
  --ok-soft: #d1fae5;
  --shadow: 0 20px 60px rgba(13, 27, 42, 0.10), 0 4px 16px rgba(13, 27, 42, 0.06);
  --shadow-sm: 0 1px 3px rgba(13, 27, 42, 0.06), 0 1px 2px rgba(13, 27, 42, 0.04);
  --shadow-md: 0 4px 16px rgba(13, 27, 42, 0.08), 0 2px 6px rgba(13, 27, 42, 0.05);
  --shadow-brand: 0 8px 32px rgba(79, 70, 229, 0.28), 0 2px 8px rgba(79, 70, 229, 0.16);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  font-family: "Inter", "SF Pro Display", "PingFang SC", "Microsoft YaHei UI", system-ui, sans-serif;
  font-feature-settings: "cv02","cv03","cv04","cv11";
}
body {
  min-height: 100dvh;
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
body::-webkit-scrollbar {
  display: none;
}
html {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
html::-webkit-scrollbar {
  display: none;
}
button, input { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }

.auth-screen {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    linear-gradient(135deg, rgba(79, 70, 229, 0.95), rgba(67, 56, 202, 0.92)),
    url("/static/login-wallpaper.jpg") center/cover;
}
.auth-panel {
  width: min(1100px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 420px;
  gap: 40px;
  align-items: center;
}
.auth-copy {
  min-height: 560px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 12px 20px 12px 8px;
  color: #fff;
}
.auth-brand {
  display: grid;
  gap: 28px;
  max-width: 520px;
  padding-top: 8px;
}
.auth-brand-visual {
  width: fit-content;
  padding: 6px;
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.06));
  box-shadow:
    0 24px 56px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.30);
  backdrop-filter: blur(12px);
}
.auth-brand-logo {
  display: block;
  width: 136px;
  height: 136px;
  border-radius: 18px;
  object-fit: cover;
}
.auth-brand-quote {
  margin: 0;
  padding: 0;
  border: 0;
  display: grid;
  gap: 10px;
  max-width: 480px;
}
.auth-brand-quote-line {
  display: block;
  color: rgba(255, 255, 255, 0.96);
  font-size: clamp(28px, 3.8vw, 40px);
  font-weight: 800;
  line-height: 1.28;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.auth-brand-quote-line--accent {
  font-size: clamp(32px, 4.4vw, 46px);
  line-height: 1.22;
  background: linear-gradient(120deg, #ffffff 0%, #ccfbf1 55%, #99f6e4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: none;
}
.brand-lockup, .side-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
}
.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: inline-grid;
  place-items: center;
  background: #ffffff;
  color: var(--brand-dark);
  font-weight: 900;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}
img.brand-mark.brand-mark-img {
  display: block;
  padding: 0;
  object-fit: cover;
  object-position: center;
  font-weight: normal;
}
.auth-card {
  align-self: center;
  display: grid;
  gap: 14px;
  padding: 32px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 24px;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.88) 0%,
    rgba(255, 255, 255, 0.62) 100%
  );
  box-shadow:
    0 32px 80px rgba(15, 23, 42, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -1px 0 rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
}
.auth-pane { display: grid; gap: 12px; }
.sms-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}
.sms-code-field { display: grid; gap: 6px; }
.sms-demo-hint {
  margin: 0;
  padding: 10px 14px;
  border-radius: 10px;
  background: #f0fdfa;
  border: 1px solid #99f6e4;
  color: #0f766e;
  font-size: 13px;
  line-height: 1.5;
}
input[type="tel"] {
  width: 100%;
  min-height: 44px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  padding: 10px 14px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.eyebrow {
  margin: 0 0 6px;
  color: var(--brand);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .10em;
  text-transform: uppercase;
}
.auth-card h2 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.auth-card p { margin: 0; color: var(--muted); line-height: 1.55; font-size: 14px; }
label { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: 0.01em; }
input[type="email"], input[type="password"], input[type="number"], input[type="search"], input[type="text"] {
  width: 100%;
  min-height: 42px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  padding: 10px 14px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  font-size: 14px;
}
input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.12), 0 1px 4px rgba(13, 148, 136, 0.08);
}
input::placeholder { color: var(--muted-2); }
.form-error {
  min-height: 18px;
  color: var(--danger) !important;
  font-size: 13px;
}
.text-button {
  border: 0;
  background: transparent;
  color: var(--brand);
  font-weight: 700;
  padding: 8px;
  transition: color 0.15s;
}
.btn {
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  font-weight: 600;
  font-size: 13.5px;
  letter-spacing: -0.01em;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, opacity .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(0.99); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none !important; box-shadow: none !important; }
.btn.primary {
  background: linear-gradient(135deg, #0d9488 0%, #0597b0 100%);
  color: white;
  border-color: rgba(255,255,255,0.15);
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.30), 0 1px 3px rgba(13, 148, 136, 0.18), inset 0 1px 0 rgba(255,255,255,0.15);
}
.btn.primary:hover {
  background: linear-gradient(135deg, #0f9e91 0%, #0aa3c0 100%);
  box-shadow: 0 6px 20px rgba(13, 148, 136, 0.38), 0 2px 6px rgba(13, 148, 136, 0.20);
}
.btn.secondary {
  background: linear-gradient(135deg, #1e293b, #0d1b2a);
  color: white;
  border-color: rgba(255,255,255,0.08);
  box-shadow: 0 2px 6px rgba(13, 27, 42, 0.20), inset 0 1px 0 rgba(255,255,255,0.08);
}
.btn.secondary:hover {
  background: linear-gradient(135deg, #273549, #111f30);
  box-shadow: 0 4px 14px rgba(13, 27, 42, 0.28);
}
.btn.ghost {
  background: #fff;
  color: var(--ink-2);
  border-color: var(--line);
  box-shadow: 0 1px 3px rgba(13, 27, 42, 0.06);
}
.btn.ghost:hover {
  background: var(--surface-2);
  border-color: #cbd5e1;
  box-shadow: var(--shadow-sm);
}
.btn.danger {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: #fecaca;
}
.btn.danger:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.14);
}
.btn-sm { min-height: 30px; padding: 4px 12px; font-size: 12px; }

.app {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 20px 14px;
  background: linear-gradient(180deg, #0d1b2a 0%, #0a1628 55%, #081220 100%);
  color: #fff;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 2px 0 20px rgba(0, 0, 0, 0.15);
}
.side-brand {
  padding: 6px 6px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.side-brand .brand-mark {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  flex-shrink: 0;
  box-shadow: none;
  border: none;
  outline: none;
}
.side-brand img.brand-mark.brand-mark-img {
  width: 40px;
  height: 40px;
  border: none;
  outline: none;
  background: #0a0f0d;
  border-radius: 10px;
  box-shadow: none;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
}
.side-brand small {
  display: block;
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.70);
  font-size: 11px;
  letter-spacing: 0.01em;
}
.nav-list {
  display: grid;
  gap: 2px;
  padding: 20px 0;
}
.nav-item {
  position: relative;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  padding: 11px 12px;
  text-align: left;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  overflow: hidden;
}
.nav-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0;
  background: var(--brand);
  border-radius: 0 2px 2px 0;
  transition: height 0.2s ease;
}
.nav-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}
.nav-item-title,
.nav-item > span:not(.nav-item-row):not(.nav-badge) {
  display: block;
  color: inherit;
  font-weight: 700;
  font-size: 14px;
}
.nav-item small {
  display: block;
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 11px;
}
.nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.88);
}
.nav-item.active {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.22), rgba(99, 102, 241, 0.12));
  border-color: rgba(99, 102, 241, 0.35);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 2px 8px rgba(79, 70, 229, 0.18);
}
.nav-item.active::before {
  height: 60%;
}
.side-bottom {
  margin-top: auto;
  display: grid;
  gap: 10px;
}
.side-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(8px);
  color: rgba(255, 255, 255, 0.82);
}
.side-footer strong { color: #fff; font-size: 20px; font-weight: 800; }
.side-actions {
  display: grid;
  gap: 8px;
}
.side-user {
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
}
.side-user span {
  display: block;
  color: rgba(255, 255, 255, 0.88);
  font-size: 13px;
  font-weight: 700;
}
.side-user small {
  display: block;
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 11px;
}
.side-logout-btn {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(239, 68, 68, 0.28);
  border-radius: 10px;
  background: rgba(239, 68, 68, 0.08);
  color: rgba(252, 165, 165, 0.90);
  font-weight: 700;
  font-size: 13px;
  transition: background 0.15s, border-color 0.15s;
}
.side-logout-btn:hover {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.45);
}
.topbar-logout {
  color: var(--danger);
  border-color: #fecaca;
}
.topbar-logout:hover {
  background: #fef2f2;
}

.workspace {
  min-width: 0;
  padding: 28px 32px;
  padding-bottom: 90px;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 26px;
}
.topbar h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1.2;
}
.top-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.view { animation: fadeView .20s cubic-bezier(0.22,1,0.36,1); }
@keyframes fadeView {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.metrics-grid--compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.table-scroll {
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.table-scroll::-webkit-scrollbar {
  display: none;
}
.metric, .panel, .catalog-band, .wallet-card, .topup-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.metric {
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
}
.metric::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.6) 0%, rgba(255,255,255,0) 60%);
  pointer-events: none;
}
.metric:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.metric span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.metric strong {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--ink);
}
.metric-financial {
  background: linear-gradient(145deg, #f8fafc, #fff);
}
.metric.accent {
  background: linear-gradient(135deg, #0d9488 0%, #0597b0 60%, #0891b2 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: var(--shadow-brand);
}
.metric.accent::before { background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0) 60%); }
.metric.accent span { color: rgba(255, 255, 255, .88); }
.metric.accent strong { color: #fff; }
.notice {
  margin: 0 0 16px;
  border: 1px solid #fde68a;
  border-radius: 12px;
  background: linear-gradient(135deg, #fffbeb, #fef9e7);
  color: #854d0e;
  padding: 12px 16px;
}
.panel { overflow: hidden; }
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface-2) 0%, var(--surface) 100%);
}
.panel-head h2, .catalog-band h2, .topup-card h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.panel-head p, .catalog-band p, .wallet-card p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.5;
  font-size: 13px;
}
.orders-panel-head {
  align-items: flex-start;
  flex-wrap: wrap;
}
.orders-search {
  min-width: 220px;
  max-width: 320px;
  flex: 1 1 260px;
  flex-shrink: 0;
}
.orders-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  flex: 1 1 760px;
  max-width: min(100%, 960px);
  margin-left: auto;
}
.orders-filter-row {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.orders-filter-select {
  height: 38px;
  min-width: 126px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  padding: 0 30px 0 11px;
  font-size: 12px;
  font-weight: 800;
  box-shadow: var(--shadow-sm);
}
.orders-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 12px;
}
.orders-page-size,
.orders-pager-buttons {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.orders-page-size select {
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  padding: 0 28px 0 10px;
  font-weight: 700;
}
.orders-page-indicator {
  color: var(--muted);
  min-width: 72px;
  text-align: center;
}
.orders-list-sub {
  margin-top: 4px;
  font-size: 12px;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 850px;
}
.data-table th {
  padding: 11px 16px;
  background: var(--surface-2);
  color: #475569;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .10em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}
.data-table td {
  padding: 13px 16px;
  border-top: 1px solid var(--line-2);
  vertical-align: middle;
}
.data-table tbody tr {
  transition: background .12s ease;
}
.data-table tbody tr:hover {
  background: linear-gradient(90deg, rgba(13,148,136,0.03) 0%, rgba(248,250,252,0.8) 100%);
}
.orders-table { min-width: 980px; }
.orders-table .col-otp { min-width: 148px; }
.orders-table tbody tr.has-code {
  background: linear-gradient(90deg, rgba(209, 250, 229, 0.40) 0%, transparent 28%);
}
.orders-table tbody tr.has-code:hover {
  background: linear-gradient(90deg, rgba(209, 250, 229, 0.60) 0%, #f8fafc 28%);
}
.order-service {
  display: flex;
  align-items: center;
  gap: 10px;
}
.order-svc-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  background: linear-gradient(135deg, #0d9488, #0f766e);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}
.order-svc-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.status-cell {
  position: relative;
  min-width: 170px;
  white-space: nowrap;
}
.otp-cell { min-width: 140px; }
.otp-box {
  display: grid;
  gap: 4px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: #fff;
}
.otp-box--ready {
  border-color: #4ade80;
  background: linear-gradient(145deg, #f0fdf4 0%, #fff 100%);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.10), 0 4px 12px rgba(22, 101, 52, 0.10);
}
.otp-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #16a34a;
}
.otp-code {
  font-family: "JetBrains Mono", "Consolas", "SF Mono", "Segoe UI Mono", monospace;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: #14532d;
  line-height: 1.1;
}
.otp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}
.otp-copy {
  justify-self: start;
  border: 1px solid #bbf7d0;
  border-radius: 6px;
  background: #fff;
  color: #166534;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  transition: background 0.15s;
}
.otp-copy:hover { background: #dcfce7; border-color: #86efac; }
.otp-ack {
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  background: #fff;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  transition: background 0.15s;
}
.otp-ack:hover { background: #eff6ff; border-color: #93c5fd; }
.otp-box--waiting {
  display: flex;
  align-items: center;
  gap: 8px;
  border-style: dashed;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.otp-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3b82f6;
  animation: otp-pulse 1.4s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes otp-pulse {
  0%, 100% { opacity: 0.30; transform: scale(0.88); }
  50% { opacity: 1; transform: scale(1.12); }
}
.otp-empty { color: #cbd5e1; font-size: 18px; font-weight: 700; }

.otp-ack-history {
  margin: 0 16px 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.35);
}
.otp-history-title {
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 4px;
}
.otp-history-hint {
  font-size: 12px;
  line-height: 1.45;
  margin: 0 0 10px;
}
.otp-history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.otp-history-item {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 10px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #e2e8f0;
}
.otp-history-code {
  font-size: 18px;
  letter-spacing: 0.04em;
  color: #0f766e;
}
.otp-history-at { font-size: 12px; }
.otp-history-copy { margin-left: auto; }
.empty-row { text-align: center; padding: 48px !important; }
.rent-cell strong, .price-cell strong { display: block; }
.time-cell { white-space: nowrap; color: var(--muted); font-size: 13px; }
.service-cell strong, .phone-cell strong { display: block; }
.service-cell small, .phone-cell small, .muted { color: var(--muted); font-size: 12px; }
.phone-cell {
  min-width: 148px;
}
.phone-cell-inner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
}
.phone-number {
  font-family: "JetBrains Mono", "Consolas", "SF Mono", "Segoe UI Mono", monospace;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--ink);
  line-height: 1.25;
}
.phone-pending {
  font-size: 14px;
}
.phone-copy-btn {
  flex-shrink: 0;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--brand, #4f46e5);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.phone-copy-btn:hover {
  background: rgba(79, 70, 229, 0.08);
  border-color: rgba(79, 70, 229, 0.35);
}
.phone-copy-btn--done {
  color: #059669;
  border-color: rgba(5, 150, 105, 0.35);
  background: #ecfdf5;
}
.phone-cell strong {
  font-family: "JetBrains Mono", "Consolas", "SF Mono", "Segoe UI Mono", monospace;
  letter-spacing: 0.04em;
}
.region-cell { white-space: nowrap; }
.region-label {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  color: #475569;
  font-size: 11px;
  font-weight: 700;
}
.service-cell .reuse-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  color: #4338ca;
  background: #eef2ff;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 22px;
  border-radius: 999px;
  padding: 3px 10px 3px 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: var(--surface-3);
  color: #475569;
  border: 1px solid transparent;
}
.badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.6;
  flex-shrink: 0;
}
.badge.received, .badge.active_ok {
  background: #f0fdf4;
  color: #15803d;
  border-color: #bbf7d0;
}
.badge.active, .badge.pending {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}
.badge.expired, .badge.failed, .badge.banned, .badge.unavailable {
  background: #fef2f2;
  color: #dc2626;
  border-color: #fecaca;
}
.badge.stuck_no_code {
  background: #faf5ff;
  color: #7e22ce;
  border-color: #e9d5ff;
}
.badge.grace {
  background: #fff7ed;
  color: #c2410c;
  border-color: #fed7aa;
}
.badge.released, .badge.cancelled, .badge.unknown {
  background: var(--surface-3);
  color: #64748b;
  border-color: var(--line);
}
.badge.not_logged_in {
  background: #fefce8;
  color: #a16207;
  border-color: #fde68a;
}
.expiry-banner {
  margin-bottom: 16px;
  padding: 14px 18px;
  border-radius: 12px;
  border: 1px solid #fed7aa;
  background: linear-gradient(135deg, #fff7ed, #fffbeb);
  color: #9a3412;
  font-size: 14px;
  line-height: 1.55;
}
.expiry-banner strong { color: #c2410c; }
.expiry-banner.critical {
  border-color: #fecaca;
  background: linear-gradient(135deg, #fef2f2, #fff7ed);
  color: #991b1b;
}
.expiry-banner.critical strong { color: #b91c1c; }

/* ── 缺货预约 ─────────────────────────────────────────── */
#backorder-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-color: #bae6fd;
  background: linear-gradient(135deg, #f0f9ff, #eff6ff);
  color: #075985;
}
#backorder-banner.hidden { display: none; }
.backorder-list {
  max-height: 420px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 14px 0;
}
.backorder-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 10px;
  background: #fff;
}
.backorder-item-main { min-width: 0; }
.backorder-item-main .muted { font-size: 12px; }
.backorder-item-side {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.backorder-item .status-badge {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: #f1f5f9;
  color: #475569;
}
.backorder-item .status-badge.status-pending { background: #fef9c3; color: #854d0e; }
.backorder-item .status-badge.status-fulfilled { background: #d1fae5; color: #065f46; }
.backorder-item .status-badge.status-cancelled { background: #f1f5f9; color: #64748b; }
#view-backorders .backorder-list { max-height: none; margin: 4px 0 0; }
.backorder-section-title { font-size: 13px; font-weight: 700; color: #334155; margin: 4px 0; }
.backorder-section-title.muted { color: #94a3b8; font-weight: 600; }
.order-row.expiry-notice { background: #fffbeb; }
.order-row.expiry-warning { background: #fff7ed; }
.order-row.expiry-critical,
.order-row.expiry-grace { background: #fef2f2; }
.order-row.expiry-lapsed { background: var(--surface-2); opacity: 0.90; }
.account-login-badge--lapsed { background: #fee2e2; color: #991b1b; }
.account-login-badge--invalid { background: var(--surface-2); color: var(--muted); }
.badge.order-released-badge {
  display: inline-block;
  background: #e2e8f0;
  color: #475569;
  font-weight: 700;
  cursor: default;
  user-select: none;
}
#wa-status-bar.released {
  background: var(--surface-2);
  border-color: var(--line);
}
.rent-cell small.expiry-notice { color: #b45309; font-weight: 700; }
.rent-cell small.expiry-warning { color: #c2410c; font-weight: 700; }
.rent-cell small.expiry-critical,
.rent-cell small.expiry-grace { color: #b91c1c; font-weight: 700; }
.plan-tag {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  vertical-align: middle;
}
.plan-tag--renew { background: #dcfce7; color: #166534; }
.plan-tag--short { background: #fef3c7; color: #92400e; }
.rent-plan--renewable.selected { border-color: #16a34a; }
.badge.released, .badge.cancelled, .badge.unknown { background: var(--surface-2); color: #475569; }
.badge.not_logged_in { background: #fef3c7; color: #92400e; }
.account-status-wrap {
  display: grid;
  gap: 6px;
}
.account-status-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 96px;
  max-width: 132px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 8px 6px 10px;
  background: #fff;
  color: #334155;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.account-status-trigger:hover {
  transform: translateY(-1px);
  border-color: rgba(15, 139, 127, 0.35);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.10);
}
.account-status-trigger small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}
.account-status-trigger--compact {
  width: 112px;
}
.account-status-trigger--normal { background: #ecfdf3; color: #067647; border-color: #abefc6; }
.account-status-trigger--pending_unban { background: #fffaeb; color: #b54708; border-color: #fedf89; }
.account-status-trigger--permanent_ban { background: #fff1f3; color: #b42318; border-color: #fecdd6; }
.account-status-trigger--unused { background: #f8fafc; color: #475467; border-color: #e2e8f0; }
.account-status-trigger--stuck_no_code { background: #f4ebff; color: #6941c6; border-color: #d6bbfb; }
.account-status-segments {
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
.account-status-segments--compact {
  flex-wrap: wrap;
  max-width: 168px;
}
.account-status-segment {
  border: 0;
  border-radius: 999px;
  padding: 6px 10px;
  background: transparent;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}
.account-status-segment:hover:not(.active):not(:disabled) {
  background: #fff;
  color: var(--ink);
}
.account-status-segment.active {
  color: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.16);
}
.account-status-segment--normal.active { background: #16a34a; }
.account-status-segment--pending_unban.active { background: #d97706; }
.account-status-segment--permanent_ban.active { background: #dc2626; }
.account-status-segment--unused.active { background: #64748b; }
.account-status-segment--stuck_no_code.active { background: #7e22ce; }

.account-login-badge--unused { background: #e2e8f0; color: #475569; }
.account-login-badge { font-weight: 600; }
.account-login-badge--normal { background: #dcfce7; color: #166534; }
.account-login-badge--pending_unban { background: #fef3c7; color: #92400e; }
.account-login-badge--permanent_ban { background: #fee2e2; color: #991b1b; }
.account-login-badge--stuck_no_code { background: #f3e8ff; color: #6b21a8; }
.account-status-segment:disabled {
  opacity: 0.65;
  cursor: wait;
}
.account-status-segments.is-saving {
  opacity: 0.72;
  pointer-events: none;
}
.account-status-segments.is-saving::after {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-left: 6px;
  border: 2px solid rgba(0, 0, 0, 0.12);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: account-status-spin 0.7s linear infinite;
  vertical-align: middle;
}
@keyframes account-status-spin {
  to { transform: rotate(360deg); }
}
.status-cell {
  position: relative;
  min-width: 170px;
  white-space: nowrap;
}
.status-grace-tag {
  color: #9a3412;
  font-size: 11px;
  font-weight: 700;
}
.wa-status-line {
  margin-top: 8px;
}
.wa-status-bar .account-status-trigger {
  width: 100%;
  max-width: none;
  margin: 10px 0 8px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
}
.wa-status-bar .account-status-segments {
  display: flex;
  width: 100%;
  margin-top: 8px;
  margin-bottom: 8px;
}
.wa-status-bar .account-status-segment {
  flex: 1;
  padding: 10px 12px;
  font-size: 13px;
}
.account-status-picker-card {
  width: min(520px, calc(100vw - 32px));
}
.account-status-options {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}
.account-status-option {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px 14px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.account-status-option:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(15, 139, 127, 0.30);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.10);
}
.account-status-option.active {
  border-width: 2px;
}
.account-status-option:disabled {
  opacity: 0.72;
  cursor: wait;
}
.account-status-option-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #94a3b8;
}
.account-status-option-main {
  display: grid;
  gap: 4px;
}
.account-status-option-main strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}
.account-status-option-main small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
.account-status-option-check {
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 900;
}
.account-status-option--normal .account-status-option-dot { background: #12b76a; }
.account-status-option--pending_unban .account-status-option-dot { background: #f79009; }
.account-status-option--permanent_ban .account-status-option-dot { background: #f04438; }
.account-status-option--unused .account-status-option-dot { background: #667085; }
.account-status-option--stuck_no_code .account-status-option-dot { background: #7f56d9; }
.account-status-option--normal.active { background: #ecfdf3; border-color: #75e0a7; }
.account-status-option--pending_unban.active { background: #fffaeb; border-color: #fedf89; }
.account-status-option--permanent_ban.active { background: #fff1f3; border-color: #fda29b; }
.account-status-option--unused.active { background: #f8fafc; border-color: #cbd5e1; }
.account-status-option--stuck_no_code.active { background: #f4ebff; border-color: #d6bbfb; }
code {
  border-radius: 8px;
  background: #f0fdfa;
  color: var(--brand-dark);
  padding: 3px 8px;
  font-weight: 800;
  font-family: "JetBrains Mono", "Consolas", "SF Mono", monospace;
  font-size: 0.9em;
}

.catalog-band {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  padding: 22px;
  margin-bottom: 14px;
  background:
    linear-gradient(120deg, rgba(204, 251, 241, .60), rgba(255, 255, 255, .97)),
    var(--surface);
}
.catalog-stats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.catalog-stats span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  padding: 6px 14px;
  font-weight: 700;
  font-size: 12px;
  box-shadow: var(--shadow-sm);
}
/* ── Service type tabs: 短期租赁 / 长租号码 ──────────────────────────── */
.catalog-type-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 16px 0 14px;
}
.cat-type-tab {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
  transition: border-color .18s, background .18s, box-shadow .18s;
  text-align: left;
  font-family: inherit;
}
.cat-type-tab:hover {
  border-color: var(--brand-light);
  background: var(--brand-soft);
}
.cat-type-tab.active {
  border-color: var(--brand);
  background: var(--brand-soft);
  box-shadow: 0 0 0 3px var(--brand-glow);
}
.cat-tab-ico {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  color: var(--muted);
  transition: color .18s;
}
.cat-type-tab.active .cat-tab-ico { color: var(--brand); }
.cat-tab-body { display: flex; flex-direction: column; }
.cat-tab-title {
  font-size: .9rem;
  font-weight: 700;
  color: var(--ink);
  transition: color .18s;
  line-height: 1.3;
}
.cat-type-tab.active .cat-tab-title { color: var(--brand); }
.cat-tab-hint {
  font-size: .73rem;
  color: var(--muted);
  margin-top: 3px;
  line-height: 1.3;
}
/* Rental price in service cards */
.price-rental { color: var(--brand); font-weight: 800; font-size: 14px; }
.price-unit { font-size: .78em; font-weight: 400; color: var(--muted); margin-left: 1px; }

.catalog-tools {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}
.catalog-tools input { max-width: 560px; }
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 12px;
}
.cat-section {
  margin: 18px 0 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.cat-section--availability {
  font-size: 13px;
  letter-spacing: .02em;
  text-transform: none;
}
.svc-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 82px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 14px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s;
}
.svc-card:not(.disabled):hover {
  border-color: #99f6e4;
  box-shadow: 0 8px 24px rgba(13, 148, 136, 0.12), 0 2px 6px rgba(13, 148, 136, 0.06);
  transform: translateY(-2px);
}
.svc-card.disabled { opacity: .48; pointer-events: none; }
.svc-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-weight: 900;
}
.svc-icon img { width: 100%; height: 100%; object-fit: cover; background: #fff; }
.svc-card .name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.svc-card .desc { display: block; color: var(--muted); font-size: 12px; line-height: 1.45; margin-top: 3px; }
.svc-card .cost { font-weight: 800; color: var(--brand); font-size: 14px; }
.price-pending { color: var(--muted); font-size: 12px; }
.catalog-empty {
  border: 1.5px dashed var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 48px;
  text-align: center;
  color: var(--muted);
}
.load-more { text-align: center; padding: 22px; }
.skel {
  pointer-events: none;
  min-height: 82px;
}
.skel .svc-icon, .skel-line, .skel-price {
  background: linear-gradient(90deg, #f1f5f9, #f8fafc, #f1f5f9);
  background-size: 400px 100%;
  animation: shimmer 1.2s linear infinite;
}
.skel-line { height: 14px; border-radius: 6px; margin-bottom: 8px; }
.skel-line.short { width: 68%; height: 10px; }
.skel-price { width: 48px; height: 18px; border-radius: 6px; }
@keyframes shimmer {
  from { background-position: -200px 0; }
  to { background-position: 200px 0; }
}

.wallet-layout {
  display: grid;
  grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
  gap: 14px;
  margin-bottom: 14px;
  align-items: start;
}
.wallet-layout--single {
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
}
.wallet-card {
  padding: 24px;
  color: #fff;
  background:
    linear-gradient(135deg, #0d9488 0%, #0891b2 50%, #3b82f6 100%);
  border-color: transparent;
  box-shadow: 0 16px 48px rgba(13, 148, 136, 0.30), 0 4px 12px rgba(13, 148, 136, 0.16);
}
.upstream-wallet-card {
  background:
    linear-gradient(135deg, rgba(30, 64, 175, .96), rgba(79, 70, 229, .88));
}
.topup-card-main {
  padding: 0;
  display: grid;
  gap: 0;
  overflow: visible;
}
.topup-card.topup-card-main {
  padding: 0;
  gap: 0;
}
.topup-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface-2) 0%, var(--surface) 100%);
}
.topup-head h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.topup-sub {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
}
.topup-network-badge {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(13, 148, 136, 0.10);
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.topup-step {
  padding: 20px 22px 22px;
  display: grid;
  gap: 16px;
}
.topup-section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}
.topup-presets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.topup-preset {
  padding: 14px 10px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.topup-preset:hover {
  border-color: rgba(13, 148, 136, 0.45);
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.10);
}
.topup-preset.active {
  border-color: var(--brand);
  background: rgba(13, 148, 136, 0.06);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.12);
}
.topup-custom label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 700;
}
.topup-custom-row {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.topup-currency {
  padding: 0 14px;
  font-size: 18px;
  font-weight: 800;
  color: var(--muted);
  background: var(--surface-2);
  align-self: stretch;
  display: grid;
  place-items: center;
}
.topup-custom-row input {
  flex: 1;
  min-width: 0;
  border: 0;
  padding: 13px 14px 13px 8px;
  font-size: 18px;
  font-weight: 700;
  background: transparent;
}
.topup-custom-row input:focus {
  outline: none;
}
.topup-custom-row:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.12);
}
.topup-submit { margin-top: 4px; }
.topup-pay-grid {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}
.topup-qr-wrap {
  display: grid;
  gap: 10px;
  justify-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.topup-qr {
  display: block;
  width: 200px;
  height: 200px;
  border-radius: 12px;
}
.topup-qr-hint {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}
.topup-pay-details {
  display: grid;
  gap: 14px;
}
.topup-pay-amount {
  display: grid;
  gap: 4px;
  padding: 14px 18px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.08), rgba(59, 130, 246, 0.06));
  border: 1px solid rgba(13, 148, 136, 0.16);
}
.topup-pay-amount span {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.topup-pay-amount strong {
  font-size: 30px;
  font-weight: 900;
  color: var(--brand);
  letter-spacing: -0.03em;
}
.topup-address-box {
  display: grid;
  gap: 8px;
}
.topup-address-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.topup-address-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
}
.topup-address-row code {
  flex: 1;
  min-width: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.45;
  word-break: break-all;
  color: var(--ink);
}
.btn-sm {
  padding: 8px 12px;
  font-size: 13px;
  flex-shrink: 0;
}
.topup-notices {
  margin: 0;
  padding: 0 0 0 18px;
  display: grid;
  gap: 6px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
}
.topup-notices strong { color: var(--ink); }
.topup-pay-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.topup-status-msg {
  margin: 0;
  min-height: 0;
}
.topup-status-msg:not(:empty) {
  margin-top: 2px;
}
.topup-recent-panel {
  display: grid;
  gap: 12px;
  padding: 16px 18px 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
  min-width: 0;
}
.topup-recent-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.topup-recent-title {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.topup-recent-sub {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}
.topup-recent-count {
  flex-shrink: 0;
  margin-top: 2px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.topup-deposit-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.topup-deposit-pagination:empty {
  display: none;
}
.topup-deposit-pager {
  justify-content: space-between;
  padding-top: 4px;
  border-top: 1px solid var(--line-2);
}
.topup-deposit-empty {
  list-style: none;
  padding: 28px 14px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}
.topup-deposit-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  transition: background 0.15s;
}
.topup-deposit-item:hover {
  background: var(--surface-2);
}
.topup-deposit-item button {
  border: 0;
  background: transparent;
  color: var(--brand);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
}
.topup-deposit-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.topup-deposit-actions .danger-link {
  color: var(--danger);
}
.topup-status.cancelled {
  background: #fee2e2;
  color: #991b1b;
}
.topup-deposit-meta {
  display: grid;
  gap: 2px;
  min-width: 0;
  flex: 1; /* 撑满左侧，让状态徽章始终贴右对齐 */
}
.topup-deposit-meta strong {
  font-size: 14px;
  font-weight: 700;
}
.topup-deposit-meta small {
  font-size: 12px;
  color: var(--muted);
}
.topup-status {
  flex-shrink: 0;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}
.topup-status.pending {
  background: #fef3c7;
  color: #92400e;
}
.topup-status.completed {
  background: #dcfce7;
  color: #166534;
}
.topup-status.expired {
  background: var(--surface-2);
  color: var(--muted);
}
.wallet-card span { color: rgba(255,255,255,.92); font-weight: 700; font-size: 12px; letter-spacing: 0.02em; }
.wallet-card strong { display: block; margin-top: 10px; font-size: 44px; font-weight: 900; letter-spacing: -0.04em; line-height: 1; }
.wallet-spent-line {
  margin: 12px 0 0;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.80);
}
.wallet-spent-line strong { display: inline; margin-top: 0; font-size: 18px; font-weight: 800; }
.wallet-card p { color: rgba(255,255,255,.76); font-size: 13px; }
.topup-card { padding: 20px; display: grid; gap: 12px; }
.inline-form { display: flex; gap: 10px; }
.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
}
.timeline li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  transition: background 0.12s;
}
.timeline li:hover {
  background: var(--surface-2);
}
.amount-pos { color: #16a34a; font-weight: 800; }
.amount-neg { color: var(--danger); font-weight: 800; }

.settings-grid {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 14px;
}
.profile-panel {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 20px;
}
.profile-panel .btn { grid-column: 1 / -1; justify-self: start; }
.avatar {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--brand-soft), #ccfbf1);
  color: var(--brand-dark);
  font-size: 28px;
  font-weight: 900;
}
.avatar-lg {
  width: 72px;
  height: 72px;
  font-size: 32px;
  border-radius: 18px;
  flex-shrink: 0;
}
.button-row { display: flex; flex-wrap: wrap; gap: 10px; padding: 18px; }
.inline-message { margin: 0 18px 18px; color: var(--muted); font-size: 13px; }
.inline-message.success { color: var(--success, #22c55e); }
.inline-message.error { color: var(--danger, #ef4444); }

/* ── Settings Tabs ── */
.settings-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}
.settings-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: color .15s, border-color .15s;
  margin-bottom: -1px;
}
.settings-tab:hover { color: var(--text); }
.settings-tab.active { color: var(--brand); border-bottom-color: var(--brand); }
.settings-tab-icon { font-size: 16px; }
.settings-tab-content { display: flex; flex-direction: column; gap: 16px; }
.settings-tab-content.hidden { display: none; }

/* Settings profile card */
.settings-profile-card {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 24px;
}
.settings-avatar-wrap { flex-shrink: 0; }
.settings-profile-info { flex: 1; display: flex; flex-direction: column; gap: 14px; }
.settings-field { display: flex; flex-direction: column; gap: 3px; }
.settings-field-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.settings-field-value { font-size: 15px; color: var(--text); font-weight: 500; }

/* Settings security card */
.settings-security-card { padding: 22px 24px; display: flex; flex-direction: column; gap: 18px; }
.settings-section-head h3 { font-size: 15px; font-weight: 600; margin: 0 0 4px; }
.settings-section-head p { margin: 0; }
.text-muted { color: var(--muted); font-size: 13px; }

/* Settings form */
.settings-form { display: flex; flex-direction: column; gap: 14px; }
.settings-form-field { display: flex; flex-direction: column; gap: 6px; }
.settings-form-field label { font-size: 13px; font-weight: 500; color: var(--text); }
.settings-form-field input,
.settings-select {
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  width: 100%;
  box-sizing: border-box;
  outline: none;
  transition: border-color .15s;
}
.settings-form-field input:focus,
.settings-select:focus { border-color: var(--brand); }

/* Timezone card */
.settings-tz-card { padding: 22px 24px; display: flex; flex-direction: column; gap: 16px; }
.settings-tz-note { margin: 0; }

.drawer {
  position: fixed;
  inset: 0;
  z-index: 50;
}
.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .40);
  backdrop-filter: blur(4px);
}
.drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(480px, 100%);
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #f8fafc;
  box-shadow: -4px 0 40px rgba(13, 27, 42, .18), -1px 0 0 rgba(226, 232, 240, 0.8);
  animation: drawerSlideIn .22s cubic-bezier(.32,.72,0,1);
}
@keyframes drawerSlideIn {
  from { transform: translateX(32px); opacity: 0.6; }
  to   { transform: translateX(0);    opacity: 1; }
}
.drawer-head {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 16px;
  background: linear-gradient(135deg, #0d9488, #0891b2);
  color: #fff;
}
.drawer-head h2 { margin: 0; font-size: 17px; font-weight: 700; }
.drawer-head p { margin: 4px 0 0; color: rgba(255,255,255,.75); font-size: 13px; }
.icon-btn {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.14);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  transition: background 0.15s;
}
.icon-btn:hover {
  background: rgba(255,255,255,.22);
}
.wa-status {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(0,0,0,.08);
  background: #f0fdf4;
}
.wa-status.banned { background: #fef2f2; }
.wa-status.not_logged_in { background: #fffbeb; }
.messages {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
  background-color: #f1f5f9;
  background-image:
    radial-gradient(circle at 12px 12px, rgba(13, 148, 136, 0.05) 1.5px, transparent 1.5px);
  background-size: 28px 28px;
}
.bubble-wrap { display: flex; margin: 7px 0; }
.bubble-wrap.in { justify-content: flex-start; }
.bubble-wrap.out { justify-content: flex-end; }
.bubble {
  max-width: 82%;
  border-radius: 10px;
  padding: 10px 13px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
  line-height: 1.5;
  word-break: break-word;
}
.bubble-wrap.out .bubble {
  background: #d1fae5;
}
.bubble.hi {
  border: 2px solid var(--brand);
  font-size: 18px;
  font-weight: 900;
}
.drawer-actions {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-top: 1px solid rgba(0,0,0,.08);
  background: #fff;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .52);
  backdrop-filter: blur(4px);
}
.modal-card {
  position: relative;
  width: min(520px, 100%);
  border-radius: var(--radius-xl);
  background: #fff;
  padding: 28px;
  box-shadow: 0 24px 80px rgba(13,27,42,0.18), 0 8px 24px rgba(13,27,42,0.10);
  border: 1px solid rgba(255,255,255,0.9);
  animation: modalPop .22s cubic-bezier(.34,1.56,.64,1);
}
@keyframes modalPop {
  from { opacity: 0; transform: scale(0.94) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
/* Rental modal two-column layout */
.rent-modal-card {
  width: min(860px, calc(100vw - 36px));
  padding: 0;
}
.rent-modal-cols {
  display: grid;
  grid-template-columns: 1fr 320px;
}
.rent-modal-left {
  padding: 28px 20px 28px 28px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow-y: auto;
  max-height: calc(100dvh - 80px);
}
/* Keep area mode buttons in a single column */
.rent-modal-left .rent-area-modes {
  grid-template-columns: 1fr;
}
.rent-modal-right {
  padding: 28px 28px 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 0;
  overflow-y: auto;
  max-height: calc(100dvh - 80px);
}
.rent-modal-actions {
  margin-top: auto;
  padding-top: 16px;
}
.rent-quantity-field {
  margin: 14px 0 4px;
  padding: 14px 0 0;
  border-top: 1px solid var(--line);
}
.rent-quantity-field > label {
  display: block;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.rent-quantity-stepper {
  display: inline-flex;
  align-items: stretch;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-xs, 0 1px 2px rgba(15, 23, 42, 0.04));
}
.rent-quantity-stepper .qty-btn {
  width: 44px;
  min-height: 44px;
  border: none;
  background: transparent;
  color: var(--ink);
  font-size: 22px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.rent-quantity-stepper .qty-btn:hover:not(:disabled) {
  background: rgba(79, 70, 229, 0.08);
  color: var(--brand, #4f46e5);
}
.rent-quantity-stepper .qty-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.rent-quantity-stepper #rent-qty-input {
  width: 56px;
  border: none;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  background: transparent;
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  padding: 0;
}
.rent-quantity-hint {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.45;
}
.modal-card h2 { margin: 0 0 6px; font-weight: 800; letter-spacing: -0.02em; }
.modal-card p { margin: 0 0 16px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.rent-area-field { margin-bottom: 14px; }
.rent-assign-field { margin-top: 4px; }
.rent-assign-field > label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.rent-assign-hint {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.45;
}
.rent-area-field > label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.rent-area-modes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}
.rent-area-mode {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 10px 12px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, background 0.15s;
}
.rent-area-mode strong { font-size: 14px; font-weight: 700; }
.rent-area-mode small { color: var(--muted); font-size: 12px; line-height: 1.4; }
.rent-area-mode:hover { border-color: #c7d2fe; }
.rent-area-mode:disabled { opacity: 0.55; cursor: wait; }
.rent-area-mode.active {
  border-color: var(--brand);
  background: var(--brand-soft);
}
.rent-area-specific { margin-top: 4px; display: flex; flex-direction: column; gap: 6px; flex: 1; min-height: 0; }
.rent-area-field { display: flex; flex-direction: column; flex: 1; min-height: 0; margin-bottom: 0; }
.rent-area-search {
  width: 100%;
  padding: 8px 12px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  box-sizing: border-box;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.rent-area-search:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.12);
}
.rent-area-picked {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--brand-dark);
}
.rent-area-list {
  flex: 1;
  min-height: 180px;
  max-height: 240px;
  overflow-y: auto;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.rent-area-group-label {
  padding: 8px 10px 4px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.rent-area-option {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.rent-area-option:hover {
  background: var(--surface-2);
}
.rent-area-option.active {
  background: var(--brand-soft);
  border-color: rgba(13, 148, 136, 0.35);
  color: var(--brand-dark);
  box-shadow: inset 0 0 0 1px rgba(13, 148, 136, 0.08);
}
.rent-area-empty {
  padding: 24px 12px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.rent-area-field select {
  width: 100%;
  padding: 6px 10px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  flex: 1;
  min-height: 120px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.rent-area-field select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.12);
}
.rent-area-field select:disabled { opacity: 0.65; cursor: wait; }
.rent-area-field optgroup { font-weight: 700; color: #475569; font-size: 12px; }
.rent-area-field option { padding: 4px 6px; font-size: 14px; }
/* ?? Toast ?? ?? */
#toast-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}
.toast {
  padding: 12px 20px 12px 16px;
  border-radius: 14px;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.5;
  box-shadow: 0 8px 32px rgba(0,0,0,.14), 0 2px 8px rgba(0,0,0,.08);
  opacity: 0;
  transform: translateY(-12px) scale(0.97);
  transition: opacity .22s cubic-bezier(.34,1.56,.64,1), transform .22s cubic-bezier(.34,1.56,.64,1);
  white-space: nowrap;
  max-width: calc(100vw - 40px);
  backdrop-filter: blur(12px);
  border-left: 4px solid transparent;
  pointer-events: auto;
}
.toast--show {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.toast--success {
  background: rgba(240, 253, 244, 0.97);
  color: #166534;
  border-left-color: #22c55e;
  border: 1px solid #bbf7d0;
  border-left: 4px solid #22c55e;
}
.toast--error {
  background: rgba(254, 242, 242, 0.97);
  color: #b91c1c;
  border: 1px solid #fecaca;
  border-left: 4px solid #ef4444;
}
.toast--info {
  background: rgba(239, 246, 255, 0.97);
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  border-left: 4px solid #3b82f6;
}
/* ?? Admin hub ?? */
.admin-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
  padding: 24px 26px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(13, 148, 136, 0.07) 0%, rgba(255, 255, 255, 0.96) 42%),
    var(--surface);
  box-shadow: var(--shadow-sm);
}
.admin-hero-copy h2 {
  margin: 6px 0 8px;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.admin-hero-copy p {
  margin: 0;
  max-width: 560px;
  color: var(--muted);
  line-height: 1.6;
  font-size: 14px;
}
.admin-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(110px, 1fr));
  gap: 10px;
  flex-shrink: 0;
}
.admin-stat {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  display: grid;
  gap: 6px;
  box-shadow: var(--shadow-sm);
}
.admin-stat span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.admin-stat strong {
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
}
.admin-stat.accent {
  background: linear-gradient(135deg, #0d9488, #0891b2);
  border-color: transparent;
  color: #fff;
  box-shadow: var(--shadow-brand);
}
.admin-stat.accent span { color: rgba(255, 255, 255, 0.72); }

.admin-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.renew-hero { margin-bottom: 16px; }
.renew-scope-hint { margin-top: 6px; color: var(--muted); font-size: 13px; }
.admin-tab {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  text-align: left;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
  box-shadow: var(--shadow-sm);
}
.admin-tab:hover {
  border-color: #99f6e4;
  box-shadow: 0 4px 16px rgba(13, 148, 136, 0.10);
  transform: translateY(-1px);
}
.admin-tab.active {
  border-color: var(--brand);
  background: linear-gradient(180deg, #f0fdf9 0%, #fff 100%);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.10), var(--shadow-sm);
}
.admin-tab-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  font-size: 18px;
  flex-shrink: 0;
}
.admin-tab-text {
  display: grid;
  gap: 2px;
}
.admin-tab-text strong { font-size: 14px; font-weight: 700; }
.admin-tab-text small { color: var(--muted); font-size: 12px; }

.admin-panel.hidden { display: none; }
.admin-split {
  display: grid;
  grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}
.admin-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.admin-card-grow { min-height: 420px; }
.admin-card-head {
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #f8fafc 0%, var(--surface) 100%);
}
.admin-card-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.admin-card-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.admin-card-foot {
  padding: 0 20px 20px;
  margin: 0;
}
.admin-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.admin-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.admin-search,
.admin-select,
.assign-select {
  padding: 9px 12px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.admin-search:focus,
.admin-select:focus,
.assign-select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.12);
}
.admin-search { min-width: 220px; }
.admin-select { min-width: 130px; }
.assign-agent-picker {
  position: relative;
  display: flex;
  align-items: center;
}
.assign-agent-search { min-width: 180px; padding-right: 34px; }
.assign-agent-clear {
  position: absolute;
  right: 8px;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 50%;
  background: #e2e8f0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
  transition: background 0.15s;
}
.assign-agent-clear:hover { background: #cbd5e1; color: var(--ink); }
.assign-agent-suggest {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 120;
  min-width: 280px;
  max-height: 360px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
}
.assign-agent-option {
  display: grid;
  gap: 2px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
  text-align: left;
  transition: background 0.12s;
}
.assign-agent-option:last-child { border-bottom: 0; }
.assign-agent-option:hover,
.assign-agent-option.active { background: #f0fdf4; }
.assign-agent-option-name { font-weight: 700; color: var(--ink); }
.assign-agent-option small { color: var(--muted); font-size: 12px; }
.assign-agent-suggest-empty {
  padding: 12px;
  color: var(--muted);
  font-size: 13px;
}
.assign-agent-suggest-footer {
  position: sticky;
  bottom: 0;
  padding: 8px 12px;
  border-top: 1px solid var(--line);
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
}
.assign-agent-filter-hint {
  margin: 8px 0 0;
  color: var(--brand);
  font-size: 13px;
  font-weight: 700;
}
.admin-msg { margin: 12px 20px 0; }

.agent-form-v2 {
  display: grid;
  gap: 14px;
  padding: 20px;
}
.agent-form-v2 .field {
  display: grid;
  gap: 6px;
}
.agent-form-v2 label {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.01em;
}
.agent-form-v2 input {
  padding: 11px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.agent-form-v2 input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.12);
}
.agent-form-v2 .field-hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.btn.block { width: 100%; justify-content: center; }

.agent-grid {
  display: grid;
  gap: 10px;
  padding: 16px 20px 20px;
  max-height: 520px;
  overflow-y: auto;
}
.agent-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.agent-card-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: stretch;
}
.btn-sm {
  padding: 6px 10px;
  font-size: 12px;
  min-height: 32px;
}
@media (max-width: 720px) {
  .agent-card {
    grid-template-columns: 48px minmax(0, 1fr);
  }
  .agent-card-actions {
    grid-column: 1 / -1;
    flex-direction: row;
    flex-wrap: wrap;
  }
}
.agent-card:hover {
  border-color: #99f6e4;
  box-shadow: 0 4px 16px rgba(13, 148, 136, 0.10);
}
.agent-avatar {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
  font-weight: 800;
  font-size: 18px;
}
.agent-card-body strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
}
.agent-card-body small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.agent-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.agent-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 11px;
  font-weight: 700;
}
.admin-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--muted);
}
.admin-empty-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  font-size: 24px;
}
.admin-empty h4 {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
}
.admin-empty p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
}

.admin-table-wrap { padding: 0 4px 4px; }
.renew-list-sub { margin-top: 6px; color: var(--muted); font-size: 13px; }
.renew-toolbar-actions { flex-wrap: wrap; }
.renew-check-col { width: 40px; text-align: center; }
.admin-renew-table td.renew-price { font-weight: 600; white-space: nowrap; }
.admin-renew-table tr.renew-row-grace { background: #fffbeb; }
.admin-renew-table tr.renew-row-soon { background: #f0fdf9; }
.admin-assign-table { min-width: 760px; font-size: 15px; }
.admin-assign-table td { font-size: 15px; line-height: 1.45; vertical-align: middle; }
.admin-assign-table td:last-child { min-width: 180px; }
.admin-assign-table td strong { font-size: 16px; }
.admin-assign-table .muted { font-size: 13px; }
.assign-pagination { padding: 12px 0 4px; border-top: 1px solid var(--line); margin-top: 4px; }
.assign-total-hint { color: var(--muted); font-size: 13px; }

/* Audit log table */
.audit-log-table { min-width: 900px; font-size: 13px; }
.audit-log-table th, .audit-log-table td { font-size: 13px; padding: 8px 10px; }
.audit-time { white-space: nowrap; color: var(--muted); }
.audit-detail { max-width: 320px; word-break: break-all; }
.audit-value { max-width: 140px; word-break: break-all; color: var(--muted); }
.audit-ip { font-family: monospace; font-size: 12px; color: var(--muted); }
.audit-action-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--surface-2);
  color: var(--text);
}
.audit-action-assign_order { background: #dbeafe; color: #1d4ed8; }
.audit-action-renew_order { background: #d1fae5; color: #065f46; }
.audit-action-release_order { background: #fee2e2; color: #991b1b; }
.audit-action-create_user { background: #ede9fe; color: #5b21b6; }
.audit-action-delete_user { background: #fce7f3; color: #9d174d; }
.audit-action-import_rental { background: #fef3c7; color: #92400e; }
.audit-pagination { padding: 12px 0 4px; border-top: 1px solid var(--line); margin-top: 4px; }
.assign-owner {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  font-size: 12px;
  font-weight: 700;
}
.assign-owner.unassigned {
  background: #fff7ed;
  color: #9a3412;
}
.assign-order-id {
  font-weight: 800;
  font-size: 16px;
  color: var(--brand-dark);
}
.assign-phone {
  display: block;
  margin-top: 6px;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #f43f5e;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 1px 3px rgba(244, 63, 94, 0.40);
}
.nav-item.active .nav-badge {
  background: #fff;
  color: #be123c;
  box-shadow: none;
}
.admin-inbox-table { min-width: 820px; font-size: 15px; }
.admin-inbox-table td { vertical-align: middle; }
.inbox-actions { display: flex; flex-wrap: wrap; gap: 8px; }

@media (max-width: 980px) {
  .admin-hero { flex-direction: column; align-items: stretch; }
  .admin-stats { grid-template-columns: repeat(3, 1fr); }
  .admin-split { grid-template-columns: 1fr; }
  .admin-tabs { grid-template-columns: 1fr; }
  .admin-toolbar { flex-direction: column; }
}

.agent-groups-panel {
  margin-bottom: 18px;
}
.agent-groups-head {
  align-items: flex-end;
  gap: 16px;
}
.agent-groups-head h3 {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.agent-groups-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.agent-group-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
  flex-shrink: 0;
}
.agent-group-field {
  margin: 0;
  min-width: 180px;
}
.agent-group-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.agent-group-field input {
  width: 100%;
  min-width: 160px;
}
.agent-group-board {
  display: grid;
  gap: 14px;
}
.agent-group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.agent-group-card {
  position: relative;
  display: grid;
  gap: 14px;
  padding: 18px 18px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  text-align: left;
  cursor: pointer;
  transition: border-color .18s, box-shadow .18s, transform .15s;
  box-shadow: var(--shadow-sm);
}
.agent-group-card:hover {
  border-color: var(--brand);
  box-shadow: 0 8px 28px rgba(13, 148, 136, 0.14);
  transform: translateY(-2px);
}
.agent-group-card.active {
  border-color: var(--brand);
  background: linear-gradient(180deg, rgba(13, 148, 136, 0.08) 0%, var(--surface) 100%);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.14), var(--shadow-sm);
}
.agent-group-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.agent-group-badge {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 18px;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.02em;
}
.agent-group-title {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.2;
  word-break: break-all;
}
.agent-group-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.agent-group-metric {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.04);
  display: grid;
  gap: 2px;
}
.agent-group-metric strong {
  font-size: 24px;
  line-height: 1;
  color: var(--brand-dark);
  font-weight: 800;
  letter-spacing: -0.03em;
}
.agent-group-metric span {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.agent-group-delete {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity .15s, background .15s, color .15s;
}
.agent-group-card:hover .agent-group-delete,
.agent-group-card:focus-within .agent-group-delete {
  opacity: 1;
}
.agent-group-delete:hover {
  background: #fee2e2;
  border-color: #fecaca;
  color: #b91c1c;
}
.agent-group-ungrouped-wrap {
  padding-top: 4px;
  border-top: 1px dashed var(--line);
}
.agent-group-bulk-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 14px 18px;
  border: 1px solid rgba(13, 148, 136, 0.22);
  border-radius: 12px;
  background: rgba(13, 148, 136, 0.05);
}
.agent-group-bulk-copy {
  margin: 0;
  font-size: 14px;
  color: var(--ink);
}
.agent-group-bulk-copy strong {
  color: var(--brand-dark);
  font-size: 18px;
  font-weight: 800;
}
.agent-group-bulk-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.agent-group-bulk-actions .admin-select {
  min-width: 140px;
}
.group-picker {
  position: relative;
}
.group-picker-trigger {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  text-align: left;
  transition: border-color .15s, box-shadow .15s;
}
.group-picker.open .group-picker-trigger,
.group-picker-trigger:hover {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.10);
}
.group-picker-badge {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-size: 16px;
  font-weight: 900;
  color: #fff;
}
.group-picker-badge.ungrouped {
  background: #64748b;
}
.group-picker-text {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 2px;
}
.group-picker-text strong {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}
.group-picker-text small {
  font-size: 12px;
  color: var(--muted);
}
.group-picker-chevron {
  flex-shrink: 0;
  color: var(--muted);
  font-size: 14px;
  transition: transform .15s;
}
.group-picker.open .group-picker-chevron {
  transform: rotate(180deg);
}
.group-picker-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 90;
  max-height: 420px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 8px;
}
.modal .group-picker-menu {
  z-index: 120;
}
.group-picker-menu--floating {
  position: fixed;
  top: auto;
  left: auto;
  right: auto;
  z-index: 200;
  max-height: 420px;
}
.group-picker-options {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 2px 0;
}
.group-picker-footer {
  flex-shrink: 0;
  padding: 8px 12px 4px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
}
.group-picker-footer.hidden {
  display: none;
}
.admin-card:has(.group-picker.open) {
  overflow: visible;
  position: relative;
  z-index: 25;
}
.group-picker-search-wrap {
  position: sticky;
  top: 0;
  z-index: 1;
  padding-bottom: 8px;
  background: #fff;
}
.group-picker-search {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  font-size: 14px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.group-picker-search:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.10);
}
.group-picker-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background .12s;
}
.group-picker-option:hover,
.group-picker-option.active {
  background: rgba(13, 148, 136, 0.07);
}
.group-picker-option.active {
  box-shadow: inset 0 0 0 1px rgba(13, 148, 136, 0.24);
}
.group-picker-option-badge {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 15px;
  font-weight: 900;
  color: #fff;
}
.group-picker-option-body {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 2px;
}
.group-picker-option-body strong {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}
.group-picker-option-body small {
  font-size: 12px;
  color: var(--muted);
}
.group-picker-option-meta {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}
.group-picker-empty {
  padding: 18px 12px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.group-picker-inline {
  min-width: 200px;
}
.group-picker-assign {
  min-width: 220px;
  width: 100%;
  max-width: 280px;
}
.group-picker-option.disabled,
.group-picker-option:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.group-picker-inline .group-picker-trigger {
  padding: 10px 12px;
}
.group-picker-inline .group-picker-badge {
  width: 34px;
  height: 34px;
  font-size: 14px;
}
.agent-group-ungrouped-label {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.agent-group-card.pending-assign {
  border-color: #fcd34d;
  background: linear-gradient(145deg, #fffbeb 0%, #fff 55%);
}

.agent-group-card.pending-assign:hover {
  border-color: #f59e0b;
}

.agent-group-card.pending-assign.active {
  border-color: #d97706;
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.20);
}

.agent-group-grid--solo {
  margin-bottom: 12px;
}

.agent-group-card.ungrouped {
  max-width: 320px;
  background: var(--surface-2);
  border-style: dashed;
  cursor: default;
}
.agent-group-card.ungrouped:hover {
  transform: none;
  box-shadow: var(--shadow-sm);
  border-color: var(--line);
}
.agent-group-card.ungrouped .agent-group-badge {
  background: #64748b !important;
}
.agent-group-empty {
  margin: 0;
  padding: 32px 16px;
  border: 1.5px dashed var(--line);
  border-radius: 12px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  background: var(--surface-2);
}
.agent-group-empty strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
}
@media (max-width: 900px) {
  .agent-groups-head {
    flex-direction: column;
    align-items: stretch;
  }
  .agent-group-form {
    width: 100%;
  }
  .agent-group-field {
    flex: 1;
  }
}
.agent-pill-leader {
  background: #fef3c7;
  color: #b45309;
}
.agent-pill-group {
  background: #e0f2fe;
  color: #0369a1;
}

.reuse-source-info {
  margin-bottom: 16px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, #f8fafc 0%, var(--surface) 100%);
  box-shadow: var(--shadow-sm);
}
.reuse-source-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.reuse-source-eyebrow {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.reuse-source-phone {
  font-size: 20px;
  letter-spacing: 0.02em;
  font-weight: 700;
}
.reuse-source-tag {
  flex-shrink: 0;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 700;
}
.reuse-source-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.reuse-source-item {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.04);
  display: grid;
  gap: 4px;
}
.reuse-source-item-wide {
  grid-column: 1 / -1;
}
.reuse-source-item span {
  font-size: 11px;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.reuse-source-item strong {
  font-size: 14px;
  color: var(--ink);
  line-height: 1.4;
}
.reuse-source-note {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}
.reuse-source-price {
  margin-bottom: 10px;
  font-size: 14px;
  color: var(--ink);
}
.reuse-source-price strong {
  color: var(--brand-dark);
  font-size: 18px;
  font-weight: 800;
}
.reuse-new-rent-btn {
  width: 100%;
}
.reuse-section-label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}
.expiry-text-warning,
.expiry-text-critical { color: #b45309; }
.expiry-text-grace { color: #b91c1c; }
.reuse-phone-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 600;
  font-size: 13px;
}
.reuse-search {
  width: 100%;
  margin-bottom: 12px;
  padding: 10px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.reuse-search:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.12);
}
.reuse-service-list {
  display: grid;
  gap: 8px;
  max-height: 40vh;
  overflow-y: auto;
  margin-bottom: 8px;
}
.reuse-service-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  background: var(--surface);
  transition: border-color 0.15s;
}
.reuse-service-item.selected {
  border-color: var(--brand);
  background: var(--brand-soft);
}
.reuse-service-item.disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.reuse-service-item .name { font-weight: 600; }
.reuse-service-item small { color: var(--muted); }
.rent-bind-panel {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.rent-bind-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  margin-bottom: 8px;
  cursor: pointer;
}
.rent-bind-hint { font-size: 13px; line-height: 1.55; margin: 0 0 10px; }
.rent-bind-selected {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  min-height: 28px;
}
.bind-chip {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 12px;
  font-weight: 600;
}
.rent-plan-list { display: grid; gap: 10px; max-height: 48vh; overflow-y: auto; }
.rent-plan {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 13px;
  transition: border-color 0.15s, background 0.15s;
}
.rent-plan.selected { border-color: var(--brand); background: var(--brand-soft); }
.rent-plan--disabled {
  opacity: 0.55;
  cursor: not-allowed;
  border-color: var(--line);
  background: var(--surface-2);
}
.rent-plan--disabled .plan-price { color: var(--muted); }
.plan-unaffordable { display: block; margin-top: 4px; color: var(--danger); font-weight: 600; }
.rent-plan small { display: block; margin-top: 3px; color: var(--muted); }
.plan-price { font-weight: 800; color: var(--brand); }
.rent-plan-loading {
  pointer-events: none;
}
.radio-skel {
  width: 16px;
  height: 16px;
  border-radius: 50%;
}
.rent-plan-loading .radio-skel,
.rent-plan-loading .skel-line,
.rent-plan-loading .skel-price {
  background: linear-gradient(90deg, #f1f5f9, #f8fafc, #f1f5f9);
  background-size: 400px 100%;
  animation: shimmer 1.2s linear infinite;
}
.rent-plan-error {
  border: 1px solid #fecaca;
  border-radius: 10px;
  background: #fef2f2;
  color: #991b1b;
  padding: 16px;
}
.rent-plan-error p {
  margin: 6px 0 14px;
  color: #7f1d1d;
  line-height: 1.55;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}
.confirm-card {
  width: min(460px, 100%);
}
.confirm-card .eyebrow {
  margin-bottom: 8px;
}
.confirm-details {
  display: grid;
  gap: 8px;
  margin: 16px 0 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
}
.confirm-details div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.confirm-details dt {
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
}
.confirm-details dd {
  margin: 0;
  text-align: right;
  font-weight: 800;
}
.mobile-nav {
  display: none;
}

@media (max-width: 920px) {
  .auth-panel { grid-template-columns: 1fr; }
  .auth-copy {
    min-height: auto;
    padding: 8px 4px 4px;
    justify-content: flex-start;
  }
  .auth-brand {
    gap: 20px;
    max-width: none;
    padding-top: 0;
  }
  .auth-brand-logo {
    width: 112px;
    height: 112px;
  }
  .auth-brand-quote-line { font-size: 26px; }
  .auth-brand-quote-line--accent { font-size: 30px; }
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .workspace { padding: 18px; }
  .topbar { flex-direction: column; }
  .top-actions { justify-content: flex-start; }
  .metrics-grid, .wallet-layout, .settings-grid { grid-template-columns: 1fr; }
  .topup-pay-grid { grid-template-columns: 1fr; }
  .topup-presets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mobile-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(16px);
  }
  .mobile-nav button {
    min-height: 56px;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-weight: 700;
    font-size: 13px;
  }
  .mobile-nav button.active { color: var(--brand); }
}
@media (max-width: 560px) {
  .auth-screen { padding: 16px; }
  .auth-card { padding: 24px; border-radius: 16px; }
  .workspace { padding: 14px; }
  .topbar h1 { font-size: 24px; }
  .top-actions, .catalog-tools, .inline-form { width: 100%; }
  .top-actions .btn, .catalog-tools .btn, .inline-form .btn { flex: 1; }
  .svc-card { grid-template-columns: 42px minmax(0, 1fr); }
  .svc-card .cost { grid-column: 2; }
}

.guanli-portal {
  --brand: #14b8a6;
  --brand-dark: #0d9488;
  --glass-bg: rgba(255, 255, 255, 0.16);
  --glass-bg-strong: rgba(255, 255, 255, 0.28);
  --glass-border: rgba(255, 255, 255, 0.42);
  --glass-blur: blur(44px) saturate(185%);
  --glass-shadow:
    0 28px 72px rgba(15, 23, 42, 0.20),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

/* liquid-bg / liquid-orb removed ? div deleted from HTML (guanli.html) */

.guanli-portal .auth-screen,
.guanli-portal .app {
  position: relative;
  z-index: 1;
}

.guanli-auth {
  background: transparent;
}
.guanli-auth-panel {
  max-width: 980px;
}
.guanli-auth-copy {
  color: rgba(255, 255, 255, 0.92);
}
.guanli-auth-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}
.guanli-auth-mark,
.guanli-mark {
  background: linear-gradient(145deg, rgba(255,255,255,0.35), rgba(255,255,255,0.08)) !important;
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  backdrop-filter: var(--glass-blur);
}
.guanli-auth-mark {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 28px;
  font-weight: 900;
  color: #fff;
}
.guanli-auth-brand strong {
  display: block;
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}
.guanli-auth-brand p {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.72);
}
.guanli-auth-note {
  margin: 0;
  max-width: 420px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.68);
  font-size: 14px;
}
.guanli-portal .auth-card {
  background: linear-gradient(155deg, rgba(255,255,255,0.34) 0%, rgba(255,255,255,0.12) 100%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}
.guanli-portal .auth-card h2,
.guanli-portal .auth-card label {
  color: rgba(255, 255, 255, 0.95);
}
.guanli-portal .auth-card p,
.guanli-portal .auth-card .muted {
  color: rgba(255, 255, 255, 0.68) !important;
}
.guanli-portal .auth-card .eyebrow {
  color: #99f6e4 !important;
}
.guanli-portal .auth-card input {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
  backdrop-filter: blur(12px);
}
.guanli-portal .auth-card input::placeholder {
  color: rgba(255, 255, 255, 0.42);
}
.guanli-portal .auth-card input:focus {
  border-color: rgba(153, 246, 228, 0.75);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.22);
}

.guanli-sidebar {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.72) 0%, rgba(15, 23, 42, 0.55) 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(36px) saturate(160%);
  -webkit-backdrop-filter: blur(36px) saturate(160%);
  color: #f8fafc;
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.06);
}
.guanli-sidebar .nav-item {
  color: rgba(248, 250, 252, 0.68);
  border: 1px solid transparent;
  border-radius: 14px;
}
.guanli-sidebar .nav-item.active,
.guanli-sidebar .nav-item:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.14);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.guanli-mobile-nav {
  grid-template-columns: repeat(3, 1fr) !important;
}

.guanli-app .workspace {
  background: transparent;
  padding: 24px 28px 90px;
}
.guanli-app .topbar {
  position: sticky;
  top: 12px;
  z-index: 20;
  margin-bottom: 20px;
  padding: 16px 22px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: linear-gradient(145deg, rgba(255,255,255,0.72), rgba(255,255,255,0.42));
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow);
}
.guanli-app .topbar h1 {
  font-size: 26px;
  background: linear-gradient(120deg, #0f172a 20%, #4f46e5 90%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Liquid glass admin hub */
.guanli-app .admin-hero,
#view-admin .admin-hero {
  background: linear-gradient(145deg, rgba(255,255,255,0.55) 0%, rgba(255,255,255,0.28) 100%);
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 24px;
  padding: 28px 30px;
  box-shadow: var(--glass-shadow);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  color: var(--ink);
  position: relative;
  overflow: hidden;
}
.guanli-app .admin-hero::before,
#view-admin .admin-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 88% 12%, rgba(20, 184, 166, 0.18), transparent 42%),
    radial-gradient(circle at 8% 88%, rgba(59, 130, 246, 0.14), transparent 40%);
  pointer-events: none;
}
.guanli-app .admin-hero-copy h2,
#view-admin .admin-hero-copy h2 {
  color: var(--ink);
  font-size: 15px;
  position: relative;
}
.guanli-app .admin-hero-copy p,
#view-admin .admin-hero-copy p {
  color: var(--muted);
  position: relative;
}
.guanli-app .admin-hero .eyebrow,
#view-admin .admin-hero .eyebrow {
  color: var(--brand-dark) !important;
  position: relative;
}

.guanli-app .admin-stat,
#view-admin .admin-stat {
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(255,255,255,0.78), rgba(255,255,255,0.42));
  border: 1px solid rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.75), 0 8px 24px rgba(15,23,42,0.06);
  position: relative;
  overflow: hidden;
}
.guanli-app .admin-stat.accent,
#view-admin .admin-stat.accent {
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.92), rgba(8, 145, 178, 0.88));
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
  box-shadow: 0 12px 32px rgba(13, 148, 136, 0.32), inset 0 1px 0 rgba(255,255,255,0.35);
}
.guanli-app .admin-stat.accent span,
#view-admin .admin-stat.accent span {
  color: rgba(255, 255, 255, 0.78);
}
.guanli-app .admin-stat.accent strong,
#view-admin .admin-stat.accent strong {
  color: #fff;
}

.guanli-app .admin-tabs,
#view-admin .admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px;
  width: fit-content;
  max-width: 100%;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.38);
  backdrop-filter: blur(20px) saturate(160%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.65);
  grid-template-columns: none;
}
.guanli-app .admin-tab,
#view-admin .admin-tab {
  border-radius: 14px;
  border: 1px solid transparent;
  background: transparent;
  box-shadow: none;
}
.guanli-app .admin-tab:hover,
#view-admin .admin-tab:hover {
  background: rgba(255, 255, 255, 0.45);
  transform: none;
}
.guanli-app .admin-tab.active,
#view-admin .admin-tab.active {
  background: linear-gradient(145deg, rgba(255,255,255,0.92), rgba(240,253,250,0.75));
  border-color: rgba(13, 148, 136, 0.28);
  box-shadow: 0 4px 16px rgba(13, 148, 136, 0.12), inset 0 1px 0 rgba(255,255,255,0.9);
  color: var(--brand-dark);
}
.guanli-app .admin-tab.active .admin-tab-icon,
#view-admin .admin-tab.active .admin-tab-icon {
  background: linear-gradient(135deg, var(--brand), #0891b2);
  color: #fff;
}

.guanli-app .admin-card,
#view-admin .admin-card,
.guanli-app .panel,
.guanli-app .settings-grid .panel {
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  background: linear-gradient(160deg, rgba(255,255,255,0.72) 0%, rgba(255,255,255,0.44) 100%);
  backdrop-filter: blur(32px) saturate(170%);
  -webkit-backdrop-filter: blur(32px) saturate(170%);
  box-shadow: var(--glass-shadow);
  overflow: hidden;
}
.guanli-app .admin-card-head,
#view-admin .admin-card-head {
  background: linear-gradient(180deg, rgba(255,255,255,0.55), rgba(255,255,255,0.18));
  border-bottom: 1px solid rgba(255, 255, 255, 0.45);
}
.guanli-app .admin-search,
.guanli-app .admin-select,
#view-admin .admin-search,
#view-admin .admin-select {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(12px);
}

.guanli-app .profile-panel {
  border-left: 3px solid rgba(13, 148, 136, 0.65);
}
.guanli-app .avatar {
  background: linear-gradient(135deg, var(--brand), #0891b2);
  color: #fff;
  box-shadow: 0 8px 24px rgba(13, 148, 136, 0.28);
}

.guanli-sidebar #role-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #99f6e4;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 2px;
}
.guanli-sidebar .side-brand {
  border-bottom-color: rgba(255, 255, 255, 0.10);
}
.guanli-sidebar .side-brand strong {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
}

.guanli-portal {
  --guanli-blue: #2563ff;
  --guanli-navy: #111936;
  --guanli-card-dark: rgba(25, 35, 72, 0.86);
  --guanli-card-light: rgba(255, 255, 255, 0.78);
}
.guanli-sidebar {
  background:
    radial-gradient(circle at 28% 0%, rgba(37, 99, 255, 0.22), transparent 34%),
    linear-gradient(180deg, #17213f 0%, #111936 48%, #0c1328 100%);
}
.guanli-nav-list {
  gap: 8px;
}
.guanli-sidebar .nav-item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  column-gap: 10px;
  align-items: center;
  padding: 11px 12px;
  border-radius: 15px;
  color: rgba(226, 232, 240, 0.76);
}
.guanli-sidebar .nav-item::before {
  display: none;
}
.guanli-sidebar .nav-item .nav-icon {
  grid-row: span 2;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}
.guanli-sidebar .nav-item > span:not(.nav-icon) {
  font-weight: 800;
  font-size: 14px;
  line-height: 1.15;
}
.guanli-sidebar .nav-item small {
  margin-top: 3px;
  color: rgba(203, 213, 225, 0.80);
}
.guanli-sidebar .nav-item.active,
.guanli-sidebar .nav-item:hover {
  background: linear-gradient(135deg, rgba(37, 99, 255, 0.96), rgba(79, 70, 229, 0.86));
  border-color: rgba(147, 197, 253, 0.34);
  color: #fff;
  box-shadow: 0 14px 30px rgba(37, 99, 255, 0.28), inset 0 1px 0 rgba(255,255,255,0.24);
}
.guanli-sidebar .nav-item.active .nav-icon,
.guanli-sidebar .nav-item:hover .nav-icon {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.22);
}
.guanli-sidebar .nav-item.active small,
.guanli-sidebar .nav-item:hover small {
  color: rgba(226, 232, 240, 0.82);
}
.guanli-theme-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 10px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(248, 250, 252, 0.92);
  text-align: left;
}
.guanli-theme-toggle .theme-toggle-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.10);
}
.guanli-theme-toggle strong,
.guanli-theme-toggle small {
  display: block;
}
.guanli-theme-toggle small {
  margin-top: 2px;
  color: rgba(148, 163, 184, 0.9);
}
.partner-admin-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(245px, 1fr));
  gap: 14px;
}
.partner-admin-card {
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  background: linear-gradient(155deg, rgba(255,255,255,0.84), rgba(255,255,255,0.50));
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.10), inset 0 1px 0 rgba(255,255,255,0.72);
  display: grid;
  gap: 16px;
}
.partner-admin-card-head {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}
.partner-admin-avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #2563ff, #6d5dfc);
  box-shadow: 0 10px 24px rgba(37, 99, 255, 0.28);
}
.partner-admin-card h3 {
  margin: 0;
  font-size: 18px;
  color: var(--ink);
  line-height: 1.25;
}
.partner-admin-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  word-break: break-all;
}
.partner-admin-status {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
  font-size: 11px;
  font-weight: 800;
}
.partner-admin-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.partner-admin-metrics div {
  padding: 10px;
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.72);
  border: 1px solid rgba(226, 232, 240, 0.72);
}
.partner-admin-metrics span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.partner-admin-metrics strong {
  display: block;
  margin-top: 3px;
  color: var(--ink-2);
  font-size: 16px;
}
.partner-admin-card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.partner-admin-card-foot small {
  color: var(--muted);
}
.partner-admin-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.guanli-dark {
  --ink: #f8fafc;
  --ink-2: #e2e8f0;
  --muted: #94a3b8;
  --line: rgba(148, 163, 184, 0.18);
  --surface: #18213f;
  --surface-2: #111936;
}
.guanli-dark .topbar,
.guanli-dark .admin-hero,
.guanli-dark .panel,
.guanli-dark .settings-grid .panel {
  background: linear-gradient(155deg, rgba(24, 33, 63, 0.90), rgba(17, 25, 54, 0.76)) !important;
  border-color: rgba(148, 163, 184, 0.18) !important;
  color: #f8fafc;
}
.guanli-dark .guanli-app .topbar h1 {
  background: linear-gradient(120deg, #ffffff 20%, #93c5fd 92%);
  -webkit-background-clip: text;
  background-clip: text;
}
.guanli-dark .admin-hero-copy h2,
.guanli-dark .admin-hero-copy p,
.guanli-dark .panel h2,
.guanli-dark .panel h3,
.guanli-dark .panel p {
  color: inherit;
}
.guanli-dark .partner-admin-card {
  background: linear-gradient(155deg, rgba(31, 41, 75, 0.96), rgba(20, 29, 58, 0.90));
  border-color: rgba(148, 163, 184, 0.20);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255,255,255,0.05);
}
.guanli-dark .partner-admin-card h3,
.guanli-dark .partner-admin-metrics strong {
  color: #f8fafc;
}
.guanli-dark .partner-admin-card p,
.guanli-dark .partner-admin-card-foot small,
.guanli-dark .partner-admin-metrics span {
  color: #94a3b8;
}
.guanli-dark .partner-admin-metrics div {
  background: rgba(15, 23, 42, 0.46);
  border-color: rgba(148, 163, 184, 0.16);
}
.guanli-dark .data-table {
  background: rgba(15, 23, 42, 0.35);
  color: #e2e8f0;
}
.guanli-dark .data-table thead th {
  background: rgba(30, 41, 59, 0.72);
  color: #cbd5e1;
}
.guanli-dark .btn.ghost {
  background: rgba(15, 23, 42, 0.58);
  border-color: rgba(148, 163, 184, 0.20);
  color: #e2e8f0;
}

.guanli-app .data-table {
  background: rgba(255, 255, 255, 0.35);
}
.guanli-app .data-table thead th {
  background: rgba(255, 255, 255, 0.45);
  border-bottom-color: rgba(255, 255, 255, 0.35);
}
.guanli-app .admin-deposits-table tbody tr:has(.status-pending) {
  background: linear-gradient(90deg, rgba(254, 243, 199, 0.45) 0%, transparent 24%);
}

.platform-wallet-panel .panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.platform-wallet-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-top: 0.75rem;
}
.platform-wallet-stats strong {
  display: block;
  font-size: 1.25rem;
  margin-top: 0.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.platform-balance-value {
  color: var(--brand);
}
.status-pill {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}
.status-pill.status-pending {
  background: rgba(254, 243, 199, 0.85);
  color: #92400e;
  border: 1px solid rgba(253, 230, 138, 0.8);
}
.status-pill.status-completed {
  background: rgba(209, 250, 229, 0.9);
  color: #065f46;
}
.status-pill.status-cancelled,
.status-pill.status-expired {
  background: rgba(255, 255, 255, 0.45);
  color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

@media (max-width: 900px) {
  .guanli-auth-panel {
    grid-template-columns: 1fr;
  }
  .guanli-app .topbar {
    top: 0;
    border-radius: 16px;
  }
}
@media (max-width: 980px) {
  .guanli-app .admin-tabs,
  #view-admin .admin-tabs {
    width: 100%;
    justify-content: stretch;
  }
  .guanli-app .admin-tab,
  #view-admin .admin-tab {
    flex: 1;
    justify-content: center;
  }
}

/* UI polish layer v135
   Elevates key surfaces to a premium look
*/

/* App bg: subtle mesh gradient */
.app { background: var(--bg); }
.workspace { background: transparent; }

/* Sidebar: brand glow under logo */
.side-brand .brand-mark-img {
  box-shadow: 0 0 20px rgba(13, 148, 136, 0.25);
}

/* Sidebar bottom balance card */
.side-footer {
  background: linear-gradient(135deg, rgba(13,148,136,0.12), rgba(8,145,178,0.06));
  border-color: rgba(13,148,136,0.20);
}
.side-footer strong { font-size: 18px; }

/* Nav item: active left bar becomes full-height glow */
.nav-item.active::before {
  height: 65%;
  background: linear-gradient(180deg, #14b8a6, #0891b2);
  box-shadow: 0 0 8px rgba(20, 184, 166, 0.6);
  border-radius: 0 4px 4px 0;
}

/* Panel: subtle inner shadow at top */
.panel {
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,0.8);
}

/* Table: sticky header */
.table-scroll { position: relative; }
.data-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  box-shadow: 0 1px 0 var(--line);
}

/* Eyebrow labels */
.eyebrow {
  font-size: 10px;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: var(--brand);
}

/* Scrollbar for drawer */
.messages::-webkit-scrollbar,
.drawer-panel::-webkit-scrollbar { width: 4px; }
.messages::-webkit-scrollbar-track { background: transparent; }
.messages::-webkit-scrollbar-thumb {
  background: rgba(13, 148, 136, 0.25);
  border-radius: 999px;
}

/* Drawer actions: glass footer */
.drawer-actions {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
}

/* OTP pulse: brand color */
.otp-pulse { background: var(--brand); }

/* Svc cards: more depth on hover */
.svc-card:not(.disabled):hover {
  border-color: var(--brand-light);
  box-shadow: 0 12px 32px rgba(13,148,136,0.14), 0 2px 8px rgba(13,148,136,0.08);
  transform: translateY(-3px);
}

/* Admin hero: better gradient */
.admin-hero {
  background:
    linear-gradient(135deg, rgba(13,148,136,0.08) 0%, rgba(99,102,241,0.04) 60%, rgba(255,255,255,0.97) 100%),
    var(--surface);
}

/* Wallet card: richer gradient */
.wallet-card {
  background: linear-gradient(145deg, #0d9488 0%, #0891b2 55%, #6366f1 100%);
  box-shadow: 0 20px 56px rgba(13,148,136,0.32), 0 4px 16px rgba(13,148,136,0.18);
}

/* Page heading: tighter */
.topbar .eyebrow { margin-bottom: 2px; }

/* Metric grid: separator lines */
.metrics-grid {
  position: relative;
}

/* Form error: icon */
.form-error:not(:empty)::before {
  content: '? ';
}

/* Link style */
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Inline message */
.inline-message:not(:empty) {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  background: var(--surface-2);
  border: 1px solid var(--line);
  margin-top: 8px;
}

/* Tag inputs: consistent */
select.admin-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2364748b' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  cursor: pointer;
}

/* Smooth scroll */
html { scroll-behavior: smooth; }

/* =========================================================
   UI UPGRADE LAYER v2
   Quiet, dense operations console with stronger hierarchy.
   ========================================================= */
:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #eef2f7;
  --ink: #101828;
  --ink-2: #263244;
  --muted: #667085;
  --muted-2: #98a2b3;
  --line: #d9e0ea;
  --line-2: #edf1f6;
  --brand: #0f8b7f;
  --brand-dark: #0b6f66;
  --brand-light: #17b0a1;
  --brand-soft: #e9fbf8;
  --accent: #3b5bdb;
  --accent-soft: #eef2ff;
  --warning: #d97706;
  --danger: #dc2626;
  --danger-soft: #fff1f2;
  --ok: #079455;
  --ok-soft: #ecfdf3;
  --shadow: 0 18px 48px rgba(16, 24, 40, 0.10);
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow-md: 0 8px 24px rgba(16, 24, 40, 0.08);
  --shadow-brand: 0 12px 28px rgba(15, 139, 127, 0.20);
  --radius: 8px;
  --radius-sm: 6px;
  --radius-lg: 8px;
  --radius-xl: 8px;
}

body {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(245, 247, 251, 0) 320px),
    var(--bg);
}

.app {
  grid-template-columns: 256px minmax(0, 1fr);
  background:
    linear-gradient(180deg, rgba(233, 251, 248, 0.46), rgba(245, 247, 251, 0) 360px),
    var(--bg);
}

.workspace {
  max-width: 1520px;
  width: 100%;
  padding: 24px 28px 84px;
}

.sidebar {
  padding: 16px 12px;
  background: #17202f;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

.side-brand {
  padding: 4px 6px 16px;
  gap: 10px;
}

.side-brand strong {
  font-size: 15px;
  letter-spacing: 0;
}

.side-brand small {
  color: rgba(255, 255, 255, 0.54);
}

.side-brand img.brand-mark.brand-mark-img,
.brand-mark,
.auth-brand-logo {
  border-radius: 8px;
}

.nav-list {
  gap: 4px;
  padding: 16px 0;
}

.nav-item {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  column-gap: 10px;
  align-items: center;
  min-height: 52px;
  border-radius: 8px;
  padding: 10px 12px 10px 14px;
  color: rgba(255, 255, 255, 0.68);
}

.nav-item .nav-icon {
  grid-row: 1 / span 2;
  grid-column: 1;
  width: 20px;
  height: 20px;
  display: block;
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.48);
  transition: color 0.15s;
}

.nav-item > span:not(.nav-item-row):not(.nav-badge),
.nav-item > small,
.nav-item-row {
  grid-column: 2;
}

.nav-item:hover .nav-icon {
  color: rgba(255, 255, 255, 0.88);
}

.nav-item.active .nav-icon {
  color: #a5b4fc;
}

.nav-item::before {
  width: 2px;
  background: #818cf8;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.075);
  color: rgba(255, 255, 255, 0.94);
}

.nav-item.active {
  background: rgba(99, 102, 241, 0.18);
  border-color: rgba(99, 102, 241, 0.40);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.nav-item.active::before {
  height: calc(100% - 18px);
  box-shadow: none;
}

.nav-item small {
  color: rgba(255, 255, 255, 0.42);
}

.side-footer,
.side-user {
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.065);
  border-color: rgba(255, 255, 255, 0.10);
}

.side-footer {
  padding: 12px;
}

.side-footer strong {
  font-size: 17px;
}

.side-logout-btn {
  border-radius: 8px;
}

.topbar {
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
  padding: 0 0 4px;
}

.topbar h1 {
  font-size: 27px;
  font-weight: 850;
  color: var(--ink);
}

.eyebrow {
  color: #0b6f66;
  font-size: 10px;
  letter-spacing: 0.11em;
}

.top-actions {
  gap: 8px;
}

.btn {
  min-height: 36px;
  border-radius: 7px;
  padding: 8px 14px;
  font-weight: 750;
  letter-spacing: 0;
  box-shadow: none !important;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn.primary {
  background: #0f8b7f;
  border-color: #0f8b7f;
}

.btn.primary:hover {
  background: #0b756d;
  border-color: #0b756d;
}

.btn.secondary {
  background: #263244;
  border-color: #263244;
}

.btn.secondary:hover {
  background: #1d2736;
}

.btn.ghost {
  background: #fff;
  border-color: var(--line);
  color: var(--ink-2);
}

.topbar-logout {
  color: #b42318;
}

input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="text"],
input[type="tel"],
.admin-select,
.reuse-search {
  min-height: 38px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 13.5px;
}

input:focus,
.reuse-search:focus {
  border-color: #17b0a1;
  box-shadow: 0 0 0 3px rgba(15, 139, 127, 0.12);
}

.metric,
.panel,
.catalog-band,
.wallet-card,
.topup-card,
.admin-card,
.admin-hero,
.modal-card {
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.metrics-grid {
  grid-template-columns: repeat(4, minmax(168px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.metric {
  min-height: 104px;
  padding: 16px;
}

.metric::before {
  display: none;
}

.metric:hover {
  box-shadow: var(--shadow-md);
}

.metric span {
  font-size: 11px;
  letter-spacing: 0.06em;
}

.metric strong {
  font-size: 30px;
  letter-spacing: -0.02em;
}

.metric.accent {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent 45%),
    #0f8b7f;
  box-shadow: var(--shadow-brand);
}

.panel,
.admin-card {
  overflow: hidden;
}

.panel-head,
.admin-card-head {
  padding: 14px 16px;
  background: #fff;
  border-bottom: 1px solid var(--line-2);
}

.orders-panel-head,
.admin-toolbar {
  display: flex;
  align-items: center;
}

.panel-head > div,
.admin-card-head > div {
  min-width: 0;
}

.panel-head h2,
.catalog-band h2,
.topup-card h2,
.admin-card-head h3 {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0;
}

.panel-head p,
.catalog-band p,
.wallet-card p,
.admin-card-head p {
  color: var(--muted);
  font-size: 12.5px;
}

.table-scroll {
  border-radius: 0 0 8px 8px;
}

.data-table {
  min-width: 920px;
  background: #fff;
}

.data-table th {
  padding: 10px 14px;
  background: #f8fafc;
  color: #667085;
  font-size: 10px;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--line);
}

.data-table td {
  padding: 12px 14px;
  border-top: 1px solid var(--line-2);
  font-size: 13px;
}

.data-table tbody tr:hover {
  background: #f9fbfd;
}

.data-table tbody tr {
  border-left: 3px solid transparent;
}

.data-table tbody tr:hover {
  border-left-color: rgba(15, 139, 127, 0.36);
}

.orders-table tbody tr.has-code {
  background: linear-gradient(90deg, rgba(236, 253, 243, 0.85), #fff 30%);
}

.badge,
.status-pill {
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 800;
}

.badge::before {
  display: none;
}

.badge.received,
.badge.active_ok,
.account-login-badge--normal {
  background: #ecfdf3;
  color: #067647;
  border-color: #abefc6;
}

.badge.active,
.badge.pending,
.account-login-badge--pending_unban {
  background: #fffaeb;
  color: #b54708;
  border-color: #fedf89;
}

.badge.expired,
.badge.failed,
.badge.banned,
.badge.unavailable,
.account-login-badge--permanent_ban {
  background: #fff1f3;
  color: #b42318;
  border-color: #fecdd6;
}

.badge.stuck_no_code,
.account-login-badge--stuck_no_code {
  background: #f4ebff;
  color: #6941c6;
  border-color: #d6bbfb;
}

.order-service {
  gap: 8px;
}

.order-svc-icon,
.svc-icon {
  border-radius: 8px;
}

.otp-box {
  border-radius: 8px;
  padding: 8px 10px;
}

.otp-box--ready {
  border-color: #75e0a7;
  box-shadow: inset 3px 0 0 #17b26a;
}

.otp-code {
  font-size: 20px;
}

.otp-copy,
.otp-ack,
.account-status-segment {
  border-radius: 6px;
}

.catalog-band {
  padding: 18px;
  margin-bottom: 12px;
}

.catalog-tools {
  gap: 10px;
  margin-bottom: 12px;
}

.catalog-grid {
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 10px;
}

.svc-card {
  border-radius: 8px;
  border: 1px solid var(--line);
  box-shadow: none;
}

.svc-card:not(.disabled):hover {
  border-color: rgba(15, 139, 127, 0.40);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.wallet-layout {
  gap: 12px;
}

.wallet-card {
  min-height: 180px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent 48%),
    #17202f;
  box-shadow: var(--shadow-md);
}

.wallet-card strong {
  font-size: 42px;
}

.timeline li,
.topup-card,
.topup-preset,
.topup-address-box,
.confirm-details {
  border-radius: 8px;
}

.admin-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 16px;
  padding: 18px;
  margin-bottom: 12px;
  background:
    linear-gradient(135deg, rgba(233, 251, 248, 0.78), rgba(255, 255, 255, 0.92) 52%, rgba(238, 242, 255, 0.70)),
    #fff;
}

.admin-hero::before {
  display: none;
}

.admin-hero-copy h2 {
  margin: 2px 0 6px;
  font-size: 23px;
  letter-spacing: 0;
}

.admin-hero-copy p {
  max-width: 760px;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(112px, 1fr));
  gap: 8px;
  min-width: 380px;
}

.admin-stat {
  padding: 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
}

.admin-stat strong {
  font-size: 26px;
}

.admin-stat.accent {
  background: #0f8b7f;
}

.admin-tabs {
  width: 100%;
  display: flex;
  gap: 6px;
  padding: 4px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #edf2f7;
}

.admin-tab {
  flex: 0 1 auto;
  min-height: 48px;
  border-radius: 6px;
  border: 0;
  box-shadow: none;
  background: transparent;
}

.admin-tab:hover {
  transform: none;
  background: rgba(255, 255, 255, 0.62);
}

.admin-tab.active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08);
}

.admin-tab-icon {
  border-radius: 6px;
}

.admin-split {
  grid-template-columns: minmax(320px, 0.38fr) minmax(0, 1fr);
  gap: 12px;
}

.admin-toolbar-actions {
  gap: 8px;
}

.admin-toolbar-actions,
.top-actions {
  align-items: center;
}

.admin-card {
  min-width: 0;
}

.admin-search,
.orders-search {
  min-width: 210px;
}

.agent-grid {
  gap: 10px;
  padding: 12px;
}

.agent-card {
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.agent-card:hover {
  border-color: rgba(15, 139, 127, 0.28);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.agent-card,
.agent-group-card,
.group-picker-trigger,
.group-picker-menu,
.assign-agent-suggest,
.rent-plan,
.reuse-service-item {
  border-radius: 8px;
}

.drawer-backdrop {
  background: rgba(16, 24, 40, 0.42);
}

.drawer-panel {
  width: min(520px, 100vw);
  border-radius: 8px 0 0 8px;
  box-shadow: -20px 0 48px rgba(16, 24, 40, 0.18);
}

.drawer-head {
  background: #17202f;
}

.drawer-actions {
  padding: 12px;
  background: rgba(255, 255, 255, 0.96);
}

.modal-backdrop {
  background: rgba(16, 24, 40, 0.44);
  backdrop-filter: blur(6px);
}

.modal-card {
  padding: 20px;
  box-shadow: var(--shadow);
}

.rent-modal-card {
  width: min(1080px, calc(100vw - 28px));
}

.rent-modal-left {
  background: #f8fafc;
}

.auth-screen {
  padding: 24px;
  background:
    linear-gradient(120deg, rgba(23, 32, 47, 0.86), rgba(15, 139, 127, 0.80)),
    url("/static/login-wallpaper.jpg") center/cover;
}

.auth-panel {
  grid-template-columns: minmax(0, 1fr) 396px;
  gap: 48px;
}

.auth-card {
  border-radius: 8px;
  padding: 28px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 24px 64px rgba(16, 24, 40, 0.22);
}

.auth-brand-visual {
  border-radius: 8px;
}

.auth-brand-quote-line {
  letter-spacing: 0;
}

.form-error:not(:empty)::before {
  content: "!";
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  margin-right: 6px;
  border-radius: 50%;
  background: #fee4e2;
  color: #b42318;
  font-size: 11px;
  font-weight: 900;
}

@media (max-width: 1120px) {
  .app {
    grid-template-columns: 232px minmax(0, 1fr);
  }

  .admin-hero {
    grid-template-columns: 1fr;
  }

  .admin-stats {
    min-width: 0;
  }
}

@media (max-width: 920px) {
  .app {
    grid-template-columns: 1fr;
  }

  .workspace {
    max-width: none;
    padding: 16px 14px 82px;
  }

  .topbar {
    align-items: stretch;
  }

  .top-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metrics-grid,
  .admin-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-split,
  .rent-modal-cols {
    grid-template-columns: 1fr;
  }

  .mobile-nav {
    border-top: 1px solid rgba(217, 224, 234, 0.95);
    background: rgba(255, 255, 255, 0.94);
  }

  .mobile-nav button.active {
    color: var(--brand-dark);
  }
}

/* Health check panel */

.health-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 10px;
  border: 1px solid var(--line);
  margin-top: 8px;
}

.health-summary.health-ok {
  background: var(--ok-soft);
  border-color: #a7f3d0;
}

.health-summary.health-warn {
  background: #fffbeb;
  border-color: #fde68a;
}

.health-status-icon {
  font-size: 22px;
  line-height: 1;
}

.health-summary strong { display: block; font-size: 15px; }
.health-summary small { color: var(--muted); font-size: 12px; }

.health-ok-line { color: var(--ok); font-size: 13px; margin: 8px 0; }
.health-issue   { color: var(--warning); font-size: 13px; margin: 8px 0; }

.health-issues-list {
  margin: 8px 0 0;
  padding-left: 18px;
  font-size: 13px;
  color: var(--muted);
}

.health-issues-list li { margin-bottom: 4px; }

.text-danger { color: var(--danger) !important; }

/* Company switcher (guanli portal) */

.company-switcher {
  display: flex;
  gap: 4px;
  background: var(--surface-2, #f1f5f9);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 10px;
  padding: 3px;
}

.company-tab {
  padding: 5px 16px;
  border-radius: 7px;
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-muted, #64748b);
  transition: background 0.15s, color 0.15s;
}

.company-tab.active {
  background: #ffffff;
  color: var(--brand-dark, #1e293b);
  box-shadow: 0 1px 4px rgba(0,0,0,0.10);
}

.company-tab:hover:not(.active) {
  background: rgba(255,255,255,0.55);
  color: var(--brand-dark, #1e293b);
}

/* Company badge on deposit rows */
.badge-company {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  border-radius: 4px;
  padding: 1px 5px;
  margin-left: 6px;
  vertical-align: middle;
  letter-spacing: 0.02em;
}

.badge-company-1 {
  background: #dbeafe;
  color: #1d4ed8;
}

.badge-company-2 {
  background: #fce7f3;
  color: #9d174d;
}

/* OTP inline code in order table */
.otp-inline {
  font-family: monospace;
  background: #f0fdf4;
  color: #166534;
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

@media (max-width: 560px) {
  .auth-screen {
    padding: 14px;
  }

  .auth-panel {
    gap: 20px;
  }

  .auth-brand-quote-line {
    font-size: 24px;
  }

  .auth-brand-quote-line--accent {
    font-size: 28px;
  }

  .auth-card {
    padding: 22px;
  }

  .workspace {
    padding: 12px 10px 78px;
  }

  .topbar h1 {
    font-size: 23px;
  }

  .top-actions {
    grid-template-columns: 1fr;
  }

  .metrics-grid,
  .admin-stats,
  .topup-presets {
    grid-template-columns: 1fr;
  }

  .panel-head,
  .admin-card-head,
  .catalog-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .orders-search,
  .admin-search {
    max-width: none;
    width: 100%;
  }

  .orders-toolbar,
  .orders-filter-row,
  .orders-pagination {
    justify-content: stretch;
    width: 100%;
  }

  .orders-toolbar {
    margin-left: 0;
    max-width: none;
  }

  .orders-filter-select {
    flex: 1 1 150px;
    min-width: 0;
  }

  .orders-page-size,
  .orders-pager-buttons {
    width: 100%;
    justify-content: space-between;
  }

  .modal-card {
    padding: 16px;
  }
}

/* Company Management (Platform Admin) */

.nav-item-super {
  border-top: 1px solid var(--line);
  margin-top: 4px;
  padding-top: 4px;
}

.companies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
  margin-top: 0.5rem;
}

.company-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  transition: box-shadow 0.15s, border-color 0.15s;
}
.company-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,.08);
  border-color: var(--brand-light);
}
.company-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}
.company-card-head h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}
.co-status-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.co-status-badge.active   { background: #d1fae5; color: #065f46; }
.co-status-badge.suspended { background: #fef3c7; color: #92400e; }
.co-status-badge.archived  { background: #f1f5f9; color: #64748b; }
.company-service-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 0.25rem 0 0.65rem;
}
.company-service-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 800;
}
.company-service-chip.enabled { background: #d1fae5; color: #065f46; }
.company-service-chip.disabled { background: #fee2e2; color: #991b1b; }

.company-card-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.co-stat {
  text-align: center;
}
.co-stat strong {
  display: block;
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1;
}
.co-stat small {
  font-size: 11px;
  color: var(--muted);
}

.company-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 1.5rem;
}
@media (max-width: 680px) {
  .company-form-grid { grid-template-columns: 1fr; }
}

/* Company detail drawer */
.company-drawer-panel {
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow-y: auto;
}
.co-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--line);
}
.co-section {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--line);
}
.co-section h3 {
  margin: 0 0 1rem;
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.co-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}
.co-section-head h3 { margin: 0; }

.co-settings-form { display: flex; flex-direction: column; gap: 0.75rem; }
.co-settings-form .field { display: flex; flex-direction: column; gap: 4px; }
.co-settings-form label { font-size: 13px; font-weight: 600; }
.co-service-box {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  padding: 12px;
}
.co-service-box-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.co-service-box-head strong {
  font-size: 13px;
}
.co-service-box-head span {
  color: var(--muted);
  font-size: 12px;
}
.co-service-toggle {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.co-service-toggle span {
  display: grid;
  gap: 2px;
}
.co-service-toggle small {
  color: var(--muted);
  font-weight: 500;
}

.co-health-result {
  font-size: 13px;
  padding: 0.75rem;
  border-radius: 8px;
  background: var(--surface-2);
}
.co-health-result.healthy { background: #d1fae5; color: #065f46; }
.co-health-result.unhealthy { background: #fee2e2; color: #991b1b; }

.btn-xs { padding: 4px 10px; font-size: 11px; border-radius: 6px; }

.admin-hero-actions { display: flex; align-items: center; gap: 0.75rem; }

/* Wallet Center */

.wallet-overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.875rem;
  margin-bottom: 1rem;
}

.wallet-stat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem 1.125rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-height: 96px;
}

.wallet-stat-card span {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

.wallet-stat-card strong {
  font-size: 1.35rem;
  line-height: 1.1;
}

.wallet-stat-card small {
  font-size: 11px;
  color: var(--muted-2);
}

.wallet-stat-card--primary {
  background: linear-gradient(135deg, #eef2ff 0%, #ffffff 100%);
  border-color: #c7d2fe;
}

.wallet-logs-panel { margin-top: 0.5rem; }

.wallet-logs-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.wallet-logs-sub {
  margin: 0.25rem 0 0;
  font-size: 12px;
}

.wallet-log-filters {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.wallet-log-filter.active {
  background: var(--brand-soft);
  color: var(--brand-dark);
  border-color: #c7d2fe;
}

.wallet-table-wrap { margin-top: 0.5rem; }

.wallet-table .col-amount {
  text-align: right;
  white-space: nowrap;
}

.wallet-type-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.wallet-type-badge.income    { background: #d1fae5; color: #065f46; }
.wallet-type-badge.expense   { background: #fee2e2; color: #991b1b; }
.wallet-type-badge.cat-topup  { background: #d1fae5; color: #065f46; }   /* 充值 绿 */
.wallet-type-badge.cat-refund { background: #dbeafe; color: #1e40af; }   /* 退款 蓝 */
.wallet-type-badge.cat-income { background: #d1fae5; color: #065f46; }   /* 收入 绿 */
.wallet-type-badge.cat-adjust { background: #fef9c3; color: #854d0e; }   /* 调整 黄 */
.wallet-type-badge.cat-order  { background: #fee2e2; color: #991b1b; }   /* 下单 红 */
.wallet-type-badge.cat-renew  { background: #ede9fe; color: #5b21b6; }   /* 续费 紫 */
.wallet-type-badge.cat-reuse  { background: #ffedd5; color: #9a3412; }   /* 复接 橙 */
.wallet-type-badge.cat-expense{ background: #fee2e2; color: #991b1b; }   /* 支出 红 */

.wallet-empty {
  text-align: center;
  padding: 1.5rem !important;
}

.wallet-log-pagination {
  margin-top: 0.75rem;
}

.wallet-pagination-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.wallet-pagination-info {
  font-size: 13px;
  color: var(--muted);
}

.wallet-page-size-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 13px;
  color: var(--muted);
  margin-left: auto;
}

@media (max-width: 920px) {
  .wallet-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .wallet-overview-grid {
    grid-template-columns: 1fr;
  }
}

/* Wallet finance dashboard layout override */
#view-wallet .wallet-overview-grid {
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

#view-wallet .wallet-stat-card {
  border-radius: 14px;
  min-height: 92px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

#view-wallet .wallet-layout {
  display: grid;
  grid-template-columns: minmax(380px, 430px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  margin-bottom: 0;
}

#view-wallet .wallet-left-col {
  display: grid;
  gap: 16px;
  min-width: 0;
  align-content: start;
}

#view-wallet .wallet-recharge-panel,
#view-wallet .wallet-ledger-panel,
#view-wallet .topup-recent-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
}

#view-wallet .wallet-recharge-panel {
  align-self: start;
  min-width: 0;
  overflow: visible;
}

#view-wallet .wallet-ledger-panel {
  min-width: 0;
  min-height: 520px;
  padding: 20px;
  margin-top: 0;
}

#view-wallet.wallet-payment-active .wallet-left-col,
#view-wallet .wallet-left-col:has(#topup-pay-step:not(.hidden)) {
  grid-column: 1 / -1;
}

#view-wallet.wallet-payment-active .wallet-left-col + .wallet-ledger-panel,
#view-wallet .wallet-left-col:has(#topup-pay-step:not(.hidden)) + .wallet-ledger-panel {
  grid-column: 1 / -1;
}

#view-wallet .wallet-layout:has(.wallet-left-col.hidden),
#view-wallet .wallet-layout:has(.wallet-recharge-panel.hidden):not(:has(.topup-recent-panel:not(.hidden))) {
  grid-template-columns: 1fr;
}

#view-wallet .wallet-layout:has(.wallet-left-col.hidden) .wallet-ledger-panel,
#view-wallet .wallet-layout:has(.wallet-recharge-panel.hidden):not(:has(.topup-recent-panel:not(.hidden))) .wallet-ledger-panel {
  grid-column: 1;
}

#view-wallet .topup-head {
  padding: 18px 20px 14px;
}

#view-wallet .topup-step {
  padding: 18px 20px;
}

#view-wallet .topup-pay-grid {
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  align-items: stretch;
}

#view-wallet .topup-qr-wrap {
  min-width: 0;
  align-content: center;
}

#view-wallet .topup-qr {
  width: min(220px, 100%);
  height: auto;
  aspect-ratio: 1 / 1;
}

#view-wallet .topup-pay-details,
#view-wallet .topup-address-box,
#view-wallet .topup-pay-amount {
  min-width: 0;
}

#view-wallet .topup-address-row {
  min-width: 0;
}

#view-wallet .topup-address-row code {
  overflow-wrap: anywhere;
  word-break: break-all;
  white-space: normal;
}

#view-wallet .topup-notices {
  padding-left: 16px;
}

#view-wallet .topup-recent-panel {
  padding: 16px 18px 18px;
}

#view-wallet .topup-deposit-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
}

#view-wallet .topup-deposit-item {
  padding: 10px 12px;
  min-height: auto;
}

#view-wallet .wallet-logs-head {
  align-items: flex-start;
  border-bottom: 1px solid var(--line-2);
  padding-bottom: 14px;
}

#view-wallet .wallet-log-filters {
  justify-content: flex-end;
}

#view-wallet .wallet-table-wrap {
  margin-top: 14px;
}

#view-wallet .wallet-table {
  width: 100%;
}

#view-wallet .wallet-table th,
#view-wallet .wallet-table td {
  padding-top: 12px;
  padding-bottom: 12px;
}

#view-wallet .wallet-table .col-amount,
#view-wallet .wallet-table .col-balance {
  text-align: right;
  white-space: nowrap;
}

#view-wallet .wallet-log-pagination {
  border-top: 1px solid var(--line-2);
  padding-top: 14px;
  margin-top: 14px;
}

@media (max-width: 1200px) {
  #view-wallet .wallet-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #view-wallet .wallet-layout {
    grid-template-columns: minmax(340px, 390px) minmax(0, 1fr);
    gap: 16px;
  }
}

@media (max-width: 1024px) {
  #view-wallet .wallet-layout {
    grid-template-columns: 1fr;
  }
  #view-wallet.wallet-payment-active .wallet-left-col,
  #view-wallet.wallet-payment-active .wallet-left-col + .wallet-ledger-panel,
  #view-wallet .wallet-left-col:has(#topup-pay-step:not(.hidden)),
  #view-wallet .wallet-left-col:has(#topup-pay-step:not(.hidden)) + .wallet-ledger-panel {
    grid-column: auto;
  }
}

@media (max-width: 560px) {
  #view-wallet .wallet-overview-grid {
    grid-template-columns: 1fr;
  }
  #view-wallet .topup-pay-grid {
    grid-template-columns: 1fr;
  }
  #view-wallet .topup-pay-actions .btn {
    width: 100%;
  }
}

.long-number-summary {
  margin-bottom: 18px;
}

.long-number-card {
  margin-bottom: 18px;
}

.long-number-filters {
  flex-wrap: wrap;
}

.long-number-filters .active {
  background: #111827;
  color: #fff;
  border-color: #111827;
}

.risk-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 800;
  border: 1px solid #dbeafe;
  background: #eff6ff;
  color: #1d4ed8;
  white-space: nowrap;
}

.risk-new {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #475569;
}

.risk-stable {
  background: #ecfdf5;
  border-color: #bbf7d0;
  color: #047857;
}

.risk-premium {
  background: #fef3c7;
  border-color: #fde68a;
  color: #b45309;
}

.risk-vip {
  background: #f5f3ff;
  border-color: #ddd6fe;
  color: #6d28d9;
}

.expiry-days {
  display: inline-flex;
  border-radius: 999px;
  padding: 4px 9px;
  font-weight: 800;
  background: #f1f5f9;
  color: #475569;
}

.expiry-days.notice {
  background: #eff6ff;
  color: #1d4ed8;
}

.expiry-days.warning {
  background: #fffbeb;
  color: #b45309;
}

.expiry-days.danger,
.metric.danger strong {
  color: #dc2626;
}

.expiry-days.danger {
  background: #fef2f2;
}

.metric.warning strong {
  color: #d97706;
}

.metric.notice strong {
  color: #2563eb;
}

.long-number-ranking {
  display: grid;
  gap: 10px;
}

.long-rank-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.long-rank-no {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #f8fafc;
  color: #475569;
  font-weight: 900;
}

.long-rank-item small {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 3px;
  color: var(--muted);
}

.long-rank-meta {
  text-align: right;
  white-space: nowrap;
}

.long-rank-meta small {
  justify-content: flex-end;
}

.renew-pagination,
.admin-list-pagination {
  border-top: 1px solid var(--line-2);
  margin-top: 14px;
  padding-top: 14px;
  gap: 12px;
}

.renew-pagination .pagination-size,
.admin-list-pagination .pagination-size {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.renew-pagination .pagination-size .admin-select,
.admin-list-pagination .pagination-size .admin-select {
  min-width: 76px;
  height: 34px;
  padding: 0 8px;
}

@media (max-width: 720px) {
  .long-rank-item {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .long-rank-meta {
    grid-column: 2;
    text-align: left;
  }
}

/* Partner work balance ? full-width recharge flow */
#view-partner_work_balance .pwb-page {
  display: grid;
  gap: 22px;
  max-width: 1120px;
}

#view-partner_work_balance .pwb-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 1fr);
  gap: 24px;
  align-items: stretch;
  padding: 28px 32px;
  border-radius: 20px;
  border: 1px solid rgba(13, 148, 136, 0.18);
  background:
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.14), transparent 42%),
    linear-gradient(135deg, rgba(13, 148, 136, 0.12) 0%, rgba(255, 255, 255, 0.98) 58%);
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.06);
}

#view-partner_work_balance .pwb-hero-eyebrow {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
}

#view-partner_work_balance .pwb-hero-title {
  margin: 0;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

#view-partner_work_balance .pwb-hero-desc {
  margin: 10px 0 0;
  max-width: 520px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--muted);
}

#view-partner_work_balance .pwb-hero-stats {
  display: grid;
  gap: 12px;
  align-content: center;
}

#view-partner_work_balance .pwb-stat {
  display: grid;
  gap: 4px;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
}

#view-partner_work_balance .pwb-stat span {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

#view-partner_work_balance .pwb-stat strong {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

#view-partner_work_balance .pwb-stat--primary {
  border-color: rgba(13, 148, 136, 0.28);
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.12), rgba(255, 255, 255, 0.96));
}

#view-partner_work_balance .pwb-stat--primary strong {
  font-size: 34px;
  color: var(--brand);
}

#view-partner_work_balance .pwb-recharge-card,
#view-partner_work_balance .pwb-history-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.05);
  overflow: hidden;
}

#view-partner_work_balance .pwb-card-head,
#view-partner_work_balance .pwb-history-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 28px;
  border-bottom: 1px solid var(--line-2);
  background: linear-gradient(180deg, var(--surface-2) 0%, #fff 100%);
}

#view-partner_work_balance .pwb-card-head h3,
#view-partner_work_balance .pwb-history-head h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

#view-partner_work_balance .pwb-card-head p,
#view-partner_work_balance .pwb-history-head p {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
}

#view-partner_work_balance .pwb-badge {
  flex-shrink: 0;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(13, 148, 136, 0.1);
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

#view-partner_work_balance .pwb-step {
  padding: 26px 28px 28px;
  border-top: 1px solid var(--line-2);
}

#view-partner_work_balance .pwb-step--form {
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
}

#view-partner_work_balance .pwb-step-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

#view-partner_work_balance .pwb-step-no {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  flex-shrink: 0;
}

#view-partner_work_balance .pwb-step-head strong {
  display: block;
  font-size: 16px;
  font-weight: 800;
}

#view-partner_work_balance .pwb-step-head small {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  color: var(--muted);
}

#view-partner_work_balance .pwb-pay-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

#view-partner_work_balance .pwb-qr-panel {
  display: grid;
  gap: 12px;
  justify-items: center;
  padding: 22px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

#view-partner_work_balance .pwb-qr {
  display: block;
  width: 220px;
  max-width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
}

#view-partner_work_balance .pwb-qr-panel p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

#view-partner_work_balance .pwb-pay-body {
  display: grid;
  gap: 18px;
  min-width: 0;
}

#view-partner_work_balance .pwb-address-card {
  display: grid;
  gap: 14px;
  padding: 20px 22px;
  border-radius: 16px;
  border: 1px solid rgba(13, 148, 136, 0.2);
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.06), rgba(59, 130, 246, 0.04));
}

#view-partner_work_balance .pwb-address-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

#view-partner_work_balance .pwb-network-tag {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(13, 148, 136, 0.12);
  color: var(--brand);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

#view-partner_work_balance .pwb-address-code {
  display: block;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px dashed rgba(13, 148, 136, 0.35);
  background: #fff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
  line-height: 1.55;
  word-break: break-all;
  overflow-wrap: anywhere;
  color: var(--ink);
}

#view-partner_work_balance .pwb-copy-btn {
  width: 100%;
  justify-content: center;
}

#view-partner_work_balance .pwb-info-banner {
  display: grid;
  gap: 8px;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid #dbeafe;
  background: #eff6ff;
  color: #1e3a8a;
  font-size: 13px;
  line-height: 1.6;
}

#view-partner_work_balance .pwb-info-banner p {
  margin: 0;
}

#view-partner_work_balance .pwb-form {
  display: grid;
  gap: 18px;
}

#view-partner_work_balance .pwb-form-grid {
  display: grid;
  grid-template-columns: minmax(200px, 280px) minmax(0, 1fr);
  gap: 16px;
  align-items: end;
}

#view-partner_work_balance .pwb-form .field label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 700;
}

#view-partner_work_balance .pwb-amount-input {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}

#view-partner_work_balance .pwb-amount-input:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.12);
}

#view-partner_work_balance .pwb-amount-input span {
  padding: 0 14px;
  align-self: stretch;
  display: grid;
  place-items: center;
  font-size: 18px;
  font-weight: 800;
  color: var(--muted);
  background: var(--surface-2);
}

#view-partner_work_balance .pwb-amount-input input,
#view-partner_work_balance .pwb-tx-input,
#view-partner_work_balance .pwb-field-note input {
  width: 100%;
  min-width: 0;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 13px 14px;
  font-size: 15px;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}

#view-partner_work_balance .pwb-amount-input input {
  border: 0;
  border-radius: 0;
  padding-left: 8px;
  font-size: 18px;
  font-weight: 700;
}

#view-partner_work_balance .pwb-tx-input:focus,
#view-partner_work_balance .pwb-field-note input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.12);
}

#view-partner_work_balance .pwb-form-msg {
  min-height: 20px;
  margin: 0;
}

#view-partner_work_balance .pwb-submit-btn {
  width: fit-content;
  min-width: 220px;
  min-height: 46px;
  padding-inline: 28px;
  font-size: 15px;
  font-weight: 700;
}

#view-partner_work_balance .pwb-history-card {
  padding-bottom: 8px;
}

#view-partner_work_balance .pwb-table-wrap {
  padding: 0 20px 16px;
  max-height: none;
}

#view-partner_work_balance .pwb-table {
  min-width: 640px;
}

#view-partner_work_balance .pwb-table code {
  font-size: 12px;
  word-break: break-all;
}

@media (max-width: 960px) {
  #view-partner_work_balance .pwb-hero {
    grid-template-columns: 1fr;
  }

  #view-partner_work_balance .pwb-pay-layout {
    grid-template-columns: 1fr;
  }

  #view-partner_work_balance .pwb-form-grid {
    grid-template-columns: 1fr;
  }

  #view-partner_work_balance .pwb-submit-btn {
    width: 100%;
  }
}

@media (max-width: 640px) {
  #view-partner_work_balance .pwb-hero,
  #view-partner_work_balance .pwb-card-head,
  #view-partner_work_balance .pwb-history-head,
  #view-partner_work_balance .pwb-step {
    padding-inline: 18px;
  }

  #view-partner_work_balance .pwb-card-head,
  #view-partner_work_balance .pwb-history-head {
    flex-direction: column;
    align-items: stretch;
  }
}

/* GPT membership shop */
.gpt-shop-layout {
  display: grid;
  gap: 16px;
}

.gpt-plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.gpt-plan-card {
  display: grid;
  gap: 12px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.gpt-plan-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.gpt-plan-price {
  font-size: 24px;
  font-weight: 900;
  color: var(--brand);
}

.gpt-plan-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.gpt-plan-stock {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.gpt-credential-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  background: #fff;
  margin-bottom: 10px;
}

.gpt-credential-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.gpt-credential-body {
  display: grid;
  gap: 8px;
  font-size: 13px;
}

.gpt-credential-body code {
  display: block;
  margin-top: 4px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--surface-2);
  word-break: break-all;
}

.gpt-session-code {
  max-height: 120px;
  overflow: auto;
}

.gpt-finished-list {
  padding: 0 16px 16px;
}

.gpt-session-panel {
  margin-top: 0;
}

/* GPT admin visual upgrade */
.gpt-admin-view .gpt-admin-hero {
  margin-bottom: 16px;
  border-radius: 14px;
  border: 1px solid #dbe4ef;
  background: linear-gradient(135deg, #f9fbff 0%, #eef6ff 60%, #f5f9ff 100%);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.gpt-admin-view .gpt-admin-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.gpt-admin-view .panel {
  border-radius: 12px;
  border: 1px solid #dfe7f2;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}

.gpt-admin-view .panel-head {
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.gpt-admin-view .gpt-vcc-panel,
.gpt-admin-view .gpt-session-panel {
  min-height: 420px;
}

.gpt-admin-view .gpt-stock-form-panel,
.gpt-admin-view .gpt-stock-list-panel {
  min-height: 280px;
}

.gpt-admin-view .data-table tbody tr:hover {
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.05) 0%, rgba(248, 250, 252, 0.9) 100%);
}

@media (max-width: 1080px) {
  .gpt-admin-view .gpt-admin-grid {
    grid-template-columns: 1fr;
  }
}
.gpt-checkout-actions {
  display: grid;
  gap: 8px;
  min-width: 280px;
}

.gpt-price-confirm {
  display: grid;
  grid-template-columns: 72px 96px minmax(120px, 1fr);
  gap: 6px;
  align-items: center;
}

.gpt-price-confirm .admin-search {
  min-width: 0;
  height: 34px;
  padding: 0 8px;
}

.gpt-price-check {
  margin: 0;
  white-space: nowrap;
}

.danger-text {
  color: #b91c1c;
}

/* Premium Guanli Admin Interface (final override) */
.guanli-icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.guanli-portal {
  --gl-bg: #070b18;
  --gl-sidebar: #101832;
  --gl-panel: rgba(18, 27, 55, 0.88);
  --gl-panel-2: rgba(23, 34, 68, 0.82);
  --gl-line: rgba(148, 163, 184, 0.16);
  --gl-line-strong: rgba(191, 219, 254, 0.22);
  --gl-text: #f8fafc;
  --gl-sub: #94a3b8;
  --gl-blue: #3478ff;
  --gl-blue-2: #6d5dfc;
  --gl-teal: #14b8a6;
  --gl-shadow: 0 24px 70px rgba(0, 0, 0, 0.30), inset 0 1px 0 rgba(255,255,255,0.05);
}

.guanli-portal .liquid-bg {
  display: none;
}

.guanli-app.app {
  grid-template-columns: 210px minmax(0, 1fr);
}

.guanli-sidebar {
  padding: 14px 10px;
  background:
    linear-gradient(180deg, rgba(21, 31, 63, 0.96), rgba(12, 18, 38, 0.96)),
    radial-gradient(circle at 32% 0%, rgba(52, 120, 255, 0.18), transparent 34%);
  border-right: 1px solid var(--gl-line);
  box-shadow: 12px 0 40px rgba(0, 0, 0, 0.18);
}

.guanli-sidebar .side-brand {
  padding: 2px 4px 12px;
  border-bottom: 1px solid var(--gl-line);
}

.guanli-sidebar .side-brand strong {
  color: var(--gl-text);
  font-size: 14px;
  letter-spacing: -0.02em;
}

.guanli-sidebar #role-badge {
  background: rgba(52, 120, 255, 0.14);
  border-color: rgba(147, 197, 253, 0.22);
  color: #bfdbfe;
}

.guanli-nav-list {
  padding: 10px 0;
  gap: 3px;
}

.guanli-sidebar .nav-item {
  grid-template-columns: 26px minmax(0, 1fr);
  min-height: 38px;
  padding: 6px 8px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(203, 213, 225, 0.70);
  column-gap: 8px;
}

.guanli-sidebar .nav-item .nav-icon {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  color: #7da4ff;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.guanli-sidebar .nav-item .nav-icon svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.guanli-sidebar .nav-item > span:not(.nav-icon) {
  color: inherit;
  font-size: 13px;
  font-weight: 600;
  flex: 1;
}

.guanli-sidebar .nav-item small {
  color: rgba(148, 163, 184, 0.60);
  font-size: 10px;
}

/* Nav groups */
.guanli-sidebar .nav-group {
  display: flex;
  flex-direction: column;
}

.guanli-sidebar .nav-group-trigger {
  display: grid;
  grid-template-columns: 26px 1fr 16px;
  align-items: center;
  column-gap: 8px;
  width: 100%;
  min-height: 38px;
  padding: 6px 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: rgba(203, 213, 225, 0.75);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.guanli-sidebar .nav-group-trigger:hover {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(224, 234, 255, 0.90);
}

.guanli-sidebar .nav-group.open .nav-group-trigger {
  color: #c3d8ff;
}

.guanli-sidebar .nav-group-trigger .nav-icon {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: #7da4ff;
}

.guanli-sidebar .nav-group-trigger .nav-icon svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.guanli-sidebar .nav-chevron {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
  opacity: 0.55;
}

.guanli-sidebar .nav-group.open .nav-chevron {
  transform: rotate(180deg);
  opacity: 0.85;
}

/* Group body: collapsed by default */
.guanli-sidebar .nav-group-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.22s ease;
  overflow: hidden;
}

.guanli-sidebar .nav-group.open .nav-group-body {
  grid-template-rows: 1fr;
}

.guanli-sidebar .nav-group-body > * {
  min-height: 0;
  overflow: hidden;
}

/* Sub-items */
.guanli-sidebar .nav-sub-item {
  display: flex !important;
  align-items: center;
  gap: 8px;
  min-height: 32px !important;
  padding: 5px 8px 5px 20px !important;
  border-radius: 8px !important;
  border: 1px solid transparent !important;
  background: transparent !important;
  color: rgba(148, 163, 184, 0.80) !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}

.guanli-sidebar .nav-sub-item svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.7;
}

.guanli-sidebar .nav-sub-item:hover {
  background: rgba(52, 120, 255, 0.10) !important;
  color: #c3d8ff !important;
}

.guanli-sidebar .nav-sub-item.active {
  background: rgba(52, 120, 255, 0.20) !important;
  color: #e0eeff !important;
  border-color: rgba(99, 155, 255, 0.22) !important;
}

.guanli-sidebar .nav-sub-item.active svg {
  opacity: 1;
}

.guanli-sidebar .nav-item.active,
.guanli-sidebar .nav-item:hover {
  background: rgba(52, 120, 255, 0.18);
  border-color: rgba(99, 155, 255, 0.22);
  color: #e0eaff;
  box-shadow: none;
}

.guanli-sidebar .nav-item.active {
  background: rgba(52, 120, 255, 0.24);
  border-color: rgba(99, 155, 255, 0.30);
  color: #fff;
}

.guanli-sidebar .nav-item.active .nav-icon,
.guanli-sidebar .nav-item:hover .nav-icon {
  color: #a5c0ff;
  background: rgba(52, 120, 255, 0.20);
  border-color: rgba(99, 155, 255, 0.28);
}

.guanli-theme-toggle,
.guanli-sidebar .side-actions {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--gl-line);
  border-radius: 10px;
}

.guanli-theme-toggle {
  min-height: 38px;
  padding: 6px 8px;
}

.guanli-theme-toggle .theme-toggle-icon {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: rgba(52, 120, 255, 0.14);
  color: #bfdbfe;
  font-weight: 900;
  font-size: 13px;
}

.guanli-sidebar .side-user span,
.guanli-theme-toggle strong {
  color: var(--gl-text);
  font-size: 13px;
}

.guanli-sidebar .side-user small,
.guanli-theme-toggle small {
  color: var(--gl-sub);
  font-size: 10px;
}

.guanli-app .workspace {
  padding: 22px 28px 92px;
}

.guanli-app .topbar {
  top: 16px;
  padding: 18px 22px;
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(18, 27, 55, 0.82), rgba(26, 39, 78, 0.62)) !important;
  border: 1px solid var(--gl-line-strong) !important;
  box-shadow: var(--gl-shadow);
}

.guanli-app .topbar .eyebrow,
.guanli-app .admin-hero .eyebrow,
.guanli-app .panel .eyebrow {
  color: #7dd3fc !important;
  letter-spacing: 0.12em;
}

.guanli-app .topbar h1 {
  color: var(--gl-text);
  background: none;
  -webkit-text-fill-color: currentColor;
}

.guanli-app .btn.secondary,
.guanli-app .btn.primary {
  background: linear-gradient(135deg, var(--gl-blue), var(--gl-blue-2));
  color: #fff;
  border-color: rgba(191, 219, 254, 0.24);
  box-shadow: 0 12px 28px rgba(52, 120, 255, 0.22);
}

.guanli-app .btn.ghost {
  background: rgba(255, 255, 255, 0.065);
  color: #e2e8f0;
  border-color: var(--gl-line);
}

.guanli-app .btn.danger {
  background: rgba(251, 113, 133, 0.12);
  color: #fecdd3;
  border-color: rgba(251, 113, 133, 0.25);
}

.guanli-app .panel,
.guanli-app .settings-grid .panel,
.guanli-app .admin-card,
.gpt-admin-view .panel {
  background: linear-gradient(155deg, rgba(18, 27, 55, 0.88), rgba(24, 35, 70, 0.72)) !important;
  border: 1px solid var(--gl-line-strong) !important;
  border-radius: 18px;
  box-shadow: var(--gl-shadow);
  color: var(--gl-text);
}

/* Compact single-row hero for guanli */
.guanli-app .admin-hero,
.gpt-admin-view .gpt-admin-hero {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  padding: 10px 16px !important;
  margin-bottom: 10px !important;
  min-height: 0 !important;
  border-radius: 14px !important;
  background: linear-gradient(135deg, rgba(14, 21, 48, 0.96), rgba(20, 30, 65, 0.90)) !important;
  border: 1px solid var(--gl-line-strong) !important;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18) !important;
  gap: 16px !important;
}

.guanli-app .admin-hero-copy {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

/* Hide the redundant subtitle paragraph inside hero */
.guanli-app .admin-hero-copy > p:not(.eyebrow) {
  display: none !important;
}

/* Number lookup */
.number-lookup-result {
  display: grid;
  gap: 16px;
}

.lookup-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.lookup-summary-card {
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: 14px;
  padding: 14px;
}

.lookup-summary-card span,
.lookup-section-head span {
  color: var(--muted);
  font-size: 12px;
}

.lookup-summary-card strong {
  display: block;
  margin: 6px 0;
  font-size: 18px;
}

.lookup-summary-card.primary strong {
  font-size: 22px;
}

.lookup-kpis {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.lookup-kpis span {
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.1);
  color: var(--accent);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
}

.lookup-section {
  display: grid;
  gap: 10px;
}

.lookup-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.lookup-section-head h4 {
  margin: 0;
}

.lookup-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.lookup-timeline-item {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 10px;
  align-items: start;
}

.lookup-timeline-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 5px;
}

.lookup-timeline-item p {
  margin: 2px 0;
}

/* Refined admin group board and number lookup */
.agent-groups-panel {
  padding: 14px !important;
}
.agent-groups-head {
  margin-bottom: 10px !important;
}
.agent-group-grid {
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important;
  gap: 8px !important;
}
.agent-group-card {
  gap: 8px !important;
  padding: 10px !important;
  border-radius: 12px !important;
}
.agent-group-badge {
  width: 30px !important;
  height: 30px !important;
  border-radius: 9px !important;
  font-size: 13px !important;
}
.agent-group-title {
  font-size: 13px !important;
}
.agent-group-metrics {
  gap: 6px !important;
}
.agent-group-metric {
  padding: 7px 8px !important;
}
.agent-group-metric strong {
  font-size: 16px !important;
}

.lookup-hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 16px;
  padding: 18px;
  border: 1px solid rgba(13, 148, 136, 0.18);
  border-radius: 18px;
  background:
    radial-gradient(circle at 0 0, rgba(13, 148, 136, 0.16), transparent 32%),
    var(--surface);
}
.lookup-eyebrow {
  color: var(--brand);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}
.lookup-phone {
  display: block;
  margin-top: 6px;
  color: var(--text);
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1;
  letter-spacing: -0.04em;
}
.lookup-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.lookup-meta-row span {
  border: 1px solid rgba(13, 148, 136, 0.18);
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.lookup-owner-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}
.lookup-owner-grid div,
.lookup-hero-side div {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  padding: 10px;
}
.lookup-owner-grid span,
.lookup-hero-side span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.lookup-owner-grid strong,
.lookup-hero-side strong {
  display: block;
  margin-top: 5px;
  color: var(--text);
  font-size: 15px;
}
.lookup-owner-grid small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}
.lookup-hero-side {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.lookup-hero-side strong {
  color: var(--brand);
  font-size: 22px;
}
.lookup-section {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}
@media (max-width: 860px) {
  .lookup-hero-card,
  .lookup-owner-grid {
    grid-template-columns: 1fr;
  }
  .lookup-hero-side {
    grid-template-columns: repeat(2, 1fr);
  }
}

.guanli-app .admin-hero-copy h2,
.guanli-app .panel h2,
.guanli-app .panel h3,
.gpt-admin-view .panel h2 {
  color: #f0f6ff !important;
  margin: 0 !important;
}

.guanli-app .admin-hero-copy p,
.guanli-app .panel p,
.gpt-admin-view .panel p {
  color: #94a3b8 !important;
}

.guanli-app .panel-head,
.gpt-admin-view .panel-head {
  background: rgba(255, 255, 255, 0.025) !important;
  border-bottom-color: var(--gl-line) !important;
}

/* Strong contrast for all headings inside guanli panels */
.guanli-app .admin-card h3,
.guanli-app .panel h2,
.guanli-app .panel h3 {
  color: #f0f6ff !important;
}

/* Subtext is readable grey, not too faint */
.guanli-app .panel-head p,
.guanli-app .admin-card-head p,
.guanli-app .muted {
  color: #8fa8c8 !important;
}

/* small tags and sub-labels */
.guanli-app small {
  color: #7a94b4 !important;
}

/* Table text always legible */
.guanli-app .data-table td,
.guanli-app .data-table td * {
  color: #dce8f8 !important;
}

.guanli-app .admin-stat {
  background: linear-gradient(155deg, rgba(22, 32, 64, 0.92), rgba(29, 42, 82, 0.72));
  border: 1px solid var(--gl-line);
  border-radius: 18px;
  color: var(--gl-text);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 16px 36px rgba(0,0,0,0.18);
}

.guanli-app .admin-stat.accent {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.96), rgba(14, 165, 233, 0.86));
}

.guanli-app .admin-stat strong {
  color: var(--gl-text);
}

.guanli-app input,
.guanli-app select,
.guanli-app textarea,
.guanli-app .admin-search,
.guanli-app .admin-select {
  background: rgba(7, 11, 24, 0.34) !important;
  border-color: var(--gl-line) !important;
  color: var(--gl-text) !important;
}

.guanli-app .data-table {
  background: rgba(7, 11, 24, 0.22);
  color: var(--gl-text);
}

.guanli-app .data-table thead th {
  background: rgba(255, 255, 255, 0.045);
  color: #cbd5e1;
  border-bottom: 1px solid var(--gl-line);
}

.guanli-app .data-table td {
  border-bottom-color: rgba(148, 163, 184, 0.10);
  color: #e2e8f0;
}

.guanli-app .data-table tbody tr:hover {
  background: rgba(52, 120, 255, 0.055);
}

.partner-admin-card-grid {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.partner-admin-card {
  background:
    radial-gradient(circle at 88% 0%, rgba(52, 120, 255, 0.16), transparent 32%),
    linear-gradient(155deg, rgba(22, 32, 64, 0.94), rgba(13, 20, 43, 0.90));
  border: 1px solid var(--gl-line-strong);
  border-radius: 24px;
  box-shadow: 0 22px 52px rgba(0,0,0,0.24), inset 0 1px 0 rgba(255,255,255,0.06);
}

.partner-admin-card h3,
.partner-admin-metrics strong {
  color: var(--gl-text);
}

.partner-admin-card p,
.partner-admin-card-foot small,
.partner-admin-metrics span {
  color: var(--gl-sub);
}

.partner-admin-avatar {
  background: linear-gradient(135deg, var(--gl-blue), var(--gl-blue-2));
  color: #fff;
}

.partner-admin-status {
  background: rgba(34, 197, 94, 0.12);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.18);
}

.partner-admin-metrics div {
  background: rgba(7, 11, 24, 0.34);
  border-color: rgba(148, 163, 184, 0.13);
}

.company-switcher {
  background: rgba(255, 255, 255, 0.055);
  border-color: var(--gl-line);
}

.company-tab {
  color: var(--gl-sub);
}

.company-tab.active {
  background: linear-gradient(135deg, var(--gl-blue), var(--gl-blue-2));
  color: #fff;
}

body.guanli-portal:not(.guanli-dark) .guanli-app .topbar,
body.guanli-portal:not(.guanli-dark) .guanli-app .admin-hero,
body.guanli-portal:not(.guanli-dark) .guanli-app .panel,
body.guanli-portal:not(.guanli-dark) .guanli-app .settings-grid .panel,
body.guanli-portal:not(.guanli-dark) .guanli-app .admin-card {
  background: linear-gradient(155deg, rgba(255,255,255,0.88), rgba(241,245,249,0.76)) !important;
  color: #0f172a;
}

.partner-admin-card h3,
.partner-admin-metrics strong,
.partner-admin-status {
  color: #ffffff !important;
}

/* Guanli dark: table-row and status deep overrides */

/* Base table: no white background */
.guanli-app .data-table {
  background: transparent !important;
}

.guanli-app .data-table th,
.guanli-app .data-table thead th {
  background: rgba(255, 255, 255, 0.04) !important;
  color: #94a3b8 !important;
  font-size: 11px !important;
  letter-spacing: 0.08em;
  border-bottom: 1px solid rgba(148, 163, 184, 0.13) !important;
  box-shadow: none !important;
}

.guanli-app .data-table tbody tr {
  background: transparent !important;
}

.guanli-app .data-table td {
  color: #e2e8f0 !important;
  border-top: 1px solid rgba(148, 163, 184, 0.07) !important;
  border-bottom: none !important;
}

.guanli-app .data-table tbody tr:hover {
  background: rgba(52, 120, 255, 0.07) !important;
}

/* has-code rows: teal glow instead of green-white */
.guanli-app .orders-table tbody tr.has-code {
  background: linear-gradient(90deg, rgba(20, 184, 166, 0.11) 0%, transparent 38%) !important;
}

.guanli-app .orders-table tbody tr.has-code:hover {
  background: linear-gradient(90deg, rgba(20, 184, 166, 0.20) 0%, rgba(52, 120, 255, 0.06) 40%) !important;
}

/* expiry rows: dark semantic colors instead of light pastel */
.guanli-app .order-row.expiry-notice {
  background: rgba(245, 158, 11, 0.08) !important;
}

.guanli-app .order-row.expiry-warning {
  background: rgba(249, 115, 22, 0.10) !important;
}

.guanli-app .order-row.expiry-critical,
.guanli-app .order-row.expiry-grace {
  background: rgba(239, 68, 68, 0.10) !important;
}

.guanli-app .order-row.expiry-lapsed {
  background: transparent !important;
  opacity: 0.6;
}

/* Admin hero stats in dark mode */
.guanli-app .admin-stat {
  background: linear-gradient(155deg, rgba(22, 32, 64, 0.96), rgba(29, 42, 82, 0.80)) !important;
  border: 1px solid rgba(148, 163, 184, 0.14) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255,255,255,0.05) !important;
  color: #f8fafc !important;
}

.guanli-app .admin-stat.accent {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.90), rgba(14, 165, 233, 0.80)) !important;
  border-color: rgba(94, 234, 212, 0.30) !important;
  box-shadow: 0 12px 32px rgba(20, 184, 166, 0.22) !important;
}

.guanli-app .admin-stat strong {
  color: #ffffff !important;
  font-size: 2.2rem !important;
}

.guanli-app .admin-stat span,
.guanli-app .admin-stat p {
  color: rgba(203, 213, 225, 0.88) !important;
}

/* Table scroll container in dark mode */
.guanli-app .table-scroll {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.13) !important;
}

/* Filter / search row */
.guanli-app .admin-filters {
  gap: 10px;
}

.guanli-app .admin-search,
.guanli-app .admin-select {
  background: rgba(7, 11, 24, 0.42) !important;
  border: 1px solid rgba(148, 163, 184, 0.20) !important;
  color: #e2e8f0 !important;
  border-radius: 12px !important;
}

.guanli-app .admin-search:focus,
.guanli-app .admin-select:focus {
  border-color: rgba(52, 120, 255, 0.55) !important;
  box-shadow: 0 0 0 3px rgba(52, 120, 255, 0.14) !important;
  outline: none !important;
}

/* Badge overrides inside guanli dark */
.guanli-app .badge.received,
.guanli-app .badge.active_ok {
  background: rgba(20, 184, 166, 0.16) !important;
  color: #5eead4 !important;
  border-color: rgba(20, 184, 166, 0.28) !important;
}

.guanli-app .badge.pending,
.guanli-app .badge.waiting {
  background: rgba(251, 191, 36, 0.14) !important;
  color: #fcd34d !important;
  border-color: rgba(251, 191, 36, 0.24) !important;
}

.guanli-app .badge.released,
.guanli-app .badge.expired,
.guanli-app .badge.cancelled {
  background: rgba(148, 163, 184, 0.10) !important;
  color: #94a3b8 !important;
  border-color: rgba(148, 163, 184, 0.18) !important;
}

.guanli-app .badge.stuck {
  background: rgba(239, 68, 68, 0.12) !important;
  color: #fca5a5 !important;
  border-color: rgba(239, 68, 68, 0.22) !important;
}

/* legacy tag */
.guanli-app .status-pill.legacy {
  background: rgba(109, 93, 252, 0.14) !important;
  color: #c4b5fd !important;
  border-color: rgba(109, 93, 252, 0.24) !important;
}

/* Admin order hero */
/* hero h2: compact size for single-row layout */
.guanli-app .admin-hero-copy h2 {
  font-size: 15px !important;
  font-weight: 700 !important;
  color: #f0f6ff !important;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.guanli-app .admin-hero .eyebrow {
  color: #60a5fa !important;
  letter-spacing: 0.10em;
  font-weight: 700;
  font-size: 10px !important;
  white-space: nowrap;
}

/* admin-stats row inside compact hero */
.guanli-app .admin-hero .admin-stats {
  flex-shrink: 0;
  display: flex !important;
  flex-direction: row !important;
  gap: 8px;
  grid-template-columns: unset;
}

.guanli-app .admin-hero .admin-stat {
  padding: 6px 14px !important;
  border-radius: 10px !important;
  min-width: 70px;
  box-shadow: none !important;
}

.guanli-app .admin-hero .admin-stat span {
  font-size: 10px !important;
  color: rgba(148, 163, 184, 0.80) !important;
}

.guanli-app .admin-hero .admin-stat strong {
  font-size: 18px !important;
  color: #ffffff !important;
  line-height: 1.1;
}

/* GUANLI DARK: unified component overhaul
   Fixes all remaining white/glass components inside the dark admin portal.
*/

/* Topbar */
.guanli-app .topbar {
  top: 12px !important;
  padding: 10px 18px !important;
  border-radius: 14px !important;
  background: rgba(12, 19, 42, 0.88) !important;
  border: 1px solid rgba(148, 163, 184, 0.14) !important;
  box-shadow: 0 2px 12px rgba(0,0,0,0.22) !important;
  backdrop-filter: blur(20px) !important;
  margin-bottom: 12px !important;
}

.guanli-app .topbar h1 {
  font-size: 16px !important;
  font-weight: 700 !important;
  color: #f0f6ff !important;
  background: none !important;
  -webkit-text-fill-color: #f0f6ff !important;
  letter-spacing: -0.01em;
}

.guanli-app .topbar .eyebrow {
  font-size: 9px !important;
  color: #60a5fa !important;
  letter-spacing: 0.12em;
}

/* Company switcher pills */
.guanli-app .company-switcher {
  background: rgba(7, 11, 24, 0.50) !important;
  border: 1px solid rgba(148, 163, 184, 0.16) !important;
  border-radius: 10px !important;
  padding: 3px !important;
  gap: 2px !important;
}

.guanli-app .company-tab {
  background: transparent !important;
  color: rgba(148, 163, 184, 0.80) !important;
  border: 1px solid transparent !important;
  border-radius: 7px !important;
  padding: 4px 12px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
}

.guanli-app .company-tab.active {
  background: rgba(52, 120, 255, 0.28) !important;
  color: #a5c3ff !important;
  border-color: rgba(52, 120, 255, 0.32) !important;
}

/* Admin card */
.guanli-app .admin-card {
  background: linear-gradient(155deg, rgba(14, 21, 48, 0.92), rgba(18, 27, 58, 0.80)) !important;
  border: 1px solid rgba(148, 163, 184, 0.14) !important;
  border-radius: 16px !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.20) !important;
  overflow: hidden;
}

.guanli-app .admin-card-head {
  background: rgba(255, 255, 255, 0.03) !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12) !important;
  padding: 12px 16px !important;
}

.guanli-app .admin-card-head h3 {
  font-size: 14px !important;
  font-weight: 700 !important;
  color: #e8f0ff !important;
  margin: 0 !important;
}

.guanli-app .admin-card-head p {
  font-size: 12px !important;
  color: #7a94b4 !important;
  margin: 3px 0 0 !important;
}

/* Admin tabs */
.guanli-app .admin-tabs {
  background: rgba(7, 11, 24, 0.45) !important;
  border: 1px solid rgba(148, 163, 184, 0.14) !important;
  border-radius: 12px !important;
  padding: 4px !important;
  gap: 3px !important;
  backdrop-filter: none !important;
  box-shadow: none !important;
}

.guanli-app .admin-tab {
  background: transparent !important;
  border: 1px solid transparent !important;
  border-radius: 9px !important;
  padding: 8px 14px !important;
  box-shadow: none !important;
  color: rgba(148, 163, 184, 0.80) !important;
  transform: none !important;
  transition: background 0.15s, color 0.15s !important;
}

.guanli-app .admin-tab:hover {
  background: rgba(52, 120, 255, 0.10) !important;
  color: #c3d8ff !important;
  transform: none !important;
}

.guanli-app .admin-tab.active {
  background: rgba(52, 120, 255, 0.22) !important;
  border-color: rgba(99, 155, 255, 0.28) !important;
  color: #e0eeff !important;
  box-shadow: none !important;
}

.guanli-app .admin-tab-icon {
  width: 28px !important;
  height: 28px !important;
  border-radius: 7px !important;
  background: rgba(255, 255, 255, 0.06) !important;
  font-size: 14px !important;
}

.guanli-app .admin-tab.active .admin-tab-icon {
  background: rgba(52, 120, 255, 0.28) !important;
  color: #a5c3ff !important;
}

.guanli-app .admin-tab-text strong {
  font-size: 13px !important;
  color: inherit !important;
}

.guanli-app .admin-tab-text small {
  font-size: 11px !important;
  color: rgba(148, 163, 184, 0.65) !important;
}

/* Metrics grid (profit analytics KPI cards) */
.guanli-app .metrics-grid .metric,
.guanli-app .metric {
  background: linear-gradient(155deg, rgba(14, 21, 48, 0.94), rgba(18, 27, 58, 0.82)) !important;
  border: 1px solid rgba(148, 163, 184, 0.14) !important;
  box-shadow: 0 4px 16px rgba(0,0,0,0.16) !important;
  color: #f0f6ff !important;
}

.guanli-app .metric::before {
  display: none !important;
}

.guanli-app .metric span {
  color: #7a94b4 !important;
  font-size: 11px !important;
}

.guanli-app .metric strong {
  color: #f0f6ff !important;
  font-size: 22px !important;
}

.guanli-app .metric.accent {
  background: linear-gradient(135deg, rgba(52, 120, 255, 0.22), rgba(109, 93, 252, 0.16)) !important;
  border-color: rgba(99, 155, 255, 0.24) !important;
}

.guanli-app .metric.accent span {
  color: rgba(165, 195, 255, 0.78) !important;
}

.guanli-app .metric.accent strong {
  color: #c8daff !important;
}

/* Panel head */
.guanli-app .panel-head {
  background: rgba(255, 255, 255, 0.025) !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12) !important;
  padding: 12px 16px !important;
}

.guanli-app .panel-head h2 {
  font-size: 14px !important;
  font-weight: 700 !important;
  color: #e8f0ff !important;
  margin: 0 !important;
}

.guanli-app .panel-head p {
  font-size: 12px !important;
  color: #7a94b4 !important;
  margin: 3px 0 0 !important;
}

/* Forms inside guanli */
.guanli-app label {
  color: #a8c0e0 !important;
  font-size: 12px !important;
  font-weight: 600 !important;
}

.guanli-app input,
.guanli-app select,
.guanli-app textarea {
  background: rgba(7, 11, 24, 0.50) !important;
  border: 1px solid rgba(148, 163, 184, 0.20) !important;
  color: #e8f0ff !important;
  border-radius: 9px !important;
}

.guanli-app input:focus,
.guanli-app select:focus,
.guanli-app textarea:focus {
  border-color: rgba(52, 120, 255, 0.55) !important;
  box-shadow: 0 0 0 3px rgba(52, 120, 255, 0.14) !important;
  outline: none !important;
}

.guanli-app input::placeholder,
.guanli-app textarea::placeholder {
  color: rgba(148, 163, 184, 0.40) !important;
}

/* Buttons */
.guanli-app .btn.primary {
  background: linear-gradient(135deg, #3478ff, #5b4ff5) !important;
  color: #fff !important;
  border-color: rgba(100, 160, 255, 0.30) !important;
  box-shadow: 0 4px 14px rgba(52, 120, 255, 0.28) !important;
  font-size: 13px !important;
}

.guanli-app .btn.secondary {
  background: rgba(52, 120, 255, 0.16) !important;
  color: #93c5fd !important;
  border-color: rgba(52, 120, 255, 0.28) !important;
  box-shadow: none !important;
  font-size: 13px !important;
}

.guanli-app .btn.secondary:hover {
  background: rgba(52, 120, 255, 0.26) !important;
}

.guanli-app .btn.ghost {
  background: rgba(255, 255, 255, 0.05) !important;
  color: #94a3b8 !important;
  border-color: rgba(148, 163, 184, 0.18) !important;
  font-size: 13px !important;
}

/* Table improvements */
.guanli-app .data-table th,
.guanli-app .data-table thead th {
  background: rgba(255, 255, 255, 0.035) !important;
  color: #7a94b4 !important;
  font-size: 11px !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12) !important;
  padding: 9px 12px !important;
  box-shadow: none !important;
}

.guanli-app .data-table td {
  padding: 10px 12px !important;
  border-top: 1px solid rgba(148, 163, 184, 0.07) !important;
  border-bottom: none !important;
  color: #d8e8f8 !important;
  font-size: 13px !important;
}

.guanli-app .data-table tbody tr:hover {
  background: rgba(52, 120, 255, 0.06) !important;
}

/* Settings grid panels */
.guanli-app .settings-grid .panel {
  border-radius: 16px !important;
  padding: 0 !important;
}

.guanli-app .settings-grid {
  gap: 12px !important;
}

/* Workspace */
.guanli-app .workspace {
  padding: 14px 20px 80px !important;
}

/* Dashboard KPI and page structure */

/* Page header (replaces admin-hero on dashboard) */
.guanli-app .dash-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2px 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.10);
  margin-bottom: 16px;
}

.guanli-app .dash-title {
  font-size: 18px !important;
  font-weight: 800 !important;
  color: #f0f6ff !important;
  letter-spacing: -0.02em;
  margin: 2px 0 0 !important;
  background: none !important;
  -webkit-text-fill-color: #f0f6ff !important;
}

.guanli-app .dash-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 4-KPI grid: first card is hero-sized */
.guanli-app .dash-kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.guanli-app .dash-kpi {
  background: linear-gradient(155deg, rgba(14, 21, 48, 0.94), rgba(20, 30, 65, 0.82));
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 14px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.guanli-app .dash-kpi--hero {
  background: linear-gradient(135deg, rgba(52, 120, 255, 0.22), rgba(109, 93, 252, 0.18));
  border-color: rgba(99, 155, 255, 0.28);
  box-shadow: 0 4px 20px rgba(52, 120, 255, 0.12);
}

.guanli-app .dash-kpi-label {
  font-size: 11px !important;
  font-weight: 600 !important;
  color: #7a94b4 !important;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 !important;
}

.guanli-app .dash-kpi--hero .dash-kpi-label {
  color: rgba(165, 195, 255, 0.80) !important;
}

.guanli-app .dash-kpi-value {
  font-size: 26px !important;
  font-weight: 800 !important;
  color: #f0f6ff !important;
  letter-spacing: -0.03em;
  line-height: 1;
  margin: 4px 0 !important;
}

.guanli-app .dash-kpi--hero .dash-kpi-value {
  color: #ffffff !important;
}

.guanli-app .dash-kpi-sub {
  font-size: 11px;
  color: #6a84a4;
}

.guanli-app .dash-kpi-sub em {
  font-style: normal;
  color: #8fa8c8;
  font-weight: 600;
}

.guanli-app .dash-kpi--hero .dash-kpi-sub {
  color: rgba(165, 195, 255, 0.60);
}

.guanli-app .dash-kpi--hero .dash-kpi-sub em {
  color: rgba(165, 195, 255, 0.90);
}

/* Uniform admin-hero across all views */
.guanli-app .admin-hero {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  min-height: 52px !important;
  padding: 10px 16px !important;
  margin-bottom: 12px !important;
  border-radius: 12px !important;
  background: rgba(12, 18, 44, 0.90) !important;
  border: 1px solid rgba(148, 163, 184, 0.12) !important;
  box-shadow: none !important;
  gap: 14px !important;
  overflow: visible !important;
}

.guanli-app .admin-hero::before {
  display: none !important;
}

.guanli-app .admin-hero-copy {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.guanli-app .admin-hero-copy .eyebrow {
  font-size: 10px !important;
  color: #60a5fa !important;
  letter-spacing: 0.10em;
  white-space: nowrap;
  flex-shrink: 0;
}

.guanli-app .admin-hero-copy h2 {
  font-size: 15px !important;
  font-weight: 700 !important;
  color: #e8f0ff !important;
  margin: 0 !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* always hide hero subtitle p */
.guanli-app .admin-hero-copy > p:not(.eyebrow) {
  display: none !important;
}


