:root {
  --bg: #f7f4ed;
  --panel: #fffdf8;
  --panel-2: #fbf8f1;
  --line: #e7dfd0;
  --line-strong: #d6c9b5;
  --ink: #21362d;
  --ink-2: #455b50;
  --muted: #7f8c83;
  --accent: #256b53;
  --accent-2: #174d3b;
  --accent-soft: #e8f2ea;
  --accent-line: #c8dccf;
  --danger: #b94343;
  --danger-soft: #fdeeee;
  --gold: #9a762d;
  --ok: #2f7a58;
  --ok-soft: #e7f4ed;
  --shadow: 0 12px 34px rgba(45, 62, 48, .08);
  --radius: 16px;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

/* ---------- 登录 ---------- */
.login-screen {
  position: fixed; inset: 0; display: grid; place-items: center;
  background: #eef4f5; overflow: hidden;
}
.login-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(900px 520px at 8% 4%, rgba(90, 150, 158, .22), transparent 62%),
    radial-gradient(800px 500px at 94% 90%, rgba(148, 177, 160, .25), transparent 60%),
    linear-gradient(135deg, #eef5f5 0%, #f6f8f4 55%, #eaf1f4 100%);
}
.login-bg::after {
  content: ""; position: absolute; inset: 0; opacity: .35;
  background-image: radial-gradient(rgba(63, 118, 131, .18) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: linear-gradient(120deg, #000, transparent 70%);
}
.login-card {
  position: relative; width: 420px; max-width: calc(100vw - 40px);
  background: rgba(255,255,255,.88); backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 20px; padding: 34px 34px 26px;
  box-shadow: 0 30px 70px rgba(37, 76, 86, .18);
}
.login-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 28px; }
.login-brand img { width: 54px; height: 54px; border-radius: 15px; background: #fff; object-fit: contain; box-shadow: 0 6px 16px rgba(40,80,90,.12); }
.login-brand h1 { margin: 0; font-size: 23px; letter-spacing: .5px; }
.login-brand p { margin: 4px 0 0; color: var(--muted); font-size: 12.5px; }
.field-label { display: block; margin: 0 0 7px; color: var(--ink-2); font-size: 12.5px; font-weight: 600; }
.input {
  width: 100%; height: 42px; border: 1px solid var(--line-strong); background: #fff;
  border-radius: 9px; padding: 0 12px; color: var(--ink); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(63,118,131,.12); }
.login-card .btn { margin-top: 16px; height: 44px; }
.btn-block { width: 100%; }
.login-tip { margin-top: 14px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.login-tip code { background: #eef4f5; border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; color: var(--accent-2); }
.form-error { margin-top: 10px; color: var(--danger); background: var(--danger-soft); border: 1px solid #f3cccc; border-radius: 8px; padding: 8px 10px; font-size: 12.5px; }

/* ---------- 框架 ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 238px; flex: 0 0 238px; position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; padding: 22px 16px 16px;
  background: linear-gradient(180deg, #173d31 0%, #1b4a3a 52%, #133428 100%);
  color: #dce9e9;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 0 8px 22px; border-bottom: 1px solid rgba(255,255,255,.09); }
.brand img { width: 40px; height: 40px; border-radius: 11px; background: #fff; object-fit: contain; }
.brand strong { display: block; font-size: 15px; color: #f3fbfa; letter-spacing: .3px; }
.brand span { display: block; margin-top: 3px; font-size: 11px; color: #91b4b6; letter-spacing: 1.5px; }
.nav { display: flex; flex-direction: column; gap: 3px; padding-top: 18px; overflow: auto; }
.nav-item {
  display: flex; align-items: center; gap: 11px; height: 42px; padding: 0 13px;
  border-radius: 9px; color: #b7cdcd; font-size: 13.5px; transition: all .15s;
}
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item.active { background: rgba(224, 197, 141, .15); color: #fff; box-shadow: inset 3px 0 0 #e0c58d; }
.nav-ico { width: 18px; text-align: center; font-size: 15px; opacity: .9; }
.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; padding-top: 16px; }
.server-state { display: flex; align-items: center; gap: 8px; color: #a9c3c2; font-size: 12px; padding: 0 8px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #62d39a; box-shadow: 0 0 0 3px rgba(98,211,154,.16); }
.mini-link { display: block; color: #8fb5b6; font-size: 12px; padding: 4px 8px; }
.mini-link:hover { color: #e8f6f4; }
.sidebar .btn-ghost { color: #cfe0df; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.03); margin-top: 4px; }
.sidebar .btn-ghost:hover { background: rgba(255,255,255,.08); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 86px; border-top: 3px solid #d7b47a; flex: 0 0 86px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 30px; background: rgba(247,244,237,.88); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20;
}
.topbar h2 { margin: 0; font-size: 21px; letter-spacing: .3px; }
.topbar p { margin: 5px 0 0; color: var(--muted); font-size: 12.5px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.admin-chip { display: flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; background: #fff; border: 1px solid var(--line); border-radius: 999px; font-size: 12.5px; color: var(--ink-2); }
.avatar { width: 27px; height: 27px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-2); font-size: 12px; font-weight: 700; object-fit: cover; }
img.avatar { border: 1px solid var(--line); }
.view { padding: 24px 30px 46px; max-width: 1480px; width: 100%; }

/* ---------- 通用组件 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line-strong);
  background: #fff; color: var(--ink-2); font-size: 13px; white-space: nowrap;
  transition: background .15s, border-color .15s, opacity .15s, transform .05s;
}
.btn:hover { background: #f6fafb; border-color: #b9cbd3; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 4px 12px rgba(63,118,131,.2); }
.btn-primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn-white { background: #fff; }
.btn-danger { background: #fff; border-color: #ebc4c4; color: var(--danger); }
.btn-danger:hover { background: var(--danger-soft); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-sm { height: 31px; padding: 0 10px; font-size: 12.5px; border-radius: 7px; }
.btn-xs { height: 26px; padding: 0 8px; font-size: 12px; border-radius: 6px; }
.icon-btn { width: 34px; height: 34px; padding: 0; border-radius: 8px; }
.badge { display: inline-flex; align-items: center; height: 23px; padding: 0 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; letter-spacing: .2px; }
.badge-soft { background: #fff; border: 1px solid var(--line); color: var(--muted); font-weight: 500; }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-draft { background: #f3f0e7; color: var(--gold); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-accent { background: var(--accent-soft); color: var(--accent-2); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-head { background: linear-gradient(90deg, rgba(255,252,245,.96), rgba(249,245,234,.55)); border-radius: var(--radius) var(--radius) 0 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; padding: 17px 20px; border-bottom: 1px solid var(--line); }
.card-head h3 { margin: 0; font-size: 15px; }
.card-head p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.card-body { padding: 20px; }
.section-gap { height: 18px; }
.grid-2 { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(0,1fr); gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
.muted { color: var(--muted); }
.mono { font-family: "Cascadia Code", Consolas, monospace; font-size: 12px; }
.row { display: flex; align-items: center; gap: 10px; }
.spacer { flex: 1; }
.empty { padding: 46px 20px; text-align: center; color: var(--muted); font-size: 13px; }
.empty .big { display: block; font-size: 30px; margin-bottom: 10px; opacity: .35; }

/* ---------- 总览 ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin-bottom: 18px; }
.stat { position: relative; overflow: hidden; padding: 18px 18px 16px; background: linear-gradient(135deg, #fffdf8 0%, #fbf4e5 100%); border: 1px solid var(--line); border-radius: 13px; box-shadow: var(--shadow); }
.stat::after { content: ""; position: absolute; right: -24px; top: -30px; width: 92px; height: 92px; border-radius: 50%; background: var(--accent-soft); opacity: .55; }
.stat .label { color: var(--muted); font-size: 12px; }
.stat .value { margin-top: 9px; font-size: 28px; font-weight: 700; letter-spacing: -.5px; }
.stat .foot { margin-top: 8px; font-size: 11.5px; color: var(--muted); }
.stat .foot b { color: var(--accent-2); font-weight: 600; }
.quick-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.recent-list { display: flex; flex-direction: column; }
.recent-item { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-top: 1px solid #eef3f5; }
.recent-item:first-child { border-top: 0; }
.recent-item .title { font-size: 13px; font-weight: 600; }
.recent-item .sub { margin-top: 3px; color: var(--muted); font-size: 11.5px; }
.recent-item .when { margin-left: auto; color: var(--muted); font-size: 11.5px; white-space: nowrap; }

/* ---------- 工具条 / 表格 ---------- */
.toolbar { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .input, .toolbar select { height: 35px; width: auto; min-width: 150px; }
.toolbar .search { min-width: 240px; }
.select {
  height: 35px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff;
  padding: 0 30px 0 10px; color: var(--ink-2); outline: none; appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #7d8f98 50%), linear-gradient(135deg, #7d8f98 50%, transparent 50%);
  background-position: calc(100% - 15px) 15px, calc(100% - 10px) 15px;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 11.5px; font-weight: 600; color: var(--muted); padding: 11px 14px; border-bottom: 1px solid var(--line); background: #fafcfd; white-space: nowrap; }
td { padding: 12px 14px; border-bottom: 1px solid #eef3f5; font-size: 13px; vertical-align: middle; }
tbody tr:hover { background: #fafcfd; }
tbody tr:last-child td { border-bottom: 0; }
.song-cell { display: flex; align-items: center; gap: 11px; min-width: 220px; }
.song-ico { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-2); font-size: 15px; flex: 0 0 auto; }
.song-cell .name { font-weight: 600; }
.song-cell .artist { color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.table-actions { display: flex; gap: 5px; justify-content: flex-end; white-space: nowrap; }
.checkbox { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }
.bulkbar { display: flex; align-items: center; gap: 9px; padding: 10px 16px; background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: 10px; margin-bottom: 12px; font-size: 12.5px; color: var(--accent-2); }
.pagination { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 14px 18px; border-top: 1px solid var(--line); }
.pagination .page-info { color: var(--muted); font-size: 12px; margin-right: auto; }

/* ---------- 弹窗 ---------- */
.modal-layer { position: fixed; inset: 0; background: rgba(18, 38, 45, .45); backdrop-filter: blur(3px); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 26px; }
.modal { width: 620px; max-width: 100%; max-height: calc(100vh - 52px); display: flex; flex-direction: column; background: #fff; border-radius: 16px; box-shadow: 0 30px 80px rgba(15,40,50,.25); animation: pop .16s ease-out; }
.modal.wide { width: 900px; }
@keyframes pop { from { transform: translateY(8px) scale(.99); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head { display: flex; align-items: center; padding: 18px 22px; 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-close { margin-left: auto; width: 30px; height: 30px; border: 0; border-radius: 8px; background: transparent; font-size: 18px; color: var(--muted); }
.modal-close:hover { background: #f1f5f6; color: var(--ink); }
.modal-body { padding: 20px 22px; overflow: auto; }
.modal-foot { display: flex; align-items: center; justify-content: flex-end; gap: 9px; padding: 15px 22px; border-top: 1px solid var(--line); background: #fbfcfd; border-radius: 0 0 16px 16px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.form-row { display: flex; flex-direction: column; gap: 6px; }
.form-row label { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.form-row .hint { font-size: 11.5px; color: var(--muted); font-weight: 400; }
.form-row input, .form-row select, .form-row textarea {
  width: 100%; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff;
  padding: 9px 11px; color: var(--ink); outline: none; font-size: 13px;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(63,118,131,.1); }
.form-row textarea { resize: vertical; min-height: 120px; line-height: 1.75; }
.score-editor { font-family: "Cascadia Code", Consolas, monospace; font-size: 13px; line-height: 1.9; }
.token-bar { display: flex; flex-wrap: wrap; gap: 5px; margin: 4px 0 2px; }
.token { min-width: 27px; height: 27px; padding: 0 7px; border: 1px solid var(--line); background: var(--panel-2); border-radius: 6px; font-family: Consolas, monospace; font-size: 12px; color: var(--ink-2); }
.token:hover { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-2); }
.score-meta { display: flex; gap: 14px; color: var(--muted); font-size: 11.5px; margin-top: 6px; }
.switch { position: relative; width: 40px; height: 22px; flex: 0 0 auto; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #ccd8dd; border-radius: 999px; transition: .15s; }
.switch span::after { content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; border-radius: 50%; background: #fff; transition: .15s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(18px); }
.check-row { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--ink-2); }

/* ---------- 版本 ---------- */
.upload-card { border: 1px dashed var(--accent-line); background: linear-gradient(180deg,#fbfdfd,#f4f9f9); }
.upload-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.file-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; min-height: 112px; border: 1px dashed var(--line-strong); border-radius: 10px; background: #fff; color: var(--muted); font-size: 12px; cursor: pointer; text-align: center; padding: 12px; }
.file-drop:hover { border-color: var(--accent); color: var(--accent-2); }
.file-drop b { color: var(--ink-2); font-size: 13px; }
.release-list { display: flex; flex-direction: column; }
.release-item { display: flex; align-items: center; gap: 16px; padding: 16px 20px; border-top: 1px solid #eef3f5; }
.release-item:first-child { border-top: 0; }
.rel-ver { width: 74px; height: 52px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-2); font-weight: 700; font-size: 14px; }
.rel-main { min-width: 0; flex: 1; }
.rel-main .name { font-weight: 600; font-size: 13.5px; }
.rel-main .notes { color: var(--muted); font-size: 12px; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rel-meta { display: flex; gap: 14px; color: var(--muted); font-size: 11.5px; margin-top: 5px; }

/* ---------- 密码 ---------- */
.pass-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; }
.pass-card { padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); }
.pass-card h4 { margin: 0 0 10px; font-size: 13px; display: flex; align-items: center; gap: 7px; }
.pass-card input { width: 100%; height: 44px; text-align: center; font-size: 21px; letter-spacing: 5px; font-family: Consolas, monospace; border: 1px solid var(--line-strong); border-radius: 9px; background: #fff; color: var(--accent-2); outline: none; }
.pass-card input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(63,118,131,.1); }
.pass-preview { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 16px; }
.pass-pill { padding: 7px 11px; background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: 8px; font-size: 12px; color: var(--accent-2); }

/* ---------- 需求 / 激活码 ---------- */
.request-list { display: flex; flex-direction: column; }
.request-item { padding: 16px 20px; border-top: 1px solid #eef3f5; }
.request-item:first-child { border-top: 0; }
.request-item .content { font-size: 13.5px; line-height: 1.75; white-space: pre-wrap; word-break: break-word; }
.request-meta { display: flex; align-items: center; gap: 10px; margin-top: 9px; color: var(--muted); font-size: 11.5px; }
.request-actions { display: flex; gap: 6px; margin-left: auto; }
.code-cell { font-family: Consolas, monospace; letter-spacing: .6px; color: var(--accent-2); font-weight: 600; }
.copy-btn { border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 2px 5px; border-radius: 4px; }
.copy-btn:hover { background: var(--accent-soft); color: var(--accent-2); }

/* ---------- 设置 ---------- */
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.settings-card { padding: 20px; }
.settings-card h3 { margin: 0 0 14px; font-size: 15px; }
.settings-card .form-row { margin-bottom: 12px; }
.ad-preview { border-radius: 10px; overflow: hidden; background: linear-gradient(90deg,#0f2433,#1d3f52); color: #fff; padding: 18px; }
.ad-preview .t { font-size: 17px; font-weight: 700; }
.ad-preview .s { margin-top: 5px; color: #b9d3df; font-size: 12px; }
.ad-preview .b { display: inline-flex; margin-top: 10px; padding: 6px 12px; background: #2f8cff; border-radius: 999px; font-size: 12px; }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%); z-index: 300; padding: 11px 18px; border-radius: 9px; background: #17323a; color: #ecf6f6; font-size: 13px; box-shadow: 0 12px 30px rgba(10,30,38,.3); }
.toast.err { background: #7c2c2c; }
.toast.ok { background: #1f4f3b; }

@media (max-width: 1180px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .grid-2 { grid-template-columns: 1fr; }
  .pass-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .sidebar { width: 70px; flex-basis: 70px; padding: 18px 10px; }
  .brand div, .nav-item:not(.active)::after, .nav-item { font-size: 0; }
  .nav-item { justify-content: center; padding: 0; }
  .nav-ico { font-size: 17px; }
  .brand { justify-content: center; padding-bottom: 18px; }
  .brand img { width: 36px; height: 36px; }
  .sidebar-foot .mini-link, .server-state span:last-child, .brand div { display: none; }
  .view, .topbar { padding-left: 18px; padding-right: 18px; }
  .form-grid, .upload-grid, .settings-grid { grid-template-columns: 1fr; }
  .topbar-actions .badge { display: none; }
}

/* ---------- 会员与充值 ---------- */
.badge-gold { background: #f6efd9; color: #8a6417; }
.member-tabs { display: flex; gap: 6px; padding: 6px 20px 0; border-bottom: 1px solid var(--line); background: #fff; }
.member-tab { height: 38px; padding: 0 14px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font-size: 13px; cursor: pointer; }
.member-tab.active { color: var(--accent-2); border-bottom-color: var(--accent); font-weight: 600; }
.member-tab-body { padding: 16px 20px 20px; }
.policy-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 20px; }
.policy-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid #eef3f5; }
.policy-item:last-child { border-bottom: 0; }
.policy-item .label { font-size: 13px; font-weight: 600; }
.policy-item .hint { color: var(--muted); font-size: 11.5px; margin-top: 3px; }
.member-warning { background: #fdf6e4; border: 1px solid #f0dfb5; color: #7d5a17; border-radius: 8px; padding: 9px 12px; font-size: 12px; margin-top: 10px; }
.qr-mini { width: 68px; height: 68px; object-fit: contain; border: 1px solid var(--line); border-radius: 7px; background: #fff; margin-top: 6px; }
.order-paid { color: var(--ok); font-weight: 600; }
.order-pending { color: var(--gold); font-weight: 600; }
.order-closed { color: var(--muted); }
.device-mono { font-family: Consolas, monospace; font-size: 11.5px; }
@media (max-width: 1100px) { .policy-grid { grid-template-columns: 1fr; } }

/* 用户详情 */
.detail-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.detail-grid > div { background:var(--panel-2, #f6faf9); border:1px solid var(--line, #e2e9ee); border-radius:10px; padding:10px 12px; }
.detail-grid span { display:block; color:var(--muted, #758a93); font-size:11px; margin-bottom:4px; }
.detail-grid b { font-size:13px; font-weight:600; }
@media (max-width:700px) { .detail-grid { grid-template-columns:1fr; } }

/* ---------- 舒适布局优化 ---------- */
:root {
  --bg: #f4f7f5;
  --panel-2: #f7faf8;
  --line: #e2eae5;
  --line-strong: #cfdcd4;
  --ink: #1e3028;
  --ink-2: #40554b;
  --muted: #7b8d84;
  --accent: #34766a;
  --accent-2: #285f56;
  --accent-soft: #e8f2ed;
  --accent-line: #c9e0d5;
  --radius: 16px;
  --shadow: 0 8px 26px rgba(29, 60, 47, .055);
}
body {
  background:
    radial-gradient(1000px 560px at 8% 0%, rgba(119, 177, 151, .10), transparent 60%),
    radial-gradient(900px 520px at 100% 100%, rgba(119, 158, 177, .08), transparent 65%),
    var(--bg);
  line-height: 1.55;
}
.sidebar {
  width: 226px; flex-basis: 226px; padding: 22px 14px 16px;
  background: linear-gradient(180deg, #17342f 0%, #1b3b35 52%, #142c28 100%);
}
.brand { padding: 0 9px 20px; gap: 12px; }
.brand img { width: 42px; height: 42px; border-radius: 12px; }
.brand strong { font-size: 15.5px; letter-spacing: .4px; }
.brand span { color: #91b5aa; }
.nav { gap: 4px; padding-top: 16px; }
.nav-item {
  height: 44px; padding: 0 13px; border-radius: 11px; color: #b9cfc7; font-size: 13.5px;
  transition: background .16s, color .16s, transform .16s;
}
.nav-item:hover { background: rgba(255,255,255,.07); color: #fff; transform: translateX(1px); }
.nav-item.active {
  background: linear-gradient(90deg, rgba(126, 190, 166, .20), rgba(126, 190, 166, .08));
  color: #fff; box-shadow: inset 3px 0 0 #8fd0b7;
}
.topbar {
  height: 80px; flex-basis: 80px; padding: 0 34px;
  background: rgba(247, 250, 248, .88);
  box-shadow: 0 1px 0 rgba(32, 65, 52, .03);
}
.topbar h2 { font-size: 22px; }
.topbar p { margin-top: 5px; font-size: 12.5px; }
.view { padding: 28px 34px 56px; max-width: 1560px; }
.card { border-radius: 16px; box-shadow: var(--shadow); }
.card-head { padding: 18px 22px; }
.card-head h3 { font-size: 15.5px; }
.card-head p { margin-top: 5px; line-height: 1.6; }
.card-body { padding: 22px; }
.stat-grid { gap: 16px; margin-bottom: 20px; }
.stat { padding: 20px 20px 18px; border-radius: 15px; }
.stat .value { margin-top: 10px; }
.settings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.policy-grid { grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: 26px; }
.policy-item { padding: 14px 0; }
.member-tab-body { padding: 18px 22px 22px; }
.form-row { gap: 7px; }
.form-row input, .form-row select, .form-row textarea { padding: 10px 12px; border-radius: 9px; }
.form-row textarea { line-height: 1.7; }
.toolbar { margin-bottom: 16px; }
th { padding: 12px 15px; background: #fafcfb; }
td { padding: 13px 15px; }
tbody tr:hover { background: #f8fbf9; }
.table-wrap { border-radius: 0 0 16px 16px; }
.btn { border-radius: 9px; }
.btn-primary { box-shadow: 0 5px 14px rgba(52, 118, 106, .18); }
.member-tabs { padding: 8px 22px 0; }
.member-tab { height: 40px; }
.member-warning { border-radius: 10px; line-height: 1.7; }
.modal { border-radius: 18px; }
.modal-head { padding: 20px 24px; }
.modal-body { padding: 22px 24px; }
.modal-foot { padding: 16px 24px; }
.toast { border-radius: 11px; }
@media (max-width: 1320px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .settings-grid { grid-template-columns: 1fr; }
}
@media (max-width: 980px) {
  .view, .topbar { padding-left: 22px; padding-right: 22px; }
  .policy-grid { grid-template-columns: 1fr; }
}

/* ---------- 立体简洁工作台 ---------- */
html { overflow-y: scroll; scrollbar-gutter: stable both-edges; scroll-behavior: auto; }
body { overflow-x: hidden; background: #edf3ef; }
.app { min-height: 100vh; }
.sidebar {
  box-shadow: inset -1px 0 0 rgba(255,255,255,.08), 10px 0 30px rgba(15, 46, 36, .12);
  z-index: 30;
}
.brand img { box-shadow: 0 4px 12px rgba(0,0,0,.18), inset 0 1px 0 #fff; }
.nav-item {
  border: 1px solid transparent;
  transition: background .16s ease, border-color .16s ease, color .16s ease;
}
.nav-item.active {
  border-color: rgba(157, 218, 192, .22);
  background: linear-gradient(135deg, rgba(127, 196, 167, .24), rgba(127, 196, 167, .08));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.10), 0 6px 16px rgba(0,0,0,.14);
}
.main { min-width: 0; background: transparent; }
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(248, 251, 249, .88);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(205, 220, 211, .72);
  box-shadow: 0 1px 0 rgba(255,255,255,.8), 0 8px 22px rgba(32, 66, 50, .045);
}
.view {
  min-height: calc(100vh - 80px);
  padding-top: 26px;
  animation: adminPageIn .18s ease-out both;
}
@keyframes adminPageIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}
.card {
  background: linear-gradient(180deg, #ffffff 0%, #fbfdfc 100%);
  border: 1px solid #e0eae3;
  border-radius: 15px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.95),
    0 1px 2px rgba(22, 52, 38, .04),
    0 12px 30px rgba(28, 62, 45, .055);
  overflow: hidden;
}
.card-head {
  background: linear-gradient(180deg, #ffffff, #f8fbf9);
  border-bottom: 1px solid #edf3ef;
}
.card-head h3 { letter-spacing: .1px; }
.card-body { background: transparent; }
.stat {
  background: linear-gradient(160deg, #ffffff 0%, #f8fbf9 100%);
  border: 1px solid #e0eae3;
  border-radius: 15px;
  box-shadow: inset 0 1px 0 #fff, 0 8px 22px rgba(28, 62, 45, .045);
}
.btn {
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55), 0 1px 2px rgba(24, 52, 40, .07);
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.btn:hover { box-shadow: inset 0 1px 0 rgba(255,255,255,.65), 0 4px 12px rgba(24, 52, 40, .10); }
.btn-primary {
  background: linear-gradient(180deg, #3c8375 0%, #2d6d60 100%);
  border-color: #2b675a;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.20), 0 6px 16px rgba(45, 109, 96, .22);
}
.input, .select, textarea {
  background: linear-gradient(180deg, #ffffff, #fbfdfc);
  box-shadow: inset 0 1px 2px rgba(28, 62, 45, .035);
}
.input:focus, .select:focus, textarea:focus {
  border-color: #559888;
  box-shadow: 0 0 0 3px rgba(70, 137, 118, .12), inset 0 1px 2px rgba(28, 62, 45, .02);
}
.table-wrap { background: #fff; }
thead th {
  position: sticky; top: 0; z-index: 2;
  background: #f8fbf9;
  box-shadow: 0 1px 0 #e4ece7;
}
tbody tr { transition: background .12s ease; }
.settings-grid { align-items: start; grid-auto-rows: minmax(0, auto); }
.settings-card { height: 100%; }
.modal {
  background: linear-gradient(180deg, #fff, #fbfdfc);
  box-shadow: inset 0 1px 0 #fff, 0 28px 70px rgba(20, 50, 36, .24);
}
.toast { box-shadow: 0 10px 26px rgba(12, 40, 28, .24); }
@media (max-width: 860px) {
  html { scrollbar-gutter: auto; }
  .view { min-height: calc(100vh - 80px); }
}
