:root {
  --primary: #4f46e5;
  --primary-light: #6366f1;
  --primary-dark: #4338ca;
  --primary-bg: #eef2ff;
  --accent: #0ea5e9;
  --bg: #f1f5f9;
  --surface: #ffffff;
  --border: #e2e8f0;
  --text: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --success: #10b981;
  --success-bg: #ecfdf5;
  --warning: #f59e0b;
  --warning-bg: #fffbeb;
  --danger: #ef4444;
  --danger-bg: #fef2f2;
  --info: #3b82f6;
  --info-bg: #eff6ff;
  --sidebar-bg: #0f172a;
  --sidebar-text: #cbd5e1;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.07), 0 2px 4px -2px rgba(0,0,0,.05);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.08), 0 4px 6px -4px rgba(0,0,0,.04);
  --transition: .2s ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-light); text-decoration: underline; }

code {
  font-family: "SF Mono", "Fira Code", Consolas, monospace;
  background: var(--primary-bg);
  color: var(--primary-dark);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12.5px;
  word-break: break-all;
}

.muted { color: var(--text-muted); }
.small { font-size: 12px; }
.hidden { display: none !important; }
.mono { font-family: Consolas, Menlo, monospace; }
hr { border: none; border-top: 1px solid var(--border); margin: 20px 0; }

/* ══════ 布局 ══════ */
.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: 240px; flex: 0 0 240px;
  background: var(--sidebar-bg);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; z-index: 50;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 22px 20px; border-bottom: 1px solid rgba(255,255,255,.07); }
.brand-logo {
  width: 40px; height: 40px; border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 18px; flex: 0 0 40px;
  box-shadow: 0 4px 12px rgba(79,70,229,.35);
}
.brand-logo.big { width: 56px; height: 56px; font-size: 28px; border-radius: 16px; flex: 0 0 56px; }
.brand-text strong { display: block; color: #fff; font-size: 14px; font-weight: 600; line-height: 1.3; }
.brand-text small { color: var(--sidebar-text); font-size: 11px; }

.nav { padding: 14px 12px; flex: 1; overflow-y: auto; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: var(--radius-sm);
  color: var(--sidebar-text); font-size: 13.5px; margin-bottom: 2px;
  transition: all var(--transition); text-decoration: none;
}
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; text-decoration: none; }
.nav-item.active { background: var(--primary); color: #fff; font-weight: 500; box-shadow: 0 2px 8px rgba(79,70,229,.3); }
.nav-item .ico { width: 20px; text-align: center; font-size: 15px; flex: 0 0 20px; }

.nav-section {
  padding: 12px 14px 6px; font-size: 10.5px; font-weight: 600;
  color: rgba(255,255,255,.3); letter-spacing: .8px; margin-top: 6px;
}

.sidebar-foot { padding: 14px; border-top: 1px solid rgba(255,255,255,.07); }
.user-box { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, #334155, #475569);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600; flex: 0 0 34px;
}
.uname { color: #fff; font-size: 13px; font-weight: 500; }
.urole { color: var(--text-muted); font-size: 11px; }

.main { flex: 1; padding: 24px 28px 40px; min-width: 0; }

/* ══════ 页头 ══════ */
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { margin: 0 0 4px; font-size: 22px; font-weight: 700; color: var(--text); }
.page-head .sub { margin: 0; color: var(--text-muted); font-size: 13px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.head-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ══════ 卡片 ══════ */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.card + .card { margin-top: 16px; }
.card.prose { padding: 24px 26px; line-height: 1.8; }
.card.prose h3 { margin: 22px 0 10px; font-size: 16px; font-weight: 600; }
.card.prose h3:first-child { margin-top: 0; }
.card.prose ol, .card.prose ul { padding-left: 22px; }
.card.prose li { margin: 6px 0; }
.card-header { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.card-header h3 { margin: 0; font-size: 15px; font-weight: 600; }
.card-body { padding: 20px; }

/* ══════ 项目卡片（需求 1） ══════ */
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 18px; }
.project-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow); transition: all var(--transition);
  display: flex; flex-direction: column; gap: 14px; position: relative; overflow: hidden;
}
.project-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  opacity: 0; transition: opacity var(--transition);
}
.project-card:hover { border-color: var(--primary); box-shadow: var(--shadow-md); transform: translateY(-3px); }
.project-card:hover::before { opacity: 1; }
.project-card .card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.project-card .card-top h3 { margin: 0; font-size: 17px; font-weight: 600; color: var(--text); word-break: break-word; line-height: 1.4; }
.project-card .card-top h3 a { color: var(--text); }
.project-card .card-top h3 a:hover { color: var(--primary); text-decoration: none; }
.project-card .card-desc { color: var(--text-secondary); font-size: 13px; line-height: 1.55; min-height: 40px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.project-card .card-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 14px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.project-card .card-stat { text-align: center; }
.project-card .card-stat .num { font-size: 18px; font-weight: 700; color: var(--text); line-height: 1.3; }
.project-card .card-stat .lbl { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.project-card .card-meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--text-muted); }
.project-card .card-actions { display: flex; gap: 6px; margin-top: auto; }

