/* ==========================================================================
   天宫玄造 · 管理后台视觉系统 v2
   深色水墨鎏金 + 紫金 AI —— 与 ui/admin.html 设计基准同源
   ========================================================================== */
:root {
  --bg: #0B0C10;
  --bg2: #111319;
  --bg3: #17191F;
  --card: #14161D;
  --gold: #C9A55C;
  --gold2: #E8D4A0;
  --gold3: #7A6035;
  --purple: #8B7CF6;
  --purple2: #B162E8;
  --red: #BE3C34;
  --green: #469678;
  --fg: #EDE7DA;
  --muted: #969084;
  --faint: #5E5B54;
  --line: rgba(201, 165, 92, .18);
  --line2: rgba(201, 165, 92, .36);
  --serif: "Noto Serif SC", "Songti SC", "STSong", serif;
  --sans: "PingFang SC", "Microsoft YaHei", sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; }
html, body {
  margin: 0; min-height: 100%;
  background: var(--bg); color: var(--fg);
  font-family: var(--sans); font-size: 13px; -webkit-font-smoothing: antialiased;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; background:
    radial-gradient(800px 500px at 90% 0%, rgba(139, 124, 246, .07), transparent),
    radial-gradient(700px 500px at 0% 100%, rgba(201, 165, 92, .05), transparent),
    radial-gradient(1px 1px at 18% 24%, rgba(255, 255, 255, .35), transparent),
    radial-gradient(1px 1px at 76% 14%, rgba(201, 165, 92, .5), transparent),
    radial-gradient(1px 1px at 52% 72%, rgba(255, 255, 255, .25), transparent),
    var(--bg);
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; outline: 0; }
::selection { background: rgba(201, 165, 92, .3); }
::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(201, 165, 92, .3); border-radius: 4px; }
.hidden { display: none !important; }

