:root {
  color-scheme: dark;
  font-family: "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  --bg: #0a0a0a;
  --surface: #141414;
  --surface-elevated: #1a1a1a;
  --surface-hover: #222222;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --border: #2a2a2a;
  --border-strong: #3a3a3a;
  --primary: #f17726;
  --primary-dark: #ff8f4a;
  --primary-soft: rgba(241, 119, 38, 0.14);
  --primary-wash: rgba(241, 119, 38, 0.1);
  --primary-wash-strong: rgba(241, 119, 38, 0.18);
  --primary-ring: rgba(241, 119, 38, 0.32);
  --on-primary: #1c0e06;
  --link: #8eb6ff;
  --link-hover: #c5d8ff;
  --link-soft: rgba(142, 182, 255, 0.14);
  --meter: #3ec7c2;
  --success: #4ade80;
  --danger: #f87171;
  --warn-bg: rgba(251, 191, 36, 0.1);
  --warn-border: rgba(251, 191, 36, 0.35);
  --warn-text: #fcd34d;
  --info-bg: rgba(142, 182, 255, 0.12);
  --info-border: rgba(142, 182, 255, 0.35);
  --info-text: #c5d8ff;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --radius: 12px;
  --radius-sm: 8px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background:
    radial-gradient(980px 420px at 8% -8%, rgba(241, 119, 38, 0.11), transparent 58%),
    var(--bg);
  color: var(--text);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); }
