﻿/* ==========================================================================
   星仑空间 — 界面样式
   ========================================================================== */

*,
*::before,
*::after { box-sizing: border-box; }

:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --panel-2: #fafbfd;
  --ink: #16202e;
  --ink-2: #46536a;
  --ink-3: #7d8aa0;
  --line: #e4e9f2;
  --line-2: #eef1f7;
  --brand: #3b6cf6;
  --brand-2: #2b55d6;
  --brand-soft: #eaf0ff;
  --ok: #12a150;
  --ok-soft: #e6f7ed;
  --warn: #c98a00;
  --warn-soft: #fdf4dd;
  --danger: #dc2f45;
  --danger-soft: #fdeaec;
  --side: #101725;
  --side-2: #182234;
  --side-ink: #c3cde0;
  --side-ink-2: #7f8ea9;
  --radius: 12px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(16, 23, 37, .06), 0 4px 14px rgba(16, 23, 37, .05);
  --shadow-lg: 0 12px 40px rgba(16, 23, 37, .16);
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, "Liberation Mono", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
}

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -.01em; }
p { margin: 0; }
a { color: var(--brand); text-decoration: none; }
button { font-family: inherit; font-size: inherit; }
input, select, textarea { font-family: inherit; }
code, .mono { font-family: var(--mono); }
[hidden] { display: none !important; }

/* ---------------- 启动 / 登录 ---------------- */

.auth-wrap {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  background: var(--side);
}

.auth-brand {
  position: relative;
  padding: 56px 64px;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  background:
    radial-gradient(900px 500px at -10% 10%, rgba(59, 108, 246, .55), transparent 60%),
    radial-gradient(700px 500px at 110% 90%, rgba(18, 161, 80, .28), transparent 60%),
    linear-gradient(160deg, #0d1422, #131c2e 60%, #0d1422);
}

.auth-brand::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at 30% 40%, #000 30%, transparent 75%);
  pointer-events: none;
}

.auth-brand .logo-mark { display: flex; align-items: center; gap: 12px; position: relative; }
.auth-brand .logo-mark svg { width: 40px; height: 40px; }
.auth-brand .logo-mark b { font-size: 18px; letter-spacing: .04em; }