/* ══════ 统计 ══════ */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); transition: all var(--transition); }
.stat:hover { box-shadow: var(--shadow-md); }
.stat-label { color: var(--text-muted); font-size: 12px; margin-bottom: 6px; font-weight: 500; }
.stat-value { font-size: 24px; font-weight: 700; color: var(--text); }
.stat-value.small { font-size: 13px; font-weight: 500; }

/* ══════ 表格 ══════ */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); }
.table th { background: #f8fafc; font-weight: 600; color: #475569; white-space: nowrap; font-size: 12px; letter-spacing: .3px; }
.table tbody tr { transition: background var(--transition); }
.table tbody tr:hover { background: #f8fafc; }
.table .empty { text-align: center; color: var(--text-muted); padding: 36px 10px; }
.table .cell { max-width: 300px; word-break: break-word; }
.table .ellipsis { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-meta { background: #fafbfd; }

/* ══════ 数据明细行高固定 50px（需求 6） ══════ */
.table-fixed { table-layout: auto; }
.table-fixed td {
  height: 50px; max-height: 50px;
  overflow: hidden;
  vertical-align: middle;
  padding-top: 6px; padding-bottom: 6px;
  white-space: nowrap;
  text-overflow: ellipsis;
  max-width: 300px;
}
.table-fixed th { height: 44px; vertical-align: middle; }
.table-fixed td .cell-inner {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.4;
}
.table-fixed code.mini { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }

/* ══════ 标签 ══════ */
.tag { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 20px; font-size: 11.5px; line-height: 18px; font-weight: 500; white-space: nowrap; }
.tag-ok { background: var(--success-bg); color: #059669; }
.tag-warn { background: var(--warning-bg); color: #d97706; }
.tag-err { background: var(--danger-bg); color: #dc2626; }
.tag-off { background: #f1f5f9; color: #64748b; }
.tag-primary { background: var(--primary-bg); color: var(--primary); }
.tag-sm { padding: 1px 7px; font-size: 10.5px; }

/* ══════ 按钮 ══════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text); font-size: 13px; cursor: pointer;
  transition: all var(--transition); white-space: nowrap; font-weight: 500;
  text-decoration: none; font-family: inherit;
}
.btn:hover { border-color: #cbd5e1; background: #f8fafc; text-decoration: none; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.btn-danger { color: var(--danger); border-color: #fecaca; }
.btn-danger:hover { background: var(--danger-bg); border-color: #fca5a5; }
.btn-sm { padding: 5px 11px; font-size: 12px; border-radius: 6px; }
.btn-lg { padding: 12px 22px; font-size: 15px; border-radius: var(--radius); }
.btn-block { width: 100%; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: #f1f5f9; border-color: var(--border); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ══════ 表单 ══════ */
.input {
  width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 13.5px; font-family: inherit; color: var(--text); background: var(--surface);
  outline: none; transition: border-color var(--transition), box-shadow var(--transition);
}
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,70,229,.1); }
.input:disabled { background: #f8fafc; color: var(--text-muted); }
textarea.input { resize: vertical; min-height: 60px; }
.field { display: block; margin-bottom: 16px; }
.field > span { display: block; margin-bottom: 6px; font-size: 13px; color: #334155; font-weight: 600; }
.field .hint { display: block; margin-top: 5px; color: var(--text-muted); font-size: 12px; line-height: 1.5; }
.req { color: var(--danger); font-style: normal; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; padding-top: 16px; border-top: 1px solid var(--border); margin-top: 18px; }

/* 开关 */
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.switch input { display: none; }
.switch .track { width: 44px; height: 24px; border-radius: 12px; background: #cbd5e1; position: relative; transition: background var(--transition); flex: 0 0 44px; }
.switch .track::after { content: ''; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform var(--transition); box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + .track { background: var(--primary); }
.switch input:checked + .track::after { transform: translateX(20px); }
.switch .label-text { font-size: 13px; color: var(--text); }

/* ══════ 工具栏 ══════ */
.toolbar { display: flex; gap: 8px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--border); flex-wrap: wrap; background: #fafbfd; }
.toolbar .spacer { flex: 1; }

/* ══════ Tab ══════ */
.tabs { display: flex; gap: 2px; padding: 0 16px; border-bottom: 1px solid var(--border); background: #fafbfd; overflow-x: auto; }
.tab { padding: 13px 18px; border: none; background: none; cursor: pointer; font-size: 13.5px; color: var(--text-muted); border-bottom: 2px solid transparent; font-family: inherit; font-weight: 500; transition: all var(--transition); white-space: nowrap; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }

/* ══════ 分页 ══════ */
.pager { display: flex; gap: 4px; align-items: center; justify-content: flex-end; padding: 14px 16px; flex-wrap: wrap; }
.pager button { min-width: 32px; padding: 6px 10px; border: 1px solid var(--border); background: var(--surface); border-radius: 6px; cursor: pointer; font-size: 12.5px; font-family: inherit; transition: all var(--transition); }
.pager button:hover { border-color: var(--primary); color: var(--primary); }
.pager button.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.pager button:disabled { opacity: .4; cursor: not-allowed; }
.pager .pinfo { color: var(--text-muted); font-size: 12.5px; margin-right: 8px; }

/* ══════ 弹窗 ══════ */
.modal-mask { display: none; position: fixed; inset: 0; background: rgba(15,23,42,.5); z-index: 100; align-items: flex-start; justify-content: center; padding: 50px 16px; overflow-y: auto; backdrop-filter: blur(3px); }
.modal-mask.show { display: flex; }
.modal { background: var(--surface); border-radius: 16px; width: 100%; max-width: 540px; box-shadow: 0 25px 60px rgba(0,0,0,.15); animation: modalIn .18s ease; }
.modal-wide { max-width: 820px; }
.modal-lg { max-width: 1000px; }
@keyframes modalIn { from { opacity: 0; transform: translateY(-10px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.modal-head h3 { margin: 0; font-size: 16px; font-weight: 600; }
.modal-close { border: none; background: none; font-size: 22px; line-height: 1; cursor: pointer; color: var(--text-muted); padding: 4px; border-radius: 6px; }
.modal-close:hover { background: #f1f5f9; color: var(--text); }
.modal-body { padding: 20px 22px; max-height: 65vh; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--border); }

.copy-row { display: flex; gap: 8px; }
.copy-row .input { flex: 1; }

.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px 20px; margin: 14px 0; font-size: 13px; }
.kv > div { display: flex; gap: 8px; align-items: center; }
.kv span { color: var(--text-muted); min-width: 70px; font-weight: 500; }

.pre { background: #0f172a; color: #e2e8f0; padding: 14px; border-radius: var(--radius-sm); font-size: 12.5px; line-height: 1.6; overflow-x: auto; white-space: pre-wrap; word-break: break-all; font-family: Consolas, Menlo, monospace; }
.details { margin-top: 14px; }
.details summary { cursor: pointer; color: var(--primary); font-size: 13px; margin-bottom: 8px; font-weight: 500; }

.danger-zone { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 0; border-top: 1px solid var(--border); }
.danger-zone strong { font-size: 13.5px; }
.danger-zone p { margin: 3px 0 0; }

/* ══════ 提示 ══════ */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 13px; margin-bottom: 14px; line-height: 1.6; }
.alert-info { background: var(--info-bg); color: #1e40af; border: 1px solid #bfdbfe; }
.alert-error { background: var(--danger-bg); color: #b91c1c; border: 1px solid #fecaca; }
.alert-success { background: var(--success-bg); color: #047857; border: 1px solid #a7f3d0; }
.alert-warning { background: var(--warning-bg); color: #92400e; border: 1px solid #fde68a; }

.toast { position: fixed; top: 20px; left: 50%; transform: translateX(-50%) translateY(-20px); background: #111827; color: #fff; padding: 10px 22px; border-radius: var(--radius-sm); font-size: 13.5px; opacity: 0; pointer-events: none; transition: all .25s; z-index: 200; max-width: 80vw; font-weight: 500; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { background: var(--danger); }
.toast.success { background: var(--success); }

/* ══════ 登录页（需求 3：大气磅礴、不显示默认账号密码） ══════ */
.login-body {
  background: #0b1120;
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 24px; position: relative; overflow: hidden;
}
.login-bg { position: absolute; inset: 0; overflow: hidden; }
.login-bg .orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5; }
.login-bg .orb1 { width: 620px; height: 620px; background: #4f46e5; top: -220px; left: -160px; animation: float1 18s ease-in-out infinite alternate; }
.login-bg .orb2 { width: 520px; height: 520px; background: #0ea5e9; bottom: -200px; right: -140px; animation: float2 22s ease-in-out infinite alternate; }
.login-bg .orb3 { width: 420px; height: 420px; background: #7c3aed; top: 45%; left: 55%; opacity: .3; animation: float1 26s ease-in-out infinite alternate-reverse; }
@keyframes float1 { from { transform: translate(0,0) scale(1); } to { transform: translate(70px,50px) scale(1.12); } }
@keyframes float2 { from { transform: translate(0,0) scale(1); } to { transform: translate(-60px,-45px) scale(1.15); } }
.login-grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.028) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.028) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 75% 65% at 50% 45%, #000 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 75% 65% at 50% 45%, #000 30%, transparent 100%);
}
.login-shell {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.05fr .95fr;
  width: 100%; max-width: 1080px;
  background: rgba(255,255,255,.035);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 40px 120px rgba(0,0,0,.55);
  backdrop-filter: blur(22px);
}
.login-hero {
  padding: 58px 52px;
  display: flex; flex-direction: column;
  background: linear-gradient(150deg, rgba(79,70,229,.22) 0%, rgba(14,165,233,.10) 55%, transparent 100%);
  border-right: 1px solid rgba(255,255,255,.07);
}
.login-hero .hero-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 46px; }
.login-hero .hero-brand .logo {
  width: 52px; height: 52px; border-radius: 15px;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 700; flex: 0 0 52px;
  box-shadow: 0 10px 30px rgba(99,102,241,.5);
}
.login-hero .hero-brand .brand-name { color: #fff; font-size: 17px; font-weight: 600; letter-spacing: .3px; }
.login-hero .hero-brand .brand-tag { color: rgba(255,255,255,.45); font-size: 12px; letter-spacing: .8px; }
.login-hero h1 {
  color: #fff; font-size: 38px; font-weight: 800; line-height: 1.25;
  letter-spacing: -.5px; margin-bottom: 18px;
}
.login-hero h1 .grad {
  background: linear-gradient(100deg, #a5b4fc, #67e8f9);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.login-hero .hero-desc { color: rgba(255,255,255,.6); font-size: 14.5px; line-height: 1.85; margin-bottom: 40px; max-width: 400px; }
.login-hero .hero-features { display: flex; flex-direction: column; gap: 16px; margin-top: auto; }
.login-hero .hero-feature { display: flex; align-items: flex-start; gap: 13px; }
.login-hero .hero-feature .fi {
  width: 34px; height: 34px; border-radius: 10px; flex: 0 0 34px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.1);
  display: flex; align-items: center; justify-content: center; font-size: 15px;
}
.login-hero .hero-feature .ft { color: #fff; font-size: 13.5px; font-weight: 600; }
.login-hero .hero-feature .fd { color: rgba(255,255,255,.45); font-size: 12px; line-height: 1.5; }
.login-hero .hero-foot { color: rgba(255,255,255,.3); font-size: 11.5px; margin-top: 34px; }

.login-panel { padding: 54px 46px; display: flex; flex-direction: column; justify-content: center; background: rgba(255,255,255,.015); }
.login-panel .panel-title { color: #fff; font-size: 24px; font-weight: 700; margin-bottom: 6px; }
.login-panel .panel-sub { color: rgba(255,255,255,.45); font-size: 13px; margin-bottom: 34px; }
.login-panel .field > span { color: rgba(255,255,255,.75); font-weight: 500; font-size: 13px; }
.login-panel .input {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  color: #fff; padding: 12px 14px; font-size: 14px;
}
.login-panel .input::placeholder { color: rgba(255,255,255,.28); }
.login-panel .input:focus { border-color: #6366f1; background: rgba(255,255,255,.09); box-shadow: 0 0 0 4px rgba(99,102,241,.18); }
.login-panel .btn-login {
  width: 100%; padding: 13px; border-radius: 11px; border: none; cursor: pointer;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #fff; font-size: 15px; font-weight: 600; font-family: inherit;
  box-shadow: 0 8px 26px rgba(79,70,229,.42);
  transition: all var(--transition); margin-top: 8px;
}
.login-panel .btn-login:hover { transform: translateY(-1px); box-shadow: 0 12px 32px rgba(79,70,229,.55); }
.login-panel .btn-login:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.login-panel .panel-links { display: flex; justify-content: space-between; align-items: center; margin-top: 20px; }
.login-panel .panel-links a { color: rgba(255,255,255,.55); font-size: 12.5px; }
.login-panel .panel-links a:hover { color: #a5b4fc; text-decoration: none; }
.login-panel .alert { background: rgba(239,68,68,.13); border: 1px solid rgba(239,68,68,.32); color: #fca5a5; }
.login-panel .alert-success { background: rgba(16,185,129,.13); border-color: rgba(16,185,129,.32); color: #6ee7b7; }
.login-panel .field-tip { color: rgba(255,255,255,.35); font-size: 12px; margin-top: -8px; margin-bottom: 16px; line-height: 1.6; }
.login-panel .back-link { text-align: center; margin-top: 22px; }
.login-panel .back-link a { color: rgba(255,255,255,.45); font-size: 12.5px; }

/* ══════ 错误页 ══════ */
.error-page { text-align: center; padding: 100px 20px; }
.error-page h1 { font-size: 52px; margin: 0 0 12px; color: var(--text); font-weight: 800; }
.error-page p { color: var(--text-muted); margin-bottom: 24px; font-size: 15px; }

/* ══════ 空状态 ══════ */
.empty-state { text-align: center; padding: 60px 20px; }
.empty-state .ico { font-size: 52px; margin-bottom: 14px; opacity: .35; }
.empty-state h3 { margin: 0 0 6px; font-size: 17px; color: var(--text-secondary); font-weight: 600; }
.empty-state p { margin: 0 0 20px; color: var(--text-muted); font-size: 13px; }

/* ══════ 设置页 ══════ */
.settings-grid { display: grid; grid-template-columns: 210px 1fr; gap: 20px; align-items: start; }
.settings-nav { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow); position: sticky; top: 20px; }
.settings-nav-item { display: flex; align-items: center; gap: 9px; padding: 10px 12px; border-radius: var(--radius-sm); cursor: pointer; font-size: 13px; color: var(--text-secondary); margin-bottom: 2px; transition: all var(--transition); }
.settings-nav-item:hover { background: #f1f5f9; color: var(--text); }
.settings-nav-item.active { background: var(--primary-bg); color: var(--primary); font-weight: 600; }
.settings-nav-item .nav-ico { width: 18px; text-align: center; }
.settings-content { min-width: 0; }
.settings-group { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.settings-group h3 { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.settings-group .desc { color: var(--text-muted); font-size: 12.5px; margin-bottom: 20px; }
.settings-item { display: grid; grid-template-columns: 1fr 320px; gap: 20px; align-items: start; padding: 14px 0; border-bottom: 1px solid var(--border); }
.settings-item:last-of-type { border-bottom: none; }
.settings-item .item-label { font-size: 13.5px; font-weight: 600; color: var(--text); }
.settings-item .item-hint { font-size: 12px; color: var(--text-muted); margin-top: 3px; line-height: 1.5; }
.settings-item .item-control { display: flex; align-items: center; justify-content: flex-end; }
.settings-item .item-control .input { max-width: 320px; }

/* ══════ 用户管理 ══════ */
.role-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 12px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.role-admin { background: var(--danger-bg); color: var(--danger); }
.role-editor { background: var(--primary-bg); color: var(--primary); }
.role-viewer { background: #f1f5f9; color: #64748b; }

/* ══════ 导入字段弹窗 ══════ */
.import-preview { max-height: 320px; overflow: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.import-preview table { width: 100%; border-collapse: collapse; font-size: 12px; }
.import-preview th { position: sticky; top: 0; background: #f8fafc; padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--border); font-weight: 600; color: #475569; white-space: nowrap; z-index: 1; }
.import-preview td { padding: 7px 10px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.import-preview tr:hover td { background: #fafbfd; }

/* ══════ 解析方式选择 ══════ */
.parse-select { min-width: 150px; font-size: 12.5px; padding: 5px 8px; }

/* ══════ 个人中心 ══════ */
.profile-grid { display: grid; grid-template-columns: 300px 1fr; gap: 20px; align-items: start; }
.profile-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); text-align: center; }
.profile-avatar { width: 78px; height: 78px; border-radius: 50%; margin: 0 auto 14px; background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 700; box-shadow: 0 8px 24px rgba(79,70,229,.35); }
.profile-name { font-size: 18px; font-weight: 700; }
.profile-role { margin-top: 6px; }
.profile-meta { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border); text-align: left; font-size: 12.5px; }
.profile-meta div { display: flex; justify-content: space-between; padding: 6px 0; }
.profile-meta span { color: var(--text-muted); }

/* ══════ 响应式 ══════ */
@media (max-width: 1020px) {
  .login-shell { grid-template-columns: 1fr; max-width: 520px; }
  .login-hero { display: none; }
  .login-panel { padding: 44px 34px; }
}
@media (max-width: 900px) {
  .layout { flex-direction: column; }
  .sidebar { width: 100%; flex: none; height: auto; position: static; }
  .nav { display: flex; gap: 4px; padding: 10px; overflow-x: auto; }
  .nav-item { margin: 0; white-space: nowrap; }
  .nav-section { display: none; }
  .sidebar-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .sidebar-foot .btn { width: auto; }
  .user-box { margin: 0; }
  .main { padding: 16px; }
  .settings-grid { grid-template-columns: 1fr; }
  .settings-nav { position: static; display: flex; gap: 6px; overflow-x: auto; }
  .settings-nav-item { white-space: nowrap; }
  .settings-item { grid-template-columns: 1fr; gap: 8px; }
  .settings-item .item-control { justify-content: flex-start; }
  .project-grid { grid-template-columns: 1fr; }
  .profile-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .page-head { flex-direction: column; }
  .head-actions { width: 100%; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .form-row { grid-template-columns: 1fr; }
  .project-card .card-stats { grid-template-columns: repeat(3, 1fr); }
}