/* 漫途数字 · Web 管理界面样式
 * 设计：深色侧边栏 + 浅色内容区，原生 CSS 变量、无外部依赖、离线可用。
 */

:root {
  --bg: #f4f5fb;
  --panel: #ffffff;
  --ink: #1e2233;
  --ink-2: #3c4257;
  --muted: #7b8198;
  --line: #e7e9f2;
  --line-strong: #d7dae8;
  --brand: #6d5cf6;
  --brand-2: #8f7bff;
  --brand-soft: #eeebff;
  --sidebar: #161a2c;
  --sidebar-2: #0f1220;
  --green: #15803d;
  --green-bg: #e7f7ee;
  --amber: #b45309;
  --amber-bg: #fdf1d7;
  --red: #c02626;
  --red-bg: #fde8e8;
  --blue: #1d4ed8;
  --blue-bg: #e6eeff;
  --violet: #5b46e0;
  --violet-bg: #eeebff;
  --shadow: 0 1px 2px rgba(20, 24, 45, 0.04), 0 10px 28px rgba(20, 24, 45, 0.07);
  --shadow-sm: 0 1px 2px rgba(20, 24, 45, 0.06);
  --radius: 14px;
  --radius-sm: 9px;
  --mono: "Cascadia Code", "JetBrains Mono", Consolas, "Courier New", monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", "Microsoft YaHei", "PingFang SC", system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body.drawer-open { overflow: hidden; }

h1, h2, h3, p, ul { margin: 0; }
ul { padding-left: 18px; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }

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

.sidebar {
  position: sticky;
  top: 0;
  align-self: flex-start;
  width: 236px;
  flex: 0 0 236px;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 22px 16px 18px;
  background: linear-gradient(175deg, var(--sidebar) 0%, var(--sidebar-2) 100%);
  color: #cfd3e6;
}

.brand { display: flex; align-items: center; gap: 11px; padding: 2px 8px 22px; }
.brand-logo {
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  color: #fff; font-weight: 700; font-size: 19px;
  box-shadow: 0 6px 16px rgba(109, 92, 246, 0.4);
}
.brand-name { color: #fff; font-weight: 700; font-size: 16px; letter-spacing: 0.5px; }
.brand-sub { color: #7d84a3; font-size: 11px; letter-spacing: 1.2px; text-transform: uppercase; }

.nav { display: flex; flex-direction: column; gap: 4px; flex: 1; overflow-y: auto; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px;
  border-radius: 10px;
  color: #aab0ca;
  font-size: 14px;
  transition: background 0.16s ease, color 0.16s ease;
}
.nav-item:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
.nav-item.active {
  background: linear-gradient(100deg, rgba(109, 92, 246, 0.95), rgba(143, 123, 255, 0.85));
  color: #fff;
  box-shadow: 0 6px 18px rgba(109, 92, 246, 0.35);
}
.nav-icon { width: 18px; text-align: center; opacity: 0.9; font-size: 15px; }

.sidebar-foot { padding: 14px 8px 4px; border-top: 1px solid rgba(255, 255, 255, 0.08); margin-top: 14px; }
.sse-state { display: flex; align-items: center; gap: 7px; font-size: 12px; color: #8d93ad; }
.sse-state .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #b45309;
  box-shadow: 0 0 0 3px rgba(180, 83, 9, 0.18);
}
.sse-state.online { color: #6ee7a0; }
.sse-state.online .dot { background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2); }
.version { margin-top: 8px; font-size: 11px; color: #5f6683; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  padding: 18px 28px 14px;
  background: rgba(244, 245, 251, 0.88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar h1 { font-size: 21px; font-weight: 700; letter-spacing: 0.2px; }
.page-sub { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.topbar-actions { display: flex; gap: 8px; }

.view { padding: 22px 28px 48px; width: 100%; max-width: 1440px; margin: 0 auto; }

/* ============================= 通用组件 ============================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--ink-2);
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.btn:hover { border-color: var(--brand); color: var(--brand); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn.primary {
  background: linear-gradient(120deg, var(--brand), var(--brand-2));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 6px 16px rgba(109, 92, 246, 0.3);
}
.btn.primary:hover { filter: brightness(1.05); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: rgba(109, 92, 246, 0.08); color: var(--brand); border-color: transparent; }
.btn.danger { background: var(--red-bg); border-color: transparent; color: var(--red); }
.btn.danger:hover { background: #fbd5d5; color: var(--red); }
.btn.small { padding: 5px 10px; font-size: 12px; border-radius: 8px; }
.btn.tiny { padding: 2px 8px; font-size: 11px; border-radius: 7px; }

.input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(109, 92, 246, 0.13); }
textarea.input { resize: vertical; min-height: 74px; }
.input.compact { width: auto; min-width: 120px; padding: 7px 10px; }

select.input { cursor: pointer; }

.field { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.field-label { font-size: 12.5px; color: var(--ink-2); font-weight: 600; }
.field-hint { font-size: 11.5px; color: var(--muted); }
.form-row { display: flex; gap: 14px; flex-wrap: wrap; }
.form-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 4px; }

.panel-form, .panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 18px 20px;
  margin-bottom: 18px;
}
.panel-form { display: flex; flex-direction: column; gap: 14px; }
.panel > .block-title:first-child { margin-top: 0; }

.toolbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}
.toolbar-label { color: var(--muted); font-size: 12.5px; }

.section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 6px 0 12px; }
.section-title { font-size: 15.5px; font-weight: 700; color: var(--ink); margin: 18px 0 12px; }
.section-head > .section-title { margin: 0; }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 22px;
  margin-bottom: 18px;
}
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.card-title { font-size: 18px; font-weight: 700; }
.card-summary { color: var(--ink-2); margin: 8px 0 4px; }
.card-actions { display: flex; gap: 8px; align-items: center; }
.card-actions.wrap { flex-wrap: wrap; }

.kv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px 18px; margin: 12px 0; }
.kv { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kv-label { font-size: 11.5px; color: var(--muted); }
.kv-value { font-size: 13.5px; color: var(--ink-2); word-break: break-word; }

.block { margin-top: 16px; }
.block-title { font-size: 13px; font-weight: 700; color: var(--ink-2); margin: 14px 0 8px; }
.list { margin: 0; color: var(--ink-2); }
.list li { margin: 3px 0; }

.muted { color: var(--muted); }
.small { font-size: 12px; }
.pad { padding: 12px 2px; }
.mono { font-family: var(--mono); }
.danger-text { color: var(--red); }

.code {
  background: #f7f8fd;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: #343a52;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 420px;
  overflow: auto;
}
.deliverable-body { max-height: 340px; }

.details { margin-top: 14px; border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); padding: 10px 14px; }
.details summary { cursor: pointer; color: var(--muted); font-size: 12.5px; }
.details .code { margin-top: 10px; }

.notice {
  background: var(--brand-soft);
  border: 1px solid #ddd6ff;
  color: #4338ca;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 14px;
  font-size: 13px;
}
.notice.warn { background: var(--amber-bg); border-color: #f0d9a8; color: #92400e; }
.notice.ok { background: var(--green-bg); border-color: #bfe8cd; color: var(--green); }
.notice.subtle { background: #f8f9fd; border-color: var(--line); color: var(--muted); margin: 6px 0 0; padding: 6px 10px; font-size: 12px; }

.empty {
  text-align: center;
  padding: 48px 24px;
  background: var(--panel);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
}
.empty.small { padding: 34px 20px; }
.empty-icon { font-size: 30px; opacity: 0.55; margin-bottom: 8px; }
.empty h3 { font-size: 16px; margin-bottom: 6px; }
.empty p { max-width: 520px; margin: 0 auto; }
.empty-actions { margin-top: 16px; }

.loading { padding: 40px; text-align: center; color: var(--muted); }
.loading::before {
  content: "";
  display: inline-block; width: 16px; height: 16px; margin-right: 8px;
  border: 2px solid var(--brand-soft); border-top-color: var(--brand);
  border-radius: 50%; vertical-align: -3px;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================= 徽标 / 标签 ============================= */
.badge {
  display: inline-flex; align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  background: #eef0f7;
  color: #4b5168;
}
.badge.green { background: var(--green-bg); color: var(--green); }
.badge.amber { background: var(--amber-bg); color: var(--amber); }
.badge.red { background: var(--red-bg); color: var(--red); }
.badge.blue { background: var(--blue-bg); color: var(--blue); }
.badge.violet { background: var(--violet-bg); color: var(--violet); }

.pill {
  display: inline-flex; align-items: center;
  padding: 1px 9px;
  border-radius: 7px;
  font-size: 11.5px;
  background: #f1f3fa;
  color: #555c74;
  white-space: nowrap;
}
.pill.green { background: var(--green-bg); color: var(--green); }
.pill.amber { background: var(--amber-bg); color: var(--amber); }
.pill.red { background: var(--red-bg); color: var(--red); }
.pill.blue { background: var(--blue-bg); color: var(--blue); }
.pill.violet { background: var(--violet-bg); color: var(--violet); }

.chip {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 9px;
  border-radius: 7px;
  font-size: 11.5px;
  background: #f1f3fa;
  color: #555c74;
  border: 1px solid transparent;
}
.chip b { font-weight: 700; }
.chip.green { background: var(--green-bg); color: var(--green); }
.chip.amber { background: var(--amber-bg); color: var(--amber); }
.chip.red { background: var(--red-bg); color: var(--red); }
.chip.blue { background: var(--blue-bg); color: var(--blue); }
.chip.violet { background: var(--violet-bg); color: var(--violet); }
button.chip { cursor: pointer; border-color: var(--line-strong); }
button.chip:hover { border-color: var(--brand); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0; }

/* ============================= 概览 ============================= */
.hero {
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  border-radius: var(--radius);
  padding: 18px 22px;
  margin-bottom: 18px;
  color: #fff;
  background: linear-gradient(120deg, #5b46e0 0%, #7d6bff 55%, #9d8bff 100%);
  box-shadow: 0 12px 30px rgba(91, 70, 224, 0.28);
}
.hero.warn { background: linear-gradient(120deg, #92400e 0%, #b45309 60%, #d97706 100%); box-shadow: 0 12px 30px rgba(180, 83, 9, 0.25); }
.hero-title { font-size: 19px; font-weight: 700; }
.hero-sub { font-size: 12.5px; opacity: 0.86; margin-top: 3px; word-break: break-all; }
.hero-meta { display: flex; gap: 8px; flex-wrap: wrap; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 8px; }
.stat-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
}
.stat-card.violet { border-left-color: var(--brand); }
.stat-card.amber { border-left-color: #d97706; }
.stat-card.green { border-left-color: #16a34a; }
.stat-card.blue { border-left-color: #2563eb; }
.stat-value { font-size: 27px; font-weight: 700; letter-spacing: -0.5px; }
.stat-label { font-size: 12.5px; color: var(--ink-2); font-weight: 600; margin-top: 2px; }
.stat-hint { font-size: 11.5px; color: var(--muted); margin-top: 3px; }

.cols { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.col { min-width: 0; }

.service-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.service-item {
  display: flex; align-items: flex-start; gap: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  box-shadow: var(--shadow-sm);
}
.service-dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 6px; background: #cbd0e0; flex: 0 0 9px; }
.service-item.ready .service-dot { background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.16); }
.service-item.down .service-dot { background: #f59e0b; box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.14); }
.service-name { font-size: 12.5px; font-weight: 600; }
.service-detail { font-size: 11.5px; color: var(--muted); word-break: break-word; }

.count-rows { display: flex; flex-direction: column; gap: 8px; }
.count-row { display: flex; align-items: flex-start; gap: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 14px; }
.count-label { flex: 0 0 64px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.count-items { display: flex; gap: 6px; flex-wrap: wrap; }

.event-feed {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  max-height: 560px;
  overflow-y: auto;
  padding: 6px 4px;
}
.event-item {
  display: flex; gap: 10px;
  padding: 7px 12px;
  border-bottom: 1px dashed var(--line);
  font-size: 12.5px;
}
.event-item:last-child { border-bottom: none; }
.event-item.level-error { background: #fff6f6; }
.event-item.level-warning { background: #fffaf0; }
.event-time { flex: 0 0 58px; color: var(--muted); font-family: var(--mono); font-size: 11.5px; padding-top: 2px; }
.event-body { min-width: 0; flex: 1; }
.event-title { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.event-msg { color: var(--ink-2); word-break: break-word; }
.event-meta { font-size: 11px; color: var(--muted); font-family: var(--mono); margin-top: 1px; }

/* ============================= 需求分析 ============================= */
.req-list { display: flex; flex-direction: column; gap: 6px; }
.req-item {
  display: flex; align-items: center; gap: 12px;
  background: #fbfbfe;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 13px;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.req-item:hover { border-color: var(--brand); background: #f7f5ff; }
.req-title { flex: 1; font-weight: 600; color: var(--ink-2); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.material-list { display: flex; flex-direction: column; gap: 6px; }
.material-item { background: #fbfbfe; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 9px 12px; }
.material-name { font-weight: 600; font-size: 12.5px; }
.generated { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line-strong); }

/* ============================= 数字员工 ============================= */
.employee-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }
.employee-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.employee-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.employee-head { display: flex; align-items: center; gap: 12px; }
.avatar {
  width: 42px; height: 42px; border-radius: 12px; flex: 0 0 42px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff; font-size: 18px; font-weight: 700;
}
.employee-id { min-width: 0; }
.employee-name { font-size: 15.5px; font-weight: 700; }
.employee-meta { display: flex; gap: 6px; flex-wrap: wrap; }
.employee-mission { color: var(--ink-2); font-size: 12.5px; }
.version-list { display: flex; flex-direction: column; gap: 10px; }
.version-item { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; background: #fbfbfe; }
.version-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.version-changelog { font-size: 13px; color: var(--ink-2); }

/* ============================= 任务看板 ============================= */
.board { display: grid; grid-template-columns: repeat(5, minmax(238px, 1fr)); gap: 14px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.board-column { background: #eef0f8; border-radius: var(--radius); padding: 10px; min-height: 160px; }
.board-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px 10px; }
.board-title { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.board-count { font-size: 11.5px; color: var(--muted); background: #dfe3f0; border-radius: 999px; padding: 0 8px; }
.board-body { display: flex; flex-direction: column; gap: 9px; }
.board-empty { color: #9aa0b5; font-size: 12px; text-align: center; padding: 18px 0; }
.task-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 12px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.task-card:hover { border-color: var(--brand); transform: translateY(-1px); }
.task-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.task-title { font-size: 13px; font-weight: 600; color: var(--ink); line-height: 1.45; }
.task-meta { display: flex; justify-content: space-between; gap: 8px; font-size: 11.5px; margin-top: 6px; color: var(--ink-2); }
.task-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 7px; }

/* ============================= 表格 ============================= */
.table { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.table th, .table td { text-align: left; padding: 10px 13px; font-size: 12.5px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { background: #f6f7fc; color: var(--muted); font-weight: 600; white-space: nowrap; }
.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover td { background: #fafaff; }

/* ============================= 知识库 ============================= */
.search-row { display: flex; gap: 8px; margin-bottom: 12px; }
.fact-list, .memory-list { display: flex; flex-direction: column; gap: 9px; }
.fact-item {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  box-shadow: var(--shadow-sm);
}
.fact-head { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-bottom: 5px; }
.fact-statement { font-size: 13px; color: var(--ink-2); }
.memory-item {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 13px;
  box-shadow: var(--shadow-sm);
}
.memory-item summary { cursor: pointer; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.memory-preview { flex: 1; min-width: 0; font-size: 12.5px; color: var(--ink-2); }
.memory-item .code { margin-top: 10px; max-height: 220px; }

/* ============================= 抽屉 ============================= */
.drawer { position: fixed; inset: 0; z-index: 60; }
.drawer-mask { position: absolute; inset: 0; background: rgba(15, 18, 32, 0.42); backdrop-filter: blur(2px); }
.drawer-panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(720px, 94vw);
  background: var(--bg);
  box-shadow: -18px 0 48px rgba(15, 18, 32, 0.22);
  display: flex; flex-direction: column;
  animation: slideIn 0.2s ease;
}
@keyframes slideIn { from { transform: translateX(24px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 22px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.drawer-head h2 { font-size: 16.5px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 20px 22px 40px; }
.drawer-content { display: flex; flex-direction: column; gap: 4px; }
.drawer-title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.drawer-title-row h3 { font-size: 17px; }
.drawer-actions { display: flex; gap: 10px; margin: 12px 0 4px; }
.review-item { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; margin-top: 9px; box-shadow: var(--shadow-sm); }
.review-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.score { font-size: 12.5px; font-weight: 700; color: var(--violet); }
.review-feedback { margin-top: 7px; font-size: 12.5px; color: var(--ink-2); }
.check-list { display: flex; flex-direction: column; gap: 3px; margin-top: 9px; }
.check-item { display: flex; gap: 7px; align-items: baseline; font-size: 12px; color: var(--ink-2); }
.check-icon { font-weight: 700; }
.check-item.pass .check-icon { color: var(--green); }
.check-item.fail .check-icon { color: var(--red); }
.file-list { display: flex; flex-direction: column; gap: 5px; margin-top: 9px; }
.file-item { display: flex; flex-direction: column; gap: 1px; background: #fbfbfe; border: 1px solid var(--line); border-radius: 8px; padding: 8px 11px; }
.file-name { font-weight: 600; font-size: 12.5px; }

/* ============================= 设置 ============================= */
.config-list { display: flex; flex-direction: column; }
.config-row { display: flex; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 12.5px; }
.config-row:last-child { border-bottom: none; }
.config-key { flex: 0 0 118px; color: var(--muted); font-family: var(--mono); font-size: 11.5px; word-break: break-all; }
.config-value { flex: 1; min-width: 0; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; word-break: break-word; }

/* ============================= Toast ============================= */
.toasts { position: fixed; right: 22px; bottom: 22px; z-index: 80; display: flex; flex-direction: column; gap: 9px; max-width: min(420px, 92vw); }
.toast {
  display: flex; align-items: flex-start; gap: 9px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: 10px;
  padding: 11px 14px;
  box-shadow: 0 12px 32px rgba(20, 24, 45, 0.16);
  font-size: 13px;
  animation: toastIn 0.2s ease;
}
.toast.ok { border-left-color: #16a34a; }
.toast.error { border-left-color: #dc2626; }
.toast.out { opacity: 0; transform: translateY(6px); transition: all 0.25s ease; }
.toast-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); margin-top: 6px; flex: 0 0 8px; }
.toast.ok .toast-dot { background: #16a34a; }
.toast.error .toast-dot { background: #dc2626; }
.toast-text { word-break: break-word; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ============================= 响应式 ============================= */
@media (max-width: 1080px) {
  .cols { grid-template-columns: 1fr; }
  .board { grid-template-columns: repeat(5, minmax(210px, 1fr)); }
}

@media (max-width: 820px) {
  .app { flex-direction: column; }
  .sidebar {
    position: relative; width: 100%; flex: none; height: auto;
    padding: 14px 14px 10px;
  }
  .brand { padding: 0 4px 12px; }
  .nav { flex-direction: row; overflow-x: auto; gap: 6px; padding-bottom: 4px; }
  .nav-item { flex: 0 0 auto; padding: 7px 11px; font-size: 13px; }
  .nav-icon { display: none; }
  .sidebar-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; padding: 8px 4px 0; }
  .version { margin-top: 0; }
  .topbar { position: relative; padding: 14px 16px 12px; }
  .view { padding: 16px 16px 40px; }
  .employee-grid { grid-template-columns: 1fr; }
  .drawer-panel { width: 100%; }
}
