:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --sidebar-bg: #1f2937;
  --bg: #f4f6f9;
  --border: #e6e9ef;
  --text: #1f2937;
  --muted: #8b94a7;
  --danger: #dc3545;
  --success: #16a34a;
  --radius: 10px;
}

* { box-sizing: border-box; }

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

a { color: var(--primary); text-decoration: none; }

/* ---------------------------- 图标 ---------------------------- */
.ico {
  display: inline-block;
  width: 16px; height: 16px;
  background: currentColor;
  vertical-align: -3px;
  -webkit-mask-size: contain; mask-size: contain;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
}
.ico-doc { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/><polyline points='14 2 14 8 20 8'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/><polyline points='14 2 14 8 20 8'/></svg>"); }
.ico-dashboard { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'><rect x='3' y='3' width='7' height='9' rx='1'/><rect x='14' y='3' width='7' height='5' rx='1'/><rect x='14' y='12' width='7' height='9' rx='1'/><rect x='3' y='16' width='7' height='5' rx='1'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'><rect x='3' y='3' width='7' height='9' rx='1'/><rect x='14' y='3' width='7' height='5' rx='1'/><rect x='14' y='12' width='7' height='9' rx='1'/><rect x='3' y='16' width='7' height='5' rx='1'/></svg>"); }
.ico-map { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'><path d='M21 10c0 7-9 13-9 13S3 17 3 10a9 9 0 0 1 18 0z'/><circle cx='12' cy='10' r='3'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'><path d='M21 10c0 7-9 13-9 13S3 17 3 10a9 9 0 0 1 18 0z'/><circle cx='12' cy='10' r='3'/></svg>"); }
.ico-tag { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'><path d='M20.6 13.4 12 22l-9-9V3h10l7.6 7.6a2 2 0 0 1 0 2.8z'/><circle cx='7.5' cy='7.5' r='1.5'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'><path d='M20.6 13.4 12 22l-9-9V3h10l7.6 7.6a2 2 0 0 1 0 2.8z'/><circle cx='7.5' cy='7.5' r='1.5'/></svg>"); }
.ico-file { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'><path d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/><polyline points='14 2 14 8 20 8'/><line x1='8' y1='13' x2='16' y2='13'/><line x1='8' y1='17' x2='13' y2='17'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'><path d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/><polyline points='14 2 14 8 20 8'/><line x1='8' y1='13' x2='16' y2='13'/><line x1='8' y1='17' x2='13' y2='17'/></svg>"); }
.ico-wechat { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'><path d='M8.7 3C4.9 3 1.8 5.6 1.8 8.8c0 1.8 1 3.4 2.6 4.5l-.7 2 2.3-1.1c.8.2 1.7.4 2.7.4.3 0 .5 0 .8-.1a5.4 5.4 0 0 1-.2-1.5c0-3.1 3-5.6 6.7-5.6h.6C15.8 5 12.6 3 8.7 3zM6.5 7.5a.9.9 0 1 1 0-1.8.9.9 0 0 1 0 1.8zm4.4 0a.9.9 0 1 1 0-1.8.9.9 0 0 1 0 1.8z'/><path d='M22.2 13c0-2.7-2.6-4.9-5.9-4.9-3.3 0-5.9 2.2-5.9 4.9s2.6 4.9 5.9 4.9c.7 0 1.4-.1 2-.3l1.9.9-.5-1.6c1.6-.9 2.5-2.3 2.5-3.9zm-7.9-.7a.8.8 0 1 1 0-1.6.8.8 0 0 1 0 1.6zm4 0a.8.8 0 1 1 0-1.6.8.8 0 0 1 0 1.6z'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'><path d='M8.7 3C4.9 3 1.8 5.6 1.8 8.8c0 1.8 1 3.4 2.6 4.5l-.7 2 2.3-1.1c.8.2 1.7.4 2.7.4.3 0 .5 0 .8-.1a5.4 5.4 0 0 1-.2-1.5c0-3.1 3-5.6 6.7-5.6h.6C15.8 5 12.6 3 8.7 3zM6.5 7.5a.9.9 0 1 1 0-1.8.9.9 0 0 1 0 1.8zm4.4 0a.9.9 0 1 1 0-1.8.9.9 0 0 1 0 1.8z'/><path d='M22.2 13c0-2.7-2.6-4.9-5.9-4.9-3.3 0-5.9 2.2-5.9 4.9s2.6 4.9 5.9 4.9c.7 0 1.4-.1 2-.3l1.9.9-.5-1.6c1.6-.9 2.5-2.3 2.5-3.9zm-7.9-.7a.8.8 0 1 1 0-1.6.8.8 0 0 1 0 1.6zm4 0a.8.8 0 1 1 0-1.6.8.8 0 0 1 0 1.6z'/></svg>"); }
.ico-image { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'><rect x='3' y='3' width='18' height='18' rx='2'/><circle cx='8.5' cy='8.5' r='1.5'/><polyline points='21 15 16 10 5 21'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'><rect x='3' y='3' width='18' height='18' rx='2'/><circle cx='8.5' cy='8.5' r='1.5'/><polyline points='21 15 16 10 5 21'/></svg>"); }
.ico-cog { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'><circle cx='12' cy='12' r='3'/><path d='M19.4 15a1.7 1.7 0 0 0 .3 1.9l.1.1a2 2 0 1 1-2.8 2.8l-.1-.1a1.7 1.7 0 0 0-2.9 1.2V21a2 2 0 1 1-4 0v-.1A1.7 1.7 0 0 0 7 19.4a1.7 1.7 0 0 0-1.9.3l-.1.1a2 2 0 1 1-2.8-2.8l.1-.1a1.7 1.7 0 0 0-1.2-2.9H1a2 2 0 1 1 0-4h.1A1.7 1.7 0 0 0 2.6 7a1.7 1.7 0 0 0-.3-1.9l-.1-.1a2 2 0 1 1 2.8-2.8l.1.1A1.7 1.7 0 0 0 7 2.6h.1A1.7 1.7 0 0 0 8.2 1V1a2 2 0 1 1 4 0v.1A1.7 1.7 0 0 0 15 2.6a1.7 1.7 0 0 0 1.9-.3l.1-.1a2 2 0 1 1 2.8 2.8l-.1.1a1.7 1.7 0 0 0 1.2 2.9h.1a2 2 0 1 1 0 4h-.1a1.7 1.7 0 0 0-1.5 1.5z'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'><circle cx='12' cy='12' r='3'/><path d='M19.4 15a1.7 1.7 0 0 0 .3 1.9l.1.1a2 2 0 1 1-2.8 2.8l-.1-.1a1.7 1.7 0 0 0-2.9 1.2V21a2 2 0 1 1-4 0v-.1A1.7 1.7 0 0 0 7 19.4a1.7 1.7 0 0 0-1.9.3l-.1.1a2 2 0 1 1-2.8-2.8l.1-.1a1.7 1.7 0 0 0-1.2-2.9H1a2 2 0 1 1 0-4h.1A1.7 1.7 0 0 0 2.6 7a1.7 1.7 0 0 0-.3-1.9l-.1-.1a2 2 0 1 1 2.8-2.8l.1.1A1.7 1.7 0 0 0 7 2.6h.1A1.7 1.7 0 0 0 8.2 1V1a2 2 0 1 1 4 0v.1A1.7 1.7 0 0 0 15 2.6a1.7 1.7 0 0 0 1.9-.3l.1-.1a2 2 0 1 1 2.8 2.8l-.1.1a1.7 1.7 0 0 0 1.2 2.9h.1a2 2 0 1 1 0 4h-.1a1.7 1.7 0 0 0-1.5 1.5z'/></svg>"); }
.ico-key { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'><circle cx='7.5' cy='15.5' r='4.5'/><path d='M10.7 12.3 21 2m-4 4 3 3m-6-1 3 3'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'><circle cx='7.5' cy='15.5' r='4.5'/><path d='M10.7 12.3 21 2m-4 4 3 3m-6-1 3 3'/></svg>"); }
.ico-out { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'><path d='M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4'/><polyline points='16 17 21 12 16 7'/><line x1='21' y1='12' x2='9' y2='12'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'><path d='M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4'/><polyline points='16 17 21 12 16 7'/><line x1='21' y1='12' x2='9' y2='12'/></svg>"); }
.ico-plus { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'><line x1='12' y1='5' x2='12' y2='19'/><line x1='5' y1='12' x2='19' y2='12'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'><line x1='12' y1='5' x2='12' y2='19'/><line x1='5' y1='12' x2='19' y2='12'/></svg>"); }
.ico-download { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'><path d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/><polyline points='7 10 12 15 17 10'/><line x1='12' y1='15' x2='12' y2='3'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'><path d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/><polyline points='7 10 12 15 17 10'/><line x1='12' y1='15' x2='12' y2='3'/></svg>"); }
.ico-arrow { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'><line x1='5' y1='12' x2='19' y2='12'/><polyline points='12 5 19 12 12 19'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'><line x1='5' y1='12' x2='19' y2='12'/><polyline points='12 5 19 12 12 19'/></svg>"); }
.ico-paperclip { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'><path d='M21.4 11.05 12.25 20.2a6 6 0 0 1-8.49-8.49l9.2-9.19a4 4 0 0 1 5.65 5.66l-9.2 9.19a2 2 0 0 1-2.83-2.83l8.49-8.48'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'><path d='M21.4 11.05 12.25 20.2a6 6 0 0 1-8.49-8.49l9.2-9.19a4 4 0 0 1 5.65 5.66l-9.2 9.19a2 2 0 0 1-2.83-2.83l8.49-8.48'/></svg>"); }

/* ---------------------------- 布局 ---------------------------- */
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; width: 240px;
  background: var(--sidebar-bg); color: #fff; z-index: 20; display: flex; flex-direction: column;
}
.sidebar-brand {
  display: flex; align-items: center; gap: 10px;
  height: 60px; padding: 0 20px; font-weight: 600; font-size: 15px;
  border-bottom: 1px solid rgba(255,255,255,.08); letter-spacing: .5px;
}
.sidebar-brand .ico { width: 20px; height: 20px; color: #60a5fa; }
.sidebar nav { padding: 10px 0; overflow-y: auto; }
.sidebar nav a {
  display: flex; align-items: center; gap: 10px; padding: 11px 20px;
  color: rgba(255,255,255,.72); font-size: 14px; transition: .2s;
  border-left: 3px solid transparent;
}
.sidebar nav a:hover { color: #fff; background: rgba(255,255,255,.07); }
.sidebar nav a.active { color: #fff; background: var(--primary); border-left-color: #93c5fd; }
.sidebar-icon { width: 17px; height: 17px; }
.sidebar-divider { height: 1px; background: rgba(255,255,255,.09); margin: 10px 0; }
.sidebar-logout { color: #fca5a5 !important; }

.topbar {
  position: fixed; top: 0; left: 240px; right: 0; height: 60px; z-index: 15;
  background: #fff; border-bottom: 1px solid var(--border);
}
.topbar-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; }
.topbar .brand { font-size: 16px; font-weight: 600; color: var(--text); }
.topbar-right { color: var(--muted); font-size: 13px; }
.topbar-right strong { color: var(--text); }

.main-content { margin-left: 240px; padding: 84px 24px 40px; max-width: 1440px; }

/* ---------------------------- 通用组件 ---------------------------- */
.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; gap: 16px; flex-wrap: wrap; }
.page-head h1 { font-size: 22px; margin: 0; font-weight: 650; }
.page-head .muted { font-size: 13px; }
.head-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.crumb { margin: 6px 0 0; font-size: 12.5px; color: var(--muted); }

.card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 18px; overflow: hidden; box-shadow: 0 1px 2px rgba(16,24,40,.03); }
.card-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--border); background: #fcfdff; }
.card-header h5 { margin: 0; font-size: 14.5px; font-weight: 600; }
.card-body { padding: 18px; }
.narrow-card { max-width: 460px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 16px; border-radius: 7px; border: 1px solid transparent;
  font-size: 13.5px; cursor: pointer; transition: .18s; white-space: nowrap;
  background: #eef1f6; color: #475467; font-family: inherit; line-height: 1.4;
}
.btn:hover { filter: brightness(.97); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: #fff1f2; color: var(--danger); border-color: #fecdd3; }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-light { background: #f3f5f9; color: #475467; border-color: var(--border); }
.btn-sm { padding: 5px 11px; font-size: 12.5px; border-radius: 6px; }
.btn-block { width: 100%; margin-top: 18px; padding: 10px; }

.form-label { display: block; font-size: 13px; font-weight: 600; color: #344054; margin-bottom: 6px; }
.form-label em { color: var(--danger); font-style: normal; }
.form-control {
  width: 100%; padding: 9px 12px; border: 1px solid #dfe3ea; border-radius: 7px;
  font-size: 13.5px; font-family: inherit; color: var(--text); background: #fff;
  transition: .15s; outline: none;
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
select.form-control { appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='3'><polyline points='6 9 12 15 18 9'/></svg>"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
.hint { font-size: 12px; color: var(--muted); margin: 6px 0 0; }
.muted { color: var(--muted); }

.field { margin-bottom: 16px; }
.form-grid .field { max-width: 720px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.form-actions { display: flex; gap: 10px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); }

.filter-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.filter-row .form-control { width: auto; min-width: 170px; flex: 1 1 170px; max-width: 320px; }
.filter-row .narrow { flex: 0 0 90px; max-width: 90px; }
.filter-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; align-items: end; }
.filter-grid .f-btn { display: flex; gap: 8px; }

/* ---------------------------- 表格 ---------------------------- */
.table-meta { font-size: 13px; color: var(--muted); margin: 0 0 12px; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th {
  text-align: left; padding: 11px 12px; background: #f8fafc; color: #52607a;
  font-weight: 600; font-size: 12.5px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.table td { padding: 11px 12px; border-bottom: 1px solid #f1f3f7; vertical-align: middle; }
.table tbody tr:hover { background: #fafbfd; }
.table .empty { text-align: center; color: var(--muted); padding: 36px 0; }
.td-title { max-width: 380px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.td-title:hover { white-space: normal; }
.ops { display: flex; gap: 6px; flex-wrap: nowrap; }
.w-action { width: 1%; white-space: nowrap; }

.badge { display: inline-block; padding: 2px 8px; border-radius: 4px; background: #eef2ff; color: #4055c9; font-size: 12px; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 12px; }
.pill-on { background: #e8f7ee; color: #12803e; }
.pill-off { background: #f1f3f6; color: #7c8698; }
.pill-top { background: #fff1e6; color: #c25a00; }

.thumb { max-width: 160px; max-height: 90px; border-radius: 6px; border: 1px solid var(--border); display: block; margin-bottom: 8px; object-fit: cover; }
.thumb.wide { max-width: 240px; }
.thumb-sm { width: 64px; height: 64px; border-radius: 6px; border: 1px solid var(--border); object-fit: cover; }

.pagination { display: flex; gap: 6px; margin-top: 16px; flex-wrap: wrap; }
.page-btn { padding: 6px 12px; border: 1px solid var(--border); border-radius: 6px; color: #475467; font-size: 13px; background: #fff; }
.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.page-btn.disabled { color: #c5cbd6; pointer-events: none; }

/* ---------------------------- 提示 ---------------------------- */
.alert { padding: 11px 16px; border-radius: 8px; font-size: 13.5px; margin-bottom: 16px; }
.alert-success { background: #ecfdf3; color: #067647; border: 1px solid #abefc6; }
.alert-danger { background: #fef3f2; color: #b42318; border: 1px solid #fecdca; }
.fade-in { animation: fade .3s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

#toast-wrap { position: fixed; top: 76px; right: 24px; z-index: 999; display: flex; flex-direction: column; gap: 10px; }
.toast {
  padding: 11px 18px; border-radius: 8px; color: #fff; font-size: 13.5px;
  box-shadow: 0 8px 24px rgba(16,24,40,.16); animation: slidein .25s ease;
  display: flex; align-items: center; gap: 8px; max-width: 380px;
}
.toast.success { background: #12b76a; }
.toast.error { background: #f04438; }
@keyframes slidein { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }

/* ---------------------------- 数据面板 ---------------------------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 18px; }
.stat-card {
  display: flex; flex-direction: column; gap: 8px; padding: 20px; border-radius: 12px;
  color: #fff; position: relative; overflow: hidden; transition: .2s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(16,24,40,.12); }
.stat-card.blue { background: linear-gradient(135deg, #2563eb, #4f8cf7); }
.stat-card.green { background: linear-gradient(135deg, #12b76a, #32d583); }
.stat-card.purple { background: linear-gradient(135deg, #7a5af8, #9b8afb); }
.stat-card.orange { background: linear-gradient(135deg, #f79009, #fdb022); }
.stat-card.cyan { background: linear-gradient(135deg, #0ba5ec, #36bffa); }
.stat-label { font-size: 13.5px; opacity: .92; }
.stat-num { font-size: 34px; font-weight: 700; line-height: 1.1; }
.stat-foot { font-size: 12.5px; opacity: .9; display: flex; align-items: center; gap: 4px; }

.bar-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.bar-name { width: 90px; font-size: 13px; color: #475467; text-align: right; flex: 0 0 90px; }
.bar-track { flex: 1; height: 12px; background: #f0f3f8; border-radius: 20px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 20px; background: linear-gradient(90deg, #93c5fd, #2563eb); transition: width .5s; }
.bar-val { width: 40px; font-size: 13px; color: var(--muted); }

/* ---------------------------- 编辑器 ---------------------------- */
.content-form .card-body { padding: 22px 24px; }
.editor-toolbar { display: flex; gap: 4px; flex-wrap: wrap; padding: 8px; background: #f8fafc; border: 1px solid #dfe3ea; border-bottom: none; border-radius: 8px 8px 0 0; }
.editor-toolbar .tb { padding: 5px 10px; font-size: 12.5px; border: 1px solid transparent; border-radius: 5px; background: #fff; cursor: pointer; color: #475467; font-family: inherit; }
.editor-toolbar .tb:hover { border-color: #cbd5e1; }
.editor-toolbar .tb.active { background: #e0e9ff; color: var(--primary); }
.editor {
  min-height: 300px; padding: 16px 18px; border: 1px solid #dfe3ea; border-radius: 0 0 8px 8px;
  background: #fff; font-size: 14px; line-height: 1.8; overflow-y: auto; max-height: 620px;
}
.editor:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.editor img { max-width: 100%; border-radius: 6px; }
.code-area { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; line-height: 1.7; }
.d-none { display: none !important; }

.input-group { display: flex; align-items: stretch; }
.input-group .form-control { border-radius: 7px 0 0 7px; }
.input-suffix { display: flex; align-items: center; padding: 0 12px; background: #f3f5f9; border: 1px solid #dfe3ea; border-left: none; border-radius: 0 7px 7px 0; color: var(--muted); font-size: 13px; }

.attach-list { margin-bottom: 10px; display: flex; flex-direction: column; gap: 8px; }
.attach-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; background: #f8fafc; border: 1px solid var(--border); border-radius: 7px; font-size: 13px; }
.attach-item .del { margin-left: auto; color: var(--danger); font-size: 12.5px; }

/* ---------------------------- 开关 ---------------------------- */
.switch { display: inline-flex; align-items: center; cursor: pointer; }
.switch input { display: none; }
.switch span { width: 42px; height: 24px; background: #d0d5dd; border-radius: 20px; position: relative; transition: .2s; display: inline-block; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--primary); }
.switch input:checked + span::after { left: 21px; }

/* ---------------------------- 配置页 ---------------------------- */
.config-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 24px; }

/* ---------------------------- 导入页 ---------------------------- */
.import-row { display: flex; gap: 10px; }
.import-row .form-control { flex: 1; }
.parse-state { margin-top: 12px; }

/* ---------------------------- 登录页 ---------------------------- */
.login-body {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #eef4ff 0%, #f4f6f9 45%, #f0fdf8 100%);
  margin: 0;
}
.login-container {
  width: 400px; max-width: calc(100vw - 32px); background: #fff; padding: 40px 36px 30px;
  border-radius: 16px; box-shadow: 0 20px 50px rgba(16,24,40,.1); border: 1px solid rgba(230,233,239,.9);
}
.login-logo { width: 52px; height: 52px; border-radius: 14px; background: linear-gradient(135deg, #2563eb, #60a5fa); display: flex; align-items: center; justify-content: center; margin-bottom: 18px; }
.login-logo .ico { width: 26px; height: 26px; color: #fff; }
.login-container h2 { margin: 0 0 6px; font-size: 20px; font-weight: 700; }
.login-sub { margin: 0 0 24px; font-size: 13px; color: var(--muted); }
.login-container .form-control { margin-bottom: 16px; padding: 11px 13px; }
.login-tip { font-size: 12px; color: var(--muted); text-align: center; margin: 18px 0 0; }

@media (max-width: 900px) {
  .sidebar { width: 64px; }
  .sidebar-brand span, .sidebar nav a span { display: none; }
  .sidebar-brand { justify-content: center; padding: 0; }
  .sidebar nav a { justify-content: center; padding: 14px 0; }
  .topbar { left: 64px; }
  .main-content { margin-left: 64px; padding: 80px 14px 30px; }
}
