/* ============================================================
   校园安全自查 · 高保真原型样式
   设计方向：政务台账 / 纸张质感 / 松柏绿 + 朱砂橙
   ============================================================ */

:root {
  --ink: #13231d;
  --ink-2: #25352e;
  --pine: #103029;
  --pine-2: #17463a;
  --pine-3: #1f5a49;
  --jade: #0f766e;
  --jade-2: #0d9488;
  --jade-soft: #e4f2ee;
  --jade-line: #b9dcd4;
  --paper: #f3f0e7;
  --paper-2: #ece7da;
  --card: #fffdf8;
  --line: #e2dccd;
  --line-strong: #cfc7b4;
  --muted: #6d766f;
  --muted-2: #8b938d;
  --amber: #b45309;
  --amber-soft: #fdf1df;
  --danger: #b42318;
  --danger-soft: #fcebe9;
  --success: #157f3d;
  --success-soft: #e7f5eb;
  --blue-soft: #e8f0f7;
  --blue: #1d5b8a;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(19, 35, 29, .04), 0 8px 24px -18px rgba(19, 35, 29, .35);
  --shadow-lg: 0 24px 60px -28px rgba(19, 35, 29, .45);
  --font-display: "Songti SC", "Source Han Serif SC", "Noto Serif SC", "SimSun", serif;
  --font-body: "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
  --font-num: "Bahnschrift", "DIN Alternate", "Segoe UI", sans-serif;
  --sidebar-w: 248px;
}

* { box-sizing: border-box; }

svg { width: 15px; height: 15px; flex: 0 0 auto; vertical-align: -2px; }

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(15, 118, 110, .06), transparent 60%),
    repeating-linear-gradient(0deg, rgba(19, 35, 29, .012) 0 1px, transparent 1px 3px),
    var(--paper);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 14px; color: var(--ink); }
::selection { background: var(--jade); color: #fff; }

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

.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  background:
    radial-gradient(420px 300px at 10% 0%, rgba(45, 212, 191, .12), transparent 70%),
    radial-gradient(300px 400px at 110% 100%, rgba(180, 83, 9, .14), transparent 65%),
    linear-gradient(175deg, #14382f 0%, #0d2822 100%);
  color: #e9f2ee;
  padding: 22px 16px 18px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 18px 18px;
  opacity: .35;
  pointer-events: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 2px 8px 20px;
  position: relative;
  z-index: 1;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .04));
  border: 1px solid rgba(255, 255, 255, .18);
  color: #b7e4d8;
}
.brand-mark svg { width: 23px; height: 23px; }

.brand-text strong {
  display: block;
  font-family: var(--font-display);
  font-size: 19px;
  letter-spacing: .06em;
  font-weight: 700;
  color: #f4fbf8;
}
.brand-text span {
  display: block;
  font-size: 10.5px;
  letter-spacing: .18em;
  color: rgba(220, 240, 233, .55);
  text-transform: uppercase;
}

