/* ==========================================================================
   码栈项目源码 · 管理后台
   风格：深空蓝侧栏 × 通透工作区 —— 以方正为主，圆的只用在"点"上
   形状语言三层：
     面 → 0 圆角：卡片 / 面板 / 按钮 / 标签 / 输入框 / 弹窗 / 表格 / 导航项
     点 → 圆形：图标字形 / 状态点 / 开关 / 加载环 / 关闭按钮 / 色块
     图标底座 → 微弧：.empty::before 14px、.login-logo 14px
   ========================================================================== */

:root {
  --brand: #2F6BFF;
  --brand-600: #1F55E0;
  --brand-700: #1743C4;
  --brand-soft: #EEF3FF;
  --cyan: #17C3E8;
  --violet: #7C5CFC;
  --teal: #12B886;
  --amber: #F5A524;
  --coral: #F2623C;

  --ink: #0B1220;
  --ink-2: #38415A;
  --ink-3: #5B6577;
  --muted: #8A93A3;
  --faint: #AEB7C8;

  --line: #EBEFF7;
  --line-2: #F3F6FB;
  --bg: #F4F6FC;
  --card: #FFFFFF;
  --sh-1: 0 1px 2px rgba(11, 18, 32, .035), 0 6px 18px -10px rgba(11, 18, 32, .14);
  --sh-2: 0 2px 6px rgba(11, 18, 32, .05), 0 18px 40px -20px rgba(11, 18, 32, .22);
  --sh-3: 0 8px 18px rgba(11, 18, 32, .07), 0 40px 80px -32px rgba(11, 18, 32, .32);
  --sh-brand: 0 8px 20px -8px rgba(47, 107, 255, .6);

  --sidebar: #0B1220;
  --sidebar-2: #141F38;
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }

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

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
input, select, textarea { font-family: inherit; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -.01em; }

::selection { background: rgba(47, 107, 255, .18); }

*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb {
  background: rgba(11, 18, 32, .16);
  border: 3px solid transparent;
  background-clip: content-box;
}
*::-webkit-scrollbar-thumb:hover { background: rgba(11, 18, 32, .28); background-clip: content-box; }
*::-webkit-scrollbar-track { background: transparent; }

:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(47, 107, 255, .22);
}

/* ---------------- 按钮 ---------------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 38px;
  padding: 0 18px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: .01em;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .14s cubic-bezier(.22, 1, .36, 1), box-shadow .18s, background .18s, border-color .18s, color .18s;
}
.btn:hover { background: #FBFCFE; border-color: #DFE5F0; color: var(--ink); box-shadow: var(--sh-1); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; transform: none; }

.btn.primary {
  border-color: transparent;
  background: linear-gradient(135deg, #4F7CFF 0%, #2F6BFF 52%, #1B45C4 100%);
  color: #fff;
  box-shadow: var(--sh-brand);
}
.btn.primary:hover { background: linear-gradient(135deg, #5B85FF 0%, #346FFB 52%, #1E4BD2 100%); color: #fff; }
.btn.primary:disabled { background: #CBD5E9; box-shadow: none; }

.btn.ghost { background: transparent; border-color: rgba(11, 18, 32, .1); color: var(--muted); }
.btn.ghost:hover { background: rgba(11, 18, 32, .035); color: var(--ink-2); }

.btn.danger { color: #D6336C; border-color: #FBD5E4; background: #FFF7FA; }
.btn.danger:hover { background: #FFEDF4; border-color: #F8BFD5; color: #C31E5A; }

.btn.sm { height: 32px; padding: 0 13px; font-size: 12.5px; }
.btn.block { width: 100%; height: 46px; font-size: 15px; }

/* ---------------- 表单 ---------------- */
.field { margin-bottom: 16px; }
.field > label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-3);
  margin-bottom: 7px;
  letter-spacing: .02em;
}

