/* ============ 新澳门六合彩 · 管理后台 设计系统 "Golden Glass" ============
   与前台同色系：底 #0B0F1A / 金 #F5C451 / 波色 红 #FF3B4E 蓝 #3B8BFF 绿 #2ED573
   深色玻璃拟态 + 金色点睛；电脑端 1280+
   ============================================================================ */
:root {
  --bg: #0B0F1A;
  --gold: #F5C451;
  --gold2: #E0A93A;
  --gold-soft: rgba(245, 196, 81, .14);
  --grad: linear-gradient(135deg, #F5C451, #E0A93A);
  --red: #FF3B4E;
  --blue: #3B8BFF;
  --green: #2ED573;
  --panel: rgba(255, 255, 255, .06);
  --panel2: rgba(255, 255, 255, .025);
  --line: rgba(255, 255, 255, .09);
  --line2: rgba(255, 255, 255, .05);
  --txt: #E8ECF5;
  --muted: #8A93A8;
  --dim: #5B6478;
  --ok: #2ED573;
  --warn: #F5C451;
  --err: #FF3B4E;
  --info: #3B8BFF;
  --shadow: 0 12px 40px rgba(0, 0, 0, .45);
  --r: 16px;
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --mono: "DIN Alternate", "Roboto Mono", Consolas, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { color-scheme: dark; }
body {
  font-family: "Segoe UI", "Microsoft YaHei UI", "PingFang SC", system-ui, sans-serif;
  background: var(--bg); color: var(--txt); font-size: 14px; line-height: 1.5;
  min-height: 100vh; overflow-x: hidden;
}
button, input, select, textarea { font-family: inherit; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 8px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: rgba(245,196,81,.35); }
::-webkit-scrollbar-track { background: transparent; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.gold { color: var(--gold); }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; } .mb16 { margin-bottom: 16px; }

/* ---------- 极光背景 ---------- */
.aurora { position: fixed; inset: 0; z-index: -2; overflow: hidden; }
.aurora::before, .aurora::after {
  content: ""; position: absolute; width: 55vw; height: 55vw; border-radius: 50%;
  filter: blur(140px); opacity: .13; will-change: transform;
}
.aurora::before { background: var(--gold); top: -20vw; left: -14vw; animation: drift1 28s ease-in-out infinite alternate; }
.aurora::after { background: var(--blue); bottom: -24vw; right: -14vw; animation: drift2 34s ease-in-out infinite alternate; }
@keyframes drift1 { to { transform: translate(14vw, 10vh) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-12vw, -12vh) scale(1.1); } }
.grid-dots {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 75%);
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- 布局 ---------- */
.shell { display: flex; min-height: 100vh; }
.side {
  width: 236px; flex-shrink: 0; position: sticky; top: 0; height: 100vh;
  background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.008));
  border-right: 1px solid var(--line2); backdrop-filter: blur(20px);
  display: flex; flex-direction: column; padding: 18px 12px; z-index: 20;
}
.logo { display: flex; align-items: center; gap: 11px; padding: 6px 10px 20px; }
.logo-ic {
  width: 40px; height: 40px; border-radius: 13px; background: var(--grad);
  display: grid; place-items: center; font-size: 15px; font-weight: 900; color: #0B0F1A; font-family: var(--mono);
  box-shadow: 0 6px 22px rgba(245,196,81,.4), inset 0 -2px 0 rgba(0,0,0,.18);
  animation: float 5s ease-in-out infinite;
}
@keyframes float { 50% { transform: translateY(-4px); } }
.logo-tx { font-size: 15.5px; font-weight: 800; letter-spacing: .5px;
  background: linear-gradient(135deg, #fff, #F5C451); -webkit-background-clip: text; background-clip: text; color: transparent; }
.logo-sub { font-size: 10px; color: var(--muted); letter-spacing: 2px; }

.nav { display: flex; flex-direction: column; gap: 3px; flex: 1; overflow-y: auto; }
.nav-sec { font-size: 11px; color: var(--dim); padding: 14px 12px 6px; letter-spacing: 1.5px; }
.nav-item {
  position: relative; overflow: hidden; display: flex; align-items: center; gap: 11px;
  padding: 10.5px 13px; border-radius: 12px; cursor: pointer; color: var(--muted);
  font-weight: 500; transition: all .22s ease; border: 1px solid transparent; user-select: none;
}
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; transition: transform .25s var(--spring); }
.nav-item:hover { color: var(--txt); background: rgba(255,255,255,.045); transform: translateX(3px); }
.nav-item:hover svg { transform: scale(1.12) rotate(-4deg); }
.nav-item.on {
  color: #fff; background: linear-gradient(135deg, rgba(245,196,81,.2), rgba(245,196,81,.08));
  border-color: rgba(245,196,81,.35);
  box-shadow: 0 4px 18px rgba(245,196,81,.15), inset 0 1px 0 rgba(255,255,255,.08);
}
.nav-item.on svg { color: var(--gold); }
.nav-item.on::before {
  content: ""; position: absolute; left: 0; top: 22%; bottom: 22%; width: 3px;
  border-radius: 3px; background: var(--grad); box-shadow: 0 0 12px var(--gold);
}
.side-foot { padding: 12px 12px 4px; font-size: 11px; color: var(--dim); border-top: 1px solid var(--line2); display: flex; justify-content: space-between; }
.mock-badge { color: var(--gold); font-weight: 700; }

.main { flex: 1; min-width: 0; padding: 0 28px 48px; }
.topbar {
  position: sticky; top: 0; z-index: 15; display: flex; align-items: center; justify-content: space-between;
  padding: 18px 4px 14px; margin-bottom: 14px;
  background: linear-gradient(180deg, var(--bg) 70%, transparent);
}
.page-title { font-size: 21px; font-weight: 800; letter-spacing: .3px; display: flex; align-items: center; gap: 10px; }
.page-title .back { width: 30px; height: 30px; }
.page-desc { font-size: 12px; color: var(--muted); margin-top: 3px; }
.top-right { display: flex; align-items: center; gap: 10px; }
.user-chip {
  display: flex; align-items: center; gap: 9px; padding: 6px 13px 6px 7px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--line);
}
.avatar {
  width: 28px; height: 28px; border-radius: 50%; background: var(--grad);
  display: grid; place-items: center; font-size: 13px; font-weight: 800; color: #0B0F1A;
}