.nav-group { position: relative; z-index: 1; margin-top: 6px; }
.nav-label {
  font-size: 10.5px;
  letter-spacing: .16em;
  color: rgba(205, 231, 222, .48);
  padding: 14px 12px 7px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 10.5px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: rgba(230, 245, 239, .74);
  font-size: 13.5px;
  text-align: left;
  transition: background .18s, color .18s, transform .18s;
  margin-bottom: 2px;
}
.nav-item svg { width: 17px; height: 17px; opacity: .8; flex: 0 0 auto; }
.nav-item:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nav-item.active {
  background: linear-gradient(90deg, rgba(45, 212, 191, .2), rgba(45, 212, 191, .06));
  color: #eafff8;
  box-shadow: inset 2px 0 0 #5eead4;
}
.nav-item.active svg { opacity: 1; color: #5eead4; }
.nav-item .nav-badge {
  margin-left: auto;
  min-width: 20px;
  height: 19px;
  padding: 0 6px;
  border-radius: 10px;
  background: #c2410c;
  color: #fff;
  font-size: 11px;
  display: grid;
  place-items: center;
  font-family: var(--font-num);
}

.sidebar-foot {
  margin-top: auto;
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(255, 255, 255, .09);
  padding: 15px 10px 2px;
  font-size: 11.5px;
  color: rgba(220, 240, 233, .46);
  line-height: 1.7;
}
.sidebar-foot b { color: rgba(235, 250, 244, .8); font-weight: 500; }

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

.topbar {
  height: 64px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 30px;
  background: rgba(255, 253, 248, .82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 30;
}

.crumb { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 7px; }
.crumb b { color: var(--ink); font-weight: 600; }
.crumb .sep { color: var(--line-strong); }

.topbar-spacer { flex: 1; }

.role-switch {
  display: flex;
  padding: 3px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.role-switch button {
  border: 0;
  background: transparent;
  padding: 6px 11px;
  border-radius: 7px;
  font-size: 12px;
  color: var(--muted);
  transition: all .18s;
}
.role-switch button.active {
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(19, 35, 29, .12);
  font-weight: 600;
}

.icon-btn {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  color: var(--muted);
  position: relative;
}
.icon-btn:hover { color: var(--ink); border-color: var(--line-strong); }
.icon-btn .dot {
  position: absolute; top: 8px; right: 8px;
  width: 6px; height: 6px; border-radius: 50%;
  background: #c2410c;
}
.icon-btn svg, .btn svg { width: 16px; height: 16px; }

.avatar {
  display: flex; align-items: center; gap: 10px;
  padding-left: 14px; border-left: 1px solid var(--line);
}
.avatar-pic {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--jade-soft);
  color: var(--jade);
  font-weight: 700;
  font-size: 13px;
  border: 1px solid var(--jade-line);
}
.avatar-meta strong { display: block; font-size: 12.5px; line-height: 1.3; }
.avatar-meta span { display: block; font-size: 10.5px; color: var(--muted); }

.content { padding: 26px 30px 60px; max-width: 1560px; width: 100%; margin: 0 auto; }

/* ---------- 通用组件 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 38px; padding: 0 16px;
  border-radius: 9px;
  border: 1px solid var(--line-strong);
  background: var(--card);
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 500;
  transition: all .18s;
  white-space: nowrap;
}
.btn:hover { border-color: var(--pine-3); color: var(--pine-3); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.primary {
  background: linear-gradient(180deg, var(--pine-3), var(--pine-2));
  border-color: var(--pine-2);
  color: #f2fbf7;
  box-shadow: 0 6px 16px -10px rgba(16, 48, 41, .9);
}
.btn.primary:hover { background: linear-gradient(180deg, #246a56, var(--pine-2)); color: #fff; }
.btn.danger { color: var(--danger); border-color: #e8c2be; background: #fff8f7; }
.btn.danger:hover { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--ink); background: var(--paper-2); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 12px; border-radius: 7px; }
.btn.lg { height: 44px; padding: 0 22px; font-size: 14px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 {
  font-family: var(--font-display);
  font-size: 27px;
  letter-spacing: .02em;
  margin: 0 0 4px;
  font-weight: 700;
  line-height: 1.25;
}
.page-head p { margin: 0; color: var(--muted); font-size: 13px; }
.page-actions { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 16px 18px 12px;
}
.card-title {
  font-family: var(--font-display);
  font-size: 16.5px; font-weight: 700; letter-spacing: .02em;
  display: flex; align-items: center; gap: 9px;
}
.card-title .tick { width: 3px; height: 15px; border-radius: 2px; background: var(--jade); display: inline-block; }
.card-sub { font-size: 12px; color: var(--muted); font-weight: 400; font-family: var(--font-body); }
.card-body { padding: 0 18px 18px; }

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  height: 22px; padding: 0 8px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .85; }
.badge.draft { background: #f0eee7; color: #78716c; }
.badge.pending { background: var(--amber-soft); color: var(--amber); }
.badge.approved { background: var(--success-soft); color: var(--success); }
.badge.returned { background: var(--danger-soft); color: var(--danger); }
.badge.done { background: var(--jade-soft); color: var(--jade); }
.badge.info { background: var(--blue-soft); color: var(--blue); }
.badge.plain { background: var(--paper-2); color: var(--muted); }
.badge.plain::before { display: none; }

.tag {
  display: inline-flex; align-items: center;
  height: 21px; padding: 0 7px;
  border-radius: 5px;
  border: 1px solid var(--line);
  background: #fffdf8;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}
.tag.jade { color: var(--jade); border-color: var(--jade-line); background: var(--jade-soft); }
.tag.amber { color: var(--amber); border-color: #ecd3ae; background: var(--amber-soft); }
.tag.red { color: var(--danger); border-color: #ecc6c2; background: var(--danger-soft); }

/* 统计卡 */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.stat-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 17px 18px 15px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.stat-card::after {
  content: "";
  position: absolute; right: -26px; top: -30px;
  width: 96px; height: 96px; border-radius: 50%;
  background: radial-gradient(circle, rgba(15, 118, 110, .09), transparent 70%);
}
.stat-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 12.5px; }
.stat-top .ico { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--jade-soft); color: var(--jade); }
.stat-top .ico.amber { background: var(--amber-soft); color: var(--amber); }
.stat-top .ico.red { background: var(--danger-soft); color: var(--danger); }
.stat-top .ico.blue { background: var(--blue-soft); color: var(--blue); }
.stat-num { font-family: var(--font-num); font-size: 33px; line-height: 1.15; margin: 8px 0 1px; letter-spacing: .02em; }
.stat-num small { font-family: var(--font-body); font-size: 12px; color: var(--muted); font-weight: 400; margin-left: 3px; }
.stat-foot { font-size: 11.5px; color: var(--muted-2); display: flex; gap: 6px; align-items: center; }
.stat-foot b { color: var(--jade); font-weight: 600; }
.stat-foot b.warn { color: var(--amber); }

