:root {
  --bg: #f3f5f9;
  --surface: #ffffff;
  --ink: #17203a;
  --ink-2: #3b4763;
  --muted: #77839b;
  --line: #e6eaf3;
  --line-2: #d8dfec;
  --brand: #3b5bfd;
  --brand-2: #2f49d6;
  --brand-soft: #edf0ff;
  --sidebar: #131a2b;
  --sidebar-2: #1b2439;
  --green: #0e9f6e;
  --green-soft: #e6f7f0;
  --amber: #d97706;
  --amber-soft: #fff3e2;
  --purple: #7c3aed;
  --purple-soft: #f1ebff;
  --red: #dc2626;
  --red-soft: #fdeeee;
  --slate: #64748b;
  --slate-soft: #eef1f6;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(23, 32, 58, 0.04), 0 8px 24px rgba(23, 32, 58, 0.06);
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.18);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
.hide { display: none !important; }
.muted { color: var(--muted); }
.right { text-align: right; }
.mono { font-variant-numeric: tabular-nums; }

/* 登录页 */
.login-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  background: #fff;
}
.login-art {
  position: relative;
  overflow: hidden;
  padding: 56px 56px 40px;
  color: #eef2ff;
  background:
    radial-gradient(900px 520px at 12% 8%, #2c3d8f 0%, rgba(28, 40, 95, 0) 62%),
    radial-gradient(700px 520px at 92% 92%, #1b6f7a 0%, rgba(20, 70, 80, 0) 60%),
    linear-gradient(150deg, #101630 0%, #18224a 48%, #0e1626 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.login-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), transparent 86%);
  pointer-events: none;
}
.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: 16px;
}
.brand-mark .dot {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #6d84ff, #3b5bfd);
  display: grid; place-items: center;
  font-size: 15px;
  color: #fff;
  box-shadow: 0 6px 18px rgba(59, 91, 253, 0.4);
}
.login-art h1 {
  position: relative;
  z-index: 1;
  margin: 0 0 18px;
  font-size: 38px;
  line-height: 1.28;
  letter-spacing: -0.01em;
}
.login-art p {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: 460px;
  color: rgba(226, 233, 255, 0.72);
  line-height: 1.85;
  font-size: 14px;
}
.login-art .art-foot {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 26px;
  color: rgba(226, 233, 255, 0.55);
  font-size: 12px;
  letter-spacing: 0.04em;
}
.login-art .art-foot span { display: flex; align-items: center; gap: 8px; }
.login-art .art-foot i { width: 5px; height: 5px; border-radius: 50%; background: #6d84ff; display: inline-block; }
.login-panel {
  display: grid;
  place-items: center;
  padding: 40px;
  background: #fff;
}
.login-card { width: 100%; max-width: 380px; }
.login-card h2 { margin: 0 0 6px; font-size: 24px; letter-spacing: -0.01em; }
.login-card .sub { margin: 0 0 30px; color: var(--muted); font-size: 13px; }
.login-card .field { margin-bottom: 18px; }
.login-card .btn-primary { width: 100%; height: 46px; font-size: 15px; margin-top: 6px; }
.login-tip {
  margin-top: 22px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #f6f8fd;
  border: 1px solid #e8ecf7;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.7;
}
.login-error { min-height: 20px; color: var(--red); font-size: 12.5px; margin-top: 10px; }

/* 布局 */
.app-shell {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  background: linear-gradient(180deg, var(--sidebar) 0%, #0f1626 100%);
  color: #b9c2d8;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 30;
}
.sidebar .brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 22px 22px 20px;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.sidebar .brand .dot {
  width: 32px; height: 32px; border-radius: 9px;
  background: linear-gradient(135deg, #6d84ff, #3b5bfd);
  display: grid; place-items: center;
  font-size: 13px;
  box-shadow: 0 6px 18px rgba(59, 91, 253, 0.35);
}
.sidebar .brand small { display: block; font-size: 10.5px; color: #7f8bae; font-weight: 500; letter-spacing: 0.06em; }
.nav { padding: 6px 12px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; flex: 1; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 12px;
  border-radius: 9px;
  color: #a9b3ca;
  font-size: 13.5px;
  cursor: pointer;
  transition: background 0.16s, color 0.16s;
  border: 0;
  background: transparent;
  text-align: left;
  width: 100%;
}
.nav-item svg { width: 17px; height: 17px; flex: none; opacity: 0.8; }
.nav-item:hover { background: rgba(255, 255, 255, 0.05); color: #e8ecff; }
.nav-item.active {
  background: linear-gradient(90deg, rgba(59, 91, 253, 0.22), rgba(59, 91, 253, 0.05));
  color: #fff;
  box-shadow: inset 2px 0 0 #6d84ff;
}
.nav-item.active svg { opacity: 1; }
.nav-group { margin: 14px 12px 6px; font-size: 11px; letter-spacing: 0.1em; color: #6c7796; }
.sidebar-foot {
  padding: 14px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 11.5px;
  color: #6c7796;
}
.main { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 26px;
  background: rgba(243, 245, 249, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(230, 234, 243, 0.9);
}
.topbar h1 { font-size: 19px; margin: 0; letter-spacing: -0.01em; }
.topbar .crumb { color: var(--muted); font-size: 12px; margin-top: 3px; }
.topbar .spacer { flex: 1; }
.user-chip {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 12px 6px 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 1px 2px rgba(23, 32, 58, 0.04);
}
.avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, #e7ecff, #ccd7ff);
  color: #3b4a86;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 700;
}
.user-chip .meta { line-height: 1.25; }
.user-chip .meta b { display: block; font-size: 12.5px; font-weight: 600; }
.user-chip .meta span { font-size: 11px; color: var(--muted); }
.view { padding: 22px 26px 60px; }

/* 通用块 */
.page-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head .titles h2 { margin: 0 0 4px; font-size: 17px; }
.page-head .titles p { margin: 0; color: var(--muted); font-size: 12.5px; }
.page-head .actions { margin-left: auto; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card + .card { margin-top: 16px; }
.card-head {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 12px;
}
.card-head h3 { margin: 0; font-size: 14.5px; }
.card-head .sub { color: var(--muted); font-size: 12px; }
.card-head .right { margin-left: auto; }
.card-body { padding: 18px; }
.card-body.tight { padding: 0; }

.grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.stat {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.stat .label { color: var(--muted); font-size: 12.5px; display: flex; align-items: center; gap: 8px; }
.stat .value { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; margin-top: 8px; font-variant-numeric: tabular-nums; }
.stat .value small { font-size: 14px; font-weight: 500; color: var(--muted); margin-left: 4px; }
.stat .hint { color: var(--muted); font-size: 12px; margin-top: 6px; }
.stat::after {
  content: ""; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px;
  border-radius: 50%; background: var(--brand-soft); opacity: 0.6;
}
.stat.green::after { background: var(--green-soft); }
.stat.amber::after { background: var(--amber-soft); }
.stat.purple::after { background: var(--purple-soft); }

/* 按钮 */
.btn {
  appearance: none;
  border: 1px solid var(--line-2);
  background: #fff;
  color: var(--ink-2);
  height: 36px;
  padding: 0 15px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn:hover { border-color: #c7d0e4; background: #fafbff; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn svg { width: 15px; height: 15px; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 6px 14px rgba(59, 91, 253, 0.22); }
.btn-primary:hover { background: var(--brand-2); border-color: var(--brand-2); }
.btn-danger { color: var(--red); border-color: #f3c9c9; background: #fff; }
.btn-danger:hover { background: var(--red-soft); border-color: #eeb4b4; }
.btn-ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn-ghost:hover { background: #eef1f8; color: var(--ink-2); }
.btn-sm { height: 30px; padding: 0 11px; font-size: 12.5px; border-radius: 7px; }
.btn-block { width: 100%; justify-content: center; }
.btn-link { border: 0; background: none; color: var(--brand); cursor: pointer; font-size: 12.5px; padding: 2px 4px; }
.btn-link:hover { text-decoration: underline; }
.btn-link.danger { color: var(--red); }

/* 表单 */
.field { display: flex; flex-direction: column; gap: 7px; }
.field > label { font-size: 12.5px; color: var(--ink-2); font-weight: 500; }
.field .req { color: var(--red); margin-left: 2px; }
.field .tip { font-size: 11.5px; color: var(--muted); }
.input, .select, .textarea {
  width: 100%;
  border: 1px solid var(--line-2);
  background: #fff;
  border-radius: 9px;
  padding: 9px 12px;
  font-size: 13.5px;
  color: var(--ink);
  font-family: inherit;
  transition: border 0.15s, box-shadow 0.15s;
  height: 38px;
}
.textarea { height: auto; min-height: 76px; resize: vertical; line-height: 1.6; }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(59, 91, 253, 0.12);
}
.input::placeholder, .textarea::placeholder { color: #a7b0c4; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid .span-2 { grid-column: span 2; }
.form-grid .span-3 { grid-column: span 3; }
.form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.inline { display: flex; gap: 10px; align-items: center; }
.switch { position: relative; width: 42px; height: 24px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span {
  position: absolute; inset: 0; background: #d6dbe8; border-radius: 999px; cursor: pointer; transition: 0.2s;
}
.switch span::after {
  content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; top: 3px; left: 3px; transition: 0.2s; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
}
.switch input:checked + span { background: var(--brand); }
.switch input:checked + span::after { transform: translateX(18px); }

/* 工具栏 / 搜索 / 标签 */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.search { position: relative; }
.search .input { padding-left: 34px; width: 240px; }
.search svg { position: absolute; left: 11px; top: 11px; width: 16px; height: 16px; opacity: 0.45; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line-2); background: #fff; color: var(--muted);
  border-radius: 999px; padding: 5px 12px; font-size: 12.5px; cursor: pointer;
}
.chip:hover { color: var(--ink-2); border-color: #c7d0e4; }
.chip.active { background: var(--brand-soft); border-color: #c8d2ff; color: var(--brand-2); font-weight: 600; }

/* 表格 */
.table-wrap { width: 100%; overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th {
  text-align: left; font-weight: 600; color: var(--muted); font-size: 12px;
  padding: 12px 14px; border-bottom: 1px solid var(--line); background: #fafbff;
  white-space: nowrap;
}
.tbl td { padding: 13px 14px; border-bottom: 1px solid #f0f3f9; vertical-align: middle; }
.tbl tbody tr { transition: background 0.12s; }
.tbl tbody tr:hover { background: #fafbff; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl .order-no { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tbl .customer { font-weight: 600; }
.tbl .actions { white-space: nowrap; text-align: right; }
.tbl .amount { font-weight: 600; font-variant-numeric: tabular-nums; }

.empty { padding: 52px 20px; text-align: center; color: var(--muted); font-size: 13px; }
.empty .big { font-size: 38px; opacity: 0.25; margin-bottom: 10px; }
.pagination { display: flex; align-items: center; gap: 8px; justify-content: flex-end; padding: 12px 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12.5px; }

/* 状态徽章 */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  border-radius: 999px; padding: 3px 9px; font-size: 12px; font-weight: 500;
  background: var(--slate-soft); color: var(--slate); white-space: nowrap;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.75; }
.badge.pending { background: var(--amber-soft); color: var(--amber); }
.badge.active { background: var(--green-soft); color: var(--green); }
.badge.settle_pending { background: var(--purple-soft); color: var(--purple); }
.badge.settled { background: var(--slate-soft); color: var(--slate); }
.badge.rejected { background: var(--red-soft); color: var(--red); }
.badge.deleted { background: #fff1f1; color: #b91c1c; }
.badge.soft-blue { background: var(--brand-soft); color: var(--brand-2); }
.badge.outline { background: #fff; border: 1px solid var(--line-2); }
.badge.sm { font-size: 11px; padding: 2px 7px; }

/* 弹窗 */
.overlay {
  position: fixed; inset: 0; background: rgba(14, 20, 38, 0.48);
  backdrop-filter: blur(3px); z-index: 100;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 6vh 16px; overflow-y: auto;
  animation: fade 0.18s ease;
}
.modal {
  width: 520px; max-width: 100%; background: #fff; border-radius: 14px;
  box-shadow: var(--shadow-lg); animation: pop 0.2s ease;
  overflow: hidden;
}
.modal.wide { width: 760px; }
.modal.xwide { width: 900px; }
.modal-head {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 18px 20px 14px; border-bottom: 1px solid var(--line);
}
.modal-head h3 { margin: 0; font-size: 16px; }
.modal-head p { margin: 4px 0 0; font-size: 12px; color: var(--muted); }
.modal-head .close {
  margin-left: auto; border: 0; background: none; font-size: 20px; line-height: 1;
  color: var(--muted); cursor: pointer; padding: 2px 6px; border-radius: 6px;
}
.modal-head .close:hover { background: #f1f4fa; color: var(--ink); }
.modal-body { padding: 20px; max-height: 72vh; overflow-y: auto; }
.modal-foot {
  display: flex; gap: 10px; justify-content: flex-end;
  padding: 14px 20px; border-top: 1px solid var(--line); background: #fbfcff;
}
@keyframes pop { from { transform: translateY(8px) scale(0.985); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* 详情 */
.detail-head { display: flex; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.detail-head .amount { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.detail-head .amount small { font-size: 12px; color: var(--muted); font-weight: 400; margin-right: 6px; }
.kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; }
.kv .item { display: flex; gap: 8px; font-size: 13px; line-height: 1.6; }
.kv .item .k { color: var(--muted); flex: none; width: 76px; }
.kv .item .v { color: var(--ink); word-break: break-all; }
.section-title { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin: 22px 0 10px; }
.section-title::after { content: ""; height: 1px; background: var(--line); flex: 1; }

.photo-grid { display: flex; gap: 10px; flex-wrap: wrap; }
.photo-grid .thumb {
  width: 92px; height: 92px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line);
  cursor: zoom-in; background: #f4f6fb;
}
.photo-grid .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-grid .add {
  width: 92px; height: 92px; border-radius: 8px; border: 1px dashed #c9d2e6;
  display: grid; place-items: center; color: var(--muted); cursor: pointer; font-size: 12px; gap: 4px;
  background: #fbfcff;
}
.photo-grid .add:hover { border-color: var(--brand); color: var(--brand); }
.photo-grid .thumb .del {
  position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border-radius: 50%;
  background: rgba(15, 23, 42, 0.62); color: #fff; border: 0; font-size: 11px; cursor: pointer; line-height: 1;
}
.photo-grid .thumb { position: relative; }

/* 时间线 */
.timeline { position: relative; margin: 0; padding: 2px 0 2px 22px; list-style: none; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 1px; background: var(--line-2); }
.timeline li { position: relative; padding: 0 0 16px; font-size: 12.5px; color: var(--ink-2); }
.timeline li::before {
  content: ""; position: absolute; left: -22px; top: 5px; width: 8px; height: 8px;
  border-radius: 50%; background: #fff; border: 2px solid #c3cce0;
}
.timeline li:first-child::before { border-color: var(--brand); background: var(--brand); }
.timeline li:last-child { padding-bottom: 2px; }
.timeline .meta { color: var(--muted); font-size: 11.5px; margin-top: 3px; }
.timeline .note { color: var(--muted); margin-top: 2px; }
.timeline .due { color: var(--brand-2); font-variant-numeric: tabular-nums; }

/* 提示 */
#toast-root { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  background: #17203a; color: #fff; padding: 10px 16px; border-radius: 9px; font-size: 13px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.28); animation: pop 0.2s ease; max-width: 80vw;
}
.toast.error { background: #a51f1f; }
.toast.success { background: #0b7a52; }

/* 加载 */
.loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 46px; color: var(--muted); font-size: 13px; }
.spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid #d6dded; border-top-color: var(--brand);
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 分组统计 */
.store-card { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 12px; overflow: hidden; background: #fff; }
.store-card .head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: #fafbff; cursor: pointer; }
.store-card .head .name { font-weight: 600; font-size: 13.5px; }
.store-card .head .nums { margin-left: auto; display: flex; gap: 20px; font-size: 12.5px; color: var(--muted); }
.store-card .head .nums b { color: var(--ink); font-variant-numeric: tabular-nums; }
.store-card .body { padding: 0; }
.store-card.collapsed .body { display: none; }

/* 通知记录 */
.log-list { display: flex; flex-direction: column; }
.log-row { display: flex; gap: 12px; padding: 12px 18px; border-bottom: 1px solid #f1f4fa; align-items: flex-start; }
.log-row:last-child { border-bottom: 0; }
.log-row .dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 5px; flex: none; background: var(--slate); }
.log-row .dot.sent { background: var(--green); }
.log-row .dot.failed { background: var(--red); }
.log-row .dot.skipped { background: #cbd3e4; }
.log-row .body { flex: 1; min-width: 0; }
.log-row .t { font-size: 12.5px; font-weight: 600; }
.log-row .c { font-size: 12px; color: var(--muted); margin-top: 2px; word-break: break-all; }
.log-row .time { font-size: 11.5px; color: #9aa3b8; white-space: nowrap; }

/* 图片预览 */
.lightbox { position: fixed; inset: 0; background: rgba(8, 12, 24, 0.86); z-index: 300; display: grid; place-items: center; cursor: zoom-out; }
.lightbox img { max-width: 92vw; max-height: 90vh; border-radius: 8px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5); }

/* 个人页 */
.profile-grid { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 16px; align-items: start; }
.profile-card { text-align: center; padding: 28px 20px; }
.profile-card .avatar-lg {
  width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 14px;
  background: linear-gradient(135deg, #e7ecff, #c7d3ff); color: #33427d;
  display: grid; place-items: center; font-size: 24px; font-weight: 700;
}
.profile-card h3 { margin: 0 0 4px; font-size: 16px; }
.profile-card .role { font-size: 12px; color: var(--muted); }

/* 分栏 */
.split { display: grid; grid-template-columns: 1fr 320px; gap: 16px; align-items: start; }

@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .login-wrap { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 240px; transform: translateX(-104%); transition: transform 0.2s; }
  .sidebar.open { transform: none; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3); }
  .topbar { padding: 12px 16px; }
  .view { padding: 16px; }
  .grid-3 { grid-template-columns: 1fr; }
  .form-grid, .form-grid-3, .kv { grid-template-columns: 1fr; }
  .form-grid .span-2, .form-grid .span-3 { grid-column: span 1; }
  .profile-grid { grid-template-columns: 1fr; }
  .nav-item { padding: 12px; }
  .menu-btn { display: inline-flex !important; }
}
.menu-btn { display: none; }