/* ---------- 视图切换动画 ---------- */
.view { animation: viewIn .4s ease both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(14px); } }

/* ---------- 玻璃卡片 ---------- */
.glass {
  background: linear-gradient(180deg, var(--panel), var(--panel2));
  border: 1px solid var(--line); border-radius: var(--r);
  backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px); box-shadow: var(--shadow);
}
.card { padding: 20px; }
.card + .card { margin-top: 16px; }
.card-title { font-size: 15px; font-weight: 700; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.card-title svg { width: 16px; height: 16px; color: var(--gold); }
.card-title .grow { flex: 1; }
.card-sub { font-size: 12px; color: var(--muted); font-weight: 400; }

/* ---------- 统计卡 ---------- */
.stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; margin-bottom: 18px; }
@media (max-width: 1500px) { .stats { grid-template-columns: repeat(3, 1fr); } }
.stat {
  position: relative; overflow: hidden; padding: 18px 18px 16px; cursor: default;
  transition: transform .3s var(--spring), border-color .3s, box-shadow .3s;
}
.stat:hover { transform: translateY(-5px); border-color: color-mix(in srgb, var(--sc, var(--gold)) 45%, transparent);
  box-shadow: 0 16px 44px color-mix(in srgb, var(--sc, var(--gold)) 16%, rgba(0,0,0,.4)); }