.auth-brand h1 {
  position: relative;
  font-size: clamp(30px, 3.4vw, 46px);
  line-height: 1.18;
  margin: 44px 0 18px;
  font-weight: 700;
}
.auth-brand h1 span { color: #8fb0ff; }
.auth-brand > p { position: relative; color: #9fb0cb; max-width: 30em; font-size: 15px; }

.auth-points { position: relative; margin-top: 40px; display: grid; gap: 16px; max-width: 34em; }
.auth-points .item { display: flex; gap: 13px; align-items: flex-start; color: #b9c7dd; font-size: 13.5px; }
.auth-points .item .txt { min-width: 0; }
.auth-points b { color: #fff; display: block; font-size: 14px; margin-bottom: 1px; }
.auth-points .dot {
  flex: none; width: 26px; height: 26px; border-radius: 8px; margin-top: 1px;
  display: grid; place-items: center; background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .1); color: #8fb0ff;
}
.auth-points .dot svg { width: 14px; height: 14px; }

.auth-form-side { background: var(--bg); display: grid; place-items: center; padding: 32px 24px; }
.auth-card { width: min(400px, 100%); }
.auth-card .eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .12em; color: var(--ink-3); text-transform: uppercase; }
.auth-card h2 { font-size: 25px; margin: 8px 0 6px; }
.auth-card .sub { color: var(--ink-2); margin-bottom: 26px; font-size: 13.5px; }
.auth-card .form-stack { display: grid; gap: 15px; }
.auth-foot { margin-top: 22px; font-size: 12px; color: var(--ink-3); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.auth-note {
  margin-top: 18px; padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--brand-soft); color: #23428f; font-size: 12.5px; border: 1px solid #d3e0ff;
}

/* ---------------- 布局 ---------------- */

/* 侧栏固定定位；主区用左内边距让位（长页面滚动时导航始终可见） */
.shell { display: block; min-height: 100dvh; padding-left: 236px; }
.shell > .main { min-width: 0; }

.sidebar {
  background: var(--side);
  color: var(--side-ink);
  display: flex;
  flex-direction: column;
  padding: 18px 14px;
  position: fixed;
  top: 0;
  left: 0;
  width: 236px;
  height: 100dvh;
  overflow-y: auto;
  z-index: 30;
}

.sidebar .brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 20px; color: #fff; }
.sidebar .brand svg { width: 30px; height: 30px; flex: none; }
.sidebar .brand b { font-size: 15px; letter-spacing: .02em; display: block; line-height: 1.25; }
.sidebar .brand small { display: block; color: var(--side-ink-2); font-size: 11px; letter-spacing: .08em; }

.nav-group { margin-bottom: 22px; }
.nav-group > .label {
  font-size: 10.5px; letter-spacing: .14em; color: var(--side-ink-2);
  padding: 0 10px; margin-bottom: 7px; text-transform: uppercase; font-weight: 700;
}

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 9px; color: var(--side-ink);
  cursor: pointer; font-size: 13.5px; border: 1px solid transparent;
  transition: background .15s, color .15s; width: 100%; text-align: left; background: none;
}
.nav-item svg { width: 17px; height: 17px; flex: none; opacity: .85; }
.nav-item:hover { background: rgba(255, 255, 255, .055); color: #fff; }
.nav-item.active { background: rgba(59, 108, 246, .18); color: #fff; border-color: rgba(120, 160, 255, .22); }
.nav-item.active svg { opacity: 1; color: #9dbaff; }
.nav-item .badge-count {
  margin-left: auto; font-size: 11px; padding: 1px 7px; border-radius: 20px;
  background: rgba(255, 255, 255, .1); color: #dbe4f5; font-variant-numeric: tabular-nums;
}

.sidebar .spacer { flex: 1; }

.side-user {
  border-top: 1px solid rgba(255, 255, 255, .08);
  padding-top: 14px; display: flex; align-items: center; gap: 10px;
}
.side-user .who { min-width: 0; flex: 1; }
.side-user .who b { display: block; color: #fff; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user .who span { font-size: 11.5px; color: var(--side-ink-2); }
.side-user .icon-btn { color: var(--side-ink-2); }
.side-user .icon-btn:hover { color: #fff; background: rgba(255, 255, 255, .08); }

/* ---------------- 主区 ---------------- */

.main { min-width: 0; display: flex; flex-direction: column; }

.topbar {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 28px; background: rgba(255, 255, 255, .86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 20;
}
.topbar h2 { font-size: 18px; }
.topbar .crumb { color: var(--ink-3); font-size: 13px; }
.topbar .grow { flex: 1; }
.topbar .period-chip {
  font-size: 12.5px; color: var(--ink-2); background: var(--panel-2);
  border: 1px solid var(--line); padding: 5px 11px; border-radius: 20px;
}

.page { padding: 24px 28px 56px; max-width: 1500px; width: 100%; }

/* ---------------- 通用组件 ---------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 8px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: var(--panel); color: var(--ink); font-weight: 550; font-size: 13.5px;
  cursor: pointer; transition: .15s; white-space: nowrap; min-height: 36px;
}
.btn svg { width: 15px; height: 15px; }
.btn:hover { border-color: #cfd7e6; background: #fbfcfe; }
.btn:active { transform: translateY(.5px); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-2); border-color: var(--brand-2); }
.btn.danger { color: var(--danger); border-color: #f3c6cc; background: #fff; }
.btn.danger:hover { background: var(--danger-soft); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--line-2); }
.btn.sm { padding: 5px 10px; min-height: 30px; font-size: 12.5px; border-radius: 8px; }
.btn.sm svg { width: 13px; height: 13px; }
.btn.block { width: 100%; }
.btn.lg { padding: 11px 18px; font-size: 14.5px; min-height: 44px; }

.icon-btn {
  display: inline-grid; place-items: center; width: 32px; height: 32px;
  border-radius: 8px; border: 0; background: transparent; color: var(--ink-3);
  cursor: pointer; transition: .15s;
}
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn:hover { background: var(--line-2); color: var(--ink); }

.input, .select, .textarea {
  width: 100%; padding: 8px 11px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  font-size: 13.5px; min-height: 36px; transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(59, 108, 246, .13);
}
.input::placeholder, .textarea::placeholder { color: #a7b2c4; }
.textarea { min-height: 76px; resize: vertical; line-height: 1.6; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%237d8aa0'%3E%3Cpath d='M5.2 7.4a1 1 0 0 1 1.4 0L10 10.8l3.4-3.4a1 1 0 1 1 1.4 1.4l-4.1 4.1a1 1 0 0 1-1.4 0L5.2 8.8a1 1 0 0 1 0-1.4z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 9px center; background-size: 17px; padding-right: 32px; }

.field { display: grid; gap: 6px; }
.field > label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); display: flex; gap: 5px; align-items: center; }
.field > label .req { color: var(--danger); }
.field > .hint { font-size: 11.5px; color: var(--ink-3); }
.field.row2 { grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid { display: grid; gap: 15px; }
.form-grid.two { grid-template-columns: 1fr 1fr; }

.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-head {
  display: flex; align-items: center; gap: 12px; padding: 15px 18px;
  border-bottom: 1px solid var(--line-2);
}
.card-head h3 { font-size: 14.5px; }
.card-head .sub { color: var(--ink-3); font-size: 12.5px; }
.card-head .grow { flex: 1; }
.card-body { padding: 18px; }

.stack-8 { display: grid; gap: 8px; }
.row { display: flex; align-items: center; gap: 9px; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; }

/* 统计卡 */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(178px, 1fr)); gap: 14px; }
.stat {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 15px 16px; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.stat .t { font-size: 12.5px; color: var(--ink-3); display: flex; align-items: center; gap: 7px; }
.stat .v { font-size: 26px; font-weight: 700; letter-spacing: -.02em; margin: 6px 0 2px; font-variant-numeric: tabular-nums; }
.stat .v small { font-size: 13px; font-weight: 500; color: var(--ink-3); margin-left: 3px; }
.stat .d { font-size: 12px; color: var(--ink-2); }
.stat .ic {
  position: absolute; right: 14px; top: 14px; width: 30px; height: 30px;
  border-radius: 9px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand);
}
.stat .ic svg { width: 16px; height: 16px; }
.stat.s-ok .ic { background: var(--ok-soft); color: var(--ok); }
.stat.s-warn .ic { background: var(--warn-soft); color: var(--warn); }
.stat.s-danger .ic { background: var(--danger-soft); color: var(--danger); }

.trend-up { color: var(--ok); font-weight: 600; }
.trend-down { color: var(--danger); font-weight: 600; }

/* 表格 */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data th {
  text-align: left; font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 700; padding: 10px 14px;
  border-bottom: 1px solid var(--line); background: var(--panel-2); white-space: nowrap;
}
table.data td { padding: 11px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.data tbody tr:hover { background: #fbfcfe; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.data td.actions { text-align: right; white-space: nowrap; }
table.data .muted { color: var(--ink-3); }
table.data tr.deleted { opacity: .5; }

.empty {
  padding: 48px 20px; text-align: center; color: var(--ink-3);
}
.empty svg { width: 38px; height: 38px; opacity: .35; margin-bottom: 10px; }
.empty b { display: block; color: var(--ink-2); font-size: 14px; margin-bottom: 4px; }
.empty p { font-size: 12.5px; }
.empty .btn { margin-top: 14px; }

/* 徽标 / 标签 */
.tag {
  display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600;
  padding: 2px 9px; border-radius: 20px; background: var(--line-2); color: var(--ink-2);
  white-space: nowrap;
}
.tag::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.tag.no-dot::before { display: none; }
.tag.ok { background: var(--ok-soft); color: #0b7a3c; }
.tag.warn { background: var(--warn-soft); color: #8a6100; }
.tag.danger { background: var(--danger-soft); color: #b02534; }
.tag.info { background: var(--brand-soft); color: #274cae; }
.tag.plain { background: var(--line-2); color: var(--ink-2); }
.tag.plain::before { display: none; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px;
  padding: 5px 11px; border-radius: 20px; border: 1px solid var(--line);
  background: #fff; color: var(--ink-2); cursor: pointer; transition: .15s; user-select: none;
}
.chip:hover { border-color: #cfd7e6; }
.chip.on { background: var(--brand-soft); border-color: #c9d9ff; color: #24479e; font-weight: 600; }

.avatar {
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  display: grid; place-items: center; font-size: 12.5px; font-weight: 700;
  background: var(--brand-soft); color: var(--brand); text-transform: uppercase;
}
.avatar.lg { width: 40px; height: 40px; border-radius: 11px; font-size: 15px; }
.avatar.green { background: var(--ok-soft); color: var(--ok); }
.avatar.orange { background: var(--warn-soft); color: var(--warn); }
.avatar.red { background: var(--danger-soft); color: var(--danger); }
.avatar.slate { background: var(--line-2); color: var(--ink-2); }

/* 进度条 */
.meter { height: 6px; border-radius: 4px; background: var(--line-2); overflow: hidden; min-width: 70px; }
.meter > i { display: block; height: 100%; border-radius: 4px; background: var(--brand); transition: width .4s; }
.meter.warn > i { background: var(--warn); }
.meter.danger > i { background: var(--danger); }
.meter.ok > i { background: var(--ok); }

/* 工具条 */
.toolbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 13px 16px; border-bottom: 1px solid var(--line-2);
}
.toolbar .search { position: relative; flex: 1; min-width: 180px; max-width: 320px; }
.toolbar .search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--ink-3); }
.toolbar .search .input { padding-left: 32px; }
.toolbar .sep { width: 1px; height: 20px; background: var(--line); }

/* 页头 */
.page-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head .grow { flex: 1; }
.page-head h1 { font-size: 22px; margin-bottom: 3px; }
.page-head p { color: var(--ink-3); font-size: 13px; }

/* 网格布局 */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: start; }
.grid-main-side { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mb-12 { margin-bottom: 12px; }

/* 排行榜 */
.rank-list { display: grid; gap: 2px; }
.rank-row { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-radius: 9px; }
.rank-row + .rank-row { border-top: 1px solid var(--line-2); }
.rank-row .n {
  width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center;
  font-size: 11.5px; font-weight: 700; background: var(--line-2); color: var(--ink-2); flex: none;
}
.rank-row:nth-child(1) .n { background: #fff3d1; color: #8a6100; }
.rank-row:nth-child(2) .n { background: #eef1f6; color: #5a6678; }
.rank-row:nth-child(3) .n { background: #fbe9dd; color: #9a5424; }
.rank-row .who { flex: 1; min-width: 0; }
.rank-row .who b { font-size: 13.5px; font-weight: 600; display: block; }
.rank-row .who span { font-size: 11.5px; color: var(--ink-3); }
.rank-row .amount { font-variant-numeric: tabular-nums; font-weight: 650; font-size: 13.5px; }
.rank-row .amount small { color: var(--ink-3); font-weight: 400; margin-left: 3px; }

/* 动态流 */
.feed { display: grid; gap: 0; }
.feed-item { display: flex; gap: 11px; padding: 10px 0; border-bottom: 1px solid var(--line-2); font-size: 13px; }
.feed-item:last-child { border-bottom: 0; }
.feed-item .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); margin-top: 7px; flex: none; }
.feed-item .body { min-width: 0; flex: 1; }
.feed-item .body b { font-weight: 600; }
.feed-item .time { color: var(--ink-3); font-size: 11.5px; white-space: nowrap; }

/* 柱状趋势图 */
.bars { display: flex; align-items: flex-end; gap: 14px; height: 122px; padding-top: 8px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 7px; height: 100%; justify-content: flex-end; }
.bar-col .pair { display: flex; align-items: flex-end; justify-content: center; gap: 5px; height: 86px; width: 100%; }
.bar-col .bar {
  width: 26px; max-width: 26px; border-radius: 7px 7px 3px 3px;
  background: linear-gradient(180deg, #6b93ff, var(--brand)); min-height: 3px;
  position: relative; transition: height .5s ease; cursor: default;
}
.bar-col .bar:hover { filter: brightness(1.08); }
.bar-col .bar.revenue { background: linear-gradient(180deg, #38c47c, var(--ok)); }
.bar-col .lbl { font-size: 11px; color: var(--ink-3); white-space: nowrap; }
.bar-col .val { font-size: 11.5px; font-weight: 650; color: var(--ink-2); font-variant-numeric: tabular-nums; }

/* 密码显示 */
.pw {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 12.5px; background: var(--panel-2);
  border: 1px dashed var(--line); border-radius: 7px; padding: 3px 8px; color: var(--ink);
}
.pw.blurred { letter-spacing: .12em; color: var(--ink-3); }
.pw .act { border: 0; background: none; cursor: pointer; color: var(--ink-3); padding: 0; display: grid; place-items: center; }
.pw .act:hover { color: var(--brand); }
.pw .act svg { width: 13px; height: 13px; }

/* 复选框 */
.check { display: inline-grid; place-items: center; }
.check input {
  appearance: none; width: 16px; height: 16px; border-radius: 4.5px;
  border: 1.5px solid #c6cfdd; background: #fff; cursor: pointer; margin: 0; transition: .15s;
}
.check input:checked { background: var(--brand); border-color: var(--brand); }
.check input:checked::after {
  content: ""; width: 8px; height: 4.5px; border-left: 2px solid #fff; border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translate(1px, -1px);
}

/* 弹窗 */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(13, 20, 34, .46);
  backdrop-filter: blur(2px); z-index: 100; display: grid; place-items: center;
  padding: 20px; animation: fade .14s ease;
}
@keyframes fade { from { opacity: 0; } }
.modal {
  background: #fff; border-radius: 14px; box-shadow: var(--shadow-lg);
  width: min(560px, 100%); max-height: calc(100dvh - 40px);
  display: flex; flex-direction: column; animation: pop .16s ease;
}
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.985); } }
.modal.wide { width: min(880px, 100%); }
.modal.narrow { width: min(440px, 100%); }
.modal-head { padding: 18px 20px 14px; border-bottom: 1px solid var(--line-2); display: flex; align-items: flex-start; gap: 12px; }
.modal-head h3 { font-size: 16px; }
.modal-head .sub { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.modal-head .grow { flex: 1; }
.modal-body { padding: 20px; overflow-y: auto; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--line-2); display: flex; gap: 9px; justify-content: flex-end; background: var(--panel-2); border-radius: 0 0 14px 14px; }

/* 凭证展示 */
.cred-box {
  background: #0f1626; color: #dbe6fb; border-radius: 10px; padding: 16px;
  font-family: var(--mono); font-size: 12.5px; line-height: 1.75; white-space: pre-wrap;
  word-break: break-all; max-height: 320px; overflow: auto; border: 1px solid #1d2940;
}
.cred-line { display: flex; gap: 10px; align-items: baseline; }
.cred-key { color: #7f8ea9; min-width: 4.5em; }
.cred-val { color: #fff; }
.cred-hl { color: #8fb0ff; }

.cred-card {
  border: 1px solid var(--line); border-radius: 10px; padding: 13px 15px;
  background: linear-gradient(180deg, #fff, #fafbfd); display: grid; gap: 5px;
}
.cred-card .top { display: flex; align-items: center; gap: 8px; }
.cred-card .top b { font-size: 13.5px; }
.cred-card .kv { display: grid; grid-template-columns: 62px 1fr; gap: 2px 10px; font-size: 12.5px; }
.cred-card .kv .k { color: var(--ink-3); }
.cred-card .kv .v { font-family: var(--mono); word-break: break-all; }

/* Toast */
.toast-wrap { position: fixed; top: 16px; right: 16px; z-index: 200; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast {
  background: #101725; color: #fff; padding: 10px 15px; border-radius: 10px;
  font-size: 13px; box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 9px;
  animation: slide .2s ease; max-width: 380px; pointer-events: auto;
}
@keyframes slide { from { opacity: 0; transform: translateX(14px); } }
.toast.ok { background: #0b6b39; }
.toast.err { background: #a51f30; }
.toast svg { width: 15px; height: 15px; flex: none; }
.toast.leaving { animation: fadeout .18s ease forwards; }
@keyframes fadeout { to { opacity: 0; transform: translateX(14px); } }

/* 加载骨架 */
.skeleton { background: linear-gradient(90deg, #eef1f7 25%, #f6f8fc 50%, #eef1f7 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 7px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.spinner {
  width: 16px; height: 16px; border: 2px solid rgba(255, 255, 255, .35);
  border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite;
}
.spinner.dark { border-color: #d5ddea; border-top-color: var(--brand); }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-row { padding: 34px; display: grid; place-items: center; }

/* 分段控件 */
.segmented { display: inline-flex; background: var(--line-2); padding: 3px; border-radius: 9px; gap: 2px; }
.segmented button {
  border: 0; background: none; padding: 5px 12px; border-radius: 7px; cursor: pointer;
  font-size: 12.5px; color: var(--ink-2); font-weight: 550;
}
.segmented button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(16, 23, 37, .09); }

/* 账号卡片（手机端友好视图） */
.acct-cards { display: none; }
.acct-card {
  border: 1px solid var(--line); border-radius: 11px; padding: 13px 14px;
  background: #fff; display: grid; gap: 9px;
}
.acct-card .top { display: flex; align-items: center; gap: 9px; }
.acct-card .top b { font-size: 14px; }
.acct-card .meta { display: flex; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--ink-3); }
.acct-card .row-kv { display: flex; gap: 8px; align-items: center; font-size: 12.5px; }
.acct-card .row-kv .k { color: var(--ink-3); min-width: 3.6em; }
.acct-card .foot { display: flex; gap: 6px; align-items: center; border-top: 1px solid var(--line-2); padding-top: 9px; flex-wrap: wrap; }
.acct-card .usage { display: grid; gap: 4px; }

/* 设置项 */
.setting-row { display: flex; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line-2); }
.setting-row:last-child { border-bottom: 0; }
.setting-row .info { flex: 1; min-width: 0; }
.setting-row .info b { font-size: 13.5px; display: block; }
.setting-row .info span { font-size: 12px; color: var(--ink-3); }
.setting-row .phone-note { font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); }

/* ---------------- 响应式 ---------------- */

@media (max-width: 1080px) {
  .grid-main-side, .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-brand { padding: 34px 26px; }
  .auth-brand h1 { font-size: 27px; margin: 24px 0 10px; }
  .auth-points { display: none; }
  .auth-form-side { padding: 26px 20px 40px; }

  .shell { display: block; padding-left: 0; }
  .sidebar {
    position: fixed; bottom: 0; left: 0; right: 0; top: auto; width: auto; height: auto;
    align-self: auto; flex-direction: row; align-items: center; padding: 6px 8px; overflow: visible;
    border-top: 1px solid rgba(255, 255, 255, .1); z-index: 50;
  }
  .sidebar .brand, .sidebar .nav-group > .label, .sidebar .spacer { display: none !important; }
  .sidebar .nav-group { display: contents; margin: 0; }
  .nav-item {
    flex-direction: column; gap: 2px; padding: 6px 3px; font-size: 10px;
    flex: 1; text-align: center; min-width: 0; border: 0;
  }
  .nav-item span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .nav-item .badge-count { display: none; }
  .nav-item:hover { background: none; }
  .side-user { border: 0; padding: 0; gap: 0; flex: none; }
  .side-user .who { display: none; }
  .side-user .icon-btn { width: 34px; height: 34px; }
  .sidebar > #po-nav { display: contents; }
  .main { padding-bottom: 68px; }
  .topbar { padding: 12px 16px; }
  .page { padding: 18px 16px 40px; }

  .form-grid.two { grid-template-columns: 1fr; }
  .auth-card h2 { font-size: 22px; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat .v { font-size: 21px; }
  .modal { width: 100%; }
  .modal-foot { flex-wrap: wrap; }
  .modal-foot .btn { flex: 1; }
  table.data th, table.data td { padding: 9px 10px; }
}

@media (max-width: 460px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .stat .ic { display: none; }
  .page-head h1 { font-size: 19px; }
}

@media (max-width: 760px) {
  .data-table-view { display: none !important; }
  .acct-cards { display: grid !important; gap: 10px; padding: 12px; }
}

/* 打印 */
@media print {
  .sidebar, .topbar, .btn, .toolbar { display: none !important; }
  .shell { grid-template-columns: 1fr; }
  .page { padding: 0; }
  .card { box-shadow: none; }
}