/* 书法标题 / 金色渐变字 */
.serif { font-family: var(--serif); }
.gold-text {
  background: linear-gradient(135deg, #F5E4B8, #C9A55C 55%, #8A6E3C);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.ai-text {
  background: linear-gradient(135deg, #A99BFF, #B162E8);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- 页面转场 / 逐行升起 / 数字滚动（动效契约：只改 transform / opacity） ---------- */
::view-transition-old(root) { animation: pgOut .28s var(--ease) both; }
::view-transition-new(root) { animation: pgIn .44s var(--ease) both; }
@keyframes pgOut { to { opacity: 0; transform: translate3d(-14px, 0, 0); } }
@keyframes pgIn { from { opacity: 0; transform: translate3d(18px, 0, 0); } }
.page-title.rising > .lr-in { display: inline-block; transform: translate3d(0, 112%, 0); animation: lrUp .7s var(--ease) both; }
@keyframes lrUp { to { transform: translate3d(0, 0, 0); } }
.stats .stat { animation: statIn .5s var(--ease) both; }
.stats .stat:nth-child(1) { animation-delay: .04s; }
.stats .stat:nth-child(2) { animation-delay: .09s; }
.stats .stat:nth-child(3) { animation-delay: .14s; }
.stats .stat:nth-child(4) { animation-delay: .19s; }
.stats .stat:nth-child(5) { animation-delay: .24s; }
.stats .stat:nth-child(6) { animation-delay: .29s; }
@keyframes statIn { from { opacity: 0; transform: translate3d(0, 10px, 0); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .page-title.rising > .lr-in, .stats .stat { animation: none; transform: none; opacity: 1; }
}

/* ============ 登录页 ============ */
.login-page { min-height: 100vh; display: grid; place-items: center; position: relative; padding: 30px 20px; }
.login-bg {
  position: absolute; inset: 0; pointer-events: none; background:
    radial-gradient(1px 1px at 22% 18%, rgba(255, 255, 255, .45), transparent),
    radial-gradient(1px 1px at 68% 26%, rgba(201, 165, 92, .55), transparent),
    radial-gradient(1px 1px at 82% 72%, rgba(139, 124, 246, .45), transparent),
    radial-gradient(900px 520px at 50% 0%, rgba(139, 124, 246, .12), transparent),
    linear-gradient(160deg, #0B0C10, #07080B);
}
.login-card {
  position: relative; width: min(520px, 94vw); padding: 42px 40px 32px;
  border: 1px solid var(--line2); border-radius: 14px; text-align: center;
  background: linear-gradient(160deg, rgba(23, 25, 31, .92), rgba(11, 12, 16, .96));
  backdrop-filter: blur(22px); box-shadow: 0 40px 100px -40px #000;
  animation: cardIn .6s var(--ease) both;
}
.login-card::before, .login-card::after {
  content: ""; position: absolute; width: 20px; height: 20px; border: 2px solid var(--gold); pointer-events: none;
}
.login-card::before { left: -2px; top: -2px; border-right: 0; border-bottom: 0; }
.login-card::after { right: -2px; bottom: -2px; border-left: 0; border-top: 0; }
@keyframes cardIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.brand-mark {
  display: inline-grid; place-items: center; width: 60px; height: 60px; margin-bottom: 18px;
  border: 1px solid var(--gold); border-radius: 8px; font-family: var(--serif); font-size: 30px; color: var(--gold2);
  box-shadow: inset 0 0 0 3px rgba(11, 12, 16, .9), inset 0 0 0 4px var(--line2), 0 0 40px -14px var(--gold);
}
.login-card h1 { font-family: var(--serif); font-size: 25px; font-weight: 400; letter-spacing: .14em; margin: 0 0 10px; }
.brand-sub { font-size: 9.5px; letter-spacing: .34em; color: var(--gold); margin-bottom: 16px; }
.login-tip { font-size: 12px; color: var(--muted); margin: 0 0 22px; line-height: 1.9; }
.demo-accounts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 18px; text-align: left; }
.demo-accounts button {
  border: 1px solid var(--line); border-radius: 7px; background: rgba(255, 255, 255, .025);
  padding: 9px 11px; cursor: pointer; transition: .25s; color: var(--fg); text-align: left;
}
.demo-accounts button:hover { border-color: var(--gold); background: rgba(201, 165, 92, .1); }
.demo-accounts b { display: block; font-family: var(--serif); font-size: 12.5px; font-weight: 400; }
.demo-accounts small { display: block; font-size: 9.5px; color: var(--faint); margin-top: 3px; }
.login-row { display: flex; gap: 10px; }
.login-row input {
  flex: 1; padding: 11px 14px; border: 1px solid var(--line); border-radius: 7px;
  background: rgba(255, 255, 255, .03); color: var(--fg); font-size: 12px;
}
.login-row input:focus { border-color: var(--gold); }
.login-msg { min-height: 18px; font-size: 11px; color: #E8837C; margin-top: 10px; }
.login-foot { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 10px; color: var(--faint); letter-spacing: .08em; }

/* ============ 布局 ============ */
.app { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  border-right: 1px solid var(--line); background: linear-gradient(180deg, #101116, #0B0C10);
  padding: 18px 0 0; overflow-y: auto;
}
.side-brand {
  display: flex; align-items: center; gap: 10px; padding: 0 20px 18px;
  font-family: var(--serif); font-size: 16px; letter-spacing: .1em; border-bottom: 1px solid var(--line);
}
.side-logo {
  width: 36px; height: 36px; flex-shrink: 0; display: grid; place-items: center; border: 1px solid var(--gold);
  border-radius: 5px; color: var(--gold2); font-family: var(--serif); font-size: 18px;
  box-shadow: inset 0 0 0 2px var(--bg), inset 0 0 0 3px var(--line2);
}
.side-name { font-family: var(--serif); color: var(--fg); }
.side-en { font-family: var(--sans); font-size: 8.5px; letter-spacing: .18em; color: var(--gold); margin-top: 3px; }
.tenant-picker { padding: 12px 18px 6px; }
.tenant-picker select {
  width: 100%; padding: 8px 10px; border: 1px solid var(--line2); border-radius: 6px;
  background: rgba(201, 165, 92, .06); color: var(--gold2); font-size: 11px;
}
.tenant-picker .tag { display: block; text-align: center; }
.menu { flex: 1; padding: 6px 0 12px; }
.menu-group { display: flex; align-items: center; gap: 10px; padding: 14px 20px 7px; font-size: 9.5px; letter-spacing: .26em; color: var(--faint); }
.menu-group::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.menu-item {
  display: flex; align-items: center; gap: 11px; padding: 10px 20px; font-size: 12.5px;
  color: var(--muted); cursor: pointer; transition: .25s; position: relative; letter-spacing: .05em;
}
.menu-item:hover { color: var(--fg); background: rgba(201, 165, 92, .05); }
.menu-item.active {
  color: var(--gold2);
  background: linear-gradient(90deg, rgba(201, 165, 92, .16), transparent);
}
.menu-item.active::before {
  content: ""; position: absolute; left: 0; top: 18%; bottom: 18%; width: 2px; background: var(--gold);
}
.menu-item .ic { width: 18px; text-align: center; color: var(--gold); font-family: var(--serif); font-size: 13px; }
.side-foot {
  display: flex; justify-content: space-between; padding: 12px 20px; border-top: 1px solid var(--line);
  font-size: 9.5px; color: var(--faint); letter-spacing: .1em;
}
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 70px; display: flex; align-items: center; gap: 18px; padding: 0 30px;
  border-bottom: 1px solid var(--line); background: rgba(11, 12, 16, .9); backdrop-filter: blur(16px);
  position: sticky; top: 0; z-index: 50;
}
.crumb { font-family: var(--serif); font-size: 16px; letter-spacing: .12em; color: var(--gold2); white-space: nowrap; }
.crumb-sep { margin: 0 8px; color: var(--faint); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.user-chip { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--muted); }
.avatar-mini {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line2); background: rgba(201, 165, 92, .1); color: var(--gold2);
  font-family: var(--serif); font-size: 14px;
}
.role-tag {
  font-size: 9.5px; padding: 3px 8px; border-radius: 999px; letter-spacing: .08em;
  border: 1px solid rgba(139, 124, 246, .45); color: #B9AAFF; background: rgba(139, 124, 246, .12);
}
.content { padding: 26px 30px 40px; flex: 1; }

/* ============ 通用组件 ============ */
.btn-gold, .btn-ghost, .btn-danger, .btn-mini {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: 6px; cursor: pointer; transition: .25s; font-size: 12px; letter-spacing: .05em;
  border: 1px solid transparent; white-space: nowrap;
}
.btn-gold {
  padding: 9px 20px; background: linear-gradient(135deg, #E3C98C, #C9A55C 60%, #A07E42);
  color: #1A1206; font-weight: 600;
}
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -10px rgba(201, 165, 92, .7); }
.btn-ghost { padding: 9px 20px; border-color: var(--line2); color: var(--gold2); background: rgba(201, 165, 92, .05); }
.btn-ghost:hover { background: rgba(201, 165, 92, .13); border-color: var(--gold); }
.btn-danger { padding: 9px 20px; border-color: rgba(190, 60, 52, .5); color: #E8837C; background: rgba(190, 60, 52, .14); }
.btn-mini { padding: 5px 11px; font-size: 10.5px; border-color: var(--line); color: var(--muted); background: rgba(255, 255, 255, .03); }
.btn-mini:hover { border-color: var(--gold); color: var(--gold2); }

/* 按钮动态效果：流光扫过 + 点击涟漪 + 忙碌/完成态 */
.btn-gold, .btn-ghost, .btn-danger, .btn-mini {
  position: relative; overflow: hidden; isolation: isolate;
  transition: transform .18s var(--ease), box-shadow .28s var(--ease), border-color .2s, background .2s, color .2s;
}
.btn-gold::before, .btn-ghost::before, .btn-danger::before, .btn-mini::before {
  content: ""; position: absolute; inset: -60% -90%; z-index: -1; pointer-events: none;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, .34) 50%, transparent 62%);
  transform: translateX(-125%); opacity: 0;
  transition: transform .72s var(--ease), opacity .2s;
}
.btn-gold:hover::before, .btn-ghost:hover::before, .btn-danger:hover::before, .btn-mini:hover::before { transform: translateX(125%); opacity: 1; }
.btn-gold:hover { box-shadow: 0 14px 30px -12px rgba(201, 165, 92, .85); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1px rgba(201, 165, 92, .3), 0 10px 24px -16px rgba(201, 165, 92, .6); }
.btn-danger:hover { box-shadow: 0 10px 24px -14px rgba(190, 60, 52, .8); }
.btn-mini:hover { transform: translateY(-1px); }
.btn-gold:active, .btn-ghost:active, .btn-danger:active, .btn-mini:active { transform: scale(.96); transition-duration: .08s; }
.btn-gold.is-hit, .btn-ghost.is-hit, .btn-danger.is-hit, .btn-mini.is-hit { transform: scale(.97); }
.btn-gold.is-busy, .btn-ghost.is-busy, .btn-danger.is-busy, .btn-mini.is-busy { color: transparent !important; pointer-events: none; }
.btn-gold.is-busy::after, .btn-ghost.is-busy::after, .btn-danger.is-busy::after, .btn-mini.is-busy::after {
  content: ""; position: absolute; inset: calc(50% - 8px); width: 16px; height: 16px;
  border: 2px solid rgba(255, 255, 255, .75); border-top-color: var(--purple2); border-radius: 50%;
  animation: adminSpin .7s linear infinite;
}
.btn-gold.is-done, .btn-ghost.is-done, .btn-danger.is-done, .btn-mini.is-done { animation: adminDone .58s var(--ease); }
@keyframes adminSpin { to { transform: rotate(360deg); } }
@keyframes adminDone { 0% { box-shadow: 0 0 0 0 rgba(70, 150, 120, .6); } 100% { box-shadow: 0 0 0 14px rgba(70, 150, 120, 0); } }
.btn-ripple { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, .5); transform: translate(-50%, -50%) scale(0); opacity: 0; pointer-events: none; z-index: -1; animation: adminRipple .62s var(--ease) forwards; }
@keyframes adminRipple { 0% { opacity: .9; transform: translate(-50%, -50%) scale(0); } 100% { opacity: 0; transform: translate(-50%, -50%) scale(18); } }

/* 高校演示预览 */
.edu-preview-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.edu-preview-tile { text-align: left; border: 1px solid var(--line); border-radius: 6px; background: rgba(255, 255, 255, .02); color: var(--fg); padding: 14px; cursor: pointer; font-family: inherit; }
.edu-preview-tile b { display: block; font-family: var(--serif); font-size: 13px; color: var(--gold2); letter-spacing: .08em; font-weight: 500; }
.edu-preview-tile small { display: block; margin-top: 6px; font-size: 10.5px; line-height: 1.7; color: var(--muted); }
.edu-preview-tile:hover { border-color: var(--gold); box-shadow: 0 12px 26px -16px rgba(201, 165, 92, .8); }
@media (prefers-reduced-motion: reduce) {
  .btn-gold::before, .btn-ghost::before, .btn-danger::before, .btn-mini::before, .btn-ripple { display: none; }
  .btn-gold:hover, .btn-ghost:hover, .btn-danger:hover, .btn-mini:hover, .btn-mini:hover { transform: none; }
  .btn-gold:active, .btn-ghost:active, .btn-danger:active, .btn-mini:active { transform: none; }
  .btn-gold.is-busy::after, .btn-ghost.is-busy::after, .btn-danger.is-busy::after, .btn-mini.is-busy::after { animation: none; border-top-color: var(--gold2); }
}

.tag {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border: 1px solid var(--line);
  border-radius: 999px; font-size: 10px; color: var(--gold2); background: rgba(8, 9, 13, .5); white-space: nowrap;
}
.tag.green { border-color: rgba(70, 150, 120, .5); color: #8FD9B8; background: rgba(70, 150, 120, .12); }
.tag.red { border-color: rgba(190, 60, 52, .55); color: #E8837C; background: rgba(190, 60, 52, .13); }
.tag.blue { border-color: rgba(139, 124, 246, .45); color: #B9AAFF; background: rgba(139, 124, 246, .12); }
.tag.gray { border-color: rgba(255, 255, 255, .1); color: var(--muted); background: rgba(255, 255, 255, .05); }

.card {
  border: 1px solid var(--line); border-radius: 10px;
  background: linear-gradient(150deg, rgba(23, 25, 31, .95), rgba(13, 14, 18, .95));
}
.card h3 {
  font-size: 14px; font-weight: 400; letter-spacing: .08em; color: var(--fg); margin: 0;
  padding: 15px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: baseline; gap: 10px;
}
.card h3 small { font-family: var(--sans); font-size: 10px; color: var(--faint); letter-spacing: .06em; }
.card.empty { padding: 34px; text-align: center; color: var(--faint); font-size: 12px; }
.notice {
  padding: 12px 16px; border: 1px solid rgba(201, 165, 92, .22); border-left: 2px solid var(--gold);
  border-radius: 8px; background: rgba(201, 165, 92, .05); color: var(--muted); font-size: 11.5px; line-height: 1.9;
}

.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-title { display: block; overflow: hidden; font-family: var(--serif); font-size: clamp(22px, 2.2vw, 30px); letter-spacing: .1em; color: var(--gold2); }
.page-desc { font-size: 11.5px; color: var(--muted); margin-top: 7px; letter-spacing: .04em; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.stat {
  position: relative; overflow: hidden; padding: 17px 18px; border: 1px solid var(--line); border-radius: 10px;
  background: linear-gradient(150deg, rgba(23, 25, 31, .95), rgba(13, 14, 18, .95));
}
.stat::after {
  content: ""; position: absolute; right: -30px; top: -30px; width: 90px; height: 90px; border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 165, 92, .16), transparent 70%); pointer-events: none;
}
.stat-label { font-size: 11px; color: var(--muted); margin-bottom: 6px; }
.stat-value { font-family: var(--serif); font-size: clamp(22px, 2.2vw, 30px); letter-spacing: .04em; color: var(--gold2); font-variant-numeric: tabular-nums; }
.stat-sub { font-size: 10px; color: var(--faint); margin-top: 6px; }

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

/* 柱状趋势（数据随滚动生长） */
.spark { display: flex; align-items: flex-end; gap: 8px; height: 150px; padding: 18px 18px 0; }
.spark i {
  flex: 1; border-radius: 4px 4px 0 0; min-height: 4px; opacity: .9;
  background: linear-gradient(180deg, rgba(139, 124, 246, .9), rgba(177, 98, 232, .22));
  transform-origin: bottom; transform: scaleY(0); transition: transform .72s var(--ease) var(--d, 0ms);
}
.spark.grow i { transform: scaleY(1); }
.spark-vals { display: flex; gap: 8px; padding: 10px 18px 18px; }
.spark-vals span { flex: 1; text-align: center; font-size: 10px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* 表格 */
.table-wrap { overflow-x: auto; }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: 11.5px; min-width: 640px; }
.table-wrap th {
  text-align: left; padding: 11px 16px; color: var(--muted); font-weight: 400;
  background: rgba(255, 255, 255, .025); white-space: nowrap; font-size: 10px; letter-spacing: .06em;
}
.table-wrap td { padding: 12px 16px; border-top: 1px solid var(--line); vertical-align: middle; }
.table-wrap tr:hover td { background: rgba(201, 165, 92, .035); }
.thumb {
  width: 44px; height: 44px; border-radius: 5px; object-fit: cover; display: inline-block;
  vertical-align: middle; margin-right: 10px; border: 1px solid var(--line); background: #0D0E12;
}
.money { color: var(--gold2); font-family: var(--serif); font-size: 13px; }

/* 表单 */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; padding: 18px; }
.form-grid .field.span2, .field.span2 { grid-column: span 2; }
.field { margin-bottom: 4px; }
.field label { display: block; font-size: 10.5px; color: var(--muted); margin-bottom: 6px; letter-spacing: .06em; }
.field input, .field select, .field textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 6px;
  background: rgba(255, 255, 255, .03); color: var(--fg); font-size: 11.5px;
}
.field textarea { resize: vertical; min-height: 62px; line-height: 1.8; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--gold); }
.form-actions { display: flex; gap: 10px; padding: 0 18px 18px; }

.switch-row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 11px 18px; border-bottom: 1px solid var(--line); font-size: 11.5px; color: var(--fg);
}
.switch-row .desc { font-size: 10px; color: var(--faint); margin-top: 3px; }
.switch {
  width: 34px; height: 18px; border-radius: 9px; background: rgba(255, 255, 255, .12);
  position: relative; cursor: pointer; transition: .25s; flex-shrink: 0;
}
.switch::after {
  content: ""; position: absolute; left: 2px; top: 2px; width: 14px; height: 14px;
  border-radius: 50%; background: #fff; transition: .25s;
}
.switch.on { background: linear-gradient(135deg, var(--purple), var(--purple2)); }
.switch.on::after { left: 18px; }