.stat::after {
  content: ""; position: absolute; top: -40%; right: -20%; width: 60%; height: 120%;
  background: radial-gradient(circle, color-mix(in srgb, var(--sc, var(--gold)) 14%, transparent), transparent 70%);
  pointer-events: none;
}
.stat-ic {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 12px;
  background: linear-gradient(135deg, var(--sc, var(--gold)), color-mix(in srgb, var(--sc, var(--gold)) 60%, #fff 10%));
  box-shadow: 0 8px 22px color-mix(in srgb, var(--sc, var(--gold)) 35%, transparent);
  color: #0B0F1A;
}
.stat-ic svg { width: 20px; height: 20px; }
.stat-num { font-size: 28px; font-weight: 800; font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: .5px; }
.stat-lbl { font-size: 12.5px; color: var(--muted); margin-top: 3px; }

/* ---------- 按钮（涟漪 + 流光） ---------- */
.btn {
  position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  outline: none; cursor: pointer; border-radius: 12px; padding: 9.5px 17px;
  font-size: 13.5px; font-weight: 600; color: var(--txt);
  background: rgba(255,255,255,.06); border: 1px solid var(--line);
  transition: transform .16s var(--spring), box-shadow .3s ease, filter .2s ease, background .2s, border-color .2s;
  user-select: none; -webkit-tap-highlight-color: transparent; white-space: nowrap;
}
.btn svg { width: 15px; height: 15px; }
.btn:hover { transform: translateY(-2px); background: rgba(255,255,255,.1); }
.btn:active { transform: scale(.95); }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn-primary {
  background: var(--grad); border: none; color: #0B0F1A;
  box-shadow: 0 4px 18px rgba(245,196,81,.32);
}
.btn-primary:hover { background: var(--grad); filter: brightness(1.08); box-shadow: 0 8px 30px rgba(245,196,81,.45); }
.btn-primary::before {
  content: ""; position: absolute; top: 0; left: -80%; width: 50%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.45), transparent);
  transform: skewX(-20deg); transition: left .55s ease;
}
.btn-primary:hover::before { left: 140%; }
.btn-danger { background: linear-gradient(135deg, #FF3B4E, #d61f33); border: none; color: #fff; box-shadow: 0 4px 18px rgba(255,59,78,.3); }
.btn-danger:hover { filter: brightness(1.1); box-shadow: 0 8px 28px rgba(255,59,78,.45); }
.btn-ok { background: linear-gradient(135deg, #2ED573, #1fb35c); border: none; color: #062b16; }
.btn-ghost { background: transparent; }
.btn-sm { padding: 6.5px 12px; font-size: 12.5px; border-radius: 10px; }
.btn-xs { padding: 4px 9px; font-size: 12px; border-radius: 8px; }
.icon-btn {
  position: relative; overflow: hidden; width: 34px; height: 34px; border-radius: 10px; display: inline-grid; place-items: center;
  background: rgba(255,255,255,.05); border: 1px solid var(--line); cursor: pointer; color: var(--muted);
  transition: all .2s var(--spring); flex-shrink: 0;
}
.icon-btn svg { width: 15px; height: 15px; }
.icon-btn:hover { color: #fff; transform: translateY(-2px) scale(1.06); background: rgba(255,255,255,.1); }
.icon-btn:active { transform: scale(.9); }
.icon-btn.danger:hover { color: var(--err); border-color: rgba(255,59,78,.4); }
.icon-btn.sm { width: 28px; height: 28px; border-radius: 8px; }
.icon-btn.sm svg { width: 13px; height: 13px; }

.ripple {
  position: absolute; border-radius: 50%; pointer-events: none;
  background: rgba(255,255,255,.45); transform: scale(0);
  animation: rip .6s ease-out forwards; mix-blend-mode: screen;
}
@keyframes rip { to { transform: scale(3.4); opacity: 0; } }

/* ---------- 表单 ---------- */
.inp, select.inp, textarea.inp {
  background: rgba(255,255,255,.045); border: 1px solid var(--line); border-radius: 11px;
  padding: 9.5px 13px; color: var(--txt); font-size: 13.5px; outline: none; width: 100%;
  transition: border-color .2s, box-shadow .2s, background .2s; min-width: 0;
}
.inp::placeholder { color: var(--dim); }
.inp:focus { border-color: var(--gold); background: rgba(255,255,255,.07); box-shadow: 0 0 0 3.5px rgba(245,196,81,.18); }
.inp.err { border-color: var(--err); }
select.inp option { background: #10141f; }
textarea.inp { resize: vertical; min-height: 90px; line-height: 1.55; }
input[type="color"].inp { padding: 4px; height: 40px; width: 60px; cursor: pointer; }
input[type="range"].inp { padding: 0; height: 34px; accent-color: var(--gold); background: transparent; border: none; box-shadow: none; }
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 15px; }
.field label { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.field .hint { font-size: 11.5px; color: var(--dim); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field-row.c3 { grid-template-columns: 1fr 1fr 1fr; }
.field-row.c4 { grid-template-columns: repeat(4, 1fr); }
.field-row.c7 { grid-template-columns: repeat(7, 1fr); }
.check { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13.5px; user-select: none; padding: 7px 12px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255,255,255,.03); transition: all .2s; }
.check:hover { border-color: rgba(245,196,81,.4); }
.check input { width: 16px; height: 16px; accent-color: var(--gold); cursor: pointer; }
.check.on { border-color: rgba(245,196,81,.5); background: var(--gold-soft); color: #fff; }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }

/* 开关 */
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; font-size: 13.5px; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .tk { width: 42px; height: 24px; border-radius: 12px; background: rgba(255,255,255,.12); border: 1px solid var(--line); position: relative; transition: background .25s, border-color .25s; flex-shrink: 0; }
.switch .tk::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .25s var(--spring), background .25s; box-shadow: 0 2px 6px rgba(0,0,0,.4); }
.switch input:checked + .tk { background: var(--grad); border-color: transparent; }
.switch input:checked + .tk::after { transform: translateX(18px); background: #0B0F1A; }
.switch input:focus-visible + .tk { box-shadow: 0 0 0 3px rgba(245,196,81,.25); }
.switch-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.switch-item { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.03); }
.switch-item .nm { font-weight: 600; font-size: 13.5px; }
.switch-item .ds { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  position: relative; overflow: hidden; padding: 7px 13px; border-radius: 10px; cursor: pointer; user-select: none;
  border: 1px solid var(--line); color: var(--muted); font-size: 12.5px; font-weight: 500;
  transition: all .22s var(--spring); background: rgba(255,255,255,.03);
}
.chip:hover { transform: translateY(-2px); color: var(--txt); border-color: rgba(245,196,81,.35); }
.chip.on { color: #0B0F1A; border-color: transparent; background: var(--grad); font-weight: 700; box-shadow: 0 4px 14px rgba(245,196,81,.28); }
.chip.var { font-family: var(--mono); color: var(--gold); border-color: rgba(245,196,81,.3); background: var(--gold-soft); }
.chip.var:hover { color: #fff; }

/* 分段控件 */
.seg { display: inline-flex; padding: 4px; border-radius: 13px; background: rgba(255,255,255,.04); border: 1px solid var(--line); gap: 3px; flex-wrap: wrap; }
.seg-item { position: relative; overflow: hidden; padding: 8px 16px; border-radius: 10px; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--muted); transition: all .22s; user-select: none; display: flex; align-items: center; gap: 6px; }
.seg-item svg { width: 14px; height: 14px; }
.seg-item:hover { color: var(--txt); }
.seg-item.on { color: #0B0F1A; background: var(--grad); box-shadow: 0 4px 14px rgba(245,196,81,.28); }

/* ---------- 工具栏 ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 14px 16px; margin-bottom: 16px; }
.toolbar .inp { width: 160px; }
.toolbar .inp.w120 { width: 120px; }
.toolbar .inp.w200 { width: 200px; }
.toolbar .inp.date { width: 150px; }
.toolbar .grow { flex: 1; }
.toolbar .sep { color: var(--dim); }

/* ---------- 表格 ---------- */
.tbl-wrap { overflow-x: auto; border-radius: var(--r); }
table.tbl { width: 100%; border-collapse: collapse; white-space: nowrap; }
.tbl thead th {
  text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: .5px;
  padding: 13px 14px; border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.025); position: sticky; top: 0; z-index: 1;
}
.tbl tbody td { padding: 12px 14px; border-bottom: 1px solid var(--line2); font-size: 13.2px; vertical-align: middle; }
.tbl tbody tr { transition: background .18s; animation: rowIn .4s ease both; }
@keyframes rowIn { from { opacity: 0; transform: translateY(8px); } }
.tbl tbody tr:hover td { background: rgba(245,196,81,.05); }
.tbl tbody tr.dragging { opacity: .4; }
.tbl tbody tr.drag-over td { border-top: 2px solid var(--gold); }
.tbl .mono { color: #ffd98a; font-size: 12.5px; }
.tbl .actions { display: flex; gap: 7px; align-items: center; }
.tbl .wrap { white-space: normal; max-width: 420px; }
.tbl .ellip { max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.drag-handle { cursor: grab; color: var(--dim); display: inline-grid; place-items: center; width: 22px; }
.drag-handle:active { cursor: grabbing; }
.drag-handle svg { width: 14px; height: 14px; }
.thumb { width: 72px; height: 40px; border-radius: 8px; object-fit: cover; background: rgba(255,255,255,.06); border: 1px solid var(--line); display: block; }

/* 状态徽章 */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3.5px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-ok { background: rgba(46,213,115,.13); color: var(--ok); }
.pill-ok .dot { animation: pulse 1.6s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(46,213,115,.5); } 70% { box-shadow: 0 0 0 6px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.pill-off { background: rgba(138,147,168,.13); color: #a3abbd; }
.pill-err { background: rgba(255,59,78,.14); color: var(--err); }
.pill-warn { background: rgba(245,196,81,.14); color: var(--gold); }
.pill-info { background: rgba(59,139,255,.14); color: var(--info); }
.tag { padding: 3px 9px; border-radius: 7px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.tag-info { background: rgba(59,139,255,.14); color: var(--info); }
.tag-op { background: rgba(167,139,250,.16); color: #b8a6ff; }
.tag-warn { background: rgba(245,196,81,.14); color: var(--gold); }
.tag-error { background: rgba(255,59,78,.14); color: var(--err); }
.tag-login { background: rgba(46,213,115,.13); color: var(--ok); }
.tag-gold { background: var(--gold-soft); color: var(--gold); }

/* 六合彩球 */
.balls { display: flex; align-items: center; gap: 6px; }
.ball {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--mono); font-weight: 800; font-size: 12.5px; color: #fff; position: relative;
  background: radial-gradient(circle at 32% 28%, rgba(255,255,255,.55), transparent 38%), var(--bc, #666);
  box-shadow: inset -3px -4px 8px rgba(0,0,0,.35), 0 3px 8px color-mix(in srgb, var(--bc, #666) 45%, transparent);
  text-shadow: 0 1px 2px rgba(0,0,0,.5);
}
.ball.red { --bc: var(--red); } .ball.blue { --bc: var(--blue); } .ball.green { --bc: var(--green); }
.ball-sep { color: var(--gold); font-weight: 800; font-size: 16px; text-shadow: 0 0 10px rgba(245,196,81,.6); margin: 0 2px; }
.ball-wrap { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; }
.ball-zo { font-size: 10.5px; color: var(--muted); line-height: 1; }
.wave-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; vertical-align: middle; }
.wave-dot.red { background: var(--red); box-shadow: 0 0 6px var(--red); }
.wave-dot.blue { background: var(--blue); box-shadow: 0 0 6px var(--blue); }
.wave-dot.green { background: var(--green); box-shadow: 0 0 6px var(--green); }

/* ---------- 分页 ---------- */
.pager { display: flex; align-items: center; gap: 6px; justify-content: flex-end; padding: 14px 16px; flex-wrap: wrap; }
.pager .info { margin-right: auto; font-size: 12.5px; color: var(--muted); }
.page-btn {
  position: relative; overflow: hidden; min-width: 32px; height: 32px; padding: 0 9px; border-radius: 9px;
  display: inline-grid; place-items: center; cursor: pointer; font-size: 12.5px;
  background: rgba(255,255,255,.045); border: 1px solid var(--line); color: var(--muted);
  transition: all .18s var(--spring); user-select: none;
}
.page-btn:hover { color: #fff; transform: translateY(-2px); }
.page-btn.on { background: var(--grad); border: none; color: #0B0F1A; font-weight: 700; box-shadow: 0 4px 14px rgba(245,196,81,.3); }
.page-btn.dis { opacity: .35; pointer-events: none; }

/* ---------- 弹窗 ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px;
  background: rgba(3, 5, 12, .66); backdrop-filter: blur(7px); animation: fade .22s ease;
}
.overlay.closing { animation: fadeOut .18s ease forwards; }
@keyframes fade { from { opacity: 0; } }
@keyframes fadeOut { to { opacity: 0; } }
.modal { width: min(560px, 94vw); max-height: 88vh; overflow-y: auto; padding: 24px; animation: pop .4s var(--spring); }
.modal.w720 { width: min(720px, 94vw); } .modal.w900 { width: min(900px, 94vw); } .modal.w420 { width: min(420px, 94vw); }
.overlay.closing .modal { animation: popOut .18s ease forwards; }
@keyframes pop { from { transform: scale(.88) translateY(18px); opacity: 0; } }
@keyframes popOut { to { transform: scale(.94) translateY(8px); opacity: 0; } }
.modal-title { font-size: 17px; font-weight: 800; margin-bottom: 4px; display: flex; align-items: center; gap: 9px; }
.modal-title svg { width: 18px; height: 18px; color: var(--gold); }
.modal-sub { font-size: 12.5px; color: var(--muted); margin-bottom: 18px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.modal-foot .left { margin-right: auto; }
.id-show { text-align: center; padding: 18px; border-radius: 14px; background: var(--gold-soft); border: 1px dashed rgba(245,196,81,.45); margin: 12px 0; }
.id-show .id { font-family: var(--mono); font-size: 30px; font-weight: 800; color: var(--gold); letter-spacing: 2px; }
.id-show .lbl { font-size: 12px; color: var(--muted); }

/* ---------- Toast ---------- */
#toasts { position: fixed; top: 18px; right: 18px; z-index: 300; display: flex; flex-direction: column; gap: 10px; }
.toast {
  position: relative; overflow: hidden; min-width: 250px; max-width: 380px; padding: 13px 16px 15px;
  border-radius: 13px; font-size: 13.5px; display: flex; gap: 10px; align-items: flex-start;
  background: linear-gradient(180deg, rgba(24,30,46,.95), rgba(16,21,34,.95));
  border: 1px solid var(--line); backdrop-filter: blur(18px); box-shadow: 0 14px 40px rgba(0,0,0,.5);
  animation: toastIn .38s var(--spring);
}
.toast.leaving { animation: toastOut .25s ease forwards; }
@keyframes toastIn { from { transform: translateX(110%) scale(.9); opacity: 0; } }
@keyframes toastOut { to { transform: translateX(110%); opacity: 0; } }
.toast .t-ic { width: 20px; height: 20px; flex-shrink: 0; margin-top: 1px; }
.toast.ok .t-ic { color: var(--ok); } .toast.err .t-ic { color: var(--err); } .toast.warn .t-ic { color: var(--gold); } .toast.info .t-ic { color: var(--info); }
.toast .t-bd b { display: block; font-size: 13.5px; margin-bottom: 2px; }
.toast .t-bd span { color: var(--muted); font-size: 12.5px; word-break: break-all; }
.toast .bar { position: absolute; left: 0; bottom: 0; height: 2.5px; background: var(--grad); animation: barRun linear forwards; }
.toast.ok .bar { background: linear-gradient(90deg, #2ED573, #1fb35c); }
.toast.err .bar { background: linear-gradient(90deg, #FF3B4E, #d61f33); }
.toast.info .bar { background: linear-gradient(90deg, #3B8BFF, #2b6fd6); }
@keyframes barRun { from { width: 100%; } to { width: 0; } }

/* ---------- 下拉菜单 ---------- */
.menu {
  position: fixed; z-index: 150; min-width: 160px; padding: 6px;
  border-radius: 13px; background: linear-gradient(180deg, rgba(24,30,46,.98), rgba(16,21,34,.98));
  border: 1px solid var(--line); box-shadow: 0 18px 50px rgba(0,0,0,.55); backdrop-filter: blur(20px);
  animation: menuIn .2s var(--spring); transform-origin: top right;
}
@keyframes menuIn { from { transform: scale(.85); opacity: 0; } }
.menu-item { display: flex; align-items: center; gap: 9px; padding: 9px 12px; border-radius: 9px; cursor: pointer; font-size: 13px; color: var(--txt); transition: background .15s, transform .15s; }
.menu-item svg { width: 14px; height: 14px; }
.menu-item:hover { background: rgba(255,255,255,.07); transform: translateX(2px); }
.menu-item.danger { color: var(--err); }
.menu-item.danger:hover { background: rgba(255,59,78,.1); }

/* ---------- 登录页 ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-card { width: min(410px, 92vw); padding: 38px 34px; text-align: center; position: relative; overflow: hidden; }
.login-card::before { content: ""; position: absolute; top: -60%; left: -30%; width: 160%; height: 100%; background: radial-gradient(ellipse, rgba(245,196,81,.12), transparent 60%); pointer-events: none; }
.login-logo {
  width: 68px; height: 68px; margin: 0 auto 18px; border-radius: 22px; background: var(--grad);
  display: grid; place-items: center; font-size: 26px; font-weight: 900; color: #0B0F1A; font-family: var(--mono);
  box-shadow: 0 14px 40px rgba(245,196,81,.4), inset 0 -3px 0 rgba(0,0,0,.18);
  animation: float 5s ease-in-out infinite; position: relative;
}
.login-title { font-size: 21px; font-weight: 800; margin-bottom: 6px; }
.login-sub { font-size: 12px; color: var(--muted); margin-bottom: 26px; letter-spacing: 2px; }
.login-card .inp { padding: 12px 15px; margin-bottom: 14px; font-size: 14px; }
.login-card .btn { width: 100%; padding: 12.5px; font-size: 14.5px; margin-top: 4px; }
.login-card.shake { animation: shake .45s ease; }
@keyframes shake { 20%, 60% { transform: translateX(-9px); } 40%, 80% { transform: translateX(9px); } }
.cap-row { display: flex; gap: 10px; margin-bottom: 14px; align-items: stretch; }
.cap-row .inp { flex: 1; margin-bottom: 0; text-transform: uppercase; letter-spacing: 3px; }
.cap-img { width: 130px; height: 46px; border-radius: 10px; overflow: hidden; cursor: pointer; flex-shrink: 0;
  border: 1px solid var(--line); background: #0d1220; display: grid; place-items: center; transition: border-color .2s; }
.cap-img:hover { border-color: var(--gold); }
.cap-img svg { width: 100%; height: 100%; display: block; }
.cap-loading { color: var(--muted); font-size: 12px; }

/* ---------- 空状态 / 骨架屏 ---------- */
.empty { padding: 54px 20px; text-align: center; color: var(--muted); }
.empty .e-ic { width: 46px; height: 46px; margin: 0 auto 12px; color: var(--dim); }
.empty .e-ic svg { width: 100%; height: 100%; }
.sk { border-radius: 9px; height: 15px; margin: 13px 14px;
  background: linear-gradient(90deg, rgba(255,255,255,.04) 25%, rgba(255,255,255,.1) 37%, rgba(255,255,255,.04) 63%);
  background-size: 400% 100%; animation: shimmer 1.3s infinite; }
.sk.tall { height: 120px; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* ---------- 仪表盘图表 ---------- */
.dash-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 16px; margin-bottom: 18px; }
.chart-box { min-height: 320px; display: flex; flex-direction: column; }
.chart-box .chart { flex: 1; min-height: 0; width: 100%; }
.bars { display: flex; flex-direction: column; gap: 10px; padding-top: 4px; }
.bar-row { display: grid; grid-template-columns: 90px 1fr 70px; align-items: center; gap: 12px; font-size: 13px; }
.bar-row .bl { color: var(--muted); text-align: right; }
.bar-row .bt { height: 14px; border-radius: 7px; background: rgba(255,255,255,.05); overflow: hidden; position: relative; }
.bar-row .bf { height: 100%; border-radius: 7px; width: 0; transition: width .9s cubic-bezier(.22,1,.36,1); background: linear-gradient(90deg, var(--bc, var(--gold)), color-mix(in srgb, var(--bc, var(--gold)) 60%, #fff 15%)); box-shadow: 0 0 12px color-mix(in srgb, var(--bc, var(--gold)) 50%, transparent); }
.bar-row .bv { font-family: var(--mono); font-weight: 700; color: var(--txt); }
svg.line-chart { width: 100%; height: 100%; overflow: visible; }
.line-chart .grid { stroke: rgba(255,255,255,.06); }
.line-chart .axis { fill: var(--muted); font-size: 11px; }
.line-chart .path { fill: none; stroke: var(--gold); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 6px rgba(245,196,81,.55)); }
.line-chart .area { fill: url(#lineGrad); }
.line-chart .pt { fill: #0B0F1A; stroke: var(--gold); stroke-width: 2.5; }
.line-chart .pv { fill: var(--txt); font-size: 11px; font-family: var(--mono); text-anchor: middle; }
.last-update { font-size: 11.5px; color: var(--dim); display: flex; align-items: center; gap: 6px; }
.last-update .live { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); animation: pulse 1.6s ease-out infinite; }

/* ---------- 站点设置 ---------- */
.site-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; gap: 12px; }
.zone-title { display: flex; align-items: center; gap: 10px; font-weight: 700; margin: 18px 0 10px; font-size: 14px; }
.zone-title:first-child { margin-top: 0; }
.zone-title .tag { font-weight: 600; }
.zone-title .ln { flex: 1; height: 1px; background: var(--line2); }
.preview-box { border-radius: 14px; border: 1px dashed rgba(255,255,255,.14); background: rgba(0,0,0,.25); padding: 30px 16px 16px; display: grid; place-items: center; min-height: 160px; position: relative; overflow: hidden; }
.preview-box .lbl { position: absolute; top: 8px; left: 12px; font-size: 11px; color: var(--dim); letter-spacing: 1px; }
.carousel-prev { width: 100%; max-width: 420px; aspect-ratio: 16/7; border-radius: 12px; overflow: hidden; position: relative; background: #101625; perspective: 800px; }
.carousel-prev img, .carousel-prev .ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: grid; place-items: center; color: var(--dim); font-size: 12px; background: linear-gradient(135deg, #1a2238, #0f1422); }
.carousel-prev .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 8px 12px; font-size: 12px; background: linear-gradient(transparent, rgba(0,0,0,.7)); color: #fff; }
.carousel-prev .dots { position: absolute; bottom: 6px; right: 10px; display: flex; gap: 4px; }
.carousel-prev .dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.4); display: block; }
.carousel-prev .dots i.on { background: var(--gold); width: 14px; border-radius: 3px; }
.carousel-prev .slide { position: absolute; inset: 0; will-change: transform, opacity; }
.fx-slide .slide.out { animation: fxSlideOut var(--dur, .6s) ease both; }
.fx-slide .slide.in { animation: fxSlideIn var(--dur, .6s) ease both; }
@keyframes fxSlideIn { from { transform: translateX(100%); } }
@keyframes fxSlideOut { to { transform: translateX(-100%); } }
.fx-fade .slide.out { animation: fxFadeOut var(--dur, .6s) ease both; }
.fx-fade .slide.in { animation: fxFadeIn var(--dur, .6s) ease both; }
@keyframes fxFadeIn { from { opacity: 0; } }
@keyframes fxFadeOut { to { opacity: 0; } }
.fx-zoom .slide.out { animation: fxZoomOut var(--dur, .6s) ease both; }
.fx-zoom .slide.in { animation: fxZoomIn var(--dur, .6s) ease both; }
@keyframes fxZoomIn { from { opacity: 0; transform: scale(1.25); } }
@keyframes fxZoomOut { to { opacity: 0; transform: scale(.9); } }
.fx-cube .slide.out { animation: fxCubeOut var(--dur, .6s) ease both; transform-origin: left center; }
.fx-cube .slide.in { animation: fxCubeIn var(--dur, .6s) ease both; transform-origin: right center; }
@keyframes fxCubeIn { from { transform: translateX(100%) rotateY(-90deg); opacity: .4; } }
@keyframes fxCubeOut { to { transform: translateX(-100%) rotateY(90deg); opacity: .4; } }
.upload-box { border: 1px dashed rgba(245,196,81,.35); border-radius: 12px; padding: 14px; display: flex; align-items: center; gap: 14px; cursor: pointer; transition: all .2s; background: rgba(245,196,81,.04); position: relative; }
.upload-box:hover { border-color: var(--gold); background: rgba(245,196,81,.08); }
.upload-box input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload-box img { width: 96px; height: 54px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.upload-box .ph { width: 96px; height: 54px; border-radius: 8px; display: grid; place-items: center; background: rgba(255,255,255,.05); color: var(--dim); }
.upload-box .ph svg { width: 22px; height: 22px; }
.upload-box .tx { font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.ad-prev { display: grid; place-items: center; }
.ad-card { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; padding: 12px; color: #fff; background-size: cover; background-position: center; min-width: 120px; min-height: 60px; transition: all .3s; }
.ad-card.glow { box-shadow: 0 0 0 1px var(--gc, var(--gold)), 0 0 18px var(--gc, var(--gold)); }
.ad-card .t { font-weight: 700; font-size: 14px; }
.ad-card .d { font-size: 12px; opacity: .8; }
.about-type { font-size: 11px; }
.kv-list { display: flex; flex-direction: column; gap: 8px; }
.kv-row { display: grid; grid-template-columns: 24px 1fr 1fr 130px 40px; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line2); background: rgba(255,255,255,.02); }
.kv-row.dragging { opacity: .4; } .kv-row.drag-over { border-top-color: var(--gold); box-shadow: inset 0 2px 0 var(--gold); }

/* ---------- 机器人 ---------- */
.bot-tabs { margin-bottom: 18px; }
.bot-grid { display: grid; grid-template-columns: 1fr 360px; gap: 18px; align-items: start; }
.bot-grid.single { grid-template-columns: 1fr; }
.cmd-btns { display: flex; flex-direction: column; gap: 6px; }
.cmd-btn-row { display: grid; grid-template-columns: 1fr 1.5fr 34px; gap: 8px; }
.menu-editor { display: flex; flex-direction: column; gap: 10px; }
.menu-row-lbl { font-size: 11.5px; color: var(--dim); letter-spacing: 1px; margin: 4px 0 -4px; }
.mbtn { display: grid; grid-template-columns: 22px 1fr 120px 34px 34px; gap: 8px; align-items: center; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.03); transition: all .2s; }
.mbtn.dragging { opacity: .4; } .mbtn.drag-over { border-color: var(--gold); box-shadow: inset 0 2px 0 var(--gold); }
.mbtn-links { grid-column: 2 / -1; display: flex; flex-direction: column; gap: 6px; padding-top: 4px; }
.mbtn-link { display: grid; grid-template-columns: 1fr 2fr 30px; gap: 6px; }
.mbtn-link .inp, .mbtn .inp { padding: 7px 10px; font-size: 12.5px; }
.kb-editor { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kb-key { padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.03); }
.kb-key .hint { font-size: 11px; color: var(--dim); margin-top: 6px; }

/* 手机预览 */
.phone { width: 340px; margin: 0 auto; border-radius: 40px; padding: 12px; background: linear-gradient(160deg, #1c2233, #0d111c); border: 1px solid rgba(255,255,255,.12); box-shadow: 0 30px 70px rgba(0,0,0,.6), inset 0 0 0 2px rgba(0,0,0,.6); position: sticky; top: 90px; }
.phone-scr { border-radius: 30px; overflow: hidden; background: #0e1621; height: 620px; display: flex; flex-direction: column; position: relative; }
.phone-notch { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 110px; height: 24px; background: #0d111c; border-radius: 0 0 16px 16px; z-index: 2; }
.tg-head { padding: 34px 14px 10px; background: #17212b; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid rgba(255,255,255,.05); }
.tg-head .av { width: 36px; height: 36px; border-radius: 50%; background: var(--grad); display: grid; place-items: center; font-weight: 800; color: #0B0F1A; font-size: 14px; }
.tg-head .nm { font-weight: 700; font-size: 14px; color: #fff; }
.tg-head .st { font-size: 11px; color: #6ab2f2; }
.tg-body { flex: 1; overflow-y: auto; padding: 12px 10px; display: flex; flex-direction: column; gap: 8px; background: radial-gradient(ellipse at top, #1a2a3a, #0e1621); }
.tg-msg { align-self: flex-start; max-width: 88%; background: #182533; color: #e6ecf2; padding: 8px 11px; border-radius: 14px 14px 14px 4px; font-size: 13px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; animation: rowIn .35s ease both; }
.tg-msg.me { align-self: flex-end; background: #2b5278; border-radius: 14px 14px 4px 14px; }
.tg-msg .tm { display: block; text-align: right; font-size: 10px; color: #6d8aa3; margin-top: 3px; }
.tg-inline { display: flex; flex-direction: column; gap: 4px; max-width: 88%; align-self: flex-start; margin-top: -4px; }
.tg-inline .r { display: flex; gap: 4px; }
.tg-inline .b { flex: 1; text-align: center; padding: 7px 8px; border-radius: 8px; background: rgba(255,255,255,.1); color: #6ab2f2; font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; justify-content: center; gap: 4px; }
.tg-inline .b svg { width: 11px; height: 11px; flex-shrink: 0; }
.tg-kb { background: #17212b; padding: 8px 8px 10px; display: flex; flex-direction: column; gap: 6px; border-top: 1px solid rgba(255,255,255,.05); }
.tg-kb .r { display: flex; gap: 6px; }
.tg-kb .k { flex: 1; text-align: center; padding: 9px; border-radius: 8px; background: #2b3a4a; color: #e6ecf2; font-size: 13px; font-weight: 600; }
.tg-input { padding: 8px 12px 14px; background: #17212b; display: flex; align-items: center; gap: 8px; }
.tg-input .f { flex: 1; height: 36px; border-radius: 18px; background: #242f3d; color: #6d8aa3; font-size: 13px; display: flex; align-items: center; padding: 0 14px; }
.tg-input .s { width: 36px; height: 36px; border-radius: 50%; background: #5288c1; display: grid; place-items: center; color: #fff; }
.tg-input .s svg { width: 16px; height: 16px; }
.tg-input .kbi { width: 22px; height: 22px; color: #6d8aa3; }
.tg-input .kbi svg { width: 22px; height: 22px; }

/* 统计小卡 */
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.mini-stat { padding: 16px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255,255,255,.03); text-align: center; }
.mini-stat .n { font-family: var(--mono); font-size: 26px; font-weight: 800; color: var(--gold); }
.mini-stat .l { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* 日志明细 */
.detail-pre { font-family: var(--mono); font-size: 12px; color: var(--muted); white-space: pre-wrap; word-break: break-all; background: rgba(0,0,0,.3); padding: 12px; border-radius: 10px; max-height: 300px; overflow: auto; }

/* 加载遮罩 */
.loading-line { height: 2px; background: var(--grad); position: fixed; top: 0; left: 0; z-index: 400; animation: loadLine 1.2s ease-in-out infinite; width: 30%; }
@keyframes loadLine { 0% { left: -30%; } 100% { left: 100%; } }