.input {
  width: 100%;
  height: 40px;
  padding: 0 13px;
  border: 1px solid var(--line);
  background: #FBFCFE;
  color: var(--ink);
  font-size: 14px;
  transition: border-color .18s, background .18s, box-shadow .18s;
}
textarea.input { height: auto; min-height: 90px; padding: 11px 13px; line-height: 1.65; resize: vertical; }
select.input {
  appearance: none;
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%238A93A3' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
.input:hover { border-color: #DFE5F0; }
.input:focus {
  outline: none;
  border-color: rgba(47, 107, 255, .55);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(47, 107, 255, .14);
}
.input::placeholder { color: var(--faint); }

.grow { flex: 1; min-width: 0; }

/* 开关 */
.switch { position: relative; display: inline-flex; cursor: pointer; flex: none; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch i {
  display: block;
  width: 46px;
  height: 27px;
  border-radius: 99px;
  background: #CFD8E8;
  box-shadow: inset 0 1px 3px rgba(11, 18, 32, .16);
  transition: background .22s cubic-bezier(.22, 1, .36, 1);
}
.switch i::after {
  content: '';
  display: block;
  width: 21px;
  height: 21px;
  margin: 3px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(11, 18, 32, .28);
  transition: transform .24s cubic-bezier(.22, 1, .36, 1);
}
.switch input:checked + i { background: linear-gradient(135deg, #4F7CFF, #1B45C4); }
.switch input:checked + i::after { transform: translateX(19px); }
.switch input:focus-visible + i { box-shadow: 0 0 0 3px rgba(47, 107, 255, .24); }

/* ---------------- 标签（直角 + 左侧色脊） ---------------- */
.pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 23px;
  padding: 0 10px 0 14px;
  background: #F1F4FA;
  color: var(--ink-3);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .02em;
  white-space: nowrap;
}
.pill::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: currentColor;
  opacity: .5;
}
.pill.blue { background: var(--brand-soft); color: var(--brand-600); }
.pill.ok { background: #E6F8F0; color: #0A7A57; }
.pill.warn { background: #FFF3DF; color: #9A6200; }
.pill.danger { background: #FFEDF3; color: #C31E5A; }
.pill.info { background: #EBF8FD; color: #0A749B; }
.pill.off { background: #F1F3F8; color: #98A2B6; }

/* 主题色色块 */
.swatch {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  vertical-align: -2px;
  border: 1px solid rgba(11, 18, 32, .1);
}

/* ---------------- 登录 ---------------- */
.login-wrap {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px 20px;
  overflow: hidden;
  background: radial-gradient(1100px 620px at 12% -10%, #1E4FD8 0%, transparent 62%),
              radial-gradient(900px 520px at 92% 8%, #7C5CFC 0%, transparent 58%),
              radial-gradient(700px 500px at 62% 108%, #17C3E8 0%, transparent 60%),
              linear-gradient(160deg, #0B1220 0%, #13224A 100%);
}
.login-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--noise);
  opacity: .16;
  pointer-events: none;
}

.login-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 400px;
  padding: 40px 36px 30px;
  background: rgba(255, 255, 255, .97);
  border: 1px solid rgba(255, 255, 255, .6);
  box-shadow: 0 40px 90px -36px rgba(4, 10, 28, .8), 0 0 0 1px rgba(255, 255, 255, .1);
  backdrop-filter: blur(20px);
  animation: pop .5s cubic-bezier(.22, 1, .36, 1) both;
}
@keyframes pop {
  from { opacity: 0; transform: translateY(18px) scale(.98); }
  to { opacity: 1; transform: none; }
}

.login-brand { display: flex; align-items: center; gap: 14px; }
.login-logo {
  flex: none;
  width: 50px;
  height: 50px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(150deg, #4F7CFF 0%, #2F6BFF 52%, #1B45C4 100%);
  color: #fff;
  font-size: 23px;
  font-weight: 800;
  box-shadow: 0 14px 28px -12px rgba(47, 107, 255, .95);
}
.login-title { font-size: 21px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.login-sub {
  font-size: 13px;
  color: var(--muted);
  margin: 8px 0 28px;
  letter-spacing: .01em;
}

/* ---------------- 布局 ---------------- */
.layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; }

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 22px 16px 30px;
  background: linear-gradient(180deg, #0B1220 0%, #101B33 62%, #131F3C 100%);
  color: #fff;
}
.sidebar::before {
  content: '';
  position: fixed;
  width: 250px;
  height: 100vh;
  top: 0;
  left: 0;
  background-image: var(--noise);
  opacity: .1;
  pointer-events: none;
}
.sidebar::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .18); background-clip: content-box; }

.sidebar-brand {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px 22px;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.sidebar-brand .login-logo { width: 42px; height: 42px; font-size: 19px; }
.sidebar-brand b { display: block; font-size: 15.5px; font-weight: 700; letter-spacing: -.01em; }
.sidebar-brand span { display: block; font-size: 11.5px; color: rgba(255, 255, 255, .42); margin-top: 2px; letter-spacing: .04em; }

.nav { position: relative; display: flex; flex-direction: column; gap: 3px; }
.nav-group {
  padding: 20px 12px 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  color: rgba(255, 255, 255, .32);
  text-transform: uppercase;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  height: 42px;
  padding: 0 12px;
  color: rgba(255, 255, 255, .68);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background .18s, color .18s, transform .16s;
}
.nav-item:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav-item:active { transform: scale(.985); }

.nav-item .dot {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .26);
  transition: background .2s, box-shadow .2s, transform .2s;
}
.nav-item.active {
  color: #fff;
  font-weight: 600;
  background: linear-gradient(100deg, rgba(47, 107, 255, .34) 0%, rgba(47, 107, 255, .1) 60%, rgba(47, 107, 255, 0) 100%);
  box-shadow: inset 0 0 0 1px rgba(120, 160, 255, .18);
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: -16px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 22px;
  background: linear-gradient(180deg, #6E9BFF, #2F6BFF);
  box-shadow: 0 0 14px rgba(79, 124, 255, .9);
}
.nav-item.active .dot {
  background: #7FA8FF;
  box-shadow: 0 0 10px rgba(127, 168, 255, .9);
  transform: scale(1.15);
}
.nav-badge {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  height: 19px;
  min-width: 19px;
  padding: 0 6px;
  background: linear-gradient(135deg, #FF8A3D, #F2623C);
  color: #fff;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
  box-shadow: 0 4px 10px -4px rgba(242, 98, 60, .9);
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 66px;
  padding: 0 30px;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}
/* 底部能量条：直角语言的收口线 */
.topbar::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  background: linear-gradient(90deg, var(--brand) 0%, var(--cyan) 30%, rgba(23, 195, 232, 0) 78%);
  pointer-events: none;
}
.topbar h1 { font-size: 19px; letter-spacing: -.02em; }
.who {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 13px;
  background: var(--line-2);
  color: var(--ink-3);
  font-size: 12.5px;
  font-weight: 600;
}

.content { flex: 1; padding: 26px 30px 60px; min-width: 0; }
.content > * { animation: rise .42s cubic-bezier(.22, 1, .36, 1) both; }
.content > *:nth-child(1) { animation-delay: 0s; }
.content > *:nth-child(2) { animation-delay: .05s; }
.content > *:nth-child(3) { animation-delay: .1s; }
.content > *:nth-child(4) { animation-delay: .14s; }
.content > *:nth-child(5) { animation-delay: .18s; }
.content > *:nth-child(n+6) { animation-delay: .2s; }
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* ---------------- 卡片 ---------------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--sh-1);
  margin-bottom: 18px;
}
.card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line-2);
  background: linear-gradient(180deg, #FCFDFF, #FFFFFF);
}
.card-head h2 { font-size: 15px; letter-spacing: -.01em; }
.card-head h2::before {
  content: '';
  display: inline-block;
  vertical-align: -1px;
  width: 3px;
  height: 14px;
  margin-right: 9px;
  background: linear-gradient(180deg, #4F7CFF, #1B45C4);
}
.card-body { padding: 20px 22px; }

/* ---------------- 数据卡 ---------------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}
.stat {
  position: relative;
  padding: 20px 20px 18px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--sh-1);
  overflow: hidden;
  animation: rise .42s cubic-bezier(.22, 1, .36, 1) both;
}
.stat::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--a, #2F6BFF), var(--a2, #1B45C4));
}
.stat::after {
  content: '';
  position: absolute;
  right: -50px;
  top: -60px;
  width: 160px;
  height: 160px;
  background: radial-gradient(circle, var(--asoft, rgba(47, 107, 255, .16)), transparent 68%);
  pointer-events: none;
}
.stat:nth-child(1) { --a: #4F7CFF; --a2: #1B45C4; --asoft: rgba(47, 107, 255, .22); animation-delay: 0s; }
.stat:nth-child(2) { --a: #9B7BFF; --a2: #5B34D8; --asoft: rgba(124, 92, 252, .22); animation-delay: .05s; }
.stat:nth-child(3) { --a: #3FD9AB; --a2: #0A7A57; --asoft: rgba(18, 184, 134, .22); animation-delay: .1s; }
.stat:nth-child(4) { --a: #FFC062; --a2: #D98200; --asoft: rgba(245, 165, 36, .24); animation-delay: .15s; }
.stat:nth-child(n+5) { --a: #7FB2FF; --a2: #2F6BFF; --asoft: rgba(47, 107, 255, .18); animation-delay: .18s; }

.stat .k {
  position: relative;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: .03em;
}
.stat .v {
  position: relative;
  margin-top: 8px;
  font-size: 32px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}
.stat .n {
  position: relative;
  margin-top: 8px;
  font-size: 12px;
  color: var(--faint);
  line-height: 1.5;
}
.stat.alt { background: linear-gradient(180deg, #FFFFFF, #FAFBFF); }

/* ---------------- 表格 ---------------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-wrap .table { width: max-content; min-width: 100%; }

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13.5px;
}
.table thead th {
  padding: 12px 14px;
  text-align: left;
  background: #F8FAFE;
  border-bottom: 1px solid var(--line);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.table tbody td {
  padding: 14px;
  border-bottom: 1px solid var(--line-2);
  color: var(--ink-2);
  vertical-align: middle;
}
.table tbody tr { transition: background .16s; }
.table tbody tr:hover { background: #FAFBFF; }
.table tbody tr:last-child td { border-bottom: none; }
.table .t-title {
  font-size: 14px;
  font-weight: 650;
  color: var(--ink);
  letter-spacing: -.01em;
  max-width: 360px;
}
.table .t-sub {
  font-size: 12px;
  color: var(--faint);
  margin-top: 3px;
  max-width: 360px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.actions { display: flex; gap: 6px; flex-wrap: nowrap; }

.table-wrap::-webkit-scrollbar { height: 9px; }
.table-wrap::-webkit-scrollbar-thumb { background: rgba(11, 18, 32, .18); }

/* ---------------- 分页 ---------------- */
.pager {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--line-2);
  background: #FCFDFF;
}
.pager .info { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }

.spacer { flex: 1; }

.modal-head .btn.ghost {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 50%;
  font-size: 13px;
  flex: none;
}

/* ---------------- 筛选栏 ---------------- */
.filters {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line-2);
  background: linear-gradient(180deg, #FCFDFF, #FFFFFF);
  flex-wrap: wrap;
}
.filters .input { width: auto; min-width: 140px; height: 38px; }
.filters .input.grow { min-width: 200px; }

/* ---------------- 提示 ---------------- */
.tip {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.75;
}
.hint {
  padding: 12px 15px;
  margin-bottom: 14px;
  background: #F6F9FF;
  border: 1px solid rgba(47, 107, 255, .13);
  color: #3B4C6B;
  font-size: 12.5px;
  line-height: 1.8;
}
.hint b { color: var(--brand-600); }
.hint.warn {
  background: #FFFBF1;
  border-color: rgba(245, 165, 36, .3);
  color: #8A6220;
}
.hint.warn b { color: #9A6200; }

/* ---------------- 空态 / 加载 ---------------- */
.empty {
  padding: 54px 20px;
  text-align: center;
  color: var(--faint);
  font-size: 13px;
}
.empty::before {
  content: '';
  display: block;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  margin: 0 auto 14px;
  background: linear-gradient(150deg, #F1F5FF, #E4ECFF);
  box-shadow: inset 0 0 0 1px rgba(47, 107, 255, .1);
}
.empty.loading { color: var(--muted); }
.empty.loading::before {
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  border: 2.5px solid rgba(47, 107, 255, .18);
  border-top-color: var(--brand);
  animation: spin .75s linear infinite;
}
.empty.loading::after {
  content: '';
  display: block;
  width: 190px;
  height: 8px;
  margin: 18px auto 0;
  background: linear-gradient(90deg, #EDF1F8 25%, #F7F9FD 37%, #EDF1F8 63%);
  background-size: 400% 100%;
  animation: sk 1.3s ease infinite;
}
@keyframes sk {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}
.empty.error { color: #C31E5A; }
.empty.error::before { background: linear-gradient(150deg, #FFF1F5, #FFE3EC); box-shadow: inset 0 0 0 1px rgba(214, 51, 108, .16); }

/* ---------------- 迷你指标 ---------------- */
.mini {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}
.mini-i {
  padding: 14px 16px;
  background: #F8FAFE;
  border: 1px solid var(--line);
}
.mini-k { display: block; font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .02em; }
.mini-v {
  display: block;
  margin-top: 6px;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}

.spin {
  display: inline-block;
  width: 14px;
  height: 14px;
  vertical-align: -2px;
  border: 2px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------- 弹窗 ---------------- */
.mask {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(8, 13, 26, .5);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  padding: 28px 20px;
  overflow-y: auto;
  animation: fade .18s ease both;
}
@keyframes fade { from { opacity: 0; } }

.modal {
  width: 100%;
  max-width: 620px;
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  box-shadow: var(--sh-3);
  overflow: hidden;
  animation: pop .34s cubic-bezier(.22, 1, .36, 1) both;
}
.modal-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line-2);
}
.modal-head h3 { flex: 1; font-size: 16px; letter-spacing: -.01em; }
.modal-body { padding: 22px 24px; overflow-y: auto; }
.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--line-2);
  background: #FCFDFF;
}
.modal.narrow { max-width: 420px; }
.modal.wide { max-width: 860px; }

/* ---------------- 提示条 ---------------- */
#toast-root {
  position: fixed;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 400;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 20px;
  background: rgba(11, 18, 32, .92);
  color: #fff;
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: 0 20px 40px -18px rgba(11, 18, 32, .8);
  backdrop-filter: blur(14px);
  animation: toastIn .32s cubic-bezier(.22, 1, .36, 1) both;
}
.toast::before {
  content: '';
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #7FA8FF;
  box-shadow: 0 0 10px rgba(127, 168, 255, .9);
}
.toast.ok::before { background: #3FD9AB; box-shadow: 0 0 10px rgba(63, 217, 171, .9); }
.toast.err::before { background: #FF7A85; box-shadow: 0 0 10px rgba(255, 122, 133, .9); }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(-10px) scale(.96); }
  to { opacity: 1; transform: none; }
}

/* ---------------- 网盘行 ---------------- */
.pan-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.pan-row .input { height: 38px; }
.pan-row .grow { flex: 1; min-width: 0; }

/* ---------------- 栅格 ---------------- */
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 16px; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1180px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar {
    position: relative;
    height: auto;
    padding: 16px 14px;
  }
  .sidebar::before { display: none; }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .nav-group { display: none; }
  .nav-item.active::before { display: none; }
  .content, .topbar { padding-left: 18px; padding-right: 18px; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .stats { grid-template-columns: 1fr; }
}