.banner-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 16px 18px 18px; }
.banner-item { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--bg2); }
.banner-item img { width: 100%; height: 92px; object-fit: cover; filter: brightness(.8); }
.banner-item div { padding: 9px 11px; font-size: 11px; color: var(--muted); }

.toast {
  position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%) translateY(20px); z-index: 200;
  padding: 11px 24px; border: 1px solid var(--line2); border-radius: 6px;
  background: rgba(20, 21, 28, .97); backdrop-filter: blur(18px); color: var(--gold2);
  font-size: 12px; opacity: 0; transition: .3s; pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============ 响应式 ============ */
@media (max-width: 1200px) {
  .stats, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .stats, .grid-2, .grid-3, .grid-4, .form-grid { grid-template-columns: 1fr; }
  .form-grid .field.span2, .field.span2 { grid-column: span 1; }
}

/* ==========================================================================
   复刻组件：数据总览 / 审核 / 租户 / 展厅搭建 / 卡片管理（对应 ui/admin.html）
   ========================================================================== */

/* ---------- 页面头 ---------- */
.pg-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.pg-head h2 { font-family: var(--serif); font-size: clamp(24px, 2.4vw, 34px); letter-spacing: .1em; margin: 0 0 8px; }
.pg-head p { font-size: 12px; color: var(--muted); margin: 0; line-height: 1.9; }
.pg-head .actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Hero 横幅 ---------- */
.hero-banner {
  position: relative; border: 1px solid var(--line2); border-radius: 12px; overflow: hidden;
  min-height: 200px; display: flex; align-items: center; padding: 34px 36px; margin-bottom: 20px;
}
.hero-banner > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(.36) saturate(.8); }
.hero-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8, 9, 13, .9), rgba(8, 9, 13, .2) 70%, transparent); }
.hb-inner { position: relative; z-index: 2; }
.hb-inner h2 { font-family: var(--serif); font-size: clamp(28px, 3.2vw, 48px); line-height: 1.3; letter-spacing: .08em; margin: 0; }
.hb-inner .en { font-size: 10.5px; letter-spacing: .4em; color: var(--gold); margin-top: 12px; }
.hb-date { position: absolute; right: 30px; top: 26px; z-index: 2; text-align: right; }
.hb-date b { font-family: var(--serif); font-size: 20px; color: var(--gold2); letter-spacing: .06em; font-weight: 400; }
.hb-date small { display: block; font-size: 10px; color: var(--muted); margin-top: 4px; }

