* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --primary: #2563eb;
  --primary-soft: #eff6ff;
  --bg: #f4f6fa;
  --card: #ffffff;
  --border: #e5e9f0;
  --text: #1e293b;
  --muted: #7c8aa0;
  --green: #16a34a;
  --orange: #ea580c;
  --purple: #7c3aed;
  --red: #dc2626;
  --sidebar: #10192e;
  --gold: #b45309;
  --gold-soft: #fdf6e9;
  --paper: #fbfaf6;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --shadow-card: 0 1px 2px rgba(16, 24, 40, .04), 0 10px 28px rgba(16, 24, 40, .06);
  --font-display: Georgia, "Songti SC", "Noto Serif SC", serif;
}
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
}
.app { display: flex; min-height: 100vh; }

/* ===== 侧边栏 ===== */
.sidebar {
  width: 230px; flex-shrink: 0; background: var(--sidebar); color: #cbd5e1;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; gap: 10px; align-items: center; padding: 20px 16px; border-bottom: 1px solid rgba(255,255,255,.08); }
.brand-logo {
  width: 38px; height: 38px; border-radius: 10px; background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: #fff; font-weight: 700; font-size: 18px; display: flex; align-items: center; justify-content: center;
}
.brand-title { color: #fff; font-weight: 600; font-size: 15px; }
.brand-sub { font-size: 12px; color: #94a3b8; margin-top: 2px; }
.nav { flex: 1; padding: 12px 10px; overflow-y: auto; }
.nav-label { font-size: 11px; color: #64748b; padding: 12px 10px 6px; letter-spacing: 1px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px;
  color: #cbd5e1; cursor: pointer; margin-bottom: 2px; font-size: 14px; transition: all .15s;
}
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item.active { background: var(--primary); color: #fff; }
.nav-icon { width: 18px; text-align: center; }
.badge {
  margin-left: auto; background: rgba(255,255,255,.14); border-radius: 20px;
  font-size: 11px; padding: 1px 8px; color: #e2e8f0;
}
.badge.accent { background: var(--primary); }
.camp-dates { margin-bottom: 10px; }

/* ===== 主区域 ===== */
.main { flex: 1; padding: 0 24px 32px; min-width: 0; }
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 0; position: sticky; top: 0; background: var(--bg); z-index: 5;
}
.topbar h1 { font-size: 20px; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.status-pill {
  background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0;
  padding: 4px 12px; border-radius: 20px; font-size: 12px; display: flex; align-items: center; gap: 6px;
}
.status-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: #10b981; }
.user-chip {
  width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg,#6366f1,#3b82f6);
  color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600;
}

.page { display: none; animation: fadeIn .2s; }
.page.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ===== 通用卡片 / 网格 ===== */
.card {
  background: var(--card);
  border: 1px solid rgba(229, 233, 240, .8);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-card);
  transition: box-shadow .2s, transform .2s;
}
.card:hover { box-shadow: 0 2px 6px rgba(16,24,40,.06), 0 18px 40px rgba(16,24,40,.1); }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.card-head h3 { font-size: 15px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.muted { color: var(--muted); font-size: 13px; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 18px;
  display: flex; gap: 14px; align-items: center;
}
.stat-icon {
  width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center;
  justify-content: center; font-size: 19px;
}
.stat-icon.blue { background: var(--primary-soft); color: var(--primary); }
.stat-icon.green { background: #ecfdf5; color: var(--green); }
.stat-icon.orange { background: #fff7ed; color: var(--orange); }
.stat-icon.purple { background: #f5f3ff; color: var(--purple); }
.stat-value { font-size: 24px; font-weight: 700; }
.stat-label { color: var(--muted); font-size: 12px; margin-top: 2px; }

/* ===== 按钮 / 输入 ===== */
.btn {
  border: 1px solid var(--border); background: #fff; color: var(--text); border-radius: 8px;
  padding: 8px 14px; cursor: pointer; font-size: 13px; transition: all .15s;
}
.btn:hover { border-color: var(--primary); color: var(--primary); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: #1d4ed8; }
.btn.ghost { background: transparent; }
.btn.small { padding: 5px 10px; font-size: 12px; }
.btn.link { border: none; background: none; color: var(--primary); padding: 0; }
.btn.danger-text { color: var(--red); }
.input {
  border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; font-size: 13px;
  outline: none; background: #fff; min-width: 0;
}
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
textarea.input { resize: vertical; font-family: inherit; }

/* ===== 工具栏 ===== */
.toolbar { display: flex; gap: 10px; margin-bottom: 16px; align-items: center; flex-wrap: wrap; }
.toolbar .input:first-child { flex: 1; max-width: 320px; }
.toolbar-spacer { flex: 1; }

/* ===== 表格 ===== */
.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left; font-size: 12px; color: var(--muted); font-weight: 500;
  padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.table td { padding: 11px 12px; border-bottom: 1px solid #f1f4f9; vertical-align: middle; }
.table tr:hover td { background: #f8fafc; }
.table tr:last-child td { border-bottom: none; }
.tag {
  display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 12px;
}
.tag.g1 { background: var(--primary-soft); color: var(--primary); }
.tag.g2 { background: #ecfdf5; color: var(--green); }
.tag.g3 { background: #fff7ed; color: var(--orange); }
.tag.g4 { background: #f5f3ff; color: var(--purple); }
.tag.g5 { background: #fef2f2; color: var(--red); }
.tag.g6 { background: #ecfeff; color: #0891b2; }
.tag.on { background: #ecfdf5; color: var(--green); }
.tag.off { background: #fef2f2; color: var(--red); }
.health-cell { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.row-actions { display: flex; gap: 8px; }
.row-actions button { background: none; border: none; cursor: pointer; font-size: 13px; padding: 2px; }
.row-actions .edit { color: var(--primary); }
.row-actions .del { color: var(--red); }
.empty { text-align: center; color: var(--muted); padding: 40px 0; display: none; }

/* ===== 概览页 ===== */
.todo-list { list-style: none; }
.todo-list li {
  display: flex; align-items: center; gap: 10px; padding: 9px 0;
  border-bottom: 1px solid #f1f4f9; font-size: 13px;
}
.todo-list li:last-child { border-bottom: none; }
.todo-list .todo-phase { color: var(--primary); font-weight: 600; white-space: nowrap; }
.todo-list .todo-owner { margin-left: auto; color: var(--muted); font-size: 12px; white-space: nowrap; }
.todo-empty { color: var(--muted); text-align: center; padding: 24px 0; }

.group-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.group-card { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; }
.group-card .g-name { font-weight: 600; display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.group-card .g-meta { font-size: 12px; color: var(--muted); line-height: 1.7; }

.checkin-summary { display: flex; align-items: center; gap: 20px; }
.ring-big {
  width: 92px; height: 92px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; position: relative;
  background: conic-gradient(var(--green) calc(var(--p) * 1%), #e8edf5 0);
}
.ring-big::before {
  content: ""; position: absolute; inset: 9px; background: #fff; border-radius: 50%;
}
.ring-big span { position: relative; font-weight: 700; font-size: 18px; }
.checkin-detail { flex: 1; }
.checkin-detail .cd-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 13px; border-bottom: 1px dashed #eef2f7; }
.checkin-detail .cd-row:last-child { border: none; }

.feed-list { list-style: none; }
.feed-list li { display: flex; gap: 10px; padding: 8px 0; font-size: 13px; border-bottom: 1px solid #f1f4f9; }
.feed-list li:last-child { border: none; }
.feed-list .feed-time { color: var(--muted); font-size: 12px; white-space: nowrap; }

/* ===== 团队页 ===== */
.tabs { display: flex; gap: 8px; margin-bottom: 16px; align-items: center; }
.tab {
  padding: 8px 20px; border-radius: 8px; border: 1px solid var(--border); background: #fff;
  cursor: pointer; font-size: 13px;
}
.tab.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.member-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 18px; position: relative; }
.member-card .m-top { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.avatar {
  width: 44px; height: 44px; border-radius: 50%; color: #fff; display: flex; align-items: center;
  justify-content: center; font-size: 16px; font-weight: 600; flex-shrink: 0;
}
.member-card .m-name { font-weight: 600; font-size: 15px; }
.member-card .m-role { font-size: 12px; color: var(--muted); margin-top: 2px; }
.member-card .m-row { font-size: 13px; color: #475569; padding: 4px 0; display: flex; gap: 8px; }
.member-card .m-row b { color: var(--muted); font-weight: 500; min-width: 58px; }
.member-card .m-actions { position: absolute; top: 12px; right: 12px; display: flex; gap: 6px; }
.member-card .m-actions button { background: none; border: none; cursor: pointer; font-size: 13px; }
.duty-notes { font-size: 13px; color: #475569; line-height: 2; }
.duty-notes b { color: var(--text); }

/* ===== SOP 页 ===== */
.sop-summary { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.sop-ring {
  width: 84px; height: 84px; border-radius: 50%;
  background: conic-gradient(var(--primary) calc(var(--p) * 1%), #e8edf5 0);
  display: flex; align-items: center; justify-content: center; position: relative;
}
.sop-ring::before { content: ""; position: absolute; inset: 8px; background: #fff; border-radius: 50%; }
.sop-ring span { position: relative; font-weight: 700; font-size: 17px; }
.sop-phase { background: var(--card); border: 1px solid var(--border); border-radius: 12px; margin-bottom: 14px; overflow: hidden; }
.sop-phase-head {
  display: flex; align-items: center; gap: 12px; padding: 15px 18px; cursor: pointer; user-select: none;
}
.sop-phase-head:hover { background: #fafbfd; }
.sop-phase-head .ph-name { font-weight: 600; }
.sop-phase-head .ph-count { font-size: 12px; color: var(--muted); }
.sop-phase-head .arrow { margin-left: auto; color: var(--muted); transition: transform .2s; }
.sop-phase.open .arrow { transform: rotate(90deg); }
.sop-progress { width: 120px; height: 6px; background: #e8edf5; border-radius: 4px; overflow: hidden; }
.sop-progress i { display: block; height: 100%; background: var(--primary); border-radius: 4px; }
.sop-items { display: none; border-top: 1px solid var(--border); }
.sop-phase.open .sop-items { display: block; }
.sop-item { display: flex; align-items: center; gap: 12px; padding: 11px 18px; border-bottom: 1px solid #f1f4f9; font-size: 13px; }
.sop-item:last-child { border-bottom: none; }
.sop-item input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; }
.sop-item .si-text { flex: 1; }
.sop-item.done .si-text { color: var(--muted); text-decoration: line-through; }
.sop-item .si-owner { color: var(--primary); background: var(--primary-soft); padding: 2px 10px; border-radius: 20px; font-size: 12px; white-space: nowrap; }
.sop-item .si-del { background: none; border: none; color: #cbd5e1; cursor: pointer; }
.sop-item .si-del:hover { color: var(--red); }
.sop-add { display: flex; gap: 10px; padding: 12px 18px; background: #fafbfd; }
.sop-add .input { flex: 1; }

/* ===== 行程页 ===== */
.day-tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.day-tab {
  padding: 8px 16px; border-radius: 8px; border: 1px solid var(--border); background: #fff;
  cursor: pointer; font-size: 13px; display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.day-tab b { font-size: 14px; }
.day-tab span { font-size: 11px; color: var(--muted); }
.day-tab.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.day-tab.active span { color: rgba(255,255,255,.8); }
.timeline { position: relative; padding-left: 24px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: #e8edf5; }
.tl-item { position: relative; padding: 10px 0 18px; }
.tl-item::before {
  content: ""; position: absolute; left: -23px; top: 16px; width: 12px; height: 12px;
  border-radius: 50%; background: #fff; border: 3px solid var(--primary);
}
.tl-time { font-size: 12px; color: var(--primary); font-weight: 600; }
.tl-title { font-weight: 600; margin: 3px 0 2px; }
.tl-meta { font-size: 12px; color: var(--muted); }

/* ===== 安全页 ===== */
.contact-list { list-style: none; }
.contact-list li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid #f1f4f9; }
.contact-list li:last-child { border: none; }
.contact-list .c-name { font-weight: 600; }
.contact-list .c-role { font-size: 12px; color: var(--muted); }
.contact-list .c-phone { margin-left: auto; color: var(--primary); font-weight: 600; }
.plan-item { border: 1px solid var(--border); border-radius: 10px; margin-bottom: 10px; overflow: hidden; }
.plan-head { padding: 11px 14px; cursor: pointer; font-weight: 600; font-size: 13px; display: flex; align-items: center; gap: 8px; }
.plan-head:hover { background: #fafbfd; }
.plan-head .arrow { margin-left: auto; color: var(--muted); transition: transform .2s; }
.plan-item.open .arrow { transform: rotate(90deg); }
.plan-body { display: none; padding: 0 14px 12px; font-size: 13px; color: #475569; line-height: 1.9; border-top: 1px dashed #eef2f7; padding-top: 10px; }
.plan-item.open .plan-body { display: block; }
.safety-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.safety-check {
  display: flex; align-items: center; gap: 10px; border: 1px solid var(--border);
  border-radius: 10px; padding: 12px 14px; font-size: 13px; cursor: pointer; user-select: none;
}
.safety-check input { width: 16px; height: 16px; accent-color: var(--green); }
.safety-check.done { background: #f0fdf4; border-color: #bbf7d0; }

/* ===== 弹窗 / 提示 ===== */.modal-mask {
  position: fixed; inset: 0; background: rgba(15,23,42,.45); display: none;
  align-items: center; justify-content: center; z-index: 50;
}
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 14px; width: 480px; max-width: calc(100vw - 40px); max-height: 86vh; overflow-y: auto; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-head h3 { font-size: 16px; }
.modal-close { background: none; border: none; font-size: 15px; cursor: pointer; color: var(--muted); }
.modal-body { padding: 18px 20px; }
.form-row { margin-bottom: 14px; }
.form-row label { display: block; font-size: 13px; color: #475569; margin-bottom: 6px; }
.form-row .input { width: 100%; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }
.toast {
  position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: #1e293b; color: #fff; padding: 10px 22px; border-radius: 8px; font-size: 13px;
  opacity: 0; pointer-events: none; transition: all .25s; z-index: 99;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 1000px) {
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
}

/* ===== 用户与权限 ===== */
.user-chip {
  width: auto; min-width: 34px; height: 34px; padding: 0 14px; border-radius: 20px;
  border: none; cursor: pointer;
  background: linear-gradient(135deg, #6366f1, #3b82f6); color: #fff;
  font-size: 12px; font-weight: 600; font-family: inherit;
  white-space: nowrap;
}
body[data-role="assistant"] .mgr-only,
body[data-role="assistant"] .admin-only,
body[data-role="leader"] .admin-only { display: none !important; }

.tag.st-pending { background: #f1f5f9; color: #64748b; }
.tag.st-done { background: #fff7ed; color: #ea580c; }
.tag.st-verified { background: #ecfdf5; color: var(--green); }
.sop-item.locked { opacity: .72; }
.sop-item input[type="checkbox"]:disabled { cursor: not-allowed; }
.si-vbtn {
  border: 1px solid var(--border); background: #fff; border-radius: 8px;
  padding: 3px 10px; font-size: 12px; cursor: pointer; white-space: nowrap;
}
.si-vbtn.ok { color: var(--green); border-color: #a7f3d0; background: #ecfdf5; }
.si-vbtn.no { color: var(--red); border-color: #fecaca; background: #fff; }
.si-vbtn:hover { opacity: .85; }

/* ===== 登录页 ===== */
.login-mask {
  position: fixed; inset: 0; z-index: 100; display: none;
  align-items: center; justify-content: center; padding: 32px;
  background: radial-gradient(120% 90% at 8% 0%, #1d3a6e 0%, #10192e 55%, #0b1224 100%);
}
.login-mask.show { display: flex; }
.login-shell {
  width: 100%; max-width: 1060px; height: min(640px, calc(100vh - 64px));
  display: grid; grid-template-columns: 1.05fr .95fr;
  background: #fff; border-radius: 24px; overflow: hidden;
  box-shadow: 0 30px 80px rgba(2, 8, 23, .55);
}
/* 左侧配图区 */
.login-visual { position: relative; overflow: hidden; background: linear-gradient(160deg, #123 0%, #1e3a5f 100%); }
.lv-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lv-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(9, 30, 66, .05) 0%, rgba(9, 30, 66, .45) 58%, rgba(9, 30, 66, .88) 100%);
}
.lv-brand { position: absolute; left: 36px; right: 36px; bottom: 34px; color: #fff; }
.lv-logo {
  width: 46px; height: 46px; border-radius: 14px; margin-bottom: 14px;
  background: linear-gradient(135deg, #3b82f6, #06AD56); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 22px; box-shadow: 0 8px 20px rgba(0, 0, 0, .28);
}
.lv-name { font-size: 20px; font-weight: 700; letter-spacing: .5px; }
.lv-slogan { margin-top: 6px; font-size: 13px; color: rgba(255, 255, 255, .82); }
/* 右侧登录面板 */
.login-panel {
  padding: 48px 52px; display: flex; flex-direction: column; justify-content: center;
  overflow-y: auto; background: #fff;
}
.login-brand { margin-bottom: 26px; }
.login-title { font-size: 22px; font-weight: 700; color: var(--text); }
.login-sub { font-size: 13px; color: var(--muted); margin-top: 6px; }
.login-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.login-card {
  border: 1px solid var(--border); border-radius: 12px; padding: 16px 10px;
  text-align: center; cursor: pointer; transition: all .15s; background: #fff;
}
.login-card:hover { border-color: var(--primary); box-shadow: 0 6px 16px rgba(37, 99, 235, .18); transform: translateY(-2px); }
.login-card .avatar { margin: 0 auto 8px; }
.login-card .lc-name { font-weight: 600; }
.login-card .lc-role { font-size: 11px; color: var(--muted); margin-top: 3px; }
.login-card .lc-role.admin { color: #b45309; font-weight: 600; }
.login-card.current { border-color: var(--primary); background: var(--primary-soft); cursor: pointer; }
.lc-enter { margin-top: 8px; font-size: 11px; color: var(--primary); }
.login-hint { margin-top: 16px; font-size: 12px; color: var(--muted); line-height: 1.8; }
.login-foot { margin-top: 14px; text-align: right; }
/* 账号密码登录表单 */
#loginGrid { display: block; }
.login-field { display: block; margin-bottom: 16px; }
.login-field > span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.login-field .input {
  width: 100%; height: 46px; border-radius: 12px; font-size: 14px;
  background: #f4f7fb; border: 1px solid transparent; padding: 0 14px; transition: all .15s;
}
.login-field .input:focus {
  background: #fff; border-color: #bcd9ff; box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); outline: none;
}
.login-error { min-height: 18px; font-size: 12px; color: var(--red); margin-bottom: 8px; }
.login-tip { margin-top: 12px; font-size: 11px; color: var(--muted); line-height: 1.7; }
.btn.full { width: 100%; justify-content: center; height: 46px; border-radius: 12px; font-size: 15px; }
@media (max-width: 900px) {
  .login-mask { padding: 16px; }
  .login-shell { grid-template-columns: 1fr; max-width: 440px; height: auto; max-height: calc(100vh - 32px); }
  .login-visual { display: none; }
  .login-panel { padding: 36px 26px; }
}
/* 注册入口 / 账号管理 */
.login-switch { margin-top: 10px; text-align: center; }
.link-btn {
  background: none; border: none; padding: 0; cursor: pointer;
  color: var(--primary); font-size: 12px;
}
.link-btn:hover { text-decoration: underline; }
.acc-state { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; }
.acc-state.on { background: #dcfce7; color: #15803d; }
.acc-state.off { background: #fef3c7; color: #b45309; }
.acc-ops { white-space: nowrap; }
.acc-ops .btn + .btn { margin-left: 4px; }
.acc-check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }

/* 证书 Logo 设置 */
.cert-logo-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 12px; margin: 0 0 14px;
  border: 1px dashed var(--border); border-radius: 10px; background: #fafbfc;
}
.cert-logo-preview {
  width: 120px; height: 52px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: #fff; border: 1px solid var(--border); border-radius: 8px;
  overflow: hidden; font-size: 12px;
}
.cert-logo-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.cert-logo-acts { display: flex; align-items: center; gap: 6px; }
.cert-logo-tip { font-size: 12px; }
@media (max-width: 700px) {
  .login-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ================= 运营升级批次一 ================= */
.dot-new {
  display: none; width: 8px; height: 8px; border-radius: 50%;
  background: #ef4444; margin-left: auto;
}
.dot-new.show { display: inline-block; }
.nav-item .dot-new { flex-shrink: 0; }

/* SOP 模板栏 */
.tpl-bar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: #fff; border: 1px dashed var(--border); border-radius: 12px;
  padding: 10px 14px; margin-bottom: 16px;
}
.tpl-bar .tpl-title { font-weight: 600; font-size: 13px; color: var(--muted); }
.tpl-bar .tpl-sep { width: 1px; height: 20px; background: var(--border); }
.sop-item.is-new { background: #fffbeb; border-color: #fde68a; }
.tag.new { background: #fef3c7; color: #b45309; font-weight: 600; }

/* 点名 */
.rc-rounds { display: flex; gap: 8px; margin-bottom: 10px; }
.rc-round {
  border: 1px solid var(--border); background: #fff; border-radius: 999px;
  padding: 6px 14px; cursor: pointer; font-size: 13px; color: var(--text);
}
.rc-round.active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.rc-round.sm { padding: 4px 10px; font-size: 12px; }
.rc-groups { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.rc-actions { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
.rc-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; max-height: 420px; overflow: auto; }
.rc-student {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px;
  border: 1px solid var(--border); border-radius: 10px; cursor: pointer; background: #fff;
}
.rc-student.present { border-color: var(--green); background: #f0fdf4; }
.rc-name { font-weight: 500; }
.rc-student .tag { margin-left: auto; }
.rc-history { display: flex; flex-direction: column; gap: 10px; max-height: 520px; overflow: auto; }
.rc-rec { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
.rc-rec-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rc-num { font-size: 15px; }
.rc-num.ok { color: var(--green); }
.rc-num.warn { color: var(--orange); }
.rc-meta { margin-left: auto; font-size: 12px; color: var(--muted); }
.rc-absent { margin-top: 6px; font-size: 12px; color: var(--red); }
.rc-absent.ok { color: var(--muted); }

/* 健康上报 */
.health-chips { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.health-list { display: flex; flex-direction: column; gap: 12px; }
.health-card { padding: 14px 16px; }
.hc-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hc-top b { font-size: 15px; }
.hc-meta { margin-left: auto; font-size: 12px; color: var(--muted); }
.hc-body { margin-top: 8px; font-size: 13px; line-height: 1.8; color: var(--text); }
.hc-updates { margin-top: 6px; font-size: 12px; color: var(--muted); border-top: 1px dashed var(--border); padding-top: 6px; }
.hc-actions { margin-top: 10px; display: flex; gap: 8px; }

/* 数据与备份 */
.data-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row-inline { display: flex; gap: 8px; align-items: center; }
.archive-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.archive-row {
  display: flex; align-items: center; justify-content: space-between;
  border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px;
}
.briefing-text { font-family: inherit; line-height: 1.9; font-size: 13px; white-space: pre-wrap; }

/* ================= 分组与行程编辑 ================= */
.tl-item { display: flex; gap: 12px; align-items: flex-start; }
.tl-item .tl-time { flex-shrink: 0; width: 96px; }
.tl-item .tl-main { flex: 1; min-width: 0; }
.tl-item .tl-title { margin-top: 0; }
.tl-acts { display: flex; gap: 6px; flex-shrink: 0; opacity: 0; transition: opacity .15s; }
.tl-item:hover .tl-acts { opacity: 1; }
.tl-acts button {
  border: 1px solid var(--border); background: #fff; border-radius: 8px;
  padding: 4px 10px; font-size: 12px; cursor: pointer; color: var(--text);
}
.tl-acts button:hover { border-color: var(--primary); color: var(--primary); }
.tl-acts button.del { color: var(--red); }
.tl-acts button.del:hover { border-color: var(--red); }
.day-tab.add { justify-content: center; color: var(--muted); font-size: 18px; }
.day-tab.add:hover { border-color: var(--primary); color: var(--primary); }
.sched-head-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.group-manage-list { display: flex; flex-direction: column; gap: 8px; max-height: 300px; overflow: auto; }

/* ================= 结营交付与教学闭环（closing-loop-3） ================= */
.sig-pad {
  width: 100%; height: 140px; border: 1px dashed var(--border); border-radius: 10px;
  background: #fff; touch-action: none; cursor: crosshair; display: block;
}
.wl-box {
  background: #f0f7ff; border: 1px solid #dbeafe; border-radius: 10px;
  padding: 10px 12px; margin-bottom: 14px; font-size: 13px;
}
.wl-box b { color: var(--primary); }
.wl-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.wl-list span {
  background: #fff; border: 1px solid #bfdbfe; color: #1d4ed8;
  border-radius: 999px; padding: 2px 10px; font-size: 12px;
}
.wl-health { margin-top: 6px; color: var(--orange, #d97706); font-size: 12px; }
.hv-list { display: flex; flex-direction: column; gap: 10px; max-height: 520px; overflow: auto; }
.hv-row {
  display: flex; gap: 12px; align-items: center; border: 1px solid var(--border);
  border-radius: 12px; padding: 10px 12px;
}
.hv-sig {
  width: 120px; height: 48px; border-radius: 8px; border: 1px solid var(--border);
  object-fit: contain; background: #fff; flex-shrink: 0;
}
.hv-sig-empty {
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 11px;
}
.hv-main { flex: 1; min-width: 0; }
.hv-line { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }
.chk-row {
  display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text);
  background: #fff7ed; border: 1px solid #fed7aa; border-radius: 10px; padding: 10px 12px;
}
.task-card { margin-bottom: 14px; }
.task-students {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px;
}
.task-student {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  border: 1px solid var(--border); border-radius: 10px; padding: 6px 8px 6px 12px; font-size: 13px;
}

/* =============== 多营次 UI =============== */
.camp-switch { display: flex; align-items: center; gap: 6px; }
.camp-switch select {
  padding: 6px 28px 6px 12px; font-size: 13px; border: 1px solid var(--border);
  border-radius: 8px; background: #fff; cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center;
}
.camp-switch select:hover { border-color: var(--accent); }

/* 同步状态变体 */
.status-pill.syncing { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.status-pill.syncing .dot { background: #f59e0b; }
.status-pill.error { background: #fee2e2; color: #991b1b; border-color: #fecaca; }
.status-pill.error .dot { background: #ef4444; }
.status-pill.offline { background: #f3f4f6; color: #6b7280; border-color: #e5e7eb; }
.status-pill.offline .dot { background: #9ca3af; }
.dot.ok { background: #10b981; }
.dot.spin { animation: spin 1s linear infinite; }
.dot.bad { background: #ef4444; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* Modal */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.4); display: flex;
  align-items: center; justify-content: center; z-index: 9999; backdrop-filter: blur(2px);
}
.modal {
  background: #fff; border-radius: 14px; padding: 24px; width: 380px; max-width: 92vw;
  box-shadow: 0 20px 50px rgba(0,0,0,.15); display: flex; flex-direction: column; gap: 12px;
}
.modal h3 { margin: 0; font-size: 17px; }
.modal label { display: flex; flex-direction: column; font-size: 13px; color: var(--text-soft); gap: 4px; }
.modal input { padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; }
.modal input:focus { outline: none; border-color: var(--accent); }
.modal .nc-checks { font-size: 13px; color: var(--text-soft); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.ts-btn {
  border: 1px solid var(--border); background: #f8fafc; color: var(--muted);
  border-radius: 999px; padding: 3px 10px; font-size: 12px; cursor: pointer; white-space: nowrap;
}
.ts-btn:hover { border-color: var(--primary); color: var(--primary); }
.ts-btn.done { background: #ecfdf5; border-color: #a7f3d0; color: #059669; }
.ts-btn.exc { background: #fffbeb; border-color: #fde68a; color: #d97706; }
.notice-list { display: flex; flex-direction: column; gap: 10px; max-height: 520px; overflow: auto; }
.notice-card { border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; }
.notice-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.notice-head .row-actions { margin-left: auto; }
.notice-body { font-size: 13px; line-height: 1.7; white-space: pre-wrap; word-break: break-all; }
.report-text {
  width: 100%; font-family: inherit; line-height: 1.9; font-size: 13px;
  white-space: pre-wrap; background: #f8fafc; border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 14px;
}
.points-log { display: flex; flex-direction: column; gap: 6px; max-height: 180px; overflow: auto; margin-top: 10px; }
.points-row {
  display: flex; align-items: center; gap: 10px; font-size: 13px;
  border-bottom: 1px dashed var(--border); padding-bottom: 6px;
}
.expense-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.expense-row {
  display: flex; align-items: center; gap: 10px; font-size: 13px;
  border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; flex-wrap: wrap;
}
.expense-row .row-actions { margin-left: auto; }

/* ===== 结营报告 ===== */
.report-sheet { padding: 28px 32px; }
.report-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; border-bottom: 2px solid var(--border); padding-bottom: 16px; margin-bottom: 18px; }
.report-head h2 { margin: 0 0 8px; font-size: 22px; }
.report-meta { color: var(--muted); font-size: 12px; line-height: 1.8; }
.report-badge { background: var(--primary-soft); color: var(--primary); padding: 8px 14px; border-radius: 999px; font-weight: 600; font-size: 13px; white-space: nowrap; }
.report-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 22px; }
.report-kpis .rk { border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; }
.report-kpis .rk b { display: block; font-size: 20px; margin-bottom: 4px; }
.report-kpis .rk span { font-size: 12px; color: var(--muted); }
.report-sheet h3 { margin: 22px 0 10px; font-size: 15px; }
.report-p { margin: 0; font-size: 13px; line-height: 1.9; color: #475569; }
.report-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.report-contacts { margin: 0; padding-left: 20px; font-size: 13px; line-height: 1.9; }
.report-sign { display: flex; justify-content: space-between; margin-top: 40px; padding-top: 18px; border-top: 1px dashed var(--border); font-size: 13px; }

/* —— 今日工作台 —— */
.today-hero {
  position: relative; overflow: hidden; display: flex; gap: 24px;
  justify-content: space-between; flex-wrap: wrap; padding: 24px 26px;
  border-radius: var(--radius-lg);
  background: linear-gradient(120deg, #0f2557 0%, #1d4ed8 55%, #3b82f6 100%);
  color: #fff; box-shadow: 0 16px 36px rgba(29, 78, 216, .26); margin-bottom: 16px;
}
.today-hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background-image: radial-gradient(circle at 85% 15%, rgba(191, 219, 254, .3), transparent 42%),
    radial-gradient(circle at 10% 90%, rgba(30, 64, 175, .45), transparent 48%);
}
.hero-particles {
  position: absolute; inset: 0; width: 100%; height: 100%;
  z-index: 1; pointer-events: none; display: block;
}
.th-main { position: relative; z-index: 2; max-width: 560px; }
.th-kicker { font-size: 12px; letter-spacing: .12em; color: #bfdbfe; margin-bottom: 8px; }
.th-main h2 { font-family: var(--font-display); font-size: 26px; font-weight: 600; letter-spacing: .02em; margin-bottom: 6px; }
.th-main p { font-size: 13px; line-height: 1.7; color: #dbeafe; }
.th-actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.btn.light { background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .2); color: #fff; }
.btn.light:hover { background: rgba(255, 255, 255, .2); }
.th-metrics { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(2, minmax(96px, 1fr)); gap: 10px; align-self: center; }
.th-metric { background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12); border-radius: var(--radius-md); padding: 10px 16px; min-width: 104px; }
.th-metric b { display: block; font-size: 21px; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
.th-metric span { font-size: 11px; color: #bfdbfe; }
.th-metric.alert b { color: #fca5a5; }
.th-metric.warn b { color: #fcd34d; }
.dashboard-main { display: grid; grid-template-columns: 1.45fr 1fr; gap: 16px; margin-bottom: 16px; }
.task-flow { display: flex; flex-direction: column; gap: 8px; }
.task-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: var(--radius-md); background: #fff;
  cursor: pointer; transition: border-color .15s, transform .15s, box-shadow .15s;
}
.task-item:hover { border-color: #cdd9ee; transform: translateX(2px); box-shadow: var(--shadow-card); }
.task-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--primary); }
.task-item.red .task-dot { background: var(--red); }
.task-item.orange .task-dot { background: var(--orange); }
.task-item.gold .task-dot { background: var(--gold); }
.task-title { font-size: 13px; font-weight: 600; line-height: 1.5; }
.task-sub { margin-left: auto; font-size: 12px; color: var(--muted); white-space: nowrap; }
.task-arrow { color: #c3cbda; font-size: 13px; }
.task-empty { padding: 26px 0; text-align: center; color: var(--muted); font-size: 13px; }
.today-timeline { display: flex; flex-direction: column; gap: 10px; max-height: 330px; overflow: auto; }
.tt-item { display: flex; gap: 12px; font-size: 13px; padding: 6px 0; border-bottom: 1px dashed var(--border); }
.tt-item:last-child { border-bottom: none; }
.tt-time { width: 96px; flex: none; color: var(--muted); font-variant-numeric: tabular-nums; }
.tt-title { font-weight: 600; line-height: 1.5; }
.tt-place { font-size: 12px; color: var(--muted); margin-top: 2px; }
.tt-item.now .tt-time { color: var(--primary); font-weight: 700; }
.tt-item.now .tt-title { color: var(--primary); }
.tt-item.past { opacity: .55; }
@media (max-width: 1024px) { .dashboard-main { grid-template-columns: 1fr; } }

/* —— 素养评价 —— */
.lit-avg {
  display: inline-block; min-width: 34px; text-align: center; font-weight: 700;
  color: var(--primary); background: #eff6ff; border-radius: 8px; padding: 2px 8px;
}
.lit-modal {
  display: flex; gap: 16px; align-items: center; margin-bottom: 12px;
  padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: #fbfcff;
}
.lit-modal .radar-svg { width: 170px; height: 170px; flex: none; }
.lit-score-list { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.ls-row { display: flex; justify-content: space-between; font-size: 13px; border-bottom: 1px dashed var(--border); padding-bottom: 4px; }
.ls-row b { color: var(--primary); }
.ls-note { font-size: 11px; color: var(--muted); line-height: 1.6; margin-top: 4px; }

/* —— 营次财务 —— */
.finance-grid { display: grid; grid-template-columns: repeat(3, 1fr) auto; gap: 12px; align-items: end; }
.finance-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.finance-kpis .fk { border: 1px solid var(--border); border-radius: var(--radius-md); padding: 12px; background: var(--paper); }
.finance-kpis .fk span { font-size: 11px; color: var(--muted); }
.finance-kpis .fk b { display: block; font-size: 19px; margin-top: 4px; font-variant-numeric: tabular-nums; }
.finance-kpis .fk.profit b { color: var(--green); }
.finance-kpis .fk.loss b { color: var(--red); }
@media (max-width: 900px) {
  .finance-grid { grid-template-columns: 1fr; }
  .finance-kpis { grid-template-columns: repeat(2, 1fr); }
}

/* —— 合规档案 —— */
.compliance-wrap { overflow: auto; }
.compliance-table { min-width: 760px; }
.compliance-table td, .compliance-table th { padding: 8px 10px; }
.comp-cell {
  width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--border);
  background: #fff; cursor: pointer; font-size: 14px; font-weight: 700; line-height: 1;
  transition: background .12s, border-color .12s, transform .12s;
}
.comp-cell:hover { transform: scale(1.06); }
.comp-cell.done { background: #ecfdf5; border-color: #a7f3d0; color: var(--green); }
.comp-cell.gap { background: #fef2f2; border-color: #fecaca; color: var(--red); }

/* —— 异常处理 —— */
.incident-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.incident-list { display: flex; flex-direction: column; gap: 12px; }
.incident-card {
  border: 1px solid var(--border); border-left: 4px solid var(--border);
  border-radius: 12px; padding: 14px 16px; background: #fff;
}
.incident-card.open { border-left-color: var(--red); }
.incident-card.processing { border-left-color: var(--orange); }
.incident-card.resolved { border-left-color: var(--green); opacity: .86; }
.inc-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.inc-name { font-size: 15px; }
.inc-type { font-size: 12px; padding: 2px 9px; border-radius: 999px; background: #f1f5f9; color: #475569; }
.inc-type.absent { background: #fef2f2; color: var(--red); }
.inc-type.left { background: #fff7ed; color: var(--orange); }
.inc-type.sick { background: #eff6ff; color: var(--primary); }
.inc-type.other { background: #f5f3ff; color: #7c3aed; }
.inc-status { font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; }
.inc-status.open { background: #fef2f2; color: var(--red); }
.inc-status.processing { background: #fff7ed; color: var(--orange); }
.inc-status.resolved { background: #ecfdf5; color: var(--green); }
.inc-time { margin-left: auto; font-size: 12px; color: var(--muted); }
.inc-source, .inc-note { font-size: 12px; color: var(--muted); margin-top: 7px; line-height: 1.7; }
.inc-actions { display: flex; gap: 8px; align-items: center; margin-top: 11px; flex-wrap: wrap; }
.inc-select { max-width: 190px; height: 32px; font-size: 12px; padding: 0 8px; }

/* —— 家长回执 —— */
.receipt-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 10px; }
.receipt-kpis .rk { background: #f8fafc; border: 1px solid var(--border); border-radius: 10px; padding: 10px 6px; text-align: center; }
.receipt-kpis .rk b { display: block; font-size: 19px; margin-bottom: 3px; }
.receipt-kpis .rk span { font-size: 11px; color: var(--muted); }
.rb-bar { height: 6px; background: #eef2f7; border-radius: 99px; overflow: hidden; margin: 8px 0; }
.rb-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #2563eb, #4f46e5); transition: width .4s ease; }
.receipt-batches { display: flex; flex-direction: column; gap: 12px; max-height: 380px; overflow: auto; }
.receipt-batch { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; background: #fff; }
.rb-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rb-rate { margin-left: auto; font-size: 12px; color: var(--primary); font-weight: 600; }
.rb-items { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.rb-chip { font-size: 12px; padding: 3px 9px; border-radius: 999px; background: #f1f5f9; color: #475569; }
.rb-chip.read { background: #eff6ff; color: #1d4ed8; }
.rb-chip.agree { background: #ecfdf5; color: var(--green); }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }

@media (max-width: 760px) {
  .receipt-kpis { grid-template-columns: repeat(2, 1fr); }
  .inc-time { margin-left: 0; width: 100%; }
}


@media print {
  .sidebar, .topbar, .nav, .toolbar, .no-print, .modal-mask, .login-mask, .toast { display: none !important; }
  .app { display: block; }
  .main { padding: 0 !important; margin: 0 !important; overflow: visible !important; }
  .page { display: none !important; }
  .page.active { display: block !important; }
  .card, .report-sheet { box-shadow: none !important; border: none !important; }
  .report-sheet { padding: 0 !important; }
  body { background: #fff; font-size: 12px; }
  @page { margin: 16mm; }
}

/* ================================================================
   PC 端视觉升级（对照参考图 1:1 还原，仅界面层）
   ================================================================ */
:root {
  --primary: #2f6bff;
  --primary-soft: #edf3ff;
  --bg: #f2f6fd;
  --card: #ffffff;
  --border: #e9eff9;
  --text: #1b2b45;
  --muted: #8a9ab5;
  --green: #22a45d;
  --orange: #f0a03c;
  --purple: #7c6cf5;
  --red: #ef5b5b;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-card: 0 10px 28px rgba(47, 107, 255, .06);
}
body { background: var(--bg); color: var(--text); }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- 侧边栏 ---------- */
.sidebar {
  width: 208px; flex-shrink: 0;
  background: linear-gradient(180deg, #17265c 0%, #2352c9 48%, #3f83ff 100%);
  color: rgba(255, 255, 255, .8);
  box-shadow: 10px 0 34px rgba(30, 70, 170, .16);
}
.brand { gap: 11px; padding: 20px 16px 18px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.brand-logo {
  width: 42px; height: 42px; border-radius: 13px; overflow: hidden; padding: 0;
  background: #fff; box-shadow: 0 8px 18px rgba(8, 24, 70, .28);
}
.brand-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.brand-title { color: #fff; font-size: 17px; font-weight: 800; letter-spacing: .4px; }
.brand-sub { color: rgba(255, 255, 255, .6); font-size: 11px; margin-top: 2px; letter-spacing: .5px; }
.nav { padding: 10px 12px 18px; min-height: 0; }
.nav::-webkit-scrollbar { width: 4px; }
.nav::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .2); border-radius: 4px; }
.nav-label {
  font-size: 10px; color: rgba(255, 255, 255, .42); letter-spacing: 2px;
  padding: 14px 12px 6px; font-weight: 600;
}
.nav-item {
  gap: 11px; padding: 9px 12px; border-radius: 13px; margin-bottom: 2px;
  color: rgba(255, 255, 255, .82); font-size: 13px; transition: background .16s, color .16s;
}
.nav-item:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.nav-item.active {
  background: #fff; color: #2f6bff; font-weight: 700;
  box-shadow: 0 12px 26px rgba(10, 34, 100, .26);
}
.nav-icon { width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; flex: none; }
.nav-icon svg {
  width: 19px; height: 19px; display: block;
  fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.nav-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge {
  background: rgba(255, 255, 255, .18); color: #fff; font-size: 10.5px;
  padding: 1px 7px; border-radius: 999px; line-height: 1.6;
}
.nav-item.active .badge { background: #eaf1ff; color: #2f6bff; }
.badge.accent { background: rgba(255, 255, 255, .26); }
.nav-item.active .badge.accent { background: #eaf1ff; color: #2f6bff; }
.dot-new { background: #ffd666; }
.sidebar-footer {
  padding: 14px 16px 16px;
  border-top: 1px solid rgba(255, 255, 255, .14);
  background: rgba(9, 26, 76, .12);
  font-size: 11px; color: rgba(255, 255, 255, .62); line-height: 1.7;
}
.camp-name-line {
  font-size: 12.5px; font-weight: 700; color: #fff;
  max-width: 180px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar-footer .camp-dates {
  margin-bottom: 2px; font-size: 10.5px;
  max-width: 180px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ---------- 主区域 / 顶栏 ---------- */
.main { padding: 0 26px 36px; background: var(--bg); }
.topbar {
  height: 68px; padding: 0 26px; margin: 0 -26px 22px;
  background: #fff; display: flex; align-items: center; justify-content: flex-start; gap: 16px;
  position: sticky; top: 0; z-index: 30;
  border-bottom: 1px solid #eef3fc; box-shadow: 0 2px 16px rgba(47, 107, 255, .05);
}
.topbar h1 { font-size: 16px; font-weight: 700; color: var(--text); white-space: nowrap; }
body[data-page="dashboard"] .topbar h1 { display: none; }
.tb-left { display: flex; align-items: center; gap: 10px; flex: none; }
.camp-chip {
  position: relative; display: flex; align-items: center; gap: 9px;
  height: 44px; padding: 4px 34px 4px 4px; border-radius: 999px;
  background: #fff; border: 1px solid #e6edf9;
  box-shadow: 0 6px 16px rgba(47, 107, 255, .07);
}
.camp-thumb { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex: none; }
#campSelect {
  appearance: none; -webkit-appearance: none; border: none; outline: none;
  background: transparent; color: var(--text); font-family: inherit;
  font-size: 13.5px; font-weight: 700; cursor: pointer;
  max-width: 160px; padding: 0; line-height: 1.4;
}
.camp-caret {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  width: 15px; height: 15px; color: #8a9ab5; pointer-events: none;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.new-camp-btn {
  height: 36px; border-radius: 999px; border: 1px dashed #c9d9f5 !important;
  color: #4a6a9e !important; background: #f7faff !important; font-size: 12px;
}
.new-camp-btn:hover { border-color: #2f6bff !important; color: #2f6bff !important; }
.tb-search { position: relative; flex: 1; max-width: 520px; margin: 0 auto; }
.tb-search input {
  width: 100%; height: 40px; border: 1px solid transparent; border-radius: 999px;
  background: #f2f7ff; padding: 0 44px 0 18px; font-size: 13px; color: var(--text);
  outline: none; font-family: inherit; transition: .16s;
}
.tb-search input::placeholder { color: #9aa9c0; }
.tb-search input:focus { background: #fff; border-color: #cfe0ff; box-shadow: 0 0 0 3px rgba(47, 107, 255, .1); }
.tb-search .s-icon {
  position: absolute; right: 15px; top: 50%; transform: translateY(-50%);
  width: 17px; height: 17px; color: #8a9ab5;
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round;
}
.topbar-right { display: flex; align-items: center; gap: 9px; margin-left: auto; flex: none; }
.status-pill {
  background: #eefaf3; color: #1f9d5a; border: 1px solid #d7f0e2;
  padding: 4px 11px; border-radius: 999px; font-size: 11.5px; gap: 6px;
}
.status-pill .dot { width: 6px; height: 6px; background: #22a45d; }
.status-pill.offline { background: #fff4f3; color: #d65454; border-color: #fbdad7; }
.status-pill.offline .dot { background: #ef5b5b; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 50%; border: none; cursor: pointer;
  background: #f5f8fe; color: #5b6b86; display: flex; align-items: center; justify-content: center;
  position: relative; text-decoration: none; transition: .16s; padding: 0;
}
.icon-btn:hover { background: #eaf1ff; color: #2f6bff; }
.icon-btn svg {
  width: 18px; height: 18px;
  fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.icon-btn .dot-badge {
  position: absolute; top: 8px; right: 9px; width: 7px; height: 7px; border-radius: 50%;
  background: #ef5b5b; border: 1.5px solid #fff;
}
.user-chip {
  height: 40px; width: auto; padding: 3px 12px 3px 3px; border-radius: 999px; border: 1px solid #e9eff9;
  background: #f5f8fe; color: var(--text); display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 600; cursor: pointer; font-family: inherit; white-space: nowrap;
}
.user-chip:hover { border-color: #cfe0ff; }
.uc-avatar {
  width: 32px; height: 32px; border-radius: 50%; flex: none;
  background: linear-gradient(135deg, #4d8dff, #7cc4ff); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700;
}
.uc-name { max-width: 76px; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Hero ---------- */
.today-hero {
  position: relative; display: block; min-height: 188px; padding: 30px 34px;
  border-radius: 20px; margin-bottom: 20px; overflow: hidden;
  background: linear-gradient(100deg, #f5faff 0%, #eaf4ff 48%, #d8ebff 100%);
  color: var(--text); box-shadow: 0 14px 34px rgba(47, 107, 255, .1);
}
.today-hero::after {
  background-image: radial-gradient(circle at 78% 8%, rgba(255, 255, 255, .7), transparent 46%),
    radial-gradient(circle at 12% 96%, rgba(207, 227, 255, .55), transparent 52%);
}
.hero-particles { z-index: 1; opacity: .55; }
.hero-skyline { display: none; }
.hero-skyline svg { width: 100%; height: 100%; display: block; }
.hero-mascot {
  position: absolute; right: 0; bottom: 0; height: 100%; width: auto; max-width: 44%;
  object-fit: cover; object-position: right bottom; z-index: 1;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 34%);
  mask-image: linear-gradient(to right, transparent 0%, #000 34%);
}
.th-main { position: relative; z-index: 2; max-width: 56%; }
.th-kicker { font-size: 11.5px; letter-spacing: .14em; color: #6b8cc4; margin-bottom: 9px; }
.th-main h2 {
  font-family: inherit; font-size: 26px; font-weight: 800; letter-spacing: .01em;
  color: #16294f; margin-bottom: 7px; line-height: 1.25;
}
.th-main p { font-size: 13px; line-height: 1.7; color: #66799b; }
.th-metrics {
  position: relative; z-index: 2; display: flex; gap: 10px; margin-top: 18px;
  grid-template-columns: none; align-self: auto; flex-wrap: wrap;
}
.th-metric {
  background: rgba(255, 255, 255, .78); border: 1px solid rgba(255, 255, 255, .95);
  border-radius: 13px; padding: 7px 14px; min-width: 0;
  box-shadow: 0 6px 16px rgba(47, 107, 255, .07); backdrop-filter: blur(6px);
}
.th-metric b { font-size: 17px; color: #16294f; line-height: 1.35; }
.th-metric span { font-size: 11px; color: #7b8ba6; }
.th-metric.alert b { color: #e25454; }
.th-metric.warn b { color: #dd8f2a; }

/* ---------- KPI ---------- */
.kpi-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-bottom: 18px; }
.kpi-card {
  position: relative; overflow: hidden; display: flex; align-items: center; gap: 13px;
  background: linear-gradient(180deg, #ffffff, #f7faff);
  border: 1px solid #e6eefc; border-radius: 18px; padding: 18px 20px;
  box-shadow: 0 6px 14px rgba(31, 76, 168, .08), 0 18px 40px rgba(47, 107, 255, .10);
}
.kpi-icon { width: 46px; height: 46px; border-radius: 14px; flex: none; display: flex; align-items: center; justify-content: center; }
.kpi-icon svg {
  width: 23px; height: 23px;
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.kpi-icon.blue { background: #e9f1ff; color: #2f6bff; }
.kpi-icon.green { background: #e7f8ef; color: #22a45d; }
.kpi-icon.orange { background: #fff3e5; color: #f0a03c; }
.kpi-icon.red { background: #feeceb; color: #ef5b5b; }
.kpi-body { min-width: 0; position: relative; z-index: 1; }
.kpi-label { font-size: 12.5px; color: var(--muted); margin-bottom: 3px; }
.kpi-value { font-size: 27px; font-weight: 800; line-height: 1.15; color: var(--text); font-variant-numeric: tabular-nums; }
.kpi-trend { font-size: 11.5px; font-weight: 600; margin-top: 3px; }
.kpi-trend.up { color: #22a45d; }
.kpi-trend.down { color: #ef5b5b; }
.kpi-watermark {
  position: absolute; right: 2px; bottom: -8px; width: 64px; height: 64px;
  color: #f1f6fe; fill: none; stroke: currentColor; stroke-width: 1.2;
  stroke-linecap: round; stroke-linejoin: round; pointer-events: none; opacity: .9; z-index: 0;
}

/* ---------- 工作台栅格 ---------- */
.dash-row-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .95fr) minmax(0, 1.3fr); gap: 18px; margin-bottom: 18px; align-items: stretch; }
.dash-row-3 { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; margin-bottom: 18px; }
.dash-row-3b { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.2fr); gap: 18px; }
.card {
  min-width: 0;
  background: #fff; border: 1px solid #eef3fc; border-radius: 18px;
  padding: 19px 21px; box-shadow: 0 10px 26px rgba(47, 107, 255, .05);
}
.card-head { margin-bottom: 15px; }
.card-head h3 { font-size: 15px; font-weight: 700; color: var(--text); display: flex; align-items: center; }
.card-head h3::before {
  content: ""; width: 4px; height: 14px; border-radius: 3px;
  background: linear-gradient(180deg, #6ea8ff, #2f6bff); margin-right: 8px; flex: none;
}
.btn.link { color: #2f6bff; font-size: 12.5px; }
.muted { color: var(--muted); font-size: 12px; }

/* ---------- 待办告警 ---------- */
.task-flow { gap: 8px; }
.task-item {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px;
  border: 1px solid transparent; border-radius: 14px; background: #f8faff;
}
.task-item:hover { background: #fff; border-color: #e3edff; box-shadow: 0 8px 20px rgba(47, 107, 255, .08); transform: none; }
.task-dot { width: 32px; height: 32px; border-radius: 11px; flex: none; display: flex; align-items: center; justify-content: center; background: #eaf1ff; }
.task-dot::after { font-weight: 800; font-size: 14px; line-height: 1; }
.task-item.red .task-dot { background: #feeceb; }
.task-item.red .task-dot::after { content: "!"; color: #ef5b5b; }
.task-item.orange .task-dot { background: #fff2e5; }
.task-item.orange .task-dot::after { content: "!"; color: #f0a03c; }
.task-item.gold .task-dot { background: #fff6e0; }
.task-item.gold .task-dot::after { content: "!"; color: #d99b1c; }
.task-item.blue .task-dot { background: #eaf1ff; }
.task-item.blue .task-dot::after { content: "✓"; color: #2f6bff; }
.task-main { flex: 1; min-width: 0; }
.task-title { font-size: 12.5px; font-weight: 600; line-height: 1.45; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-sub {
  display: block; margin-left: 0; margin-top: 2px; font-size: 11px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.task-badge { font-size: 10.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.task-badge.red { background: #fee7e7; color: #ef5b5b; }
.task-badge.orange { background: #fff0e0; color: #e08a2a; }
.task-badge.gold { background: #fff5da; color: #c98f12; }
.task-badge.blue { background: #e9f1ff; color: #2f6bff; }
.task-arrow { color: #bcc9de; font-size: 15px; }
.task-empty { padding: 24px 0; text-align: center; color: var(--muted); font-size: 13px; }

/* ---------- SOP 完成度 ---------- */
.sop-donut-wrap { display: flex; align-items: center; gap: 18px; margin-top: 2px; }
.sop-donut {
  width: 122px; height: 122px; border-radius: 50%; flex: none; position: relative;
  display: flex; align-items: center; justify-content: center;
  background: conic-gradient(#2f6bff calc(var(--p) * 1%), #e9f0fb 0);
}
.sop-donut::before {
  content: ""; position: absolute; inset: 13px; background: #fff; border-radius: 50%;
  box-shadow: 0 2px 10px rgba(47, 107, 255, .06);
}
.sop-donut span { position: relative; font-size: 20px; font-weight: 800; color: var(--text); }
.sop-legend { list-style: none; flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 9px; }
.sop-legend li { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #66799b; }
.sop-legend b { margin-left: auto; color: var(--text); font-size: 12.5px; }
.lg-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.lg-dot.done { background: #2f6bff; }
.lg-dot.doing { background: #a5c8ff; }
.lg-dot.pending { background: #dfe8f8; }
.sop-bars {
  display: flex; align-items: flex-end; gap: 7px; height: 44px; margin-top: 14px;
  padding-top: 8px; border-top: 1px dashed #edf2fa;
}
.sop-bars i {
  flex: 1; max-width: 30px; min-height: 6px; border-radius: 5px 5px 3px 3px;
  background: linear-gradient(180deg, #a7ccff, #2f6bff); opacity: .85;
}

/* ---------- 今日行程 ---------- */
.timeline-flex { display: flex; gap: 14px; }
.today-timeline { flex: 1; min-width: 0; gap: 0; max-height: 260px; overflow: auto; }
.tt-item {
  display: grid; grid-template-columns: 14px 48px minmax(0, 1fr); align-items: start; gap: 8px;
  padding: 7px 0; border-bottom: 1px dashed #eef3fa;
}
.tt-item::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #2f6bff; margin-top: 6px; }
.tt-time { width: auto; font-size: 11.5px; color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.tt-title { font-size: 12.5px; font-weight: 600; line-height: 1.5; }
.tt-place { font-size: 11px; color: var(--muted); margin-top: 1px; }
.tt-item.now::before { box-shadow: 0 0 0 4px rgba(47, 107, 255, .18); }
.tt-item.past { opacity: .72; }
.tt-item.past::before { background: #b9cdea; }
.timeline-photo {
  width: 132px; flex: none; align-self: stretch; min-height: 152px;
  border-radius: 14px; overflow: hidden; background: #eaf2ff;
}
.timeline-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- 现场动态 ---------- */
.feed-head {
  display: grid; grid-template-columns: 64px minmax(88px, 1.1fr) 2fr 70px; gap: 10px;
  align-items: center; padding: 8px 12px; margin-bottom: 2px;
  font-size: 11.5px; color: var(--muted); background: #f8fbff; border-radius: 10px;
}
.feed-list { list-style: none; }
.feed-list li {
  display: grid; grid-template-columns: 64px minmax(88px, 1.1fr) 2fr 70px; gap: 10px;
  align-items: center; padding: 11px 12px; border-bottom: 1px solid #f2f6fc; font-size: 12.5px;
}
.feed-list li:last-child { border-bottom: none; }
.feed-time { color: var(--muted); font-variant-numeric: tabular-nums; }
.feed-camp { color: #5b6b86; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-text { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-status { display: flex; align-items: center; gap: 5px; color: #22a45d; font-size: 11.5px; }
.feed-status i { width: 6px; height: 6px; border-radius: 50%; background: #22a45d; flex: none; }
.feed-list li.feed-empty { display: block; text-align: center; color: var(--muted); padding: 26px 0; border: none; }

/* ---------- 快捷功能 ---------- */
.quick-card { position: relative; overflow: hidden; }
.quick-mascot {
  position: absolute; right: 16px; top: 4px; width: 50px; height: 50px; border-radius: 50%;
  object-fit: cover; object-position: 76% 28%; border: 3px solid #fff;
  box-shadow: 0 10px 22px rgba(47, 107, 255, .18); pointer-events: none;
}
.quick-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin-top: 6px; }
.quick-tile {
  background: none; border: none; cursor: pointer; padding: 6px 2px; border-radius: 14px;
  display: flex; flex-direction: column; align-items: center; gap: 9px;
  transition: background .16s, transform .16s; font-family: inherit;
}
.quick-tile:hover { background: #f6faff; transform: translateY(-2px); }
.qt-icon {
  width: 54px; height: 54px; border-radius: 16px; display: flex; align-items: center; justify-content: center;
  color: #fff; box-shadow: 0 10px 20px rgba(47, 107, 255, .18);
}
.qt-icon svg {
  width: 24px; height: 24px;
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.qt-icon.blue { background: linear-gradient(160deg, #5b9cff, #2f6bff); }
.qt-icon.green { background: linear-gradient(160deg, #5fd6a8, #22a45d); box-shadow: 0 10px 20px rgba(34, 164, 93, .2); }
.qt-icon.orange { background: linear-gradient(160deg, #ffc26e, #f0902f); box-shadow: 0 10px 20px rgba(240, 144, 47, .2); }
.qt-icon.violet { background: linear-gradient(160deg, #aa9dff, #7c6cf5); box-shadow: 0 10px 20px rgba(124, 108, 245, .2); }
.qt-icon.cyan { background: linear-gradient(160deg, #64d9e9, #1fa9c9); box-shadow: 0 10px 20px rgba(31, 169, 201, .2); }
.qt-label { font-size: 11.5px; font-weight: 600; color: #3d4f6b; white-space: nowrap; }

/* ---------- 第二屏信息 ---------- */
.checkin-summary { gap: 18px; }
.checkin-summary .ring-big { width: 96px; height: 96px; }
.checkin-summary .ring-big::before { inset: 10px; }
.checkin-summary .ring-big span { font-size: 17px; }
.checkin-detail .cd-row { font-size: 12px; padding: 5px 0; }
.dash-row-3b .group-list { grid-template-columns: 1fr; gap: 10px; }
.dash-row-3b .group-card { border-color: #eef3fc; background: #fbfdff; border-radius: 12px; padding: 11px 13px; }
.todo-list li { font-size: 12.5px; padding: 8px 0; }

/* ---------- 其它页面统一质感 ---------- */
.btn { border-radius: 11px; border-color: #e6edf9; font-size: 13px; }
.btn.primary { background: linear-gradient(135deg, #4d8dff, #2f6bff); border-color: transparent; box-shadow: 0 6px 16px rgba(47, 107, 255, .22); }
.btn.primary:hover { background: linear-gradient(135deg, #3f82ff, #2459e0); }
.btn.ghost { background: #fff; }
.input { border-radius: 11px; border-color: #e6edf9; background: #fbfdff; }
.table th { color: var(--muted); font-weight: 600; }
.table td { border-bottom-color: #f2f6fc; }
.table tr:hover td { background: #f8fbff; }
.toolbar { margin-bottom: 18px; }
.tabs .tab { border-radius: 11px; }
.grid-2 { gap: 18px; margin-top: 18px; }

/* ---------- 响应式 ---------- */
@media (max-width: 1360px) {
  .qt-icon { width: 42px; height: 42px; border-radius: 13px; }
  .qt-icon svg { width: 20px; height: 20px; }
  .quick-tile { padding: 5px 0; }
  .quick-grid { gap: 2px; }
}
@media (max-width: 1200px) {
  .kpi-card { padding: 15px 14px; gap: 10px; }
  .kpi-icon { width: 42px; height: 42px; border-radius: 12px; }
  .kpi-value { font-size: 24px; }
  .kpi-watermark { width: 52px; height: 52px; bottom: -4px; opacity: .66; }
  .quick-mascot { width: 44px; height: 44px; top: 2px; right: 6px; border-width: 2px; }
  .dash-row-2 > .card { padding: 16px; }
  .task-item { padding: 9px 10px; gap: 8px; }
  .task-dot { width: 28px; height: 28px; border-radius: 9px; }
  .task-badge { padding: 2px 7px; font-size: 10px; }
  .task-arrow { display: none; }
  .sop-donut { width: 96px; height: 96px; }
  .sop-donut::before { inset: 10px; }
  .sop-donut span { font-size: 17px; }
  .sop-donut-wrap { gap: 12px; }
  .sop-legend li { font-size: 11px; white-space: nowrap; gap: 6px; }
  .sop-bars { height: 34px; }
  .timeline-photo { width: 100px; min-height: 120px; }
}
@media (max-width: 980px) {
  .dash-row-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .timeline-card { grid-column: 1 / -1; }
  .dash-row-3b { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .dash-row-3b > .card:last-child { grid-column: 1 / -1; }
  .tb-search { max-width: 300px; }
  .kpi-row { grid-template-columns: 1fr 1fr; }
  .dash-row-3 { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .sidebar { width: 76px; }
  .brand { justify-content: center; padding: 16px 8px; }
  .nav { padding: 10px 8px 14px; }
  .nav-item .nav-text, .nav-item .badge, .brand-text, .nav-label, .sidebar-footer { display: none; }
  .nav-item .nav-text { display: none !important; }
  .nav-item { justify-content: center; padding: 12px 0; }
  .topbar h1 { display: none; }
  .tb-search { display: none; }
  .today-hero { padding: 24px 22px; }
  .hero-mascot { max-width: 40%; opacity: .9; }
  .th-main { max-width: 66%; }
  .dash-row-2, .dash-row-3b { grid-template-columns: 1fr; }
  .dash-row-3b > .card:last-child { grid-column: auto; }
  .timeline-card { grid-column: auto; }
}
@media (max-width: 700px) {
  .main { padding: 0 14px 24px; }
  .topbar { margin: 0 -14px 16px; padding: 0 14px; }
  .kpi-row { grid-template-columns: 1fr; }
  .th-main { max-width: 100%; }
  .hero-mascot { opacity: .35; max-width: 60%; }
  .timeline-photo { display: none; }
  .quick-grid { grid-template-columns: repeat(5, 1fr); }
  .quick-mascot { display: none; }
}

