:root {
  --bg: #f4f6f9;
  --panel: #ffffff;
  --ink: #10151c;
  --ink-2: #47566a;
  --ink-3: #8c99aa;
  --line: #e6ebf2;
  --line-strong: #d6dee9;
  --green: #07c160;
  --green-dark: #06ad56;
  --green-soft: #e8f8ee;
  --blue: #2f6bff;
  --blue-soft: #eaf0ff;
  --danger: #e5484d;
  --danger-soft: #fdeeee;
  --amber: #f5a524;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 21, 28, .04), 0 8px 24px rgba(16, 21, 28, .06);
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
}

button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; }

.app { display: flex; min-height: 100vh; }

/* ------------------------------------------------------------ 侧边栏 */
.sidebar {
  width: 248px;
  flex: 0 0 248px;
  background: radial-gradient(120% 60% at 0% 0%, #16202b 0%, #0c1117 55%, #090d12 100%);
  color: #dfe7f0;
  display: flex;
  flex-direction: column;
  padding: 22px 16px 18px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 26px; }

.brand-mark {
  width: 40px; height: 40px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: #4ee08a;
  background: rgba(78, 224, 138, .1);
  border: 1px solid rgba(78, 224, 138, .22);
}
.brand-mark svg { width: 22px; height: 22px; fill: currentColor; }

.brand-text strong { display: block; font-size: 16px; letter-spacing: .5px; }
.brand-text span { display: block; font-size: 11px; color: #6d7f92; letter-spacing: 1.2px; margin-top: 2px; }

.nav { display: flex; flex-direction: column; gap: 6px; }

.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 12px 12px;
  border-radius: 10px;
  color: #9fb0c2;
  font-size: 14px;
  text-align: left;
  transition: background .18s, color .18s;
  position: relative;
}
.nav-item svg { width: 18px; height: 18px; fill: currentColor; stroke: currentColor; stroke-width: 1.6; fill-opacity: 0; flex: 0 0 18px; }
.nav-item svg rect, .nav-item svg circle { fill: currentColor; fill-opacity: 1; stroke: none; }
.nav-item span { flex: 1; }

.nav-item:hover { background: rgba(255, 255, 255, .05); color: #e6eef7; }

.nav-item.is-active {
  background: rgba(78, 224, 138, .12);
  color: #ffffff;
}
.nav-item.is-active::before {
  content: "";
  position: absolute; left: -16px; top: 14px; bottom: 14px;
  width: 3px; border-radius: 0 3px 3px 0;
  background: var(--green);
}

.nav-count {
  font-style: normal;
  font-size: 11px;
  min-width: 20px; height: 18px;
  line-height: 18px;
  text-align: center;
  border-radius: 9px;
  background: rgba(255, 255, 255, .1);
  color: #b9c8d8;
  padding: 0 6px;
}
.nav-item.is-active .nav-count { background: rgba(78, 224, 138, .2); color: #8ff0b6; }

.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; padding: 0 4px; }

.status-line { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #71839a; }
.status-line i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(7, 193, 96, .14); }

.ghost-btn {
  padding: 9px 12px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, .12);
  color: #a9bacb;
  font-size: 12.5px;
  transition: .18s;
}
.ghost-btn:hover { border-color: rgba(255, 255, 255, .26); color: #fff; }

/* ------------------------------------------------------------ 侧栏用户 */
.user-card {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 11px;
  background: rgba(255, 255, 255, .045);
  border: 1px solid rgba(255, 255, 255, .07);
}
.avatar {
  width: 30px; height: 30px; flex: 0 0 30px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(145deg, #07c160, #059a4c);
  color: #fff; font-weight: 700; font-size: 13px;
}
.user-meta { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.user-meta strong { font-size: 12.8px; color: #eaf1f8; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-meta span { font-size: 11px; color: #6f8299; }
.user-out {
  width: 26px; height: 26px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
  color: #7d90a6; transition: .18s;
}
.user-out svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.user-out:hover { background: rgba(229, 72, 77, .14); color: #ff8b8e; }

/* ------------------------------------------------------------ 登录页 */
.auth-layer {
  position: fixed; inset: 0; z-index: 90;
  display: flex; background: var(--bg);
}
.auth-side {
  width: 46%; max-width: 620px; flex: 0 0 46%;
  background: radial-gradient(120% 80% at 0% 0%, #16202b 0%, #0c1117 52%, #080c11 100%);
  color: #dfe7f0; padding: 40px 52px; display: flex; flex-direction: column;
  position: relative; overflow: hidden;
}
.auth-side::after {
  content: ''; position: absolute; right: -120px; bottom: -140px;
  width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(7, 193, 96, .22), transparent 68%);
}
.auth-brand { display: flex; align-items: center; gap: 12px; }
.auth-brand .brand-mark { width: 42px; height: 42px; }
.auth-headline {
  margin: auto 0 0; font-size: 34px; line-height: 1.32; letter-spacing: -.6px;
  font-weight: 700; color: #fff;
}
.auth-sub { margin: 16px 0 0; color: #8ea0b5; font-size: 14px; line-height: 1.75; max-width: 400px; }
.auth-points { margin: 30px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 14px; }
.auth-points li { font-size: 13px; color: #93a5b9; display: flex; gap: 10px; line-height: 1.6; }
.auth-points li b {
  flex: 0 0 auto; color: #4ee08a; background: rgba(7, 193, 96, .1);
  border: 1px solid rgba(7, 193, 96, .22); border-radius: 6px;
  padding: 1px 7px; font-size: 11.5px; font-weight: 600;
}
.auth-side-foot { margin-top: 40px; font-size: 11.5px; color: #55677c; letter-spacing: .3px; }

.auth-main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px 32px; }
.auth-card { width: 100%; max-width: 396px; }
.auth-badge {
  display: inline-block; padding: 4px 10px; border-radius: 999px;
  background: var(--green-soft); color: #05893f; font-size: 11.5px; font-weight: 600;
  letter-spacing: .4px; margin-bottom: 14px;
}
.auth-card h1 { margin: 0; font-size: 26px; letter-spacing: -.4px; }
.auth-desc { margin: 10px 0 26px; color: var(--ink-2); font-size: 13.5px; line-height: 1.7; }
.auth-field { display: block; margin-bottom: 16px; }
.auth-field > span {
  display: block; font-size: 12px; color: var(--ink-3);
  letter-spacing: .5px; margin-bottom: 7px; font-weight: 500;
}
.auth-field input {
  width: 100%; height: 46px; padding: 0 14px;
  border: 1px solid var(--line-strong); border-radius: 11px;
  background: #fff; color: var(--ink); font-size: 14.5px;
  transition: .18s;
}
.auth-field input:focus {
  outline: none; border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(7, 193, 96, .12);
}
.auth-pwd { position: relative; }
.auth-pwd input { padding-right: 46px; }
.pwd-eye {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center; color: var(--ink-3);
}
.pwd-eye svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
.pwd-eye:hover { color: var(--ink); background: #f2f5f9; }
.auth-err {
  background: var(--danger-soft); color: #b4232a; border: 1px solid #f6d4d5;
  border-radius: 9px; padding: 9px 12px; font-size: 12.5px; margin-bottom: 14px; line-height: 1.6;
}
.auth-submit { width: 100%; height: 46px; border-radius: 11px; font-size: 14.5px; }
.auth-tip { margin-top: 16px; font-size: 11.8px; color: var(--ink-3); line-height: 1.7; }
.auth-card { animation: auth-in .32s ease-out; }
@keyframes auth-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------------ 主区域 */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 20px;
  padding: 26px 32px 18px;
}
.topbar h1 { margin: 0; font-size: 22px; letter-spacing: .4px; }
.topbar p { margin: 6px 0 0; color: var(--ink-3); font-size: 13px; }
.top-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.top-side { display: flex; align-items: center; gap: 12px; }
.refresh-chip {
  display: inline-flex; align-items: center; gap: 7px;
  height: 32px; padding: 0 12px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line);
  color: var(--ink-2); font-size: 12px; letter-spacing: .2px;
  transition: .18s;
}
.refresh-chip:hover { border-color: var(--line-strong); color: var(--ink); }
.refresh-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--green);
  box-shadow: 0 0 0 0 rgba(7, 193, 96, .45);
  animation: pulse-dot 1.8s infinite;
}
.refresh-chip.is-paused { color: var(--ink-3); background: #f6f8fa; }
.refresh-chip.is-paused .refresh-dot { background: #b9c4d0; animation: none; box-shadow: none; }
@keyframes pulse-dot {
  0% { box-shadow: 0 0 0 0 rgba(7, 193, 96, .45); }
  70% { box-shadow: 0 0 0 7px rgba(7, 193, 96, 0); }
  100% { box-shadow: 0 0 0 0 rgba(7, 193, 96, 0); }
}

.content { padding: 4px 32px 48px; }

/* ------------------------------------------------------------ 通用组件 */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  height: 38px; padding: 0 16px;
  border-radius: 9px;
  font-size: 13.5px;
  background: #fff;
  color: var(--ink-2);
  border: 1px solid var(--line-strong);
  transition: .18s;
  white-space: nowrap;
}
.btn:hover { border-color: #bcc8d7; color: var(--ink); background: #fbfcfe; }
.btn svg { width: 16px; height: 16px; }

.btn-primary {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
  box-shadow: 0 6px 16px rgba(7, 193, 96, .22);
}
.btn-primary:hover { background: var(--green-dark); border-color: var(--green-dark); color: #fff; }

.btn-danger { color: var(--danger); border-color: #f3c9ca; background: #fff; }
.btn-danger:hover { background: var(--danger-soft); border-color: #eaa9ab; }

.btn-sm { height: 30px; padding: 0 11px; font-size: 12.5px; border-radius: 8px; }
.btn-ghost { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: #f2f5f9; border-color: transparent; }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-pad { padding: 20px 22px; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }

.stat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px 14px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.stat .label { font-size: 12.5px; color: var(--ink-3); }
.stat .value { font-size: 26px; font-weight: 650; margin-top: 8px; letter-spacing: -.5px; }
.stat .hint { font-size: 12px; color: var(--ink-3); margin-top: 4px; }
.stat::after {
  content: ""; position: absolute; right: -24px; top: -24px; width: 76px; height: 76px;
  border-radius: 50%; background: var(--green-soft); opacity: .7;
}
.stat:nth-child(2)::after { background: var(--blue-soft); }
.stat:nth-child(3)::after { background: #fff4e3; }
.stat:nth-child(4)::after { background: #f1ecff; }

.toolbar { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }

.search {
  display: flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: #fbfcfe;
  min-width: 260px;
}
.search svg { width: 15px; height: 15px; color: var(--ink-3); }
.search input { border: 0; outline: 0; background: transparent; flex: 1; min-width: 0; }
.search input::placeholder { color: #a9b5c3; }

select.mini, .field select, .field input, .field textarea {
  height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: #fff;
  padding: 0 12px;
  color: var(--ink);
  outline: 0;
  transition: .16s;
}
select.mini { height: 36px; font-size: 13px; color: var(--ink-2); }
.field input:focus, .field select:focus, .field textarea:focus, .search:focus-within {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(7, 193, 96, .12);
}

.table { width: 100%; border-collapse: collapse; }
.table thead th {
  text-align: left; font-weight: 500; font-size: 12.5px; color: var(--ink-3);
  padding: 12px 16px; background: #fafbfd; border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.table tbody td { padding: 14px 16px; border-bottom: 1px solid #f0f3f7; vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fafcff; }

.cell-main { font-weight: 600; color: var(--ink); }
.cell-sub { font-size: 12px; color: var(--ink-3); margin-top: 3px; }

.link { color: var(--blue); text-decoration: none; font-family: var(--mono); font-size: 12.5px; }
.link:hover { text-decoration: underline; }
.truncate { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; vertical-align: bottom; }

.pill {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  height: 24px; padding: 0 10px; border-radius: 12px;
  font-size: 12px; background: #f0f3f7; color: var(--ink-2);
}
.pill i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-3); }
.pill.ok { background: var(--green-soft); color: #0a8a48; }
.pill.ok i { background: var(--green); }
.pill.off { background: #f2f4f7; color: #7d8a99; }
.pill.off i { background: #98a4b3; }

.mono { font-family: var(--mono); font-size: 12.5px; }

.empty { padding: 64px 20px; text-align: center; color: var(--ink-3); }
.empty .ico {
  width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  background: #f2f5f9; color: #a9b6c5;
}
.empty .ico svg { width: 26px; height: 26px; fill: currentColor; }
.empty h3 { margin: 0 0 6px; font-size: 15px; color: var(--ink-2); font-weight: 600; }
.empty p { margin: 0 0 18px; font-size: 13px; }

.row-actions { display: flex; gap: 4px; justify-content: flex-end; }

/* ------------------------------------------------------------ 生成页 */
.create-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 18px; align-items: start; }

.form-card h2 { font-size: 15px; margin: 0 0 4px; }
.form-card .sub { color: var(--ink-3); font-size: 12.5px; margin: 0 0 20px; }

.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 8px; font-weight: 500; }
.field .tip { font-size: 12px; color: var(--ink-3); margin-top: 6px; }
.field input, .field select { width: 100%; }
.field textarea { width: 100%; height: 76px; padding: 10px 12px; resize: vertical; line-height: 1.5; }

.seg { display: flex; gap: 8px; flex-wrap: wrap; }
.seg button {
  padding: 9px 14px; border-radius: 9px; border: 1px solid var(--line-strong);
  background: #fff; color: var(--ink-2); font-size: 13px; transition: .16s;
}
.seg button.is-on { border-color: var(--green); color: #0a8a48; background: var(--green-soft); box-shadow: inset 0 0 0 1px rgba(7, 193, 96, .18); }

.radio-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.radio-card {
  text-align: left;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  padding: 12px 14px;
  background: #fff;
  transition: .16s;
}
.radio-card strong { display: block; font-size: 13.5px; }
.radio-card span { font-size: 12px; color: var(--ink-3); }
.radio-card.is-on { border-color: var(--green); background: var(--green-soft); }
.radio-card.is-on strong { color: #0a8a48; }

.preview-card { position: sticky; top: 18px; }
.preview-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 0; }
.preview-head h2 { font-size: 15px; margin: 0; }
.preview-box {
  margin: 14px 18px 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfcfe;
  padding: 16px;
  display: flex; align-items: center; justify-content: center;
}
.preview-box img { width: 100%; max-width: 300px; display: block; border-radius: 8px; background: #fff; }
.preview-meta { padding: 14px 18px 18px; }
.preview-meta dl { margin: 0; display: grid; grid-template-columns: 74px 1fr; gap: 8px 10px; font-size: 12.5px; }
.preview-meta dt { color: var(--ink-3); }
.preview-meta dd { margin: 0; color: var(--ink-2); word-break: break-all; }

.success {
  margin-top: 18px;
  border: 1px solid #bdeccf;
  background: linear-gradient(180deg, #f3fcf7, #ffffff);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.success h3 { margin: 0 0 6px; font-size: 15px; color: #0a8a48; }
.success p { margin: 0 0 14px; color: var(--ink-2); font-size: 13px; }

/* ------------------------------------------------------------ 抽屉 */
.drawer-mask, .modal-mask {
  position: fixed; inset: 0; background: rgba(11, 16, 22, .42);
  opacity: 0; pointer-events: none;
  transition: opacity .18s ease-out;
  will-change: opacity;
  z-index: 40;
}
.drawer-mask.is-open, .modal-mask.is-open { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed; top: 0; right: 0; height: 100vh; width: 440px; max-width: 92vw;
  background: #fff; z-index: 41;
  transform: translateX(102%);
  transition: transform .3s cubic-bezier(.32, .72, 0, 1);
  will-change: transform;
  box-shadow: -30px 0 60px rgba(11, 16, 22, .16);
  display: flex; flex-direction: column;
  contain: layout paint;
}
.drawer.is-open { transform: none; }
.drawer-head { padding: 20px 22px 14px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: flex-start; }
.drawer-body { padding: 20px 22px 40px; overflow-y: auto; flex: 1 1 auto; min-height: 0; }

.icon-btn { width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: var(--ink-3); }
.icon-btn:hover { background: #f2f5f9; color: var(--ink); }
.icon-btn svg { width: 16px; height: 16px; }

.section-title { font-size: 13px; font-weight: 600; color: var(--ink); margin: 22px 0 10px; display: flex; align-items: center; gap: 8px; }
.section-title:first-child { margin-top: 0; }

.kv { display: grid; grid-template-columns: 96px 1fr; gap: 10px; font-size: 13px; align-items: start; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; color: var(--ink-2); word-break: break-all; }

.bars { display: flex; align-items: flex-end; gap: 4px; height: 84px; padding: 8px 2px 0; }
.bar { flex: 1; background: #e9eff7; border-radius: 4px; position: relative; min-height: 3px; }
.bar i { position: absolute; inset: 0; border-radius: 4px; background: linear-gradient(180deg, #4ee08a, #07c160); }

.timeline { display: flex; flex-direction: column; gap: 0; }
.tl-item { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px dashed #eef2f7; font-size: 12.5px; }
.tl-item:last-child { border-bottom: 0; }
.tl-dot { width: 8px; height: 8px; border-radius: 50%; background: #cfdae6; margin-top: 5px; flex: 0 0 8px; }
.tl-item.hi .tl-dot { background: var(--green); }
.tl-body { color: var(--ink-2); min-width: 0; }
.tl-time { color: var(--ink-3); font-size: 11.5px; margin-top: 2px; }

/* ------------------------------------------------------------ 弹窗 */
.modal {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -46%) scale(.98);
  width: 520px; max-width: 94vw; max-height: 88vh;
  background: #fff; border-radius: 16px;
  box-shadow: 0 30px 80px rgba(11, 16, 22, .28);
  display: flex; flex-direction: column;
  contain: layout paint;
  transition: transform .24s cubic-bezier(.16, 1, .3, 1), opacity .18s ease-out;
  will-change: transform, opacity;
  opacity: 0;
  overflow: hidden;
}
.modal-mask.is-open .modal { transform: translate(-50%, -50%) scale(1); opacity: 1; }
.modal-head { padding: 20px 22px 12px; display: flex; justify-content: space-between; align-items: center; }
.modal-head h2 { margin: 0; font-size: 16px; }
.modal-body { padding: 8px 22px 4px; overflow-y: auto; flex: 1 1 auto; min-height: 0; }
.modal-foot { padding: 14px 22px 20px; display: flex; justify-content: flex-end; gap: 10px; }

.qr-modal { width: 420px; }
.qr-modal .qr-holder { padding: 8px 0 4px; text-align: center; }
.qr-modal .qr-holder img { width: 300px; height: 300px; border-radius: 10px; }
.qr-modal .qr-link {
  margin-top: 10px; font-family: var(--mono); font-size: 12px; color: #7fe0ff;
  background: rgba(9, 15, 24, .85); border: 1px solid var(--line-strong); border-radius: 8px; padding: 9px 10px;
  word-break: break-all;
}

/* ------------------------------------------------------------ 提示 */
.toast-wrap { position: fixed; top: 72px; left: 50%; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.toast {
  background: #101820; color: #fff; padding: 10px 18px; border-radius: 10px; font-size: 13px;
  box-shadow: 0 12px 30px rgba(11, 16, 22, .25);
  animation: toast-in .22s ease-out;
}
.toast.err { background: #b4232a; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

@media (max-width: 1080px) {
  .create-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
  .toast-wrap { top: auto; bottom: 26px; }
  .auth-layer { flex-direction: column; overflow-y: auto; background: var(--bg); }
  .drawer { box-shadow: -16px 0 40px rgba(11, 16, 22, .18); }
  .auth-side {
    display: block; width: 100%; flex: none; background: none;
    padding: 30px 22px 0; position: static; overflow: visible;
  }
  .auth-side::after { display: none; }
  .auth-headline, .auth-sub, .auth-points, .auth-side-foot { display: none; }
  .auth-brand .brand-text strong { color: var(--ink); }
  .auth-brand .brand-text span { color: var(--ink-3); }
  .auth-main { padding: 0 22px 40px; align-items: flex-start; }
  .auth-card {
    max-width: 100%; margin-top: 22px; background: #fff;
    border: 1px solid var(--line); border-radius: 16px;
    padding: 24px 20px 22px; box-shadow: 0 1px 2px rgba(16,21,28,.04), 0 10px 28px rgba(16,21,28,.07);
  }
  .auth-card h1 { font-size: 22px; }
  .auth-desc { font-size: 13px; margin-bottom: 22px; }
  .sidebar-foot { flex-direction: row; align-items: center; gap: 12px; }
  .user-card { flex: 1 1 auto; max-width: 240px; }
  .status-line { flex: 0 0 auto; }
  .toast { font-size: 12.5px; padding: 9px 16px; }
  .app { flex-direction: column; }
  .sidebar { width: 100%; flex: none; height: auto; position: relative; padding: 16px; }
  .nav { flex-direction: row; overflow-x: auto; gap: 4px; }
  .nav-item { flex: 1 1 0; padding: 9px 10px; font-size: 13px; gap: 7px; justify-content: center; }
  .nav-item svg { width: 15px; height: 15px; flex: 0 0 15px; }
  .nav-count { display: none; }
  .toolbar { flex-wrap: wrap; }
  .search { min-width: 0; flex: 1 1 100%; }
  .nav-item.is-active::before { display: none; }
  .brand { padding-bottom: 14px; }
  .sidebar-foot { flex-direction: row; align-items: center; justify-content: space-between; margin-top: 14px; }
  .topbar { padding: 18px 18px 12px; flex-direction: column; align-items: flex-start; }
  .top-side { width: 100%; justify-content: space-between; align-items: flex-start; }
  .content { padding: 0 18px 40px; }
  .table thead { display: none; }
  .table tbody td { display: block; border: 0; padding: 7px 16px; }
  .table tbody td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: 11px;
    color: var(--ink-3);
    letter-spacing: .6px;
    margin-bottom: 3px;
  }
  .table tbody td:first-child { padding-top: 14px; }
  .table tbody tr { display: block; border-bottom: 1px solid #f0f3f7; }
  .row-actions { justify-content: flex-start; }
}

/* ------------------------------------------------------------ 动效打磨 */
.view-in { animation: view-in .26s cubic-bezier(.16, 1, .3, 1); }
@keyframes view-in {
  from { opacity: 0; transform: translate3d(0, 8px, 0); }
  to { opacity: 1; transform: none; }
}

/* 按钮按压反馈：只动 transform，不触发布局 */
.btn:active { transform: scale(.975); }
.nav-item:active { transform: scale(.988); }
.user-out:active, .icon-btn:active { transform: scale(.94); }

/* 表格行 hover 用合成层加速 */
.table tbody tr { transition: background-color .14s ease-out; }
.table tbody tr:hover { background: #f8fbfd; }

/* 抽屉/弹窗内部滚动顺滑，滚动不带动外层 */
.drawer-body, .modal-body {
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

/* 首屏骨架 */
.sk-wrap { opacity: .9; }
.sk-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 18px; }
.sk-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.sk-table { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 0; }
.sk-row { display: flex; gap: 26px; padding: 15px 22px; border-bottom: 1px solid #f4f7fa; }
.sk-row:last-child { border-bottom: 0; }
.sk-bar {
  height: 13px; border-radius: 6px;
  background: linear-gradient(90deg, #eef2f7 25%, #f7fafd 37%, #eef2f7 63%);
  background-size: 300% 100%;
  animation: sk-shine 1.4s ease-in-out infinite;
}
@keyframes sk-shine { from { background-position: 120% 0; } to { background-position: -40% 0; } }

/* 系统开了「减少动态效果」就全部关掉，尊重设置 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

@media (max-width: 820px) {
  .sk-cards { grid-template-columns: 1fr 1fr; gap: 12px; }
  .sk-row { gap: 14px; padding: 15px 16px; }
  .sk-row .sk-bar:nth-child(2) { display: none; }
}

/* 详情抽屉统计加载占位：与真实柱状图同高，避免数据到位时跳一下 */
.bar-skeleton {
  flex: 1; height: 76px; border-radius: 4px;
  background: linear-gradient(90deg, #eef2f7 25%, #f7fafd 37%, #eef2f7 63%);
  background-size: 300% 100%;
  animation: sk-shine 1.4s ease-in-out infinite;
}

@media (max-width: 820px) {
  body.drawer-lock { overflow: hidden; }
}

/* 扫码明细：时间 / IP / 设备 / 有效性 */
.section-note { font-size: 11px; font-weight: 400; color: var(--ink-3); letter-spacing: 0; margin-left: 6px; }
.scan-list {
  border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff;
}
.scan-row {
  display: grid; grid-template-columns: 84px 1fr auto 46px;
  align-items: center; gap: 10px;
  padding: 9px 12px; border-bottom: 1px solid #f4f7fa; font-size: 12.5px;
}
.scan-row:last-child { border-bottom: 0; }
.scan-row:hover { background: #f9fbfd; }
.scan-time { color: var(--ink-3); font-variant-numeric: tabular-nums; font-size: 12px; }
.scan-ip { display: flex; align-items: center; gap: 8px; min-width: 0; }
.scan-ip code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.scan-copy {
  flex: 0 0 auto; padding: 2px 7px; border-radius: 6px; font-size: 11px;
  color: var(--deep); background: var(--green-soft); transition: .16s;
}
.scan-copy:hover { background: #d8f5e4; }
.scan-dev { color: var(--ink-2); font-size: 12px; white-space: nowrap; }
.scan-flag { text-align: right; }
.scan-flag em { font-style: normal; font-size: 11px; padding: 2px 6px; border-radius: 5px; }
.scan-flag .ok { color: #0a7f45; background: #e9f8f0; }
.scan-flag .dup { color: #8a6a1f; background: #fdf3dc; }
.scan-empty { padding: 18px 12px; text-align: center; color: var(--ink-3); font-size: 12.5px; }

@media (max-width: 820px) {
  .scan-row { grid-template-columns: 1fr auto 44px; grid-template-areas: "time dev flag" "ip ip ip"; row-gap: 4px; }
  .scan-time { grid-area: time; }
  .scan-dev { grid-area: dev; }
  .scan-flag { grid-area: flag; }
  .scan-ip { grid-area: ip; }
  .scan-ip code { font-size: 12px; }
}

/* ============================================================
   科技风主题（覆盖层）
   深空底 + 网格 + 青绿霓虹，所有交互仍是原来的结构和动效
   ============================================================ */
:root {
  --bg: #060910;
  --panel: #0c131d;
  --panel-2: #0a1017;
  --ink: #e6f0fb;
  --ink-2: #a4b6c9;
  --ink-3: #6b7f95;
  --line: rgba(112, 178, 235, .16);
  --line-strong: rgba(112, 190, 250, .3);
  --green: #22e07a;
  --green-dark: #14b864;
  --green-soft: rgba(34, 224, 122, .12);
  --blue: #38bdf8;
  --blue-soft: rgba(56, 189, 248, .12);
  --danger: #ff5f6d;
  --danger-soft: rgba(255, 95, 109, .12);
  --amber: #ffc857;
  --radius: 12px;
  --shadow: 0 0 0 1px rgba(56, 189, 248, .05), 0 16px 40px rgba(0, 0, 0, .45);
  --deep: #2fe39a;
  --cyan: #38bdf8;
  --glow-green: 0 0 18px rgba(34, 224, 122, .22);
  --glow-cyan: 0 0 18px rgba(56, 189, 248, .22);
}

body {
  background:
    radial-gradient(1100px 620px at 8% -12%, rgba(34, 224, 122, .10), transparent 62%),
    radial-gradient(900px 520px at 102% -6%, rgba(56, 189, 248, .12), transparent 58%),
    linear-gradient(180deg, #070b12 0%, #05080d 100%);
  background-attachment: fixed;
  color: var(--ink);
}

/* 背景网格：只画在上半屏，四周渐隐，不抢内容 */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(90, 170, 255, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(90, 170, 255, .055) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(circle at 50% 0%, #000 0 42%, transparent 78%);
  mask-image: radial-gradient(circle at 50% 0%, #000 0 42%, transparent 78%);
}
.app { position: relative; z-index: 1; }

::selection { background: rgba(56, 189, 248, .3); color: #fff; }

/* 滚动条 */
* { scrollbar-width: thin; scrollbar-color: rgba(90, 160, 220, .35) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(90, 160, 220, .28); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: rgba(90, 160, 220, .45); }
::-webkit-scrollbar-track { background: transparent; }

/* ------------------------------------------------------------ 侧栏 */
.sidebar {
  background:
    linear-gradient(180deg, rgba(13, 22, 33, .96), rgba(7, 11, 17, .98)),
    radial-gradient(120% 60% at 0% 0%, rgba(56, 189, 248, .08), transparent 60%);
  border-right: 1px solid rgba(90, 160, 220, .14);
  box-shadow: inset -1px 0 0 rgba(56, 189, 248, .06);
}

.brand-mark {
  color: #3ff0a0;
  background: linear-gradient(145deg, rgba(34, 224, 122, .16), rgba(56, 189, 248, .1));
  border: 1px solid rgba(34, 224, 122, .32);
  box-shadow: 0 0 16px rgba(34, 224, 122, .22), inset 0 1px 0 rgba(255, 255, 255, .08);
}
.brand-text strong { color: #eaf6ff; letter-spacing: 1.2px; }
.brand-text span { color: #5f7d97; letter-spacing: 2px; text-transform: uppercase; font-size: 10px; }

.nav-item {
  color: #8ba0b6;
  border: 1px solid transparent;
  transition: background .18s, color .18s, border-color .18s;
}
.nav-item:hover {
  background: rgba(56, 189, 248, .07);
  border-color: rgba(56, 189, 248, .16);
  color: #dcecfb;
}
.nav-item.is-active {
  color: #eafff5;
  background: linear-gradient(90deg, rgba(34, 224, 122, .16), rgba(34, 224, 122, .04) 60%, transparent);
  border-color: rgba(34, 224, 122, .26);
  box-shadow: inset 0 0 18px rgba(34, 224, 122, .08);
}
.nav-item.is-active::before {
  background: linear-gradient(180deg, #3ff0a0, #22e07a);
  box-shadow: 0 0 10px rgba(34, 224, 122, .8);
  top: 10px; bottom: 10px;
}
.nav-count { background: rgba(56, 189, 248, .12); color: #a9cbdf; border: 1px solid rgba(56, 189, 248, .18); }
.nav-item.is-active .nav-count { background: rgba(34, 224, 122, .18); color: #9df7c6; border-color: rgba(34, 224, 122, .3); }

.user-card {
  background: rgba(56, 189, 248, .05);
  border: 1px solid rgba(90, 160, 220, .16);
}
.avatar {
  background: linear-gradient(145deg, #22e07a, #0ea5e9);
  box-shadow: 0 0 14px rgba(34, 224, 122, .28);
  color: #04120c;
  font-weight: 800;
}
.user-meta strong { color: #e2eefb; }
.user-meta span { color: #6b8299; }
.user-out { color: #7d93a9; }
.user-out:hover { background: rgba(255, 95, 109, .14); color: #ff8f98; }
.status-line { color: #64809a; }
.status-line i { box-shadow: 0 0 0 3px rgba(34, 224, 122, .12), 0 0 10px rgba(34, 224, 122, .6); }

/* ------------------------------------------------------------ 页头 */
.topbar h1 {
  background: linear-gradient(92deg, #f2fbff 0%, #a8f5cf 60%, #7fe3ff 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: .6px;
}
.topbar p { color: #6f8499; }

.refresh-chip {
  background: rgba(56, 189, 248, .07);
  border: 1px solid rgba(90, 160, 220, .22);
  color: #a9c3d8;
}
.refresh-chip:hover { border-color: rgba(56, 189, 248, .45); color: #dcf1ff; box-shadow: var(--glow-cyan); }
.refresh-chip.is-paused { background: rgba(255, 255, 255, .03); color: #6e8296; box-shadow: none; }
.refresh-dot { box-shadow: 0 0 0 0 rgba(34, 224, 122, .45); }

/* ------------------------------------------------------------ 卡片 / 统计 */
.card, .form-card, .preview-card, .sk-card, .sk-table {
  background: linear-gradient(180deg, rgba(17, 26, 38, .92), rgba(9, 14, 21, .94));
  border: 1px solid var(--line);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .04);
  backdrop-filter: blur(10px);
}

.stat {
  background: linear-gradient(180deg, rgba(17, 26, 38, .94), rgba(9, 14, 21, .96));
  border: 1px solid var(--line);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .04);
  transition: transform .2s cubic-bezier(.16, 1, .3, 1), border-color .2s, box-shadow .2s;
}
.stat::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(56, 189, 248, .55), transparent);
  opacity: .8;
}
.stat:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, .34);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, .12), 0 18px 40px rgba(0, 0, 0, .5), 0 0 24px rgba(56, 189, 248, .1);
}
.stat .label { color: #7e93a9; letter-spacing: .6px; }
.stat .value {
  font-family: var(--mono); font-weight: 600; letter-spacing: -.5px;
  color: #eaf8ff; text-shadow: 0 0 22px rgba(56, 189, 248, .25);
}
.stat .hint { color: #647a90; }
.stat::after { opacity: .5; filter: saturate(1.4); }
.stat:nth-child(3)::after { background: rgba(255, 200, 87, .16); }
.stat:nth-child(4)::after { background: rgba(168, 120, 255, .16); }

/* ------------------------------------------------------------ 工具条 / 输入 */
.toolbar { border-bottom: 1px solid var(--line); }
.search {
  background: rgba(9, 15, 24, .85);
  border: 1px solid var(--line-strong);
  color: var(--ink);
}
.search input { color: var(--ink); }
.search input::placeholder { color: #5d7389; }
.search svg { color: #6f8aa2; }

select.mini, .field select, .field input, .field textarea {
  background: rgba(9, 15, 24, .85);
  border: 1px solid var(--line-strong);
  color: var(--ink);
}
select.mini option { background: #0b121b; color: var(--ink); }
.field input::placeholder, .field textarea::placeholder { color: #5d7389; }
.field input:focus, .field select:focus, .field textarea:focus, .search:focus-within {
  border-color: rgba(34, 224, 122, .6);
  box-shadow: 0 0 0 3px rgba(34, 224, 122, .12), 0 0 18px rgba(34, 224, 122, .12);
}
.field label { color: #a7bccf; }

/* ------------------------------------------------------------ 表格 */
.table thead th {
  background: rgba(9, 15, 24, .9);
  color: #7d93aa;
  border-bottom: 1px solid var(--line);
  letter-spacing: .8px;
  text-transform: uppercase;
  font-size: 11.5px;
}
.table tbody td { border-bottom: 1px solid rgba(90, 150, 210, .1); }
.table tbody tr:hover { background: rgba(56, 189, 248, .05); }
.cell-main { color: #e4effb; }
.cell-main .code, .mono, .link { color: #5fd0ff; }
.link:hover { color: #8ce2ff; }

.pill { background: rgba(255, 255, 255, .05); color: #9cb0c4; border: 1px solid rgba(255, 255, 255, .06); }
.pill.ok { background: rgba(34, 224, 122, .12); color: #6ff0ab; border-color: rgba(34, 224, 122, .3); }
.pill.off { background: rgba(255, 255, 255, .04); color: #7c8fa3; border-color: rgba(255, 255, 255, .06); }

.row-actions { gap: 6px; }

.empty .ico { background: rgba(56, 189, 248, .08); color: #5f8fb0; border: 1px solid rgba(56, 189, 248, .18); }
.empty h3 { color: #b9cbdc; }

/* ------------------------------------------------------------ 按钮 */
.btn {
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--line-strong);
  color: #b6cadb;
}
.btn:hover { background: rgba(56, 189, 248, .1); border-color: rgba(56, 189, 248, .4); color: #e6f6ff; box-shadow: var(--glow-cyan); }
.btn-primary {
  background: linear-gradient(135deg, #10b874 0%, #0c9d8c 55%, #0a8bb0 100%);
  border-color: rgba(63, 240, 160, .6);
  color: #ffffff;
  font-weight: 650;
  letter-spacing: .3px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .3);
  box-shadow: 0 0 0 1px rgba(34, 224, 122, .16), 0 8px 24px rgba(0, 0, 0, .45), 0 0 22px rgba(34, 224, 122, .2), inset 0 1px 0 rgba(255, 255, 255, .16);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #22d98a 0%, #12b39c 55%, #10a3c9 100%);
  border-color: rgba(63, 240, 160, .85); color: #ffffff;
  box-shadow: 0 0 28px rgba(34, 224, 122, .34), inset 0 1px 0 rgba(255, 255, 255, .2);
}
.btn-danger { background: rgba(255, 95, 109, .08); border-color: rgba(255, 95, 109, .3); color: #ff8f98; }
.btn-danger:hover { background: rgba(255, 95, 109, .16); border-color: rgba(255, 95, 109, .5); color: #ffb3b8; }
.btn-ghost { color: #7fa8c4; }
.btn-ghost:hover { background: rgba(56, 189, 248, .08); border-color: transparent; color: #cdeaff; }

.icon-btn { color: #7f95ab; }
.icon-btn:hover { background: rgba(56, 189, 248, .1); color: #dff2ff; }

/* 分段 / 单选卡 */
.seg button { background: rgba(9, 15, 24, .8); border-color: var(--line-strong); color: #93a9be; }
.seg button.is-on {
  border-color: rgba(34, 224, 122, .55); color: #8cf5bb;
  background: rgba(34, 224, 122, .1);
  box-shadow: inset 0 0 0 1px rgba(34, 224, 122, .16), 0 0 16px rgba(34, 224, 122, .12);
}
.radio-card { background: rgba(9, 15, 24, .8); border-color: var(--line-strong); }
.radio-card strong { color: #dbe9f7; }
.radio-card span { color: #7b90a6; }
.radio-card.is-on { border-color: rgba(34, 224, 122, .5); background: rgba(34, 224, 122, .08); }
.radio-card.is-on strong { color: #8cf5bb; }

/* 预览区：白底二维码放在深色“扫描台”上 */
.preview-box {
  background:
    radial-gradient(circle at 50% 45%, rgba(56, 189, 248, .1), transparent 62%),
    rgba(6, 10, 16, .9);
  border: 1px solid rgba(56, 189, 248, .22);
  position: relative;
}
.preview-box img {
  background: #fff;
  box-shadow: 0 0 0 1px rgba(56, 189, 248, .3), 0 12px 30px rgba(0, 0, 0, .5);
}
.preview-meta dt { color: #7b90a6; }
.preview-meta dd { color: #b8cbdc; }

.success {
  border: 1px solid rgba(34, 224, 122, .35);
  background: linear-gradient(180deg, rgba(34, 224, 122, .1), rgba(9, 14, 21, .9));
  box-shadow: 0 0 24px rgba(34, 224, 122, .1) inset;
}
.success h3 { color: #8cf5bb; }
.success p { color: #a9bed1; }

/* ------------------------------------------------------------ 抽屉 / 弹窗 */
.drawer-mask, .modal-mask { background: rgba(3, 6, 10, .42); backdrop-filter: blur(1px); }
.drawer {
  background: linear-gradient(180deg, #0c141f, #080d14);
  border-left: 1px solid rgba(56, 189, 248, .22);
  box-shadow: -30px 0 60px rgba(0, 0, 0, .55), inset 1px 0 0 rgba(56, 189, 248, .08);
}
.modal {
  background: linear-gradient(180deg, #0c141f, #090e16);
  border: 1px solid rgba(56, 189, 248, .22);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .05);
}
.modal-head h2, .drawer-head h2 { color: #e8f4ff; }
.section-title { color: #9fb6cb; }
.tl-item { border-bottom: 1px dashed rgba(90, 150, 210, .16); }

.code-box, .qr-link {
  background: rgba(9, 15, 24, .85);
  border: 1px solid var(--line-strong);
  color: #7fe0ff;
}

.bar { background: rgba(90, 150, 210, .14); }
.bar-skeleton {
  background: linear-gradient(90deg, rgba(90, 150, 210, .12) 25%, rgba(120, 200, 255, .22) 37%, rgba(90, 150, 210, .12) 63%);
  background-size: 300% 100%;
}

/* 扫码明细 */
.scan-list { background: rgba(9, 14, 21, .85); border: 1px solid var(--line); }
.scan-row { border-bottom: 1px solid rgba(90, 150, 210, .1); }
.scan-row:hover { background: rgba(56, 189, 248, .05); }
.scan-time { color: #7b93aa; }
.scan-ip code { color: #cfe6f7; }
.scan-copy { color: #7ff0b4; background: rgba(34, 224, 122, .12); border: 1px solid rgba(34, 224, 122, .22); }
.scan-copy:hover { background: rgba(34, 224, 122, .2); }
.scan-dev { color: #9db2c6; }
.scan-flag .ok { color: #7ff0b4; background: rgba(34, 224, 122, .12); }
.scan-flag .dup { color: #ffd479; background: rgba(255, 200, 87, .12); }
.scan-empty { color: #6e8398; }

/* 骨架屏 */
.sk-card, .sk-table { background: linear-gradient(180deg, rgba(17, 26, 38, .9), rgba(9, 14, 21, .92)); }
.sk-row { border-bottom: 1px solid rgba(90, 150, 210, .1); }
.sk-bar {
  background: linear-gradient(90deg, rgba(90, 150, 210, .14) 25%, rgba(120, 200, 255, .24) 37%, rgba(90, 150, 210, .14) 63%);
  background-size: 300% 100%;
}

/* Toast */
.toast {
  background: rgba(12, 20, 30, .96);
  border: 1px solid rgba(34, 224, 122, .35);
  color: #dcf6e8;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .5), 0 0 18px rgba(34, 224, 122, .12);
}
.toast[data-type="err"], .toast.is-error { border-color: rgba(255, 95, 109, .4); color: #ffd0d4; }

/* ------------------------------------------------------------ 登录 / 初始化 */
.auth-layer { background: #05080d; }
.auth-side {
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(56, 189, 248, .12) 0%, transparent 55%),
    linear-gradient(180deg, #0a1119 0%, #060a10 100%);
  border-right: 1px solid rgba(56, 189, 248, .12);
}
.auth-side::after { background: radial-gradient(circle, rgba(34, 224, 122, .16), transparent 68%); }
.auth-headline { color: #eef8ff; }
.auth-sub { color: #87a0b8; }
.auth-points li { color: #8ba4bb; }
.auth-points li b { color: #8cf5bb; background: rgba(34, 224, 122, .1); border-color: rgba(34, 224, 122, .28); }
.auth-side-foot { color: #4f6b84; }
.auth-badge { background: rgba(34, 224, 122, .12); color: #8cf5bb; border: 1px solid rgba(34, 224, 122, .3); }
.auth-card h1 { color: #eef8ff; }
.auth-desc { color: #93a9be; }
.auth-field > span { color: #7f95ab; }
.auth-field input {
  background: rgba(9, 15, 24, .9);
  border: 1px solid var(--line-strong);
  color: var(--ink);
}
.auth-field input::placeholder { color: #57708a; }
.auth-field input:focus { border-color: rgba(34, 224, 122, .6); box-shadow: 0 0 0 4px rgba(34, 224, 122, .12); }
.pwd-eye { color: #6f869c; }
.pwd-eye:hover { background: rgba(56, 189, 248, .1); color: #d6ecff; }
.auth-err { background: rgba(255, 95, 109, .1); color: #ff9aa3; border: 1px solid rgba(255, 95, 109, .3); }
.auth-tip { color: #647a90; }

/* 手机端登录卡片 */
@media (max-width: 820px) {
  .auth-layer { background: #05080d; }
  .auth-side { background: none; }
  .auth-brand .brand-text strong { color: #eaf6ff; }
  .auth-brand .brand-text span { color: #5f7d97; }
  .auth-card {
    background: linear-gradient(180deg, rgba(17, 26, 38, .95), rgba(9, 14, 21, .96));
    border: 1px solid rgba(56, 189, 248, .2);
    box-shadow: 0 16px 40px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .04);
  }
  .table tbody tr { border-bottom: 1px solid rgba(90, 150, 210, .12); }
}

/* 表格移动端卡片化后的分隔线 */
@media (max-width: 820px) {
  .table tbody td[data-label]::before { color: #6f879d; }
}


/* 登录页：右侧补一层网格与光晕，避免大片纯黑 */
.auth-layer { position: fixed; z-index: 90; }
.auth-layer::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(90, 170, 255, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(90, 170, 255, .05) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,.9), transparent 70%);
  mask-image: linear-gradient(180deg, rgba(0,0,0,.9), transparent 70%);
}
.auth-side, .auth-main { position: relative; z-index: 1; }
.auth-main {
  background: radial-gradient(640px 420px at 46% 48%, rgba(56, 189, 248, .07), transparent 70%);
}
.auth-headline { position: relative; }
.auth-headline::before {
  content: ""; position: absolute; left: 0; top: -22px; width: 46px; height: 2px;
  background: linear-gradient(90deg, #22e07a, transparent);
  box-shadow: 0 0 12px rgba(34, 224, 122, .5);
}

/* 柱状图：补一条基线，空值也能看出刻度 */
.bars { border-bottom: 1px solid rgba(90, 150, 210, .2); }
.bar i { box-shadow: 0 0 12px rgba(34, 224, 122, .28); }
.bars {
  background: repeating-linear-gradient(0deg, rgba(90, 150, 210, .12) 0 1px, transparent 1px 28px);
  background-position: 0 100%;
}
.drawer .qr-holder img, .drawer .qr-img { border-radius: 12px; }

.auth-field input:focus { outline: none; box-shadow: 0 0 0 3px rgba(34, 224, 122, .14); }

/* 骨架屏在暗底上要能看见 */
.sk-card, .sk-table { background: linear-gradient(180deg, rgba(24, 36, 52, .92), rgba(12, 19, 28, .94)); border-color: rgba(90, 160, 220, .2); }
.sk-bar { background: linear-gradient(90deg, rgba(110, 175, 235, .22) 25%, rgba(150, 220, 255, .34) 37%, rgba(110, 175, 235, .22) 63%); background-size: 300% 100%; }
.sk-dot { background: rgba(110, 175, 235, .3); }

/* ------------------------------------------------------------ 中心 Logo 选择 */
.logo-box { margin-top: 10px; }
.logo-pick-row { display: flex; align-items: center; gap: 12px; }
.logo-thumb {
  width: 48px; height: 48px; border-radius: 10px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  background: #ffffff; border: 1px dashed rgba(56, 189, 248, .4);
  overflow: hidden; font-size: 11px; color: #0b1219;
}
.logo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.logo-hint { font-size: 12px; color: #7b93aa; line-height: 1.5; }

/* ---- 版本标记（升级后肉眼可辨，避免"改了没生效"的误会） ---- */
.ver-tag {
  margin-left: auto;
  padding: 2px 7px;
  border-radius: 6px;
  font: 600 11px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace;
  font-style: normal;
  letter-spacing: .4px;
  color: #9fd0b6;
  background: rgba(34, 224, 122, .08);
  border: 1px solid rgba(34, 224, 122, .22);
}

/* ---- 死链报警：告警条 / 状态徽标 / 行内红点 ---- */
.alert-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 86, 112, .38);
  background: linear-gradient(180deg, rgba(255, 86, 112, .12), rgba(255, 86, 112, .05));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04), 0 10px 28px -18px rgba(255, 86, 112, .8);
}
.alert-ico {
  flex: 0 0 auto;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: rgba(255, 86, 112, .16);
  border: 1px solid rgba(255, 86, 112, .32);
  color: #ff8fa3;
}
.alert-ico svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.alert-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.alert-txt strong { font-size: 13.5px; color: #ffb3c1; letter-spacing: .2px; }
.alert-txt span { font-size: 12.5px; color: #d9b6bf; line-height: 1.5;
  overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.alert-acts { display: flex; gap: 8px; flex: 0 0 auto; }
.alert-acts .btn-primary { background: linear-gradient(120deg, #22e07a, #38bdf8); color: #04121a; border: 0; }

.pill.danger { color: #ffd0d8; background: rgba(255, 86, 112, .16); border-color: rgba(255, 86, 112, .4); }
.pill.danger i { background: #ff5670; box-shadow: 0 0 0 3px rgba(255, 86, 112, .18), 0 0 10px rgba(255, 86, 112, .7); }
.pill.hb { flex-direction: column; align-items: flex-start; gap: 1px; padding: 4px 9px; cursor: help; }
.pill.hb em { font: 500 10.5px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; font-style: normal; opacity: .72; }
.pill.hb { position: relative; }
.pill.hb i { position: absolute; left: 8px; top: 8px; }
.pill.hb { padding-left: 22px; }
.pill.hb > span { display: none; }
.dead-dot {
  display: inline-block;
  width: 7px; height: 7px;
  margin-right: 6px;
  border-radius: 50%;
  background: #ff5670;
  box-shadow: 0 0 0 2px rgba(255, 86, 112, .16), 0 0 8px rgba(255, 86, 112, .8);
  vertical-align: 1px;
}
.mon-note { font-size: 12px; color: #6f8aa3; white-space: nowrap; }

@media (max-width: 760px) {
  .alert-bar { flex-wrap: wrap; gap: 10px; padding: 12px; }
  .alert-acts { width: 100%; }
  .alert-acts .btn { flex: 1; }
  .mon-note { display: none; }
}

/* ---- 登录页「记住密码」 ---- */
.auth-remember {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: -4px 0 16px;
}
.chk-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  font-size: 13px;
  color: #9db2c8;
}
.chk-line input {
  appearance: none;
  width: 17px; height: 17px;
  margin: 0;
  border-radius: 5px;
  border: 1px solid rgba(120, 160, 200, .45);
  background: rgba(16, 28, 42, .9);
  position: relative;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.chk-line input:checked {
  background: linear-gradient(120deg, #22e07a, #38bdf8);
  border-color: rgba(56, 189, 248, .7);
  box-shadow: 0 0 12px -2px rgba(34, 224, 122, .6);
}
.chk-line input:checked::after {
  content: "";
  position: absolute;
  left: 5px; top: 1.5px;
  width: 5px; height: 9px;
  border: 2px solid #04121a;
  border-top: 0; border-left: 0;
  transform: rotate(40deg);
}
.chk-line input:focus-visible { outline: 2px solid rgba(56, 189, 248, .5); outline-offset: 2px; }
.chk-line span { letter-spacing: .2px; }
.auth-remember-hint { font-size: 11.5px; color: #5f7893; }
@media (max-width: 560px) {
  .auth-remember { flex-direction: column; align-items: flex-start; gap: 6px; }
}

/* ---- 登录按钮文字居中（去掉两侧多余空间） ---- */
.auth-submit { justify-content: center; }
/* 记住密码只剩勾选框，靠左对齐 */
.auth-remember { justify-content: flex-start; }