/* ---------- 数据卡 ---------- */
.stat-card { padding: 18px; position: relative; overflow: hidden; }
.stat-card .sc-ico {
  width: 38px; height: 38px; border-radius: 8px; border: 1px solid var(--line2); display: grid; place-items: center;
  color: var(--gold2); font-family: var(--serif); font-size: 17px; margin-bottom: 14px;
}
.stat-card .sc-label { font-size: 11px; color: var(--muted); margin-bottom: 6px; }
.stat-card .sc-val { font-family: var(--serif); font-size: clamp(23px, 2.3vw, 32px); letter-spacing: .04em; color: var(--gold2); }
.stat-card .sc-trend { font-size: 10px; color: #8FD9B8; margin-top: 8px; display: flex; align-items: center; gap: 5px; }
.stat-card .sc-trend.down { color: #E8837C; }
.stat-card.ai .sc-ico { border-color: rgba(139, 124, 246, .5); color: #B9AAFF; background: rgba(139, 124, 246, .1); }
.stat-card.ai .sc-val { color: #B9AAFF; }

/* ---------- 图表卡 ---------- */
.chart-card { padding: 20px; margin-bottom: 16px; }
.chart-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; gap: 10px; }
.chart-head h3 { font-family: var(--serif); font-size: 15px; letter-spacing: .08em; margin: 0; }
.fbtn {
  display: inline-flex; align-items: center; gap: 4px; padding: 6px 13px; border: 1px solid var(--line);
  border-radius: 999px; font-size: 10.5px; color: var(--muted); cursor: pointer; transition: .25s;
  background: rgba(255, 255, 255, .02);
}
.fbtn:hover { color: var(--gold2); }
.fbtn.on { color: #1A1206; background: linear-gradient(135deg, #E3C98C, #C9A55C); border-color: transparent; font-weight: 600; }
.fbtn .n { opacity: .7; margin-left: 3px; }

.line-chart { height: 190px; position: relative; padding: 0; }
.line-chart .grid-line { position: absolute; left: 34px; right: 0; height: 1px; background: rgba(255, 255, 255, .05); }
.line-chart .yl { position: absolute; left: 0; font-size: 9px; color: var(--faint); transform: translateY(-50%); }
.line-chart svg { display: block; width: 100%; height: 100%; }

.bar-chart { height: 190px; display: flex; align-items: flex-end; gap: 10px; padding-top: 16px; }
.bc-item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.bc-bar { width: 100%; max-width: 42px; border-radius: 4px 4px 0 0; min-height: 4px; background: linear-gradient(180deg, rgba(139, 124, 246, .9), rgba(177, 98, 232, .25)); }
.bc-lb { font-size: 9px; color: var(--faint); white-space: nowrap; }

.mini-art { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.ma-item { width: 88px; flex-shrink: 0; cursor: pointer; }
.ma-item img { width: 88px; height: 100px; object-fit: cover; border: 1px solid var(--line); border-radius: 6px; filter: brightness(.82); transition: .3s; }
.ma-item:hover img { filter: brightness(1); border-color: var(--gold); }
.ma-item p { font-size: 10px; margin: 6px 0 0; text-align: center; color: var(--fg); }
.ma-item small { display: block; font-size: 9px; color: var(--gold); text-align: center; margin-top: 2px; }

.lead-row { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 11px; }
.lead-row:last-child { border: 0; }
.lead-row .li { width: 28px; height: 28px; border-radius: 6px; background: rgba(201, 165, 92, .12); display: grid; place-items: center; color: var(--gold2); flex-shrink: 0; font-family: var(--serif); }
.lead-row .lt { flex: 1; min-width: 0; }
.lead-row .lt b { font-weight: 400; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--fg); }
.lead-row .lt small { color: var(--faint); font-size: 9px; }
.lead-row time { color: var(--faint); font-size: 10px; }

/* ---------- 表格卡 ---------- */
.table-card { overflow: hidden; margin-bottom: 16px; }
.table-head { display: flex; justify-content: space-between; align-items: center; padding: 15px 18px; border-bottom: 1px solid var(--line); gap: 12px; flex-wrap: wrap; }
.table-head h3 { font-family: var(--serif); font-size: 15px; letter-spacing: .08em; margin: 0; }
.table-head .tools { display: flex; gap: 8px; align-items: center; }
.filter-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.search-box { display: flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 6px; padding: 7px 12px; background: rgba(255, 255, 255, .02); min-width: 220px; }
.search-box input { background: none; border: 0; color: var(--fg); font-size: 11px; flex: 1; }
.search-box input::placeholder { color: var(--faint); }
.cell-title { font-family: var(--serif); font-size: 13px; color: var(--fg); }
.cell-sub { font-size: 9px; color: var(--faint); margin-top: 3px; }
.ops { display: flex; gap: 8px; }
.ops a, .ops button { color: var(--gold2); cursor: pointer; white-space: nowrap; font-size: 11px; background: none; border: 0; padding: 0; }
.ops a:hover, .ops button:hover { text-decoration: underline; }

/* ---------- 作品审核 ---------- */
.audit-layout { display: grid; grid-template-columns: 1.05fr .95fr; gap: 18px; align-items: start; }
.audit-art { border: 1px solid var(--line); border-radius: 10px; padding: 20px; background: #0D0E12; }
.audit-art .art-frame { border: 8px solid #191510; outline: 1px solid var(--gold3); padding: 10px; }
.audit-art .art-frame img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.audit-art .icons { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; }
.audit-art .icons div { text-align: center; font-size: 10px; color: var(--muted); padding: 10px 4px; border: 1px solid var(--line); border-radius: 7px; }
.audit-art .icons i { display: block; font-style: normal; font-size: 18px; color: var(--gold2); margin-bottom: 5px; font-family: var(--serif); }
.audit-ops { margin-top: 16px; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: rgba(20, 21, 28, .6); }
.audit-ops h4 { font-family: var(--serif); font-size: 15px; margin: 0 0 12px; }
.audit-btns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
.audit-progress { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.ap-item { font-size: 10px; color: var(--faint); }
.ap-item b { display: block; color: var(--muted); font-weight: 400; margin-bottom: 3px; }
.ap-item span { color: var(--gold2); }
.audit-ops textarea {
  width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 6px;
  background: rgba(255, 255, 255, .03); color: var(--fg); font-size: 11px; resize: vertical; min-height: 52px;
}
.audit-info { padding: 20px; }
.audit-info h4 { font-family: var(--serif); font-size: 16px; margin: 0 0 16px; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 20px; margin-bottom: 18px; }
.info-grid div { font-size: 11px; }
.info-grid span { color: var(--faint); display: block; margin-bottom: 3px; }
.info-grid b { font-weight: 400; color: var(--fg); }
.ai-result { border: 1px solid rgba(139, 124, 246, .3); border-radius: 9px; background: rgba(139, 124, 246, .07); padding: 14px; margin-bottom: 14px; }
.ai-result h5 { font-size: 11px; color: #B9AAFF; margin: 0 0 10px; display: flex; justify-content: space-between; align-items: center; }
.ai-result .chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.ai-result .chips span { font-size: 10px; color: var(--muted); border: 1px solid rgba(139, 124, 246, .3); border-radius: 5px; padding: 5px 9px; }
.ai-result p { font-size: 10.5px; color: var(--muted); margin: 0; line-height: 1.8; }
.risk { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 10px; color: var(--muted); }
.risk:last-child { border: 0; }
.risk i { width: 22px; height: 22px; border-radius: 5px; background: rgba(190, 60, 52, .15); color: #E8837C; display: grid; place-items: center; font-style: normal; flex-shrink: 0; }
.risk b { color: var(--fg); font-weight: 400; display: block; }
.risk .state { margin-left: auto; }
.state { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 10px; }
.state::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.state.live { color: #8FD9B8; background: rgba(70, 150, 120, .14); }
.state.warm { color: var(--gold2); background: rgba(201, 165, 92, .14); }
.state.draft { color: var(--muted); background: rgba(255, 255, 255, .06); }
.state.end { color: var(--faint); background: rgba(255, 255, 255, .04); }
.state.ai { color: #B9AAFF; background: rgba(139, 124, 246, .15); }

/* ---------- 租户管理 ---------- */
.tenant-layout { display: grid; grid-template-columns: 1fr 340px; gap: 18px; align-items: start; }
.tenant-list { padding: 0 0 6px; }
.t-row { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); transition: .25s; flex-wrap: wrap; }
.t-row:hover { background: rgba(201, 165, 92, .04); }
.t-logo { width: 40px; height: 40px; border-radius: 7px; border: 1px solid var(--line2); display: grid; place-items: center; font-family: var(--serif); color: var(--gold2); font-size: 16px; background: rgba(201, 165, 92, .08); flex-shrink: 0; }
.t-name { font-family: var(--serif); font-size: 13px; color: var(--fg); }
.t-name small { display: block; font-family: var(--sans); font-size: 9px; color: var(--faint); margin-top: 3px; }
.t-quota { width: 120px; }
.t-quota .qt { display: flex; justify-content: space-between; font-size: 9px; color: var(--muted); margin-bottom: 5px; }
.t-quota .qb { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .08); }
.t-quota .qb i { display: block; height: 100%; border-radius: 2px; background: linear-gradient(90deg, var(--purple), var(--purple2)); }
.t-row .ops { margin-left: auto; }
.drawer { padding: 20px; position: sticky; top: 92px; }
.drawer h4 { font-family: var(--serif); font-size: 16px; margin: 0 0 4px; }
.drawer > p { font-size: 10px; color: var(--faint); margin: 0 0 18px; }
.drawer .brand-preview { border: 1px solid var(--line); border-radius: 8px; padding: 14px; display: flex; gap: 12px; align-items: center; margin-bottom: 18px; background: rgba(201, 165, 92, .04); }
.drawer .brand-preview img { width: 46px; height: 46px; border-radius: 7px; object-fit: cover; }
.drawer .brand-preview b { font-family: var(--serif); font-size: 15px; color: var(--gold2); font-weight: 400; }
.drawer .brand-preview small { display: block; font-size: 9px; color: var(--muted); margin-top: 3px; }
.color-row { display: flex; gap: 8px; align-items: center; }
.color-dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; }
.color-dot.on { border-color: var(--fg); box-shadow: 0 0 0 2px var(--bg); }
.quota-box { border: 1px solid rgba(139, 124, 246, .3); border-radius: 9px; background: rgba(139, 124, 246, .08); padding: 14px; margin: 16px 0; }
.quota-box .qb-t { font-size: 10px; color: #B9AAFF; margin-bottom: 8px; }
.quota-box .qb-v { font-family: var(--serif); font-size: 23px; color: #fff; }
.quota-box .qb-v small { font-family: var(--sans); font-size: 9px; color: var(--muted); }
.drawer-actions { display: flex; gap: 10px; margin-top: 18px; }
.drawer-actions .btn-gold, .drawer-actions .btn-ghost { flex: 1; }
.drawer-close { float: right; width: 24px; height: 24px; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); cursor: pointer; display: grid; place-items: center; font-size: 12px; background: none; }

/* ---------- 展厅搭建 ---------- */
.build-layout { display: grid; grid-template-columns: 1fr 300px; gap: 18px; align-items: start; }
.stage { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #0A0B0E; }
.stage-tools { display: flex; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; align-items: center; }
.stage-tools button { padding: 6px 12px; font-size: 10px; color: var(--muted); border: 1px solid var(--line); border-radius: 5px; cursor: pointer; background: none; }
.stage-tools button.on { color: var(--gold2); border-color: var(--gold2); background: rgba(201, 165, 92, .1); }
.stage-view { position: relative; aspect-ratio: 16/10; }
.stage-view > img { width: 100%; height: 100%; object-fit: cover; }
.stage-view .overlay { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at center, transparent 40%, rgba(6, 7, 10, .45)); }
.stage-side { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 6px; }
.stage-side button { width: 34px; height: 34px; border-radius: 6px; border: 1px solid var(--line2); background: rgba(8, 9, 13, .78); color: var(--gold2); font-size: 11px; cursor: pointer; }
.stage-mode { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); display: flex; gap: 4px; background: rgba(8, 9, 13, .85); border: 1px solid var(--line); border-radius: 6px; padding: 4px; }
.stage-mode button { padding: 5px 14px; font-size: 10px; color: var(--muted); border-radius: 4px; cursor: pointer; border: 0; background: none; }
.stage-mode button.on { background: rgba(201, 165, 92, .18); color: var(--gold2); }
.asset-strip { display: flex; gap: 8px; overflow-x: auto; padding: 12px; border-top: 1px solid var(--line); }
.asset-strip img { width: 74px; height: 56px; object-fit: cover; border: 1px solid var(--line); border-radius: 4px; flex-shrink: 0; cursor: pointer; filter: brightness(.75); }
.asset-strip img:hover { border-color: var(--gold); filter: brightness(1); }
.cfg { padding: 18px; position: sticky; top: 92px; max-height: calc(100vh - 120px); overflow-y: auto; }
.cfg h4 { font-family: var(--serif); font-size: 15px; margin: 0 0 16px; display: flex; justify-content: space-between; align-items: center; }
.cfg .ai-opt { border: 1px solid rgba(139, 124, 246, .35); border-radius: 9px; background: rgba(139, 124, 246, .08); padding: 14px; margin-top: 16px; }
.cfg .ai-opt h5 { font-size: 11px; color: #B9AAFF; margin: 0 0 8px; }
.cfg .ai-opt p { font-size: 10px; color: var(--muted); margin: 0 0 10px; line-height: 1.7; }
.cover-upload, .upload-zone {
  border: 1px dashed var(--line2); border-radius: 8px; height: 92px; display: grid; place-items: center;
  color: var(--faint); font-size: 10px; cursor: pointer; text-align: center; line-height: 1.8; background: rgba(201, 165, 92, .03);
}
.cover-upload:hover, .upload-zone:hover { border-color: var(--gold); color: var(--gold2); }

/* ---------- 卡片管理 ---------- */
.mgr-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.mgr-card { border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: var(--card); transition: .3s; position: relative; }
.mgr-card:hover { transform: translateY(-4px); border-color: var(--gold2); box-shadow: 0 16px 40px -20px rgba(201, 165, 92, .4); }
.mgr-card .mc-img { position: relative; aspect-ratio: 4/3; overflow: hidden; }
.mgr-card img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.78); }
.mgr-card .mc-badge { position: absolute; right: 8px; top: 8px; font-size: 9px; padding: 3px 8px; border-radius: 999px; background: rgba(8, 9, 13, .85); border: 1px solid var(--line2); color: var(--gold2); }
.mgr-card .mc-ai { position: absolute; left: 8px; top: 8px; width: 22px; height: 22px; border-radius: 4px; background: rgba(139, 124, 246, .85); display: grid; place-items: center; color: #fff; font-size: 9px; font-family: var(--serif); }
.mgr-card .mc-body { padding: 12px; }
.mgr-card h4 { font-family: var(--serif); font-size: 13px; margin: 0 0 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mgr-card .mc-meta { font-size: 9px; color: var(--faint); margin-bottom: 10px; }
.mgr-card .mc-btns { display: flex; gap: 5px; }
.mgr-card .mc-btns button { flex: 1; padding: 5px; font-size: 9px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); cursor: pointer; background: none; transition: .2s; }
.mgr-card .mc-btns button:hover { border-color: var(--gold); color: var(--gold2); }
.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 20px; font-size: 11px; color: var(--muted); }
.pager .pgs { display: flex; gap: 5px; }
.pager .pgs button { width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); cursor: pointer; font-size: 11px; background: none; }
.pager .pgs button.on { background: linear-gradient(135deg, #E3C98C, #C9A55C); color: #1A1206; border-color: transparent; }
.pagination-note { text-align: center; font-size: 10px; color: var(--faint); letter-spacing: .15em; margin-top: 26px; }

@media (max-width: 1200px) {
  .mgr-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .mgr-grid, .audit-layout, .tenant-layout, .build-layout, .info-grid, .audit-btns, .audit-progress { grid-template-columns: 1fr; }
}