.grid-2 { display: grid; grid-template-columns: 1.35fr 1fr; gap: 16px; }
.grid-2 > * { min-width: 0; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }

/* 表格 */
.table-wrap { overflow-x: auto; border-radius: 10px; border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; font-size: 12.8px; background: var(--card); }
thead th {
  text-align: left; font-weight: 600; color: var(--muted);
  background: #f8f5ed;
  padding: 10px 12px; border-bottom: 1px solid var(--line);
  white-space: nowrap; font-size: 11.5px; letter-spacing: .02em;
}
tbody td { padding: 11px 12px; border-bottom: 1px solid #f0ebdf; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .15s; }
tbody tr:hover { background: #fbf8ef; }
tbody tr.clickable { cursor: pointer; }
td .strong { font-weight: 600; color: var(--ink); }
td .sub { display: block; color: var(--muted-2); font-size: 11px; margin-top: 1px; }
.cell-actions { display: flex; gap: 12px; white-space: nowrap; }
.link { display: inline-flex; align-items: center; gap: 4px; color: var(--jade); font-weight: 600; background: none; border: 0; padding: 0; font-size: 12.5px; }
.link:hover { text-decoration: underline; }
.link.danger { color: var(--danger); }

/* 筛选 */
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: flex-end; padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 14px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field > label { font-size: 11px; color: var(--muted); letter-spacing: .04em; }
.control {
  height: 34px; padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fffdf8;
  font-size: 12.5px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.control:focus { border-color: var(--jade); box-shadow: 0 0 0 3px rgba(15, 118, 110, .12); }
input.control::placeholder, textarea.control::placeholder { color: #a8aea8; }
textarea.control { height: auto; padding: 9px 10px; resize: vertical; min-height: 74px; line-height: 1.6; }
.control.wide { width: 210px; }
.control.mid { width: 150px; }

/* 概览页 */
.hero {
  position: relative;
  display: flex; align-items: center; gap: 24px;
  padding: 22px 26px;
  border-radius: 16px;
  background: linear-gradient(112deg, #123a30 0%, #17493d 56%, #1d5949 100%);
  color: #eaf7f2;
  overflow: hidden;
  margin-bottom: 18px;
  box-shadow: var(--shadow-lg);
}
.hero::after {
  content: "";
  position: absolute; right: -70px; top: -90px;
  width: 320px; height: 320px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .13);
  box-shadow: 0 0 0 34px rgba(255, 255, 255, .035), 0 0 0 68px rgba(255, 255, 255, .022);
}
.hero h2 { font-family: var(--font-display); font-size: 25px; margin: 0 0 6px; letter-spacing: .04em; }
.hero p { margin: 0; font-size: 12.5px; color: rgba(224, 244, 237, .68); max-width: 640px; }
.hero .hero-pill { display: inline-flex; gap: 6px; margin-top: 12px; }
.hero .hero-pill span { font-size: 11px; padding: 4px 9px; border: 1px solid rgba(255, 255, 255, .16); border-radius: 20px; background: rgba(255, 255, 255, .06); }
.hero-actions { margin-left: auto; position: relative; z-index: 1; display: flex; gap: 9px; }
.hero-actions .btn { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .2); color: #f0fbf7; }
.hero-actions .btn:hover { background: rgba(255, 255, 255, .18); color: #fff; }
.hero-actions .btn.primary { background: #f3c58c; border-color: #f3c58c; color: #48260a; box-shadow: none; }
.hero-actions .btn.primary:hover { background: #f7d3a6; }

.todo-list { display: flex; flex-direction: column; }
.todo-item { display: flex; align-items: center; gap: 12px; padding: 11px 2px; border-bottom: 1px dashed #ebe5d8; }
.todo-item:last-child { border-bottom: 0; }
.todo-ico { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; flex: 0 0 auto; }
.todo-ico.amber { background: var(--amber-soft); color: var(--amber); }
.todo-ico.red { background: var(--danger-soft); color: var(--danger); }
.todo-ico.jade { background: var(--jade-soft); color: var(--jade); }
.todo-main { min-width: 0; flex: 1; }
.todo-main strong { display: block; font-size: 12.8px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.todo-main span { display: block; font-size: 11px; color: var(--muted); }
.todo-item .link { font-size: 12px; }

.bar-row { display: grid; grid-template-columns: 74px 1fr 40px; gap: 10px; align-items: center; padding: 7px 0; font-size: 12px; }
.bar-track { height: 7px; border-radius: 5px; background: #efece2; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 5px; background: linear-gradient(90deg, var(--jade), #43b3a2); }
.bar-fill.amber { background: linear-gradient(90deg, #d97706, #f0b45e); }
.bar-row b { font-family: var(--font-num); font-weight: 500; text-align: right; color: var(--muted); }

/* 任务卡片 */
.task-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.task-card { padding: 17px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); position: relative; }
.task-card::before { content: ""; position: absolute; left: 0; top: 16px; bottom: 16px; width: 3px; border-radius: 0 3px 3px 0; background: var(--jade); }
.task-card.closed::before { background: var(--line-strong); }
.task-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.task-card h3 { font-family: var(--font-display); font-size: 16px; margin: 0 0 3px; font-weight: 700; line-height: 1.4; }
.task-meta { font-size: 11.5px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 12px; }
.task-scope { display: flex; flex-wrap: wrap; gap: 5px; margin: 11px 0 13px; }
.progress-line { display: flex; align-items: center; gap: 10px; font-size: 11.5px; color: var(--muted); }
.progress-line .bar-track { flex: 1; }
.progress-line b { font-family: var(--font-num); color: var(--ink); font-weight: 500; }

/* 填报页 */
.fill-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 18px; align-items: start; }
.fill-aside { position: sticky; top: 82px; display: flex; flex-direction: column; gap: 12px; }
.ring-card { padding: 18px; text-align: center; }
.ring {
  width: 118px; height: 118px; border-radius: 50%;
  margin: 4px auto 10px;
  display: grid; place-items: center;
  background: conic-gradient(var(--jade) var(--p, 0%), #eae5d8 0);
  position: relative;
}
.ring::before { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: var(--card); }
.ring-inner { position: relative; z-index: 1; }
.ring-inner b { font-family: var(--font-num); font-size: 28px; display: block; line-height: 1.1; }
.ring-inner span { font-size: 11px; color: var(--muted); }
.ring-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; border-top: 1px dashed var(--line); padding-top: 10px; margin-top: 5px; }
.ring-stats div b { display: block; font-family: var(--font-num); font-size: 17px; font-weight: 500; }
.ring-stats div span { font-size: 10.5px; color: var(--muted); }
.ring-stats .ok b { color: var(--success); }
.ring-stats .no b { color: var(--danger); }
.ring-stats .skip b { color: var(--muted-2); }

.cat-block { margin-bottom: 14px; }
.cat-head { display: flex; align-items: center; gap: 9px; padding: 13px 16px 8px; }
.cat-head h3 { font-family: var(--font-display); font-size: 15.5px; margin: 0; }
.cat-head .count { font-size: 11px; color: var(--muted); background: var(--paper-2); border-radius: 10px; padding: 1px 8px; }
.item-card { border: 1px solid var(--line); border-radius: 12px; background: var(--card); margin: 0 12px 10px; padding: 14px 16px 13px; position: relative; transition: border-color .18s, box-shadow .18s; }
.item-card:hover { border-color: var(--line-strong); }
.item-card.answered { border-color: #d9d2c1; }
.item-card.bad { border-color: #ecc6c2; background: #fffbfa; }
.item-top { display: flex; gap: 12px; }
.item-no { width: 27px; height: 27px; flex: 0 0 auto; border-radius: 8px; background: var(--paper-2); color: var(--muted); display: grid; place-items: center; font-family: var(--font-num); font-size: 12px; }
.item-card.bad .item-no { background: var(--danger-soft); color: var(--danger); }
.item-body { flex: 1; min-width: 0; }
.item-title { font-size: 13.2px; line-height: 1.72; color: var(--ink-2); white-space: pre-line; }
.item-base { margin-top: 5px; font-size: 11px; color: var(--muted-2); }
.item-base summary { cursor: pointer; color: var(--jade); }
.item-base div { margin-top: 5px; padding: 8px 10px; background: #f8f5ed; border-radius: 7px; white-space: pre-line; line-height: 1.7; }
.item-side { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.judge { display: flex; gap: 6px; background: var(--paper-2); padding: 3px; border-radius: 8px; }
.judge button { border: 0; background: transparent; border-radius: 6px; padding: 5px 13px; font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; transition: all .15s; }
.judge button svg { width: 13px; height: 13px; }
.judge button:hover { color: var(--ink); }
.judge button.on-ok { background: var(--success); color: #fff; box-shadow: 0 2px 6px -2px rgba(21, 127, 61, .5); }
.judge button.on-bad { background: var(--danger); color: #fff; box-shadow: 0 2px 6px -2px rgba(180, 35, 24, .5); }
.fill-stamp { font-size: 10.5px; color: var(--muted-2); text-align: right; }

.hazard-panel { margin: 12px 0 0 39px; padding: 13px 14px; border-radius: 10px; background: #fdf7f6; border: 1px dashed #ecc6c2; }
.hazard-panel .hp-title { font-size: 11.5px; color: var(--danger); font-weight: 600; margin-bottom: 8px; display: flex; align-items: center; gap: 5px; }
.hp-grid { display: grid; grid-template-columns: 1fr 240px; gap: 10px; }
.hp-field { display: flex; flex-direction: column; gap: 4px; }
.hp-field label { font-size: 11px; color: var(--muted); }
.hp-field label em { color: var(--danger); font-style: normal; margin-left: 2px; }
.upload-row { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.upload-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border: 1px solid var(--line); border-radius: 7px; background: #fff; font-size: 11px; color: var(--muted); }
.upload-chip .x { border: 0; background: none; color: var(--muted-2); padding: 0; line-height: 1; }
.upload-btn { border: 1px dashed var(--line-strong); background: #fffdf8; color: var(--muted); font-size: 11px; border-radius: 7px; padding: 5px 10px; }
.upload-btn:hover { border-color: var(--jade); color: var(--jade); }
.radio-row { display: flex; gap: 14px; align-items: center; font-size: 12px; flex-wrap: wrap; }
.radio-row label { display: inline-flex; align-items: center; gap: 5px; color: var(--ink-2); cursor: pointer; }

.fill-footer { position: sticky; bottom: 14px; z-index: 20; display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: rgba(255, 253, 248, .92); border: 1px solid var(--line); border-radius: 12px; backdrop-filter: blur(10px); box-shadow: var(--shadow-lg); margin-top: 14px; }
.fill-footer .hint { font-size: 11.5px; color: var(--muted); }
.fill-footer .spacer { flex: 1; }

/* 详情页 */
.detail-hero { padding: 20px 22px; }
.detail-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.detail-title h1 { font-family: var(--font-display); font-size: 24px; margin: 0 0 6px; line-height: 1.35; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--muted); font-size: 12px; }
.detail-meta b { color: var(--ink-2); font-weight: 600; }
.detail-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-top: 16px; }
.detail-stat { background: #fcfaf3; padding: 11px 14px; }
.detail-stat span { font-size: 10.5px; color: var(--muted); display: block; }
.detail-stat b { font-family: var(--font-num); font-size: 19px; font-weight: 500; }
.detail-stat b.red { color: var(--danger); }
.detail-stat b.green { color: var(--success); }

.audit-banner { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 11px; background: var(--amber-soft); border: 1px solid #eed7b3; margin-bottom: 14px; }
.audit-banner .ico { width: 32px; height: 32px; border-radius: 9px; background: #f6d9a8; color: #8a4b06; display: grid; place-items: center; flex: 0 0 auto; }
.audit-banner .txt { flex: 1; font-size: 12.5px; color: #6b3c06; }
.audit-banner .txt b { display: block; font-size: 13px; }
.audit-banner .acts { display: flex; gap: 8px; }

.result-row td { vertical-align: top; }
.result-table { min-width: 1060px; }
.task-meta span { display: inline-flex; align-items: center; gap: 4px; }
.result-label { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; font-size: 11.5px; }
.result-label.ok { color: var(--success); }
.result-label.bad { color: var(--danger); }
.result-label.skip { color: var(--muted-2); }
.result-label svg { width: 13px; height: 13px; }
.hazard-text { font-size: 12px; line-height: 1.65; max-width: 320px; }
.muted { color: var(--muted); }
.mini { font-size: 11px; }
.nowrap { white-space: nowrap; }

.timeline { position: relative; padding-left: 22px; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 5px; bottom: 5px; width: 1px; background: var(--line); }
.tl-item { position: relative; padding: 0 0 16px; }
.tl-item::before { content: ""; position: absolute; left: -20px; top: 5px; width: 9px; height: 9px; border-radius: 50%; background: var(--card); border: 2px solid var(--line-strong); }
.tl-item.done::before { border-color: var(--jade); background: var(--jade); }
.tl-item.warn::before { border-color: var(--amber); background: var(--amber); }
.tl-item.bad::before { border-color: var(--danger); background: var(--danger); }
.tl-item strong { font-size: 12.8px; display: block; }
.tl-item span { font-size: 11px; color: var(--muted); }
.tl-item p { margin: 4px 0 0; font-size: 12px; color: var(--ink-2); background: #f8f5ed; border-radius: 7px; padding: 7px 9px; }

/* 弹窗 / 抽屉 */
.overlay { position: fixed; inset: 0; background: rgba(12, 28, 23, .42); backdrop-filter: blur(2px); z-index: 100; display: grid; place-items: center; padding: 24px; animation: fade .18s ease; }
.modal { width: 100%; max-width: 620px; background: var(--card); border-radius: 16px; box-shadow: var(--shadow-lg); overflow: hidden; animation: pop .2s ease; max-height: 90vh; display: flex; flex-direction: column; }
.modal.wide { max-width: 780px; }
.modal-head { padding: 18px 22px 12px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.modal-head h3 { font-family: var(--font-display); font-size: 18px; margin: 0; }
.modal-body { padding: 18px 22px; overflow-y: auto; }
.modal-foot { padding: 13px 22px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 9px; background: #fbf8f0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.form-grid .full { grid-column: 1 / -1; }
.form-field { display: flex; flex-direction: column; gap: 5px; }
.form-field label { font-size: 12px; color: var(--ink-2); font-weight: 500; }
.form-field label em { color: var(--danger); font-style: normal; }
.form-field .control { width: 100%; }
.checks { display: flex; flex-wrap: wrap; gap: 6px; }
.check-pill { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border: 1px solid var(--line-strong); border-radius: 7px; font-size: 12px; color: var(--ink-2); background: #fffdf8; cursor: pointer; user-select: none; }
.check-pill input { accent-color: var(--jade); margin: 0; }
.check-pill:has(input:checked) { border-color: var(--jade); background: var(--jade-soft); color: var(--jade); font-weight: 600; }

.drawer-overlay { position: fixed; inset: 0; background: rgba(12, 28, 23, .35); z-index: 90; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 520px; max-width: 94vw; background: var(--card); z-index: 91; box-shadow: -20px 0 60px -30px rgba(0, 0, 0, .4); display: flex; flex-direction: column; animation: slide .22s ease; }
.drawer-head { padding: 18px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.drawer-body { padding: 16px 20px; overflow-y: auto; }
.drawer-log { border-left: 2px solid var(--line); padding-left: 13px; margin-left: 4px; }
.log-item { position: relative; padding-bottom: 15px; }
.log-item::before { content: ""; position: absolute; left: -18px; top: 4px; width: 8px; height: 8px; border-radius: 50%; background: var(--jade); }
.log-item strong { font-size: 12px; display: block; }
.log-item span { font-size: 11px; color: var(--muted); }
.log-item p { margin: 3px 0 0; font-size: 11.5px; color: var(--ink-2); }

/* Toast */
.toast-wrap { position: fixed; top: 18px; right: 20px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast { display: flex; align-items: center; gap: 9px; padding: 11px 15px; background: #102f28; color: #eaf7f2; border-radius: 10px; box-shadow: var(--shadow-lg); font-size: 12.5px; animation: slideIn .22s ease; }
.toast svg { width: 16px; height: 16px; color: #5eead4; }
.toast.warn svg { color: #fbbf24; }

.empty { padding: 46px 20px; text-align: center; color: var(--muted); }
.empty .big { font-family: var(--font-display); font-size: 17px; color: var(--ink-2); margin-bottom: 5px; }
.empty p { margin: 0; font-size: 12px; }

.note { padding: 10px 12px; border-radius: 9px; background: #f8f5ed; border: 1px solid var(--line); font-size: 11.5px; color: var(--muted); line-height: 1.7; }
.note b { color: var(--ink-2); }

.role-note { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--muted); }
.role-note::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--jade); }

/* ---------- 账号 / 通知（成品版） ---------- */
.account-btn {
  display: flex; align-items: center; gap: 10px;
  padding: 5px 10px 5px 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  text-align: left;
  transition: all .18s;
}
.account-btn:hover { border-color: var(--line-strong); box-shadow: 0 4px 14px -10px rgba(19,35,29,.4); }
.account-btn .avatar-pic { width: 34px; height: 34px; flex: 0 0 auto; }
.account-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.account-text strong { font-size: 12.5px; font-weight: 600; }
.account-text span { font-size: 10.5px; color: var(--muted); }
.account-text small { font-size: 9.5px; color: var(--muted-2); max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.bell-btn { position: relative; }
.icon-count {
  position: absolute; top: -5px; right: -5px;
  min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 9px; background: #c2410c; color: #fff;
  font-size: 9.5px; display: grid; place-items: center;
  border: 2px solid var(--card);
  font-family: var(--font-num);
}

/* 填报页新增 */
.fill-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.autosave { font-size: 11px; color: var(--muted); background: var(--paper-2); border-radius: 6px; padding: 3px 8px; }
.nav-cats { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.nav-cats .link { font-size: 12px; }
.radio-col { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; font-size: 12px; color: var(--ink-2); }
.radio-col input { accent-color: var(--jade); }
.radio-col input[type=date] { height: 30px; }

/* 附件 */
.attach-row { margin-top: 7px; }
.attach-grid { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.attach-item {
  position: relative; width: 58px; height: 58px; border-radius: 8px; overflow: hidden;
  border: 1px solid var(--line); background: #fff; padding: 0;
}
.attach-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.attach-file { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: 100%; color: var(--muted); font-size: 8.5px; padding: 3px; }
.attach-file svg { width: 17px; height: 17px; }
.attach-file b { font-weight: 400; max-width: 52px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attach-x {
  position: absolute; top: 1px; right: 1px; width: 15px; height: 15px;
  border-radius: 50%; background: rgba(19,35,29,.68); color: #fff;
  font-size: 11px; line-height: 15px; text-align: center;
}
.attach-add {
  width: 58px; height: 58px; border-radius: 8px; border: 1px dashed var(--line-strong);
  background: #fffdf8; color: var(--muted); font-size: 9px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  cursor: pointer; position: relative; overflow: hidden;
}
.attach-add:hover { border-color: var(--jade); color: var(--jade); }
.attach-add input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.attach-thumb-row { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 5px; }
.mini-thumb { width: 30px; height: 30px; border-radius: 5px; border: 1px solid var(--line); padding: 0; overflow: hidden; background: #fff; display: grid; place-items: center; color: var(--muted); }
.mini-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mini-thumb svg { width: 14px; height: 14px; }

/* 分页 */
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 12px 2px 2px; font-size: 11.5px; color: var(--muted); }
.pager .btn { height: 28px; }

/* 账号选择 */
.account-groups { display: flex; flex-direction: column; gap: 14px; }
.account-group-title { font-size: 10.5px; letter-spacing: .12em; color: var(--muted); margin-bottom: 6px; }
.account-option { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 1px solid transparent; border-radius: 10px; background: #fffdf8; text-align: left; transition: all .15s; margin-bottom: 4px; }
.account-option:hover { border-color: var(--jade-line); background: var(--jade-soft); }
.account-option.active { border-color: var(--jade); background: var(--jade-soft); }
.account-option .avatar-pic { width: 34px; height: 34px; flex: 0 0 auto; }
.account-opt-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.account-opt-main b { font-size: 12.5px; }
.account-opt-main small { font-size: 10.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-option > svg { color: var(--muted-2); width: 14px; height: 14px; }

/* 通知 */
.notif-item { display: flex; gap: 10px; width: 100%; text-align: left; padding: 11px 10px; border: 0; border-bottom: 1px dashed #ebe5d8; background: transparent; border-radius: 8px; }
.notif-item:hover { background: #f8f5ed; }
.notif-item.unread { background: #fffaf0; }
.notif-dot { width: 6px; height: 6px; border-radius: 50%; background: transparent; margin-top: 6px; flex: 0 0 auto; }
.notif-item.unread .notif-dot { background: #c2410c; }
.notif-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.notif-main b { font-size: 12.5px; }
.notif-main span { font-size: 11.5px; color: var(--muted); line-height: 1.6; }
.notif-main small { font-size: 10px; color: var(--muted-2); }

/* 设置 */
.account-card { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fcfaf3; }
.account-card .avatar-pic { width: 42px; height: 42px; font-size: 15px; }
.account-card b { display: block; font-size: 14px; }
.account-card span { display: block; font-size: 11px; color: var(--muted); }
.account-card small { display: block; font-size: 10.5px; color: var(--muted-2); margin-top: 2px; }
.storage-bar { height: 9px; border-radius: 6px; background: #ece7da; overflow: hidden; }
.storage-bar > div { height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--jade), #43b3a2); transition: width .3s; }
.settings-list { margin-top: 12px; border-top: 1px dashed var(--line); }
.settings-list > div { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed #ebe5d8; font-size: 12px; color: var(--muted); }
.settings-list b { color: var(--ink); font-weight: 600; }
.settings-actions { display: flex; gap: 9px; flex-wrap: wrap; }
.settings-actions .btn { position: relative; }

.stat-grid.five { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 1280px) {
  .stat-grid.five { grid-template-columns: repeat(3, 1fr); }
  .account-text small { display: none; }
}
@media (max-width: 1024px) {
  .account-text { display: none; }
  .account-btn { padding: 5px; }
}
@media (max-width: 720px) {
  .stat-grid.five { grid-template-columns: 1fr 1fr; }
  .account-btn .avatar-pic { width: 30px; height: 30px; }
}

/* 动效 */
html.still .view > * { animation: none !important; }
.view > * { animation: rise .38s ease both; }
.view > *:nth-child(2) { animation-delay: .04s; }
.view > *:nth-child(3) { animation-delay: .08s; }
.view > *:nth-child(4) { animation-delay: .12s; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: scale(.97) translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes slide { from { transform: translateX(30px); opacity: .5; } to { transform: none; opacity: 1; } }
@keyframes slideIn { from { transform: translateX(20px); opacity: 0; } to { transform: none; opacity: 1; } }

/* 响应式 */
@media (max-width: 1280px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .fill-layout { grid-template-columns: minmax(0, 1fr) 260px; }
  .task-grid { grid-template-columns: 1fr; }
}
@media (max-width: 1024px) {
  :root { --sidebar-w: 76px; }
  .brand-text, .nav-label, .nav-item span, .sidebar-foot { display: none; }
  .nav-item { justify-content: center; }
  .nav-item .nav-badge { position: absolute; right: 6px; top: 4px; }
  .brand { justify-content: center; padding: 2px 0 20px; }
  .grid-2, .fill-layout { grid-template-columns: 1fr; }
  .fill-aside { position: static; }
  .detail-stats { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
  .content { padding: 16px 14px 50px; }
  .topbar { padding: 0 14px; }
  .avatar-meta, .crumb { display: none; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .stat-num { font-size: 26px; }
  .form-grid, .hp-grid { grid-template-columns: 1fr; }
  .detail-stats { grid-template-columns: 1fr 1fr; }
  .hero { flex-direction: column; align-items: flex-start; }
  .hero-actions { margin-left: 0; }
}