h1 { margin: 0; font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
h2 { margin: 0 0 8px; font-size: 18px; font-weight: 700; }
p { margin: 0; }

.app-topbar {
  background: rgba(20, 20, 20, 0.92);
  border-bottom: 1px solid var(--border);
  box-shadow: inset 0 -2px 0 var(--primary);
  backdrop-filter: blur(14px);
}
.app-topbar-inner, .wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}
.app-topbar-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 56px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}
.brand:hover { color: var(--text); text-decoration: none; }
.brand-title { letter-spacing: 0.08em; }
.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 13px;
}
.nav { display: flex; gap: 8px; flex: 1; }
.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 16px;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
}
.nav a:hover { background: var(--primary-soft); color: var(--primary-dark); text-decoration: none; }
.nav a.active { background: var(--primary-soft); color: var(--primary-dark); font-weight: 600; }
.wrap { padding-top: 24px; padding-bottom: 48px; }
.wrap[aria-busy="true"] { cursor: progress; }
[data-swap="detail"].is-loading { position: relative; }
[data-swap="detail"].is-loading::before {
  content: "";
  position: absolute;
  z-index: 4;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: var(--primary);
  pointer-events: none;
}
.page-header { display: flex; justify-content: space-between; gap: 16px; align-items: flex-end; margin-bottom: 16px; }
.page-desc, .lead, .hint { color: var(--muted); font-size: 14px; }
.page-desc { margin-top: 6px; }
.hint { margin-bottom: 12px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 18px;
  margin-bottom: 16px;
}
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.stat-cell {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.stat-cell span { display: block; color: var(--muted); font-size: 13px; margin-bottom: 6px; }
.stat-cell b { font-size: 22px; font-variant-numeric: tabular-nums; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { color: var(--muted); font-size: 12px; font-weight: 600; }
tr.link { cursor: pointer; }
tr.link:hover td { background: var(--surface-hover); }
tr.on td { background: var(--link-soft); }
.sub { color: var(--muted); font-size: 13px; }
.num { font-variant-numeric: tabular-nums; }
.bar { height: 6px; background: #222; border-radius: 99px; margin-top: 6px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--meter); }

.tag {
  display: inline-flex;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 12px;
  background: var(--surface-hover);
  color: var(--text);
}
.tag.trial { background: rgba(167, 139, 250, 0.18); color: #c4b5fd; }
.tag.month { background: var(--info-bg); color: var(--info-text); }
.tag.year { background: rgba(251, 191, 36, 0.15); color: #fcd34d; }
.tag.wait { background: var(--warn-bg); color: var(--warn-text); }
.tag.paid { background: rgba(74, 222, 128, 0.15); color: #86efac; }
.ok { color: var(--success); }
.bad { color: var(--danger); }

.versions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 8px;
}
.versions button {
  background: var(--surface-elevated);
  color: var(--muted);
  border: 1px solid var(--border);
}
.versions button.on {
  background: var(--link-soft);
  color: var(--link);
  border-color: transparent;
}

input, select, textarea {
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-elevated);
  color: var(--text);
  font: inherit;
  width: 100%;
}
input:focus, select:focus { outline: none; border-color: var(--link); box-shadow: 0 0 0 3px rgba(142, 182, 255, 0.28); }
.toolbar { margin-bottom: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field span, .field-label { font-size: 13px; color: var(--muted); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field.full { grid-column: 1 / -1; }
.actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
button, .btn {
  background: var(--primary);
  color: var(--on-primary);
  border: none;
  border-radius: var(--radius-sm);
  min-height: 44px;
  padding: 10px 16px;
  font-size: 15px;
  font-weight: 650;
  cursor: pointer;
}
button:hover, .btn:hover { background: var(--primary-dark); }
button:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-secondary, .btn-quiet {
  background: var(--surface-elevated);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover, .btn-quiet:hover { background: var(--surface-hover); }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.tabs button { background: var(--surface-elevated); color: var(--muted); border: 1px solid var(--border); }
.tabs button.on { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 12px; }
.chip {
  background: var(--surface-elevated);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 999px;
  min-height: 36px;
  padding: 6px 12px;
}
.chip.on { border-color: var(--link); color: var(--link); background: var(--link-soft); }
input[type="radio"], input[type="checkbox"] {
  width: auto;
  min-height: 0;
  padding: 0;
  margin-top: 3px;
  accent-color: var(--link);
}
.choice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px;
  margin-bottom: 8px;
  background: var(--surface-elevated);
}
.choice small { display: block; color: var(--muted); }
.choice.on { border-color: var(--link); background: var(--link-soft); }
.error { color: var(--danger); font-size: 14px; margin: 0 0 8px; }
.banner {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  color: var(--warn-text);
  font-size: 14px;
}
.plan-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.plan-item {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  background: var(--surface-elevated);
}
.pay-info { margin: 0 0 12px; }
.pay-info dl {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 4px 8px;
  margin: 0;
  font-size: 13px;
}
.pay-info dt { color: var(--muted); }
.pay-info dd { margin: 0; }
.pay-url { word-break: break-all; }
.pay-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 12px;
  margin-top: 12px;
}
.qr-plate {
  width: max-content;
  background: #fff;
  border-radius: 10px;
  padding: 8px 8px 10px;
}
.qr-plate-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0 0 6px;
  color: #111827;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.qr-plate-brand img { width: 18px; height: 18px; object-fit: contain; }
.qr-svg { position: relative; width: max-content; }
.qr-svg svg { width: 132px; height: 132px; background: #fff; display: block; }
.qr-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 30px;
  height: 30px;
  transform: translate(-50%, -50%);
  background: #fff;
  border-radius: 7px;
  padding: 3px;
  box-sizing: border-box;
  object-fit: contain;
}
.record-list { display: flex; flex-direction: column; gap: 12px; }
.record-card {
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.record-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  align-items: baseline;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.record-meta b {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 13px;
}
.record-summary { margin: 0 0 12px; line-height: 1.55; }
.record-pay {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  margin: 0 0 12px;
  padding: 12px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.02);
}
.record-pay .qr-svg svg { width: 132px; height: 132px; }
.record-pay .qr-mark { width: 30px; height: 30px; }
.record-pay-copy p { margin: 0 0 8px; line-height: 1.45; }
.record-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px 16px; margin: 0 0 10px; }
.record-facts dt { color: var(--muted); font-size: 12px; }
.record-facts dd { margin: 2px 0 0; font-size: 13px; overflow-wrap: anywhere; }
.record-pay .price { margin: 0 0 6px; font-size: 22px; }
@media (max-width: 640px) {
  .record-pay { grid-template-columns: 1fr; }
}
.record-diff { margin-top: 10px; }
.record-diff b { display: block; margin-bottom: 6px; color: var(--muted); font-size: 12px; font-weight: 600; }
.record-diff dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 8px 14px; margin: 0; }
.record-diff dt { color: var(--muted); font-size: 12px; }
.record-diff dd { margin: 2px 0 0; font-size: 13px; line-height: 1.4; word-break: break-word; }
.pay-state { margin: 0 0 6px; font-weight: 600; }
.pay-state.ok { color: var(--success); }
.pay-state.wait { color: var(--muted); }
.pay-state.bad { color: var(--danger); }
.qr {
  width: 132px; height: 132px;
  display: grid;
  grid-template-columns: repeat(15, 1fr);
  gap: 1px;
  background: #fff;
  padding: 6px;
}
.qr i { background: #fff; }
.qr i.on { background: #111; }
.price { font-size: 28px; font-weight: 700; }
.record { padding: 10px 0; border-bottom: 1px solid var(--border); }
.record:last-child { border-bottom: 0; }
.meta { color: var(--muted); font-size: 13px; }
.back-link { display: inline-block; color: var(--muted); font-size: 13px; margin-bottom: 10px; }
.back-link:hover { color: var(--link); }

body.login-body {
  min-height: 100vh;
  min-height: 100dvh;
  padding: 0;
  background: #070708;
}
.login-stage {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(420px, 0.85fr);
}
.login-aside {
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 72px 88px 84px;
  overflow: hidden;
  background:
    radial-gradient(680px 460px at 24% 72%, rgba(255, 98, 20, 0.22), transparent 64%),
    radial-gradient(820px 520px at 88% 8%, rgba(241, 119, 38, 0.08), transparent 58%),
    #070708;
}
.login-aside::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse at 28% 74%, #000 12%, transparent 70%);
  pointer-events: none;
}
.login-brand { position: relative; z-index: 1; max-width: 560px; }
.login-logo {
  width: 76px;
  height: 76px;
  object-fit: contain;
  display: block;
  margin-bottom: 28px;
  filter: drop-shadow(0 16px 32px rgba(255, 98, 20, 0.28));
}
.login-aside .kicker {
  color: #ff8a4c;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.22em;
  margin-bottom: 16px;
}
.login-mark {
  margin: 0;
  font-size: clamp(56px, 6.2vw, 88px);
  font-weight: 650;
  letter-spacing: -0.045em;
  line-height: 0.92;
  color: #f6f6f4;
}
.login-aside-copy {
  margin: 22px 0 0;
  max-width: 22em;
  color: #a1a1aa;
  font-size: 17px;
  line-height: 1.65;
}
.login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 64px 56px;
  background: #0c0c0e;
  border-left: 1px solid rgba(255, 255, 255, 0.06);
}
.login-card {
  width: min(400px, 100%);
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}
.login-card h1 {
  font-size: 34px;
  font-weight: 650;
  letter-spacing: -0.03em;
  margin: 0 0 8px;
}
.login-card .page-desc { margin: 0 0 28px; color: #8d8d96; font-size: 14px; }
.login-card .tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin: 0 0 28px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
}
.login-card .tabs button {
  min-height: 42px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #9a9aa3;
  font-weight: 500;
}
.login-card .tabs button.on {
  background: #1a1a1e;
  color: #fff;
  border-color: transparent;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.login-card .tabs button:hover { background: transparent; color: #fff; }
.login-card .tabs button.on:hover { background: #1a1a1e; color: #fff; }
.login-card .field { gap: 8px; margin-bottom: 18px; }
.login-card .field > span:not(.sms-row) { font-size: 13px; color: #c4c4cc; }
.login-card .sms-row { gap: 10px; }
.login-card .sms-row button { min-height: 50px; border-radius: 10px; padding-inline: 16px; }
.login-card input {
  min-height: 50px;
  padding: 12px 14px;
  border-radius: 10px;
  border-color: #2a2a2e;
  background: #141416;
}
.login-card form > button[type="submit"] {
  width: 100%;
  min-height: 50px;
  margin-top: 8px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.06em;
}
.login-error {
  margin: 0 0 18px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(248, 113, 113, 0.12);
  color: var(--danger);
  font-size: 14px;
}
@media (max-width: 900px) {
  .login-stage { grid-template-columns: 1fr; }
  .login-aside { align-items: flex-start; padding: 36px 24px 4px; }
  .login-logo { width: 48px; height: 48px; margin-bottom: 16px; }
  .login-mark { font-size: 44px; }
  .login-aside-copy { display: none; }
  .login-panel { border-left: 0; align-items: flex-start; padding: 28px 24px 48px; }
}
.sms-row { display: flex; gap: 8px; align-items: center; }
.sms-row input { flex: 1; min-width: 0; }
.sms-row button { flex: none; min-height: 44px; white-space: nowrap; }
#aliyun-captcha-trigger {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
.kicker { color: var(--primary-dark); font-size: 12px; letter-spacing: 0.08em; margin-bottom: 8px; }
.toast {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%);
  background: var(--text); color: #0a0a0a; padding: 10px 16px; border-radius: 999px; z-index: 5;
}
.toast[hidden] { display: none; }

.page-hero {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: 16px; margin-bottom: 20px; padding: 20px 22px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: radial-gradient(ellipse 80% 120% at 0% 0%, rgba(241, 119, 38, 0.2), transparent 55%), linear-gradient(135deg, var(--surface-elevated), var(--surface) 70%);
}
.page-hero-brand { display: flex; align-items: center; gap: 16px; }
.page-hero-logo { width: 72px; height: 72px; object-fit: contain; }
.page-hero h1 { font-size: 26px; }
.alert-bar {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  padding: 14px 16px; margin-bottom: 16px; border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(251, 191, 36, 0.08), var(--surface));
  border: 1px solid var(--warn-border);
}
.alert-bar-title { font-weight: 700; color: var(--warn-text); font-size: 14px; }
.alert-bar-meta { font-size: 12px; color: var(--muted); margin-top: 4px; }
.filter-bar {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
  padding: 14px 16px; margin-bottom: 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
.filter-bar .grow { flex: 1 1 220px; min-width: 180px; }
.field-inline { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.field-inline select { width: auto; min-width: 120px; }
.panel-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: auto; }
.panel-card table { margin: 0; }
.panel-card th { background: #161616; }
.link-btn { background: none; border: none; color: var(--link); padding: 0; min-height: auto; font-size: 14px; cursor: pointer; }
.link-btn:hover { color: var(--link-hover); text-decoration: underline; background: none; }
.ops-cell { white-space: nowrap; }
.ops-cell .link-btn { margin-right: 12px; }
.pill { display: inline-flex; border-radius: 999px; padding: 2px 8px; font-size: 12px; margin: 0 4px 4px 0; }
.pill-paid { background: rgba(74, 222, 128, 0.15); color: #86efac; }
.pill-key { background: var(--info-bg); color: var(--info-text); }
.pill-channel { background: rgba(74, 222, 128, 0.15); color: #86efac; }
.pill-unpaid { background: var(--surface-hover); color: var(--muted); }
.pill-low { background: rgba(251, 146, 60, 0.14); color: #fdba74; }
.pill-empty { background: rgba(248, 113, 113, 0.12); color: #fca5a5; }
.pill-expired { background: rgba(148, 163, 184, 0.12); color: #cbd5e1; }
.up { color: var(--success); }
.down { color: var(--danger); }
#usersBody tr.selected td { background: rgba(255, 255, 255, 0.03); box-shadow: none; }
#usersBody tr.selected td:first-child { box-shadow: inset 3px 0 0 var(--link); }
.empty-pick {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
  padding: 16px 18px;
  color: var(--muted);
  font-size: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.empty-pick img { width: 112px; height: auto; flex: none; }
.empty-pick b { display: block; margin-bottom: 4px; color: var(--text); font-size: 15px; }
.empty-pick p { margin: 0; }
.detail-panel { display: none; margin-top: 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.detail-panel.open { display: block; }
.detail-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 14px 18px; background: var(--surface-elevated); border-bottom: 1px solid var(--border); }
.detail-head h2 { margin: 0; font-size: 17px; }
.detail-body { padding: 16px 18px 20px; }
.section-block { margin-top: 18px; }
.section-block h3 { margin: 0 0 10px; font-size: 14px; font-weight: 600; }
.inner-table { overflow: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.inner-table table { margin: 0; }
#usersBody tr { cursor: pointer; }
#detailPanel tbody tr[data-href] { cursor: pointer; }
#detailPanel tbody tr[data-href]:hover td { background: var(--surface-hover); }
#detailPanel tbody tr.on td { background: var(--link-soft); box-shadow: none; }
#detailPanel tbody tr.on td:first-child { box-shadow: inset 3px 0 0 var(--link); }
#detailPanel tbody tr.on:hover td { background: rgba(142, 182, 255, 0.2); }
.hint { color: var(--muted); font-size: 13px; margin: 0 0 10px; }
.meta-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; padding: 14px; background: var(--surface-elevated); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.meta-item label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.meta-item .value { font-size: 14px; font-weight: 600; word-break: break-all; }
.pagination { display: flex; justify-content: space-between; gap: 12px; margin-top: 14px; color: var(--muted); font-size: 13px; }
.drawer-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 20; }
.drawer {
  position: fixed; top: 0; right: 0; width: min(420px, 100vw); height: 100%;
  background: var(--surface); border-left: 1px solid var(--border); z-index: 21;
  display: flex; flex-direction: column;
}
.drawer-header, .drawer-footer { padding: 16px 20px; background: var(--surface-elevated); }
.drawer-header { border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.drawer-footer { border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; }
.drawer-body { padding: 20px; overflow: auto; }
.drawer-close { width: 40px; height: 40px; min-height: 40px; padding: 0; background: transparent; color: var(--muted); border: 1px solid var(--border); }

.trial-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
}
.trial-kicker { color: var(--muted); font-size: 13px; flex: none; }
.trial-seg {
  display: flex;
  flex: none;
  padding: 3px;
  border-radius: 10px;
  background: #101010;
  border: 1px solid var(--border);
}
.trial-seg label {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  min-width: 64px;
  padding: 0 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
}
.trial-seg input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  min-height: 0;
  padding: 0;
}
.trial-seg label:has(input:checked) { background: var(--primary); color: var(--on-primary); }
.trial-seg label.off { opacity: 0.4; cursor: not-allowed; }
.trial-bar input[name="reason"] { flex: 1; width: auto; min-height: 40px; }
.trial-bar .btn { flex: none; min-height: 40px; padding: 0 16px; }
.trial-note { margin: 0 0 14px; color: var(--muted); font-size: 12px; }
.trial-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 8px;
}
.trial-facts div { padding: 8px 10px; background: var(--surface-elevated); border-radius: 8px; }
.trial-facts b { display: block; font-size: 14px; font-weight: 700; }
.trial-facts span { color: var(--muted); font-size: 12px; }
.trial-facts .wide { grid-column: 1 / -1; }
.step-label { margin: 0 0 6px; color: var(--muted); font-size: 12px; }
.company-form { display: flex; gap: 8px; align-items: center; }
.company-form input { flex: 1; min-height: 40px; }
.company-form .btn, .company-form .btn-secondary { flex: none; }
.lock-form { margin: 0 0 12px; }
.open-plan-block { margin-top: 0; }
.open-plan-block h3 { margin-bottom: 10px; }
.plan-split {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.75fr);
  gap: 12px;
  align-items: start;
}
.plan-side { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.issued-caption { margin: 0; color: var(--muted); font-size: 12px; }
.pay-slip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--warn-border);
  border-radius: 10px;
  background: var(--warn-bg);
}
.pay-slip b { display: block; color: var(--warn-text); font-size: 13px; }
.pay-slip p { margin: 2px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.pay-slip .btn-secondary { flex: none; min-height: 32px; padding: 0 12px; }
.pay-mismatch { margin: 0; color: var(--warn-text); font-size: 12px; font-weight: 650; line-height: 1.45; }
.pay-card.off-plan { border-color: var(--warn-border); background: rgba(251, 191, 36, 0.04); }
.pay-card[hidden],
.issued[hidden],
.pay-slip[hidden],
.issued-caption[hidden],
.pay-mismatch[hidden] { display: none !important; }
.plan-sheet { font-variant-numeric: tabular-nums; }
.plan-sheet-head, .plan-row {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) 0.7fr 0.85fr 0.75fr 0.55fr;
  gap: 8px;
  align-items: center;
}
.plan-sheet-head {
  padding: 0 10px 6px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.plan-sheet-head span:last-child, .plan-row em { text-align: right; }
.plan-group { margin-top: 4px; }
.plan-group-name {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 2px 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}
.plan-group-name i {
  width: 6px;
  height: 6px;
  border-radius: 99px;
  background: var(--meter);
}
.plan-group.mcp .plan-group-name i { background: var(--warn-text); }
.plan-group-name span { font-weight: 500; }
.plan-row {
  position: relative;
  width: 100%;
  min-height: 36px;
  margin: 0;
  padding: 0 10px;
  color: var(--text);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.plan-row b { font-size: 13px; font-weight: 650; line-height: 1.35; }
.plan-row em { color: var(--text); font-style: normal; font-weight: 650; }
.plan-row input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  min-height: 0;
  padding: 0;
}
.plan-row:has(input:checked) {
  background: var(--link-soft);
  border-color: var(--link);
}
.plan-row:hover { background: var(--surface-hover); }
.plan-row:has(input:checked):hover { background: rgba(142, 182, 255, 0.2); }
.plan-row.off,
.plan-row.off:hover,
.plan-row.off:has(input:checked),
.plan-row.off:has(input:checked):hover {
  background: transparent;
  border-color: transparent;
  opacity: 0.4;
  cursor: not-allowed;
}
.deal {
  margin: 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #101010;
  font-variant-numeric: tabular-nums;
}
.deal-top { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.deal-top strong { font-size: 16px; font-weight: 650; }
.deal-mark {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--link-soft);
  color: var(--link);
  font-size: 12px;
  font-weight: 700;
}
.deal-mark.mcp { background: var(--warn-bg); color: var(--warn-text); }
.deal-mark:empty { display: none; }
.deal-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
  margin: 0 0 12px;
}
.deal-facts div { min-width: 0; }
.deal-facts dt { margin: 0; color: var(--muted); font-size: 12px; font-weight: 500; }
.deal-facts dd { margin: 1px 0 0; font-size: 15px; font-weight: 650; }
.deal-seg {
  display: flex;
  width: 100%;
  padding: 2px;
  margin-bottom: 8px;
  border-radius: 8px;
  background: #0c0c0c;
  border: 1px solid var(--border);
}
.deal-seg button {
  flex: 1;
  min-height: 32px;
  padding: 0 6px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
}
.deal-seg button.on { background: var(--primary); color: var(--on-primary); }
.deal-seg button:disabled { opacity: 0.35; cursor: not-allowed; }
.deal-seg button:hover { background: transparent; }
.deal-seg button.on:hover { background: var(--primary-dark); }
.deal-row { display: flex; gap: 8px; align-items: center; }
.deal-row[hidden], #dealAct[hidden], #dealConfirm[hidden], .deal-dialog-mask[hidden], #confirmAsk[hidden], #resultPane[hidden], #quotaAsk[hidden], #quotaResult[hidden], #cancelAsk[hidden], #cancelResult[hidden], #boostField[hidden], #boostUnit[hidden] { display: none; }
.boost-step { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.boost-step .deal-field { flex: 1; }
.boost-step > button {
  flex: none;
  width: 36px;
  min-height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-elevated);
  color: var(--text);
  font-size: 18px;
}
.boost-step > button:disabled { opacity: 0.35; cursor: not-allowed; }
.deal-field {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-elevated);
}
.deal-field span { flex: none; color: var(--muted); font-size: 12px; }
.deal-field input {
  flex: 1;
  min-width: 0;
  width: auto;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.deal-field input:focus { outline: none; box-shadow: none; }
.deal-field em { flex: none; font-style: normal; color: var(--muted); font-size: 13px; }
.deal-field select {
  flex: 1;
  width: auto;
  min-width: 0;
  min-height: 0;
  height: 32px;
  margin: 0;
  padding: 0 16px 0 0;
  border: 0;
  border-radius: 0;
  background-color: transparent;
  box-shadow: none;
  color: var(--text);
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 8px) 13px, calc(100% - 4px) 13px;
  background-size: 4px 4px, 4px 4px;
  background-repeat: no-repeat;
}
.deal-field select:focus { outline: none; box-shadow: none; }
#payDiscount { text-align: right; font-variant-numeric: tabular-nums; font-weight: 650; }
.pay-line { display: flex; align-items: center; gap: 10px; }
.pay-line .deal-field { flex: 1; }
.approver-field { width: 100%; margin-top: 8px; }
.deal-quote { flex: none; min-width: 96px; display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.deal-quote span { display: block; color: var(--muted); font-size: 12px; }
.deal-quote strong { font-size: 22px; font-weight: 700; letter-spacing: -0.03em; }
.deal-quote.off strong { color: var(--muted); font-weight: 600; }
.wipe-btn {
  margin-top: 4px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 8px;
  background: var(--surface-elevated);
  color: var(--text);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 650;
}
.wipe-btn.on { background: var(--link-soft); color: var(--link); border-color: transparent; }
.wipe-btn:disabled { opacity: 0.35; }
.deal-actions { margin-top: 8px; }
.deal-actions .btn { width: 100%; min-height: 36px; font-size: 14px; }
.deal-state { margin-top: 10px; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--border); }
.deal-state b { display: block; font-size: 14px; }
.deal-state p { margin: 2px 0 0; }
.deal-state .state-actions { display: flex; justify-content: flex-end; margin-top: 8px; }
.deal-state .btn-secondary { min-height: 36px; padding: 0 14px; font-size: 14px; }
.deal-state.wait { border-color: var(--warn-border); background: var(--warn-bg); }
.deal-state.wait b { color: var(--warn-text); }
.deal-state.ok { border-color: rgba(74, 222, 128, 0.35); background: rgba(74, 222, 128, 0.08); }
.deal-state.ok b { color: var(--success); }
.deal-state.no { border-color: rgba(248, 113, 113, 0.35); background: rgba(248, 113, 113, 0.08); }
.deal-state.no b { color: var(--danger); }
.approver-field[hidden],
.deal-state[hidden],
.pay-line[hidden],
#payActions[hidden],
#payHint[hidden] { display: none !important; }
.nav-count {
  margin-left: 6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 99px;
  background: var(--warn-text);
  color: #111;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.reject-box { display: flex; gap: 8px; align-items: center; }
.reject-box input { min-height: 36px; width: 180px; }
.reject-box .btn, .reject-box .link-btn { flex: none; min-height: 36px; }
.deal-field:focus-within { border-color: var(--link); box-shadow: 0 0 0 3px rgba(142, 182, 255, 0.28); }
.deal-row .btn { flex: none; min-height: 36px; padding: 0 14px; font-size: 14px; }
.deal .hint { margin: 8px 0 0; font-size: 12px; }
#dealConfirm,
.deal-dialog-mask {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.62);
}
.deal-dialog {
  width: min(420px, 100%);
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
}
.deal-dialog.wide { width: min(560px, 100%); }
.deal-dialog h3 { margin: 0 0 8px; font-size: 18px; }
.result-pay {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
  margin-top: 12px;
}
.result-pay .price { font-size: 22px; }
.quota-diff { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 8px; }
.quota-diff div {
  display: grid;
  grid-template-columns: 88px 1fr auto 1fr;
  gap: 8px;
  align-items: baseline;
  font-size: 14px;
}
.quota-diff span { color: var(--muted); }
.quota-diff b { font-variant-numeric: tabular-nums; }
.quota-diff i { color: var(--muted); font-style: normal; }
.quota-diff .changed b:last-child { color: var(--primary); }
.deal-dialog p { margin: 0 0 8px; font-size: 14px; line-height: 1.5; }
.result-mark {
  width: 44px;
  height: 44px;
  margin-bottom: 12px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 700;
}
.result-mark.ok { background: rgba(74, 222, 128, 0.15); color: var(--success); }
.result-mark.bad { background: rgba(248, 113, 113, 0.12); color: var(--danger); }
.result-mark.wait { background: var(--primary-soft); color: var(--primary); }
.confirm-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.confirm-actions .btn, .confirm-actions .btn-secondary { min-height: 36px; padding: 0 14px; font-size: 14px; }
.deal .pay-card { margin-top: 12px; }
.deal-flash { margin: 12px 0 0; font-size: 14px; }
.deal-flash.good { color: var(--success); }
.deal-flash.bad { color: var(--danger); }
.pay-card .btn-secondary { margin-top: 8px; }
@media (max-width: 800px) {
  .plan-split { grid-template-columns: 1fr; }
  .deal-row, .pay-line { display: block; }
  .deal-row .btn { width: 100%; margin-top: 8px; }
  .deal-quote { align-items: flex-start; text-align: left; margin-top: 8px; }
}
.style-switch { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.style-switch button {
  min-height: 32px; padding: 4px 12px; border-radius: 999px;
  background: transparent; color: var(--muted); border: 1px solid var(--border); font-size: 13px;
}
.style-switch button.on { background: var(--link-soft); color: var(--link); border-color: transparent; }
.style-switch button:hover { background: var(--surface-hover); color: var(--text); }
.trial-pair, .trial-slot {
  display: flex; align-items: center; gap: 8px; margin: 0 0 6px;
}
.trial-pair input[name="reason"], .trial-slot input[name="reason"] { flex: 1; width: auto; min-height: 40px; }
.trial-picks { display: flex; gap: 8px; flex: none; }
.trial-pair button, .trial-slot button {
  flex: none; min-height: 40px; padding: 0 14px;
  background: var(--surface-elevated); color: var(--text); border: 1px solid var(--border);
}
.trial-pair button:hover, .trial-slot button:hover { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.trial-slot {
  padding: 8px 10px; border: 1px dashed var(--border-strong); border-radius: 10px;
}
.trial-slot b { flex: none; min-width: 36px; }
.trial-slot .sub { flex: none; }
.brand-logo { width: 28px; height: 28px; object-fit: contain; }
.session-user { margin-left: auto; display: flex; align-items: center; gap: 10px; min-width: 0; }
.session-user span {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}
.session-user form { margin: 0; }
.session-user button { min-height: 36px; padding: 0 12px; }
.record-list .record { padding: 10px 0; border-bottom: 1px solid var(--border); }
a.sub-card { text-decoration: none; color: inherit; }
a.btn-secondary { display: inline-flex; align-items: center; text-decoration: none; }
.page-head { margin: 0 0 12px; }
.page-head h1 { display: flex; align-items: center; gap: 10px; font-size: 22px; }
.page-logo { width: 26px; height: 26px; object-fit: contain; }
.page-head .page-desc { margin: 2px 0 0; font-size: 13px; }
.users-hero { align-items: center; margin-bottom: 14px; }
.users-hero h1 { display: flex; align-items: center; gap: 10px; }
.users-hero .page-logo { width: 36px; height: 36px; }
.users-hero .page-desc { max-width: 36em; margin-top: 8px; font-size: 14px; }
.users-hero-art { width: min(240px, 34vw); height: auto; flex: none; }
.user-tools {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.user-tools .lock-form,
.user-tools .search { margin: 0; }
.who { display: inline-flex; align-items: center; gap: 10px; color: var(--text); }
.who:hover { color: var(--text); }
.who b { color: var(--link); }
.who:hover b { color: var(--link-hover); }
.who-mark {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex: none;
  background: #243044;
  color: #d6e4ff;
  font-size: 14px;
  font-weight: 700;
}
.usage-cell .bar { display: block; width: 72px; margin-top: 6px; }
.usage-cell .bar i { background: var(--meter); }
.detail-id { display: flex; align-items: center; gap: 12px; min-width: 0; }
.detail-id .who-mark { width: 40px; height: 40px; border-radius: 12px; font-size: 16px; }
.sec-title { display: inline-flex; align-items: center; gap: 8px; }
.sec-ico, .fact-ico {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.user-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 220px));
  gap: 10px;
  margin-top: 16px;
}
.fact {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.fact-ico { width: 22px; height: 22px; stroke: var(--meter); }
.fact span { display: block; color: var(--muted); font-size: 12px; }
.fact b { font-size: 20px; font-variant-numeric: tabular-nums; }
.search {
  width: 100%;
  margin-bottom: 12px;
  background: var(--surface);
}
.m-only { display: none; }
.name-cell b { font-weight: 650; }
.detail-head-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.detail-head .btn-secondary,
.quota-phone-launch {
  min-height: 36px;
  padding: 6px 12px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}
.section-block h3 { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.status-filter { display: inline-flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin: 0; font-weight: 400; color: var(--muted); font-size: 13px; }
.status-checks { display: inline-flex; align-items: center; gap: 12px; }
.status-checks label { display: inline-flex; align-items: center; gap: 4px; color: var(--text); cursor: pointer; }
.status-checks input { accent-color: var(--link); }
.meta-grid {
  gap: 8px 16px;
  padding: 0 0 4px;
  background: transparent;
  border: 0;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.quota-work { display: block; }
.quota-desk { display: none; }
.quota-phone-launch { display: none; }
.sub-cards { display: none; }
.quota-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
}
.quota-panel h4 { margin: 0 0 4px; font-size: 15px; }
.quota-field { margin-top: 12px; }
.quota-field > label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.quota-stepper { display: grid; grid-template-columns: 64px minmax(0, 1fr) 64px; gap: 8px; }
.quota-stepper button,
.quota-stepper input,
.quota-chip,
.sheet-bar button {
  background: var(--surface-elevated);
  color: var(--text);
  border: 1px solid var(--border);
}
.quota-stepper button,
.quota-stepper input { min-height: 48px; border-radius: 12px; text-align: center; }
.quota-stepper input { font-size: 22px; font-weight: 700; padding: 0 8px; }
.quota-stepper button { padding: 0; font-weight: 700; }
.quota-stepper button:hover,
.quota-chip:hover,
.sheet-bar button:hover,
.sub-card:hover { background: var(--surface-hover); }
.quota-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.quota-chip {
  min-height: 32px;
  height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 12px;
}
.quota-chip.on { background: var(--link-soft); border-color: var(--link); color: var(--info-text); }
.quota-radio {
  display: flex; gap: 8px; align-items: flex-start; margin-top: 6px;
  padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface-elevated); font-size: 13px;
}
.quota-radio.on { border-color: var(--link); }
.quota-radio small { display: block; color: var(--muted); font-size: 12px; }
.quota-radio input { width: auto; min-height: 0; margin-top: 2px; }
.quota-actions { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 4px; }
.quota-save { display: inline-flex; gap: 8px; margin-left: auto; }
.quota-actions .btn-secondary { background: var(--surface-elevated); color: var(--text); border: 1px solid var(--border); }
.quota-actions .warn { color: var(--danger); border-color: rgba(248, 113, 113, 0.45); }
.sheet-bar { display: none; }
.sub-card {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--surface-elevated);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 8px;
  min-height: 0;
}
.sub-card.on { border-color: var(--link); background: var(--link-soft); }
.sub-card-top, .sub-card-nums, .call-row { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.sub-card-top { margin-bottom: 6px; }
.sub-card-nums { color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.sub-card .bar { margin: 0 0 6px; }
.call-list { display: flex; flex-direction: column; gap: 6px; }
.call-row {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.call-row:last-child { border-bottom: 0; }
.trial-form .choice, form[data-form="trial"] .choice { min-height: 52px; }

@media (min-width: 901px) {
  .quota-work { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 12px; align-items: start; }
  .quota-desk { display: block; position: sticky; top: 12px; }
  .quota-phone-launch { display: none !important; }
  .sub-cards { display: none; }
}
@media (max-width: 900px) {
  .desk-only { display: none; }
  .sub-cards { display: block; }
  .quota-phone-launch { display: inline-flex; }
  .quota-desk.sheet {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0;
    z-index: 40;
    background: var(--bg);
    overflow: auto;
    padding: 0 14px calc(16px + env(safe-area-inset-bottom));
  }
  .quota-desk.sheet .sheet-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    position: sticky;
    top: 0;
    z-index: 2;
    margin: 0 -14px 12px;
    padding: max(10px, env(safe-area-inset-top)) 14px 10px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
  }
  .sheet-bar button { min-height: 40px; min-width: 64px; border-radius: 10px; }
  .quota-desk.sheet .quota-panel { border: 0; padding: 0; background: transparent; }
  body.sheet-open { overflow: hidden; }
  .meta-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .users-hero-art { width: 108px; }
  .user-tools { grid-template-columns: 1fr; }
  .user-facts { grid-template-columns: 1fr 1fr; }
  .empty-pick { align-items: flex-start; }
  .empty-pick img { width: 84px; }
  table.users-table tbody td.usage-cell { flex-wrap: wrap; justify-content: flex-end; }
  table.users-table tbody td.usage-cell .bar { width: 64px; }
  .wrap { padding-top: 16px; padding-bottom: 28px; }
  .app-topbar-inner, .wrap {
    padding-left: max(14px, env(safe-area-inset-left));
    padding-right: max(14px, env(safe-area-inset-right));
  }
  .panel-card { border: 0; background: transparent; overflow: visible; }
  table.users-table thead { display: none; }
  table.users-table tbody td.hide-sm { display: none; }
  table.users-table tbody tr {
    display: block;
    margin-bottom: 8px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
  }
  table.users-table tbody tr.selected { box-shadow: inset 2px 0 0 var(--link); }
  table.users-table tbody tr.selected td,
  table.users-table tbody tr.selected td:first-child { box-shadow: none; background: transparent; }
  table.users-table tbody td {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 4px 0;
    border: 0;
    text-align: right;
  }
  table.users-table tbody td.name-cell {
    display: block;
    text-align: left;
    padding-bottom: 6px;
  }
  table.users-table tbody td.name-cell::before { display: none; }
  table.users-table tbody td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12px;
  }
  table.users-table tbody td.ops-cell { justify-content: flex-end; padding-top: 6px; }
  table.users-table tbody td.ops-cell::before { display: none; }
  .m-only { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }
  .detail-head { flex-direction: column; align-items: stretch; }
  .detail-head h2 { font-size: 18px; }
  .detail-head-actions { width: auto; }
  .trial-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plan-split { grid-template-columns: 1fr; }
  .trial-bar, .trial-pair, .trial-slot { flex-wrap: wrap; }
  .trial-seg, .trial-picks { flex: 1 1 160px; }
  .trial-seg label, .trial-picks button { flex: 1; justify-content: center; }
  .trial-bar input[name="reason"],
  .trial-pair input[name="reason"],
  .trial-slot input[name="reason"] { flex: 1 1 140px; }
  .pagination { margin-top: 8px; }
}

.nav-count.pay { background: var(--success); color: #052e16; }
.nav-count[hidden] { display: none; }
.bell-wrap { position: relative; }
.nav-bell {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 16px;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  border: 0;
  font-size: 16px;
  font-weight: 400;
}
.nav-bell:hover { background: var(--primary-soft); color: var(--primary-dark); }
.nav-bell.on { background: var(--primary-soft); color: var(--primary-dark); font-weight: 600; }
.notice-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: min(380px, calc(100vw - 32px));
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  z-index: 20;
  overflow: hidden;
}
.notice-panel[hidden] { display: none !important; }
.notice-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px 10px;
  border-bottom: 1px solid var(--border);
}
.notice-head b { font-size: 14px; }
.notice-head span { color: var(--muted); font-size: 12px; }
.notice-list { max-height: 420px; overflow: auto; }
.notice-empty { padding: 28px 16px; color: var(--muted); font-size: 13px; text-align: center; }
.notice-item {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  min-height: 0;
  font-size: 14px;
  font-weight: 400;
}
.notice-item:last-child { border-bottom: 0; }
.notice-item:hover { background: var(--surface-hover); }
.notice-item.read { color: var(--muted); }
.notice-item.read strong { font-weight: 600; color: var(--text); }
.notice-dot {
  width: 8px;
  height: 8px;
  margin-top: 6px;
  border-radius: 99px;
  background: var(--success);
}
.notice-item.read .notice-dot { background: transparent; box-shadow: inset 0 0 0 1px var(--border-strong); }
.notice-item strong { display: block; font-size: 14px; }
.notice-item p { margin: 2px 0 0; font-size: 12px; color: var(--muted); line-height: 1.45; }
.notice-item .money { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text); }
.notice-item.read .money { color: var(--muted); font-weight: 600; }
.pay-toasts {
  position: fixed;
  right: 20px;
  bottom: 24px;
  z-index: 30;
  width: min(360px, calc(100vw - 32px));
}
.pay-toast {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 10px;
  padding: 12px;
  border-radius: 14px;
  background: #141414;
  border: 1px solid rgba(74, 222, 128, 0.45);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.72);
}
.pay-toast[hidden] { display: none !important; }
.toast-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(74, 222, 128, 0.15);
  color: var(--success);
  font-size: 18px;
}
.toast-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.toast-top b { font-size: 13px; color: var(--success); }
.toast-top span, .pay-toast p { color: var(--muted); font-size: 13px; }
.pay-toast p { margin: 2px 0 0; }
.toast-who { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; margin-top: 2px; }
.toast-who h3 { margin: 0; font-size: 16px; }
.toast-who b { font-size: 16px; font-variant-numeric: tabular-nums; }
.toast-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.toast-actions button { min-height: 32px; padding: 0 12px; font-size: 13px; }
.qr-locked {
  width: 132px;
  height: 132px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  background: #111;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.pay-hidden { border-style: dashed; }

.report-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
  margin-bottom: 14px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.report-tools label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}
.report-tools input[type="date"] { width: 168px; min-height: 40px; }
.report-tools .btn,
.report-tools .btn-secondary,
.report-tools a.btn-secondary { min-height: 40px; }
.report-tools .spacer { flex: 1; }
.report-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.report-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.report-stat span { display: block; color: var(--muted); font-size: 13px; }
.report-stat b {
  display: block;
  margin: 6px 0 4px;
  font-size: 28px;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.report-stat .sub { margin: 0; }
.report-block { margin-top: 18px; }
.report-block h2 {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 8px;
  font-size: 16px;
}
.plus { color: var(--success); }
@media (max-width: 800px) {
  .report-stats { grid-template-columns: 1fr; }
  .report-tools input[type="date"] { width: 100%; }
}
