:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-soft: #f8f9fa;
  --text: #17181a;
  --muted: #8b9098;
  --line: #e8eaed;
  --green: #07c160;
  --green-deep: #059b4d;
  --green-soft: #e8f8ef;
  --red: #e5484d;
  --red-soft: #fff0f0;
  --amber: #d97706;
  --amber-soft: #fff7e7;
  --blue: #2478ff;
  --blue-soft: #edf4ff;
  --shadow: 0 10px 30px rgba(24, 28, 35, .06);
  --radius: 8px;
  --sidebar: 244px;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
svg { display: block; }
.list-item > svg { width: 16px; height: 16px; flex: 0 0 auto; color: #a9afb4; }
.list-item > .list-content { min-width: 0; }
[hidden] { display: none !important; }

.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed;
  z-index: 20;
  inset: 0 auto 0 0;
  width: var(--sidebar);
  padding: 24px 16px 18px;
  display: flex;
  flex-direction: column;
  background: #fbfbfc;
  border-right: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 11px; padding: 0 10px 27px; }
.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--green);
  border-radius: 11px;
  box-shadow: 0 5px 14px rgba(7, 193, 96, .22);
}
.brand-mark svg { width: 22px; height: 22px; }
.brand-copy { min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.brand-copy strong { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-copy small { margin-top: 2px; color: #b0b4ba; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.nav-list { display: flex; flex-direction: column; gap: 5px; }
.nav-item {
  position: relative;
  min-height: 43px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #696e76;
  border-radius: 8px;
  transition: background .16s ease, color .16s ease;
}
.nav-item svg { width: 19px; height: 19px; stroke-width: 1.8; }
.nav-item:hover { color: var(--text); background: #f0f1f3; }
.nav-item.is-active { color: var(--green-deep); background: var(--green-soft); font-weight: 600; }
.nav-item.is-active::after {
  content: "";
  position: absolute;
  right: 10px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
}
.nav-item-switch { margin-top: 10px; padding-top: 0; color: #2f7a52; background: #f2faf5; border: 1px solid #deefe4; }
.nav-item-switch:hover { color: #176c42; background: #e9f7ee; }
.sidebar-foot { margin-top: auto; padding: 16px 4px 0; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 8px; }
.mini-profile { min-width: 0; flex: 1; display: flex; align-items: center; gap: 9px; padding: 2px 6px; }
.mini-profile > span:last-child { min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.mini-profile strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.mini-profile small { color: var(--muted); font-size: 11px; }
.avatar {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  background: #5f6b78;
  border-radius: 8px;
  overflow: hidden;
}
.avatar-image { position: relative; background: #5f6b78; }
.avatar-image .avatar-initial { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-weight: 700; }
.avatar-image img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.small { width: 28px; height: 28px; font-size: 12px; border-radius: 7px; }
.main { min-height: 100vh; margin-left: var(--sidebar); }
.topbar {
  min-height: 94px;
  padding: 24px 38px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid rgba(232, 234, 237, .85);
  background: rgba(244, 245, 247, .9);
  backdrop-filter: blur(14px);
}
.topbar h1 { margin: 0; font-size: 23px; line-height: 1.3; letter-spacing: 0; font-weight: 650; }
.topbar p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.page-content { width: 100%; max-width: 1480px; margin: 0 auto; padding: 28px 38px 52px; }
.user-chip {
  height: 38px;
  padding: 0 10px 0 5px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: #545961;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}
.user-chip:hover { border-color: #d5d8dd; background: #fff; }
.user-chip > svg { width: 14px; height: 14px; color: var(--muted); }
.mobile-nav { display: none; }

.button {
  min-height: 38px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-weight: 600;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, transform .16s ease;
}
.button:active { transform: translateY(1px); }
.button svg { width: 16px; height: 16px; stroke-width: 2; }
.button.primary { color: #fff; background: var(--green); box-shadow: 0 3px 10px rgba(7, 193, 96, .14); }
.button.primary:hover { background: var(--green-deep); }
.button.secondary { color: #4e5660; background: #fff; border-color: var(--line); }
.button.secondary:hover { border-color: #cfd3d8; }
.button.ghost { color: #646a72; background: transparent; border-color: var(--line); }
.button.ghost:hover { background: #f6f7f8; }
.button.danger { color: #fff; background: var(--red); }
.button:disabled { color: #a8adb2; background: #eef0f1; border-color: #e6e8ea; box-shadow: none; cursor: not-allowed; transform: none; }
.button.small { min-height: 31px; padding: 0 10px; font-size: 12px; }
.button.text { min-height: 30px; padding: 0 6px; color: var(--green-deep); background: transparent; }
.button.text.muted { color: var(--muted); }
.icon-button {
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  color: #6e747c;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
  cursor: pointer;
}
.icon-button svg { width: 17px; height: 17px; }
.icon-button.subtle:hover { background: #f0f1f3; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(24, 28, 35, .02);
}
.card-head { min-height: 57px; padding: 15px 20px 12px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--line); }
.card-head h2, .card-head h3 { margin: 0; font-size: 15px; line-height: 1.4; font-weight: 650; }
.card-head p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.card-body { padding: 20px; }
.section-stack { display: flex; flex-direction: column; gap: 18px; }
.split-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, .8fr); gap: 18px; }

.overview-band {
  position: relative;
  overflow: hidden;
  padding: 24px 25px;
  color: #fff;
  background: #202b27;
  border-radius: var(--radius);
}
.overview-band::after {
  content: "";
  position: absolute;
  right: -30px;
  bottom: -78px;
  width: 280px;
  height: 200px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 50%;
  transform: rotate(-18deg);
}
.overview-band::before {
  content: "";
  position: absolute;
  right: 95px;
  top: -95px;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: rgba(7, 193, 96, .18);
}
.overview-copy { position: relative; z-index: 1; max-width: 660px; }
.overview-kicker { display: inline-flex; align-items: center; gap: 6px; color: #b7efd0; font-size: 12px; }
.overview-kicker svg { width: 14px; height: 14px; }
.overview-copy h2 { margin: 9px 0 7px; font-size: 22px; line-height: 1.35; font-weight: 650; }
.overview-copy p { margin: 0; max-width: 580px; color: #b9c3bf; font-size: 13px; line-height: 1.7; }
.bind-key-line { position: relative; z-index: 1; margin-top: 12px; display: flex; align-items: center; gap: 7px; }
.bind-key-line strong { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; color: #e4ffe9; font-size: clamp(25px, 3vw, 38px); line-height: 1.2; letter-spacing: .14em; }
.key-copy { color: #b7efd0; border-color: rgba(255,255,255,.12); }
.key-copy:hover { background: rgba(255,255,255,.1); }
.metric-status { font-size: 21px; color: var(--green-deep); }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.account-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.account-summary-item { min-width: 0; padding: 17px 18px; display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.account-summary-item .metric-value { overflow-wrap: anywhere; }
.account-summary-item a.metric-foot { width: fit-content; text-decoration: none; }
.account-summary-item a.metric-foot:hover { text-decoration: underline; }
.metric {
  padding: 17px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.metric-label { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; }
.metric-label svg { width: 15px; height: 15px; }
.metric-value { margin-top: 3px; font-size: 24px; line-height: 1.2; font-weight: 650; letter-spacing: 0; }
.metric-foot { color: #a2a7ad; font-size: 11px; }
.admin-metric-grid { margin-top: 0; }
.admin-overview-grid { margin-top: 18px; }

.toolbar { padding: 14px 18px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.toolbar-left, .toolbar-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.search-box { position: relative; width: 235px; }
.search-box svg { position: absolute; left: 11px; top: 50%; width: 15px; height: 15px; color: #a0a5ac; transform: translateY(-50%); pointer-events: none; }
.search-box input { width: 100%; height: 35px; padding: 0 12px 0 34px; color: var(--text); background: #f6f7f8; border: 1px solid transparent; border-radius: 7px; outline: none; }
.search-box input:focus { background: #fff; border-color: #b9dfc8; box-shadow: 0 0 0 3px rgba(7, 193, 96, .08); }
.follower-pagination { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 6px; padding: 12px 16px; border-top: 1px solid var(--line); }
.follower-pagination .cell-sub { margin-right: auto; }
.follower-pagination .is-current { color: var(--green-deep); border-color: currentColor; pointer-events: none; }
.select-control {
  height: 35px;
  padding: 0 30px 0 10px;
  color: #5e646c;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  outline: none;
}
.select-control:focus { border-color: #b9dfc8; }

.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; text-align: left; }
.data-table th { height: 42px; padding: 0 16px; color: #9ca1a8; font-size: 11px; font-weight: 500; background: #fafbfb; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); white-space: nowrap; }
.data-table td { min-height: 58px; padding: 12px 16px; border-bottom: 1px solid #eff0f2; vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover td { background: #fcfdfc; }
.member-cell { display: flex; align-items: center; gap: 10px; min-width: 145px; }
.member-cell > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.member-cell strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.member-cell small { color: var(--muted); font-size: 11px; }
.cell-main { font-weight: 600; white-space: nowrap; }
.cell-sub { margin-top: 1px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.table-actions { display: flex; justify-content: flex-end; gap: 2px; white-space: nowrap; }
.amount-in { color: var(--green-deep); font-weight: 650; }
.amount-out { color: #444950; font-weight: 650; }

.tag { display: inline-flex; align-items: center; gap: 4px; min-height: 22px; padding: 0 7px; color: #6c727a; background: #f1f3f4; border-radius: 5px; font-size: 11px; line-height: 1; white-space: nowrap; }
.tag.green { color: #068747; background: var(--green-soft); }
.tag.amber { color: #a35f00; background: var(--amber-soft); }
.tag.red { color: #c8393e; background: var(--red-soft); }
.tag.blue { color: #2866ce; background: var(--blue-soft); }
.tag::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

.empty-state { padding: 50px 20px; text-align: center; color: var(--muted); }
.empty-icon { width: 50px; height: 50px; margin: 0 auto 12px; display: grid; place-items: center; color: #9fa7ad; background: #f3f5f4; border-radius: 50%; }
.empty-icon svg { width: 24px; height: 24px; }
.empty-state h3 { margin: 0; color: #4c535a; font-size: 14px; }
.empty-state p { margin: 5px 0 0; font-size: 12px; }

.list { margin: 0; padding: 0; list-style: none; }
.list-item { padding: 13px 20px; display: flex; align-items: center; gap: 11px; border-bottom: 1px solid #eff0f2; }
.list-item:last-child { border-bottom: 0; }
.list-icon { flex: 0 0 auto; width: 33px; height: 33px; display: grid; place-items: center; color: var(--green-deep); background: var(--green-soft); border-radius: 7px; }
.list-icon svg { width: 16px; height: 16px; }
.list-content { min-width: 0; flex: 1; }
.list-content strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 600; }
.list-content small { display: block; margin-top: 1px; color: var(--muted); font-size: 11px; }
.list-end { flex: 0 0 auto; text-align: right; font-size: 12px; font-weight: 600; }
.dashboard-recent { min-height: 328px; }

.form-stack { display: flex; flex-direction: column; gap: 17px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field[hidden] { display: none !important; }
.field > span, .field-label { color: #5e646c; font-size: 12px; font-weight: 600; }
.field input, .field textarea, .field select, .form-control {
  width: 100%;
  min-height: 39px;
  padding: 8px 11px;
  color: var(--text);
  background: #fff;
  border: 1px solid #dfe2e5;
  border-radius: 7px;
  outline: none;
  transition: border-color .16s, box-shadow .16s;
}
.field textarea, textarea.form-control { min-height: 90px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus, .form-control:focus { border-color: #a9dbbd; box-shadow: 0 0 0 3px rgba(7, 193, 96, .08); }
.field small { color: var(--muted); font-size: 11px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .field.full { grid-column: 1 / -1; }
.settings-section + .settings-section { margin-top: 18px; }
.settings-heading { padding: 18px 20px 10px; }
.settings-heading h2 { margin: 0; font-size: 15px; }
.settings-heading p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.settings-form { padding: 8px 20px 20px; }
.form-actions { margin-top: 18px; padding-top: 16px; display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--line); }
.info-box { padding: 11px 13px; display: flex; gap: 9px; color: #66716c; background: #f5f9f6; border: 1px solid #e5efe8; border-radius: 7px; font-size: 12px; line-height: 1.6; }
.info-box svg { flex: 0 0 auto; width: 16px; height: 16px; margin-top: 1px; color: var(--green-deep); }
.info-box.error-box { color: #8f4a2e; background: #fff7f2; border-color: #f3dfd4; }
.info-box.error-box svg { color: #c25b32; }
.segmented { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 3px; background: #f2f4f3; border-radius: 7px; }
.segmented label { position: relative; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { min-height: 32px; padding: 0 6px; display: flex; align-items: center; justify-content: center; color: #747b80; border-radius: 5px; font-size: 12px; white-space: nowrap; }
.segmented input:checked + span { color: #176c42; background: #fff; box-shadow: 0 1px 3px rgba(25,45,34,.12); font-weight: 600; }
.switch-row { min-height: 39px; display: flex; align-items: center; gap: 9px; }
.switch-row input { width: 37px; height: 21px; margin: 0; accent-color: var(--green); }
.switch-row label { color: #525a55; font-size: 13px; font-weight: 400; }
.callback-box { padding: 13px; background: #f8faf9; border: 1px solid #e5ece7; border-radius: 7px; }
.callback-box > span { display: block; color: #626b65; font-size: 12px; font-weight: 600; }
.callback-box > div { display: flex; align-items: center; gap: 5px; margin-top: 6px; }
.callback-box code { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; color: #276044; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; white-space: nowrap; }
.callback-box small { display: block; margin-top: 5px; color: #969da1; font-size: 11px; line-height: 1.6; }
.settings-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 20px; align-items: start; }
.settings-layout-single { grid-template-columns: minmax(0, 1fr); }
.settings-tabs { display: flex; flex-direction: column; gap: 4px; }
.settings-tab { width: 100%; min-height: 61px; padding: 9px 11px; display: flex; align-items: center; gap: 9px; color: #686f76; background: transparent; border: 1px solid transparent; border-radius: 8px; text-align: left; cursor: pointer; }
.settings-tab:hover { background: #f0f1f3; }
.settings-tab.is-active { color: #216d47; background: #fff; border-color: var(--line); box-shadow: 0 2px 7px rgba(28,48,35,.03); }
.settings-tab > svg:first-child { width: 18px; height: 18px; }
.settings-tab > svg:last-child { width: 14px; height: 14px; margin-left: auto; color: #b4b9bd; }
.settings-tab > span { min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.settings-tab strong { font-size: 13px; font-weight: 600; }
.settings-tab small { margin-top: 2px; color: #9aa0a5; font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.settings-version { margin: 17px 11px 0; color: #b1b6ba; font-size: 10px; line-height: 1.7; }
.settings-content { min-width: 0; }
.bind-key-card { padding: 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; background: #f6faf7; border: 1px solid #e1eee5; border-radius: 8px; }
.bind-key-card > span { flex: 0 0 100%; color: #707a73; font-size: 12px; }
.bind-key-card > strong { flex: 1; color: #176c42; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 25px; letter-spacing: .13em; }
.api-key-secret { padding: 16px; background: #f6faf7; border: 1px solid #dbece1; border-radius: 8px; }
.api-key-secret > span, .api-key-summary > span, .api-endpoint > span { display: block; color: var(--muted); font-size: 11px; font-weight: 600; }
.api-key-secret > div, .api-endpoint > div { margin-top: 7px; display: flex; align-items: center; gap: 7px; }
.api-key-secret code { min-width: 0; flex: 1; color: #176c42; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 13px; overflow-wrap: anywhere; }
.api-key-summary { padding: 15px 16px; display: flex; flex-direction: column; gap: 4px; background: #f8faf9; border: 1px solid #e6ece8; border-radius: 8px; }
.api-key-summary strong { color: #303b34; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 17px; }
.api-key-summary small { color: var(--muted); font-size: 11px; }
.api-endpoint { padding: 13px 15px; background: #f8faf9; border: 1px solid #e6ece8; border-radius: 8px; }
.api-endpoint code { min-width: 0; flex: 1; color: #276044; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.api-docs { overflow: hidden; color: #5f6862; background: #fbfcfb; border: 1px solid #e7ece8; border-radius: 8px; font-size: 12px; }
.api-docs > summary { min-height: 64px; padding: 12px 14px; display: flex; align-items: center; gap: 10px; list-style: none; cursor: pointer; }
.api-docs > summary::-webkit-details-marker { display: none; }
.api-docs > summary > span:first-child { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.api-docs > summary strong { color: #34413a; font-size: 14px; }
.api-docs > summary small { color: var(--muted); font-size: 11px; }
.api-docs > summary > .tag { flex: 0 0 auto; }
.api-docs > summary > svg { width: 16px; height: 16px; flex: 0 0 auto; color: #9ba39e; transition: transform .16s; }
.api-docs[open] > summary { border-bottom: 1px solid #e7ece8; }
.api-docs[open] > summary > svg { transform: rotate(180deg); }
.api-docs-body { padding: 0 14px 14px; }
.api-reference { margin: 12px 0 2px; padding: 13px 14px; color: #5c687b; background: #f5f7fb; border: 1px solid #e4e9f2; border-radius: 7px; }
.api-reference h3 { margin: 0 0 6px; color: #28364d; font-size: 12px; }
.api-reference p { margin: 5px 0; font-size: 11px; line-height: 1.7; }
.api-reference code { padding: 1px 4px; color: #405fe9; background: #e9edff; border-radius: 3px; font: 10px ui-monospace, SFMono-Regular, Consolas, monospace; }
.api-reference dl { margin: 9px 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px 14px; }
.api-reference dl > div { min-width: 0; display: grid; grid-template-columns: max-content minmax(0, 1fr); align-items: start; gap: 6px; }
.api-reference dt, .api-reference dd { margin: 0; }
.api-reference dd { font-size: 10px; line-height: 1.65; }
.api-reference-note { padding-top: 7px; color: #69768b; border-top: 1px solid #e3e8f0; }
.api-example-list { border-top: 0; }
.api-example { padding: 16px 0; border-bottom: 1px solid var(--line); }
.api-example-head { display: flex; align-items: center; gap: 8px; }
.api-example-head strong { font-size: 13px; }
.api-example > p { margin: 6px 0 11px; color: #747c77; font-size: 11px; line-height: 1.65; }
.api-method { min-width: 44px; padding: 3px 6px; color: #176c42; background: #e9f7ee; border-radius: 4px; font: 700 10px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace; text-align: center; }
.api-method.post { color: #275e93; background: #eaf3fb; }
.api-method.\34 22 { color: #9d4933; background: #fff0e9; }
.api-code-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.api-code-block { min-width: 0; background: #f8faf9; border: 1px solid #e7ece8; border-radius: 7px; }
.api-code-block > div { min-height: 34px; padding: 5px 6px 4px 11px; display: flex; align-items: center; justify-content: space-between; gap: 6px; border-bottom: 1px solid #e8eeea; }
.api-code-block > div > span { color: #5d6962; font-size: 10px; font-weight: 600; }
.api-code-block pre { min-height: 72px; margin: 0; padding: 10px 11px; overflow: auto; color: #315342; background: #f3f7f5; font: 10px/1.6 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre; }
.api-error-codes { padding: 13px 14px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 10px; color: #69726c; background: #fbfcfb; border: 1px solid #e7ece8; border-radius: 7px; font-size: 11px; }
.api-error-codes > strong { grid-column: 1 / -1; color: #3e4a43; font-size: 12px; }
.api-error-codes code { align-self: center; color: #8c4c37; font: 10px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; overflow-wrap: anywhere; }
.api-error-codes span { min-width: 0; }
.notification-overview .card-body { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.notification-overview-copy { display: flex; align-items: center; gap: 11px; }
.notification-overview-copy > div { display: flex; flex-direction: column; }
.notification-overview-copy strong { color: #334038; font-size: 14px; }
.notification-overview-copy span:last-child { color: var(--muted); font-size: 11px; }
.notification-keywords { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 6px; }
.notification-keywords > span:first-child { color: var(--muted); font-size: 11px; }
.notification-filters .toolbar-left { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.notification-filters .select-control { width: auto; min-width: 135px; }
.notification-filters .search-box { width: 210px; }
.push-batch-list { display: flex; flex-direction: column; }
.push-batch-card { padding: 17px 19px; border-top: 1px solid #edf0ee; }
.push-batch-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.push-batch-card > h3 { margin: 12px 0 5px; color: #303a34; font-size: 14px; line-height: 1.5; }
.push-batch-content { margin: 0; color: #626d66; font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.keyword-hit { margin-top: 9px; padding: 8px 10px; display: flex; align-items: flex-start; gap: 7px; color: #914431; background: #fff6f1; border: 1px solid #f2ded4; border-radius: 6px; font-size: 11px; line-height: 1.65; }
.keyword-hit svg { width: 15px; height: 15px; flex: 0 0 auto; margin-top: 1px; }
.keyword-hit code { margin-left: 4px; padding: 1px 5px; color: #9b432d; background: #ffeae0; border-radius: 3px; font: 10px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; }
.push-batch-metrics { margin-top: 12px; padding: 10px 12px; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; background: #f8faf9; border: 1px solid #e9eeeb; border-radius: 7px; }
.push-batch-metrics span { min-width: 0; display: flex; flex-direction: column; gap: 2px; color: #929a95; font-size: 10px; }
.push-batch-metrics strong { color: #48544d; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.push-deliveries { margin-top: 9px; border: 1px solid #e9eeeb; border-radius: 7px; }
.push-deliveries > summary { padding: 8px 11px; color: #66736b; font-size: 11px; cursor: pointer; }
.push-deliveries .list { border-top: 1px solid #edf0ee; }
.push-deliveries .list-item { padding: 8px 11px; }
.package-summary { padding: 15px 16px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; background: #f8faf9; border: 1px solid #e6ece8; border-radius: 8px; }
.package-summary > div { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.package-summary span { color: var(--muted); font-size: 11px; }
.package-summary strong { color: #2e3832; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.group-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(235px, 1fr)); gap: 11px; padding: 14px 18px 18px; }
.group-card { min-width: 0; padding: 13px; background: #fafbfa; border: 1px solid #e7ebe8; border-radius: 8px; }
.group-card-head { display: flex; align-items: center; gap: 9px; }
.group-card-head > div { min-width: 0; display: flex; flex-direction: column; }
.group-card-head > div:first-of-type { flex: 1; }
.group-card-head strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.group-card-head small { color: var(--muted); font-size: 10px; }
.group-card-head > .group-actions { min-width: max-content; margin-left: auto; display: flex; flex: 0 0 auto; flex-direction: row; align-items: center; gap: 4px; white-space: nowrap; }
.group-actions form { display: flex; }
.empty-state.compact { padding: 30px 20px; }
.check-row { min-height: 39px; padding: 5px 7px; display: flex; align-items: center; gap: 9px; color: #555e58; border-bottom: 1px solid #eff0f2; font-size: 13px; }
.check-row:last-child { border-bottom: 0; }
.check-row input { width: 17px; height: 17px; margin: 0; accent-color: var(--green); }
.check-row > span:last-child { min-width: 0; display: flex; flex-direction: column; }
.check-row small { color: var(--muted); font-size: 10px; }
.check-row > span:nth-last-child(2) { margin-left: auto; color: var(--muted); }
.follower-check-list { max-height: 250px; overflow: auto; border: 1px solid var(--line); border-radius: 7px; }
.send-scope { margin-bottom: 8px; grid-template-columns: repeat(2, 1fr); }
.scope-select { width: 100%; }
.notice-bar { margin: 0 18px 14px; padding: 11px 13px; display: flex; align-items: center; gap: 8px; color: #7c5a18; background: #fff9eb; border: 1px solid #f0e2bd; border-radius: 7px; font-size: 12px; }
.notice-bar svg { width: 16px; height: 16px; flex: 0 0 auto; }
.notice-bar .button { margin-left: auto; flex: 0 0 auto; white-space: nowrap; }
.inline-assign { display: flex; align-items: center; gap: 6px; min-width: 220px; }
.inline-assign .select-control { min-width: 0; flex: 1; }
.form-error { margin-bottom: 16px; padding: 10px 12px; color: #9d3439; background: var(--red-soft); border: 1px solid #f1d8d9; border-radius: 7px; font-size: 12px; }
.text-link { color: var(--green-deep); font-weight: 600; }
.text-link:hover { text-decoration: underline; }
.mono-cell { color: #737b76; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; }
.avatar.tiny { width: 27px; height: 27px; border-radius: 6px; font-size: 10px; }
.push-layout { align-items: start; }
.flow-list { margin: 0; padding: 5px 20px 16px; list-style: none; }
.flow-list li { padding: 12px 0; display: flex; gap: 12px; border-bottom: 1px solid #eff0f2; }
.flow-list li:last-child { border-bottom: 0; }
.flow-list li > span:last-child { display: flex; flex-direction: column; }
.flow-list strong { font-size: 13px; }
.flow-list small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.flow-number { flex: 0 0 auto; width: 24px; height: 24px; display: grid; place-items: center; color: var(--green-deep); background: var(--green-soft); border-radius: 50%; font-size: 12px; font-weight: 700; }

.dialog {
  width: min(570px, calc(100vw - 28px));
  max-height: calc(100vh - 40px);
  padding: 0;
  color: var(--text);
  background: #fff;
  border: 0;
  border-radius: 9px;
  box-shadow: 0 25px 70px rgba(16, 23, 19, .2);
  overflow: auto;
}
.dialog.dialog-compact { width: min(390px, calc(100vw - 28px)); }
.dialog::backdrop { background: rgba(22, 28, 25, .34); backdrop-filter: blur(2px); }
.dialog-head { padding: 20px 22px 14px; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.dialog-head h2 { margin: 0; font-size: 18px; line-height: 1.35; }
.dialog-head p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.dialog-body { padding: 8px 22px 22px; }
.dialog-actions { margin-top: 21px; padding-top: 15px; display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--line); }
.dialog.dialog-compact .dialog-head { padding-bottom: 18px; }
.dialog.dialog-compact .dialog-body { padding-top: 0; }
.dialog.dialog-compact .dialog-actions { margin-top: 0; }

.toast-region { position: fixed; z-index: 100; right: 22px; bottom: 22px; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast {
  min-width: 200px;
  max-width: 390px;
  padding: 11px 14px;
  color: #3d4a43;
  background: #fff;
  border: 1px solid #dfe9e2;
  border-radius: 7px;
  box-shadow: var(--shadow);
  font-size: 13px;
  animation: toast-in .2s ease both;
}
.toast.error { color: #8f2f33; border-color: #f1d8d9; }
.toast.leaving { animation: toast-out .18s ease both; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(6px); } }

.login-page { min-height: 100vh; display: grid; grid-template-columns: minmax(360px, 1fr) minmax(420px, .86fr); background: #eef2ef; }
.login-intro { position: relative; overflow: hidden; padding: 44px 8vw; display: flex; flex-direction: column; justify-content: space-between; color: #f0f5f2; background: #18231e; }
.login-intro::before { content: ""; position: absolute; width: 420px; height: 420px; right: -110px; bottom: -170px; border: 1px solid rgba(255,255,255,.11); border-radius: 50%; }
.login-intro::after { content: ""; position: absolute; width: 230px; height: 230px; right: 55px; top: 10%; border-radius: 50%; background: rgba(7,193,96,.12); }
.admin-login-intro { background: #202b25; }
.admin-login-intro::after { background: rgba(224, 171, 61, .13); }
.login-brand { position: relative; z-index: 1; display: flex; align-items: center; gap: 11px; font-weight: 650; }
.login-brand .brand-mark { box-shadow: none; }
.login-copy { position: relative; z-index: 1; max-width: 530px; margin: 50px 0; }
.login-copy h1 { margin: 0 0 14px; font-size: clamp(30px, 4vw, 50px); line-height: 1.22; letter-spacing: -.02em; font-weight: 650; }
.login-copy p { max-width: 430px; margin: 0; color: #aab8b1; font-size: 15px; line-height: 1.8; }
.login-note { position: relative; z-index: 1; color: #84958d; font-size: 12px; }
.login-panel { padding: 30px; display: flex; align-items: center; justify-content: center; }
.login-card { width: min(400px, 100%); padding: 33px 34px; background: #fff; border: 1px solid #e4e8e5; border-radius: 10px; box-shadow: 0 18px 50px rgba(26, 44, 34, .07); }
.login-card h2 { margin: 0; font-size: 23px; line-height: 1.4; }
.login-card > p { margin: 5px 0 24px; color: var(--muted); font-size: 13px; }
.login-card .button { width: 100%; min-height: 42px; margin-top: 5px; }
.login-hint { margin: 18px 0 0; padding-top: 15px; color: #9ba1a7; border-top: 1px solid var(--line); font-size: 11px; line-height: 1.7; }

@media (max-width: 1000px) {
  :root { --sidebar: 210px; }
  .topbar { padding-left: 26px; padding-right: 26px; }
  .page-content { padding-left: 26px; padding-right: 26px; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split-grid { grid-template-columns: minmax(0, 1fr); }
  .settings-layout { grid-template-columns: 1fr; gap: 13px; }
  .settings-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .settings-tab { min-height: 45px; padding: 8px; }
  .settings-tab > svg:first-child, .settings-tab > svg:last-child, .settings-tab small { display: none; }
  .settings-tab > span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .settings-version { display: none; }
}
@media (max-width: 760px) {
  .main { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .sidebar { display: none; }
  .main { margin-left: 0; }
  .topbar { min-height: 80px; padding: 17px 17px 14px; align-items: flex-start; }
  .topbar h1 { font-size: 21px; }
  .topbar p { font-size: 11px; }
  .topbar-actions > .button { min-width: 36px; padding: 0 9px; }
  .topbar-actions > .button span { display: none; }
  .user-chip > span:not(.avatar), .user-chip > svg { display: none; }
  .user-chip { padding: 0 4px; border: 0; background: transparent; }
  .page-content { padding: 17px 13px 30px; }
  .mobile-nav {
    position: fixed;
    z-index: 30;
    inset: auto 0 0;
    min-height: 64px;
    padding: 4px 8px max(5px, env(safe-area-inset-bottom));
    display: flex;
    align-items: stretch;
    background: rgba(255,255,255,.95);
    border-top: 1px solid var(--line);
    backdrop-filter: blur(14px);
  }
  .mobile-nav-item { min-width: 0; min-height: 54px; padding: 0 2px; flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: #9a9fa5; font-size: 9px; white-space: nowrap; border-radius: 6px; }
  .mobile-nav-item svg { width: 19px; height: 19px; flex: 0 0 auto; }
  .mobile-nav-item.is-active { color: var(--green-deep); }
  .metric-grid { gap: 8px; margin-top: 12px; }
  .account-summary { gap: 8px; margin-top: 12px; }
  .account-summary-item { padding: 13px 12px; }
  .metric { padding: 13px 12px; }
  .metric-value { font-size: 20px; }
  .metric-label { font-size: 11px; }
  .overview-band { padding: 20px 18px; }
  .overview-copy h2 { font-size: 19px; }
  .overview-copy p { font-size: 12px; }
  .toolbar { padding: 12px; align-items: stretch; flex-direction: column; gap: 9px; }
  .toolbar-left, .toolbar-right { width: 100%; }
  .search-box { width: 100%; }
  .select-control { flex: 1; }
  .card-head { padding: 13px 15px; }
  .card-body { padding: 15px; }
  .data-table th, .data-table td { padding-left: 13px; padding-right: 13px; }
  .mobile-records .data-table thead { display: none; }
  .mobile-records .data-table,
  .mobile-records .data-table tbody,
  .mobile-records .data-table tr,
  .mobile-records .data-table td { display: block; width: 100%; }
  .mobile-records .data-table tr { position: relative; padding: 13px 14px; border-top: 1px solid #eff0f2; }
  .mobile-records .data-table td { min-height: 0; padding: 0; border: 0; }
  .mobile-records .data-table td:nth-child(1) { padding-right: 90px; }
  .mobile-records .data-table td:nth-child(2) { margin-top: 8px; }
  .mobile-records .data-table td:nth-child(3) { position: absolute; top: 48px; right: 14px; margin: 0; padding: 0; text-align: right; }
  .mobile-records .data-table td:nth-child(n+4) { margin-top: 4px; }
  .mobile-records .data-table td:nth-child(4) { margin: 0; position: absolute; right: 14px; bottom: 14px; text-align: right; }
  .mobile-records .data-table td:nth-child(5),
  .mobile-records .data-table td:nth-child(6) { display: none; }
  .follower-records .data-table thead { display: none; }
  .follower-records .data-table,
  .follower-records .data-table tbody,
  .follower-records .data-table tr,
  .follower-records .data-table td { display: block; width: 100%; }
  .follower-records .data-table tr { padding: 13px 14px; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "user bound actions"; gap: 3px 10px; border-top: 1px solid #eff0f2; align-items: center; }
  .follower-records .data-table td { min-height: 0; padding: 0; border: 0; }
  .follower-records .data-table td:nth-child(1) { grid-area: user; }
  .follower-records .data-table td:nth-child(2) { grid-area: bound; white-space: nowrap; }
  .follower-records .data-table td:nth-child(3) { grid-area: actions; align-self: center; }
  .follower-records .data-table td:nth-child(2)::before { content: ""; }
  .user-records .data-table thead { display: none; }
  .user-records .data-table,
  .user-records .data-table tbody,
  .user-records .data-table tr,
  .user-records .data-table td { display: block; width: 100%; }
  .user-records .data-table tr { padding: 13px 14px; border-top: 1px solid #eff0f2; }
  .user-records .data-table td { min-height: 0; padding: 4px 0; border: 0; }
  .user-records .data-table td:nth-child(1) { padding-top: 0; }
  .user-records .data-table td:nth-child(2),
  .user-records .data-table td:nth-child(3),
  .user-records .data-table td:nth-child(4),
  .user-records .data-table td:nth-child(5) { color: #737b76; font-size: 11px; }
  .user-records .data-table td:nth-child(2)::before { content: "已关注 "; color: #a2a7ad; }
  .user-records .data-table td:nth-child(3)::before { content: "套餐剩余 "; color: #a2a7ad; }
  .user-records .data-table td:nth-child(4)::before { content: "邮箱 "; color: #a2a7ad; }
  .user-records .data-table td:nth-child(5)::before { content: "注册 "; color: #a2a7ad; }
  .user-records .data-table td:nth-child(6) { padding-top: 8px; }
  .user-records .data-table td:nth-child(6) .table-actions { justify-content: flex-start; }
  .inline-assign { min-width: 0; }
  .package-summary { grid-template-columns: 1fr; gap: 9px; }
  .group-grid { grid-template-columns: 1fr; padding: 12px 13px 15px; }
  .form-grid, .field-row { grid-template-columns: 1fr; gap: 14px; }
  .bind-key-line strong { font-size: 25px; }
  .bind-key-card { padding: 14px; }
  .bind-key-card > strong { font-size: 22px; }
  .segmented { grid-template-columns: repeat(2, 1fr); }
  .settings-tabs { display: flex; flex-direction: row; gap: 3px; overflow-x: auto; scrollbar-width: none; }
  .settings-tabs::-webkit-scrollbar { display: none; }
  .settings-tab { min-width: 0; min-height: 38px; padding: 7px 10px; flex: 1 1 0; font-size: 12px; justify-content: center; white-space: nowrap; }
  .settings-tab > span { display: block; }
  .settings-heading { padding-left: 15px; padding-right: 15px; }
  .settings-form { padding-left: 15px; padding-right: 15px; }
  .api-code-grid { grid-template-columns: 1fr; }
  .api-reference dl { grid-template-columns: 1fr; }
  .api-code-block pre { font-size: 10px; }
  .notification-overview .card-body { align-items: flex-start; }
  .notification-keywords { justify-content: flex-start; }
  .notification-filters .toolbar-left { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
  .notification-filters .search-box { width: 100%; grid-column: 1 / -1; }
  .notification-filters .button { grid-column: 1 / -1; }
  .push-batch-card { padding: 14px; }
  .push-batch-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .dialog-head { padding: 18px 17px 13px; }
  .dialog-body { padding: 7px 17px 18px; }
  .login-page { display: block; background: #fff; }
  .login-intro { min-height: 225px; padding: 27px 24px; justify-content: flex-start; }
  .login-copy { margin: 32px 0 20px; }
  .login-copy h1 { margin-bottom: 9px; font-size: 29px; }
  .login-copy p { font-size: 13px; line-height: 1.65; }
  .login-note { display: none; }
  .login-panel { padding: 25px 18px; }
  .login-card { padding: 25px 21px; border: 0; box-shadow: none; }
  .toast-region { left: 13px; right: 13px; bottom: 76px; }
  .toast { max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Alternate native dashboard layout, enabled only by the administrator. */
.ui-modern {
  --bg: #f1f5f9;
  --surface: #fff;
  --surface-soft: #f8fafc;
  --text: #172033;
  --muted: #718096;
  --line: #e2e8f0;
  --blue: #4f6ef7;
  --blue-soft: #eef2ff;
  --green: #15956b;
  --green-deep: #117a59;
  --green-soft: #e8f7f1;
  --shadow: 0 8px 24px rgba(30, 41, 59, .055);
  background: var(--bg);
  color: var(--text);
}
.modern-header {
  position: sticky;
  z-index: 50;
  top: 0;
  min-height: 70px;
  padding: 0 28px;
  display: flex;
  align-items: center;
  gap: 25px;
  color: #e5eaf2;
  background: #1e293b;
  border-bottom: 1px solid #334155;
  box-shadow: 0 3px 12px rgba(15, 23, 42, .12);
}
.modern-brand { min-width: 190px; display: flex; align-items: center; gap: 10px; }
.modern-brand-mark { width: 36px; height: 36px; display: grid; place-items: center; color: #fff; background: #4f6ef7; border-radius: 7px; }
.modern-brand-mark svg { width: 19px; height: 19px; }
.modern-brand > span:last-child { min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.modern-brand strong { max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #fff; font-size: 14px; }
.modern-brand small { margin-top: 3px; color: #94a3b8; font-size: 10px; }
.modern-tabs { min-width: 0; flex: 1; height: 70px; display: flex; align-items: stretch; gap: 3px; overflow-x: auto; scrollbar-width: none; }
.modern-tabs::-webkit-scrollbar { display: none; }
.modern-tab { position: relative; min-width: max-content; padding: 0 15px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; color: #bac4d3; font-size: 13px; transition: color .15s, background .15s; }
.modern-tab svg { width: 16px; height: 16px; }
.modern-tab:hover { color: #fff; background: rgba(255,255,255,.05); }
.modern-tab.is-active { color: #fff; font-weight: 600; }
.modern-tab.is-active::after { content: ""; position: absolute; right: 13px; bottom: 0; left: 13px; height: 3px; background: #8094ff; border-radius: 3px 3px 0 0; }
.modern-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 11px; }
.ui-version-switch { padding: 3px; display: flex; gap: 2px; background: #111b2b; border: 1px solid #3a4759; border-radius: 6px; }
.ui-version-switch button { min-height: 26px; padding: 0 8px; color: #aeb9ca; background: transparent; border: 0; border-radius: 4px; font-size: 10px; cursor: pointer; }
.ui-version-switch button:hover { color: #fff; }
.ui-version-switch button.is-selected { color: #fff; background: #4f6ef7; }
.modern-action-link { min-height: 34px; padding: 0 9px; display: inline-flex; align-items: center; gap: 6px; color: #dce4ef; border: 1px solid #465367; border-radius: 6px; font-size: 11px; white-space: nowrap; }
.modern-action-link:hover { color: #fff; background: #2b384b; }
.modern-action-link svg { width: 15px; height: 15px; }
.modern-account { min-width: 0; min-height: 36px; padding: 0 5px 0 0; display: flex; align-items: center; gap: 7px; color: #e5eaf2; background: transparent; border: 0; cursor: pointer; }
.modern-avatar { width: 29px; height: 29px; display: grid; place-items: center; color: #263247; background: #cbd5e1; border-radius: 50%; font-size: 12px; font-weight: 700; }
.modern-account-name { max-width: 92px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.modern-logout { width: 32px; height: 32px; display: grid; place-items: center; color: #aeb9ca; background: transparent; border: 1px solid #465367; border-radius: 6px; cursor: pointer; }
.modern-logout:hover { color: #fff; background: #2b384b; }
.modern-logout svg { width: 15px; height: 15px; }
.modern-main { width: min(1480px, 100%); min-height: calc(100vh - 70px); margin: 0 auto; padding: 28px 34px 50px; }
.modern-page-heading { min-height: 76px; margin-bottom: 21px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.modern-page-heading > div > p { margin: 0 0 3px; color: #8b96a8; font-size: 9px; font-weight: 700; letter-spacing: .08em; }
.modern-page-heading h1 { margin: 0; color: #1e293b; font-size: 24px; font-weight: 700; line-height: 1.3; }
.modern-page-heading > div > span { display: block; margin-top: 3px; color: #7b8799; font-size: 11px; }
.modern-page-heading > .button { flex: 0 0 auto; }
.modern-content { display: flex; flex-direction: column; gap: 17px; }
.ui-modern .card { border-color: #e0e6ee; border-radius: 7px; box-shadow: 0 1px 3px rgba(30, 41, 59, .035); }
.ui-modern .card-head { min-height: 56px; padding: 13px 17px; border-bottom-color: #e8edf3; }
.ui-modern .card-head h2, .ui-modern .card-head h3 { color: #243047; font-size: 14px; }
.ui-modern .card-head p { color: #8490a2; font-size: 11px; }
.ui-modern .card-body { padding: 18px; }
.ui-modern .button { min-height: 34px; padding: 0 12px; border-radius: 6px; font-size: 11px; }
.ui-modern .button.primary { color: #fff; background: #4f6ef7; border-color: #4f6ef7; box-shadow: 0 2px 4px rgba(79, 110, 247, .15); }
.ui-modern .button.primary:hover { background: #405fe9; }
.ui-modern .button.secondary { color: #475569; background: #fff; border-color: #d9e0ea; }
.ui-modern .button.secondary:hover { color: #405fe9; background: #f8faff; border-color: #b9c6ff; }
.ui-modern .button.ghost { color: #536176; background: #f8fafc; }
.ui-modern .button.text { color: #4f6ef7; }
.ui-modern .icon-button { border-radius: 6px; }
.ui-modern .icon-button.subtle:hover { color: #405fe9; background: #eef2ff; }
.ui-modern .metric-grid { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 13px; margin-top: 0; }
.ui-modern .account-summary { gap: 13px; margin-top: 0; }
.ui-modern .account-summary-item { min-height: 112px; padding: 15px 16px; border-color: #e0e6ee; border-radius: 7px; box-shadow: 0 1px 3px rgba(30, 41, 59, .035); }
.ui-modern .account-summary-item .metric-label { color: #7c8798; font-size: 11px; }
.ui-modern .account-summary-item .metric-label svg { color: #4f6ef7; }
.ui-modern .account-summary-item .metric-value { color: #202c41; font-size: 23px; }
.ui-modern .account-summary-item .metric-foot { color: #929daf; font-size: 10px; }
.ui-modern .metric { min-height: 112px; padding: 15px 16px; gap: 5px; border-color: #e0e6ee; border-radius: 7px; box-shadow: 0 1px 3px rgba(30, 41, 59, .035); }
.ui-modern .metric-label { color: #7c8798; font-size: 11px; }
.ui-modern .metric-label svg { color: #4f6ef7; }
.ui-modern .metric-value { color: #202c41; font-size: 23px; }
.ui-modern .metric-foot { color: #929daf; font-size: 10px; }
.ui-modern .split-grid { gap: 16px; }
.ui-modern .toolbar { padding: 12px 15px; gap: 12px; }
.ui-modern .data-table th { height: 38px; color: #738096; background: #f6f8fb; border-color: #e6ebf2; font-size: 10px; font-weight: 650; }
.ui-modern .data-table td { padding: 11px 14px; border-color: #edf0f5; font-size: 12px; }
.ui-modern .data-table tbody tr:hover td { background: #f8faff; }
.ui-modern .tag { min-height: 21px; border-radius: 4px; font-size: 10px; }
.ui-modern .tag.blue { color: #455fe0; background: #edf0ff; }
.ui-modern .tag.green { color: #14805c; background: #e7f7ef; }
.ui-modern .tag.amber { color: #9b640b; background: #fff5df; }
.ui-modern .tag.red { color: #bd4545; background: #fff0ef; }
.ui-modern .empty-state { padding: 40px 18px; }
.ui-modern .empty-icon { color: #4f6ef7; background: #eef2ff; border-radius: 7px; }
.ui-modern .list-item { padding: 11px 15px; border-color: #edf0f5; }
.ui-modern .list-icon { color: #4f6ef7; background: #eef2ff; border-radius: 6px; }
.ui-modern .form-stack { gap: 15px; }
.ui-modern .field { gap: 5px; }
.ui-modern .field > span, .ui-modern .field-label { color: #526078; font-size: 11px; }
.ui-modern .field input, .ui-modern .field textarea, .ui-modern .field select, .ui-modern .form-control { min-height: 37px; padding: 7px 10px; border-color: #d9e0ea; border-radius: 6px; font-size: 12px; }
.ui-modern .field textarea { min-height: 88px; }
.ui-modern .field input:focus, .ui-modern .field textarea:focus, .ui-modern .field select:focus, .ui-modern .form-control:focus { border-color: #8799fa; box-shadow: 0 0 0 3px rgba(79, 110, 247, .11); }
.ui-modern .search-box input, .ui-modern .select-control { border-radius: 6px; }
.ui-modern .settings-layout { grid-template-columns: minmax(0, 1fr); gap: 15px; }
.ui-modern .settings-tabs { flex-direction: row; gap: 4px; padding: 4px; background: #e7ecf3; border-radius: 7px; }
.ui-modern .settings-tab { min-height: 36px; flex: 0 1 auto; padding: 0 12px; color: #647187; border-radius: 5px; font-size: 11px; }
.ui-modern .settings-tab:hover { background: rgba(255,255,255,.55); }
.ui-modern .settings-tab.is-active { color: #405fe9; background: #fff; border-color: transparent; box-shadow: 0 1px 3px rgba(30, 41, 59, .1); }
.ui-modern .follower-pagination .is-current { color: #405fe9; border-color: #8799fa; }
.ui-modern .settings-version { display: none; }
.ui-modern .settings-content > .card, .ui-modern .settings-content > section.card { border-radius: 7px; }
.ui-modern .info-box { color: #526078; background: #f4f7ff; border-color: #dfe6ff; border-radius: 6px; }
.ui-modern .info-box svg { color: #4f6ef7; }
.ui-modern .check-row input { accent-color: #4f6ef7; }
.ui-modern .follower-check-list { border-radius: 6px; }
.ui-modern .dialog { border-radius: 8px; box-shadow: 0 20px 65px rgba(15, 23, 42, .25); }
.ui-modern .dialog::backdrop { background: rgba(15, 23, 42, .48); backdrop-filter: blur(2px); }
.ui-modern .dialog-head { border-bottom: 1px solid #edf0f5; }
.ui-modern .dialog-actions { border-color: #edf0f5; }
.ui-modern .text-link { color: #4f6ef7; }
.legacy-ui-switch { padding: 3px; display: flex; gap: 2px; background: #eef0f3; border: 1px solid #e3e6eb; border-radius: 6px; }
.legacy-ui-switch button { min-height: 26px; padding: 0 8px; color: #69717b; background: transparent; border: 0; border-radius: 4px; font-size: 10px; cursor: pointer; }
.legacy-ui-switch button:hover { color: #20252b; }
.legacy-ui-switch button.is-selected { color: #176c42; background: #fff; box-shadow: 0 1px 3px rgba(25,45,34,.1); }
.modern-content .overview-band { border-radius: 7px; }
.modern-key-panel { padding: 19px 21px; background: #fff; border: 1px solid #e0e6ee; border-left: 4px solid #4f6ef7; border-radius: 7px; box-shadow: 0 1px 3px rgba(30, 41, 59, .035); }
.modern-key-copy { min-width: 0; }
.modern-key-copy > span { color: #77849a; font-size: 11px; font-weight: 600; }
.modern-key-line { margin-top: 7px; display: flex; align-items: center; gap: 8px; }
.modern-key-line strong { min-width: 0; overflow-wrap: anywhere; color: #243047; font: 600 20px/1.3 ui-monospace, SFMono-Regular, Consolas, monospace; }
.modern-key-copy p { margin: 7px 0 0; color: #8590a1; font-size: 11px; }
.ui-modern .notice-bar { color: #795b17; border-radius: 6px; }
.ui-modern .package-summary { border-radius: 6px; }
.ui-modern .toast { border-radius: 6px; }
.ui-modern .mobile-nav { display: none; }
.payment-qr { width: 244px; min-height: 244px; display: grid; place-items: center; padding: 12px; background: #fff; border: 1px solid #e0e6ee; border-radius: 6px; }
.payment-recharge-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 12px; }
.payment-recharge-form .field { min-width: 0; }
.payment-recharge-submit { min-height: 39px; white-space: nowrap; }
.payment-recharge-form > small { grid-column: 1 / -1; }
.package-purchase-row { display: flex; align-items: flex-end; gap: 16px; }
.payment-package { display: flex; justify-content: flex-end; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid #e8edf2; }
.payment-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.package-picker { flex: 1 1 auto; max-width: none; min-width: 0; }
.package-options { flex: 0 0 auto; min-height: 0; }
.package-options .payment-package { padding: 0; border: 0; }
.payment-package[hidden] { display: none; }
.order-detail-list { margin: 0; display: grid; gap: 0; }
.order-detail-list > div { min-width: 0; padding: 10px 0; display: grid; grid-template-columns: 105px minmax(0, 1fr); gap: 12px; border-bottom: 1px solid var(--line); }
.order-detail-list > div[hidden] { display: none; }
.order-detail-list dt { color: var(--muted); font-size: 12px; }
.order-detail-list dd { margin: 0; overflow-wrap: anywhere; color: var(--text); font-size: 12px; }
@media (max-width: 760px) {
  .payment-recharge-form { display: flex; align-items: stretch; flex-direction: column; }
  .package-purchase-row { align-items: stretch; flex-direction: column; gap: 8px; }
  .payment-package { justify-content: flex-start; }
}
@media (max-width: 600px) { .payment-package { align-items: flex-start; flex-direction: column; } }

@media (max-width: 900px) {
  .modern-header { min-height: 64px; padding: 0 16px; gap: 12px; flex-wrap: wrap; }
  .modern-brand { min-width: 150px; }
  .modern-tabs { order: 3; flex: 0 0 100%; height: 45px; margin: 0 -2px; }
  .modern-tab { padding: 0 12px; }
  .modern-actions { margin-left: auto; }
  .legacy-ui-switch { display: none; }
  .modern-main { min-height: calc(100vh - 109px); padding: 21px 20px 38px; }
  .ui-modern .metric-grid { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
}
@media (max-width: 600px) {
  .modern-header { padding: 10px 12px 0; gap: 6px 8px; }
  .modern-brand { min-width: 0; flex: 1; }
  .modern-brand-mark { width: 32px; height: 32px; }
  .modern-brand strong { max-width: 150px; font-size: 12px; }
  .modern-brand small { font-size: 9px; }
  .modern-tabs { height: 43px; margin-top: 3px; }
  .modern-tab { padding: 0 10px; gap: 5px; font-size: 10px; }
  .modern-tab svg { width: 14px; height: 14px; }
  .modern-actions { gap: 5px; }
  .legacy-ui-switch { display: flex; }
  .ui-version-switch { gap: 1px; }
  .ui-version-switch button { min-height: 24px; padding: 0 6px; font-size: 9px; }
  .modern-action-link { width: 31px; min-height: 31px; padding: 0; justify-content: center; }
  .modern-action-link span, .modern-account-name { display: none; }
  .modern-account { min-height: 32px; }
  .modern-avatar { width: 27px; height: 27px; }
  .modern-logout { width: 29px; height: 29px; }
  .modern-main { min-height: calc(100vh - 106px); padding: 16px 12px 28px; }
  .modern-page-heading { min-height: 60px; margin-bottom: 14px; gap: 10px; }
  .modern-page-heading h1 { font-size: 20px; }
  .modern-page-heading > div > span { max-width: 260px; font-size: 10px; }
  .modern-page-heading > .button { min-width: 34px; padding: 0 8px; }
  .modern-page-heading > .button span { display: none; }
  .modern-content { gap: 12px; }
  .ui-modern .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .ui-modern .metric { min-height: 94px; padding: 11px 10px; }
  .ui-modern .account-summary { gap: 8px; }
  .ui-modern .account-summary-item { min-height: 94px; padding: 11px 10px; }
  .ui-modern .account-summary-item .metric-value { font-size: 19px; }
  .ui-modern .metric-value { font-size: 19px; }
  .ui-modern .card-head { padding: 11px 12px; }
  .ui-modern .card-body { padding: 13px; }
  .ui-modern .toolbar { padding: 10px; }
  .ui-modern .toolbar-left, .ui-modern .toolbar-right { width: 100%; }
  .ui-modern .toolbar-right { justify-content: flex-start; }
  .ui-modern .data-table th, .ui-modern .data-table td { padding-right: 10px; padding-left: 10px; }
  .ui-modern .settings-tabs { overflow-x: auto; scrollbar-width: none; }
  .ui-modern .settings-tabs::-webkit-scrollbar { display: none; }
  .ui-modern .settings-tab { min-width: max-content; padding: 0 10px; }
  .modern-key-panel { padding: 14px; }
  .modern-key-line strong { font-size: 16px; }
  .ui-modern .dialog-head { padding: 15px 14px 11px; }
  .ui-modern .dialog-body { padding: 12px 14px 16px; }
}
