:root {
  --brand: #4f6ef7;
  --brand-soft: #eef1ff;
  --brand-dark: #3a56d4;
  --bg: #f4f6fb;
  --card: #ffffff;
  --text: #141b2d;
  --text-2: #445068;
  --muted: #7b869c;
  --border: #e7ebf3;
  --green: #12a06a;
  --green-soft: #e6f7f0;
  --orange: #e8890c;
  --orange-soft: #fff4e3;
  --red: #e04b4b;
  --red-soft: #fdecec;
  --purple: #7c5cf0;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 10px 28px -16px rgba(16, 24, 40, .18);
  --shadow-lg: 0 24px 64px -24px rgba(16, 24, 40, .35);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 { margin: 0; font-weight: 650; letter-spacing: -.01em; }
p { margin: 0; }
a { color: var(--brand); text-decoration: none; }
button { font-family: inherit; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.flex { display: flex; align-items: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-16 { margin-bottom: 16px; }
.spacer { flex: 1; }
.right { margin-left: auto; }

/* ============ 登录 ============ */
.login-wrap {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  min-height: 100vh;
}
.login-brand {
  background: linear-gradient(150deg, #4356d8 0%, #4f6ef7 42%, #6f8bff 100%);
  color: #fff;
  padding: 56px 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.login-brand::after {
  content: "";
  position: absolute;
  width: 520px; height: 520px;
  right: -180px; bottom: -220px;
  background: radial-gradient(circle, rgba(255,255,255,.22), transparent 68%);
  border-radius: 50%;
}
.login-brand::before {
  content: "";
  position: absolute;
  width: 320px; height: 320px;
  left: -120px; top: -110px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 50%;
}
.brand-mark {
  display: flex; align-items: center; gap: 10px;
  font-size: 15px; font-weight: 600; letter-spacing: .02em;
  opacity: .95; margin-bottom: 42px;
}
.login-brand h1 {
  font-size: 38px;
  line-height: 1.32;
  font-weight: 700;
  letter-spacing: -.02em;
}
.login-panel {
  display: flex; align-items: center; justify-content: center;
  padding: 32px; background: #fff;
}
.login-card { width: 100%; max-width: 372px; }
.login-card h2 { font-size: 26px; margin-bottom: 6px; }
.login-card > .muted { margin-bottom: 28px; font-size: 13.5px; }

/* ============ 表单 ============ */
.field { display: block; margin-bottom: 16px; }
.field > span {
  display: block; font-size: 12.5px; font-weight: 600;
  color: var(--text-2); margin-bottom: 7px;
}
.field input[type="text"],
.field input[type="password"],
.field input[type="number"],
.field input[type="date"],
.field input[type="month"],
.field input[type="email"],
.field select,
.field textarea,
.input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fbfcfe;
  font-size: 13.5px;
  font-family: inherit;
  color: var(--text);
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.field textarea { resize: vertical; min-height: 96px; line-height: 1.7; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus {
  border-color: var(--brand);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(79, 110, 247, .12);
}
.field .hint { font-size: 11.5px; color: var(--muted); margin-top: 5px; }
.form-error {
  background: var(--red-soft); color: #b53030;
  border-radius: var(--radius-sm);
  padding: 9px 12px; font-size: 12.5px; margin-bottom: 14px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }

/* ============ 按钮 ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-2);
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}
.btn:hover { border-color: #cfd7e6; background: #fafbfe; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary {
  background: var(--brand); border-color: var(--brand); color: #fff;
  box-shadow: 0 6px 16px -8px rgba(79, 110, 247, .9);
}
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { background: #f2f5fb; color: var(--text); border-color: transparent; }
.btn-danger { color: var(--red); border-color: #f3d4d4; background: #fff; }
.btn-danger:hover { background: var(--red-soft); border-color: #edbcbc; }
.btn-sm { padding: 6px 11px; font-size: 12px; border-radius: 7px; }
.btn-block { width: 100%; padding: 11px; font-size: 14px; }

/* ============ 布局 ============ */
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 236px; flex: none;
  background: #fff;
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.sidebar-brand {
  display: flex; align-items: center;
  padding: 22px 18px 20px;
}
.brand-logo { height: 34px; width: auto; max-width: 100%; flex: none; display: block; }
.login-logo {
  height: 30px; width: auto; display: block;
  background: rgba(255, 255, 255, .95);
  border-radius: 8px; padding: 5px 9px;
}
.nav { display: flex; flex-direction: column; gap: 2px; padding: 4px 10px; flex: 1; overflow-y: auto; }
.nav-label {
  font-size: 10.5px; font-weight: 700; color: #a3adc0;
  letter-spacing: .08em; text-transform: uppercase;
  padding: 14px 10px 6px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 11px;
  border-radius: 9px;
  color: var(--text-2);
  font-size: 13.5px; font-weight: 500;
  cursor: pointer;
  border: none; background: none; text-align: left; width: 100%;
  transition: background .14s, color .14s;
}
.nav-item:hover { background: #f4f7fd; color: var(--text); }
.nav-item.active { background: var(--brand-soft); color: var(--brand-dark); font-weight: 650; }
.nav-item .ico { width: 17px; height: 17px; flex: none; opacity: .8; }
.nav-item.active .ico { opacity: 1; }
.sidebar-foot { padding: 12px; border-top: 1px solid var(--border); }
.nav-help {
  width: 100%; padding: 9px 11px; border-radius: 9px;
  border: 1px dashed var(--border); background: none;
  color: var(--muted); font-size: 12.5px; cursor: pointer;
}
.nav-help:hover { color: var(--brand); border-color: #c9d3f0; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px;
  padding: 20px 30px 16px;
  background: rgba(244, 246, 251, .86);
  backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 20;
  border-bottom: 1px solid transparent;
}
.topbar h1 { font-size: 20px; }
.page-sub { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.content { padding: 8px 30px 44px; flex: 1; }

/* 用户 */
.user-chip {
  display: flex; align-items: center; gap: 9px;
  padding: 5px 10px 5px 6px;
  border-radius: 30px; border: 1px solid var(--border);
  background: #fff; cursor: pointer; position: relative;
}
.avatar {
  width: 29px; height: 29px; border-radius: 50%;
  background: linear-gradient(140deg, #6d86f8, #4f6ef7);
  color: #fff; font-size: 12.5px; font-weight: 650;
  display: flex; align-items: center; justify-content: center;
}
.user-meta strong { display: block; font-size: 12.5px; line-height: 1.25; }
.user-meta small { display: block; font-size: 10.5px; color: var(--muted); }
.user-menu {
  display: none;
  position: absolute; right: 0; top: calc(100% + 8px);
  background: #fff; border: 1px solid var(--border);
  border-radius: 11px; box-shadow: var(--shadow-lg);
  padding: 6px; min-width: 140px; z-index: 50;
}
.user-menu.open { display: block; }
.user-menu button {
  display: block; width: 100%; text-align: left;
  padding: 8px 10px; border: none; background: none;
  font-size: 12.5px; color: var(--text-2); border-radius: 7px; cursor: pointer;
}
.user-menu button:hover { background: #f5f7fc; color: var(--text); }

/* ============ 卡片 ============ */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  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-size: 14.5px; font-weight: 650; }
.card-title .sub { font-size: 12px; color: var(--muted); font-weight: 400; margin-left: 6px; }
.card-body { padding: 0 18px 18px; }
.card-body.pad { padding: 16px 18px; }
.card-foot { padding: 12px 18px; border-top: 1px solid var(--border); }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-2-1 { grid-template-columns: 1.6fr 1fr; }
.grid-1-2 { grid-template-columns: 1fr 1.7fr; }

/* 统计卡 */
.stat { padding: 16px 18px; position: relative; overflow: hidden; }
.stat-label { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.stat-value { font-size: 27px; font-weight: 680; letter-spacing: -.02em; margin-top: 8px; line-height: 1.1; }
.stat-value small { font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 4px; }
.stat-foot { margin-top: 8px; font-size: 11.5px; color: var(--muted); }
.stat-icon {
  position: absolute; right: 14px; top: 14px;
  width: 32px; height: 32px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  background: var(--brand-soft); color: var(--brand);
}
.stat-icon.g { background: var(--green-soft); color: var(--green); }
.stat-icon.o { background: var(--orange-soft); color: var(--orange); }
.stat-icon.p { background: #f2eeff; color: var(--purple); }

/* 徽章 */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; border-radius: 20px;
  font-size: 11.5px; font-weight: 600; line-height: 1.5;
  white-space: nowrap;
}
.badge-blue { background: var(--brand-soft); color: var(--brand-dark); }
.badge-green { background: var(--green-soft); color: #0b7d52; }
.badge-orange { background: var(--orange-soft); color: #a86200; }
.badge-red { background: var(--red-soft); color: #b53030; }
.badge-muted { background: #f1f4f9; color: var(--muted); }
.badge-purple { background: #f2eeff; color: #5b3ecb; }
.badge-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

/* 进度 */
.progress { height: 6px; background: #eef1f7; border-radius: 20px; overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: 20px; background: var(--brand); transition: width .5s; }
.progress.green > i { background: var(--green); }
.progress.orange > i { background: var(--orange); }
.progress.red > i { background: var(--red); }

/* 表格 */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
  text-align: left; font-size: 11.5px; font-weight: 650; color: var(--muted);
  padding: 9px 12px; border-bottom: 1px solid var(--border);
  white-space: nowrap; background: #fafbfe;
}
.table td { padding: 11px 12px; border-bottom: 1px solid #f0f3f9; vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: #fbfcff; }
.table .num { font-variant-numeric: tabular-nums; }

/* tabs */
.tabs { display: flex; gap: 4px; background: #eef1f8; padding: 4px; border-radius: 10px; width: fit-content; }
.tab {
  padding: 6px 14px; border-radius: 7px; border: none; background: none;
  font-size: 12.5px; font-weight: 600; color: var(--muted); cursor: pointer;
  transition: all .15s; white-space: nowrap;
}
.tab.active { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(16,24,40,.08); }
.tab-line { display: flex; gap: 20px; border-bottom: 1px solid var(--border); margin-bottom: 18px; }
.tab-line button {
  padding: 10px 2px; border: none; background: none; cursor: pointer;
  font-size: 13.5px; font-weight: 600; color: var(--muted);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tab-line button.active { color: var(--brand); border-bottom-color: var(--brand); }

/* 空状态 */
.empty { padding: 46px 20px; text-align: center; color: var(--muted); font-size: 13px; }
.empty .em-icon { font-size: 26px; opacity: .35; margin-bottom: 10px; }

/* ============ 场景卡 ============ */
.scenario-card {
  padding: 15px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  transition: box-shadow .18s, transform .18s, border-color .18s;
  cursor: pointer;
}
.scenario-card:hover { box-shadow: var(--shadow); border-color: #d5ddef; transform: translateY(-1px); }
.scenario-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.scenario-name { font-size: 14px; font-weight: 650; line-height: 1.45; }
.scenario-desc {
  font-size: 12px; color: var(--muted); margin-top: 5px; line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.scenario-meta { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: 11.5px; color: var(--muted); }
.scenario-bar { margin-top: 10px; }
.scenario-bar .row { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); margin-bottom: 5px; }

/* 业务线 tab 卡 */
.line-tabs { display: flex; gap: 10px; flex-wrap: wrap; }
.line-tab {
  padding: 12px 16px; border-radius: 12px; border: 1px solid var(--border);
  background: #fff; cursor: pointer; min-width: 168px;
  transition: all .16s; text-align: left;
}
.line-tab:hover { border-color: #cfd8ec; }
.line-tab.active { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(79,110,247,.1); }
.line-tab .lt-name { font-size: 13.5px; font-weight: 650; display: flex; align-items: center; gap: 7px; }
.line-tab .lt-meta { font-size: 11.5px; color: var(--muted); margin-top: 6px; display: flex; gap: 10px; }
.line-dot { width: 8px; height: 8px; border-radius: 3px; }

/* 时间线 */
.timeline { position: relative; padding-left: 20px; }
.timeline::before {
  content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px;
  width: 1px; background: var(--border);
}
.tl-item { position: relative; padding-bottom: 16px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: ""; position: absolute; left: -18px; top: 5px;
  width: 7px; height: 7px; border-radius: 50%;
  background: #fff; border: 2px solid var(--brand);
}
.tl-head { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--muted); }
.tl-body { font-size: 12.5px; color: var(--text-2); margin-top: 4px; line-height: 1.65; }

/* ============ 弹窗 ============ */
.modal-mask {
  position: fixed; inset: 0; background: rgba(17, 24, 39, .42);
  backdrop-filter: blur(2px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 48px 20px; z-index: 200; overflow-y: auto;
  animation: fade .16s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: #fff; border-radius: 16px; width: 100%; max-width: 520px;
  box-shadow: var(--shadow-lg); animation: pop .2s cubic-bezier(.2,.9,.3,1.2);
  margin-bottom: 40px;
}
.modal.wide { max-width: 720px; }
@keyframes pop { from { transform: translateY(10px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px 12px;
}
.modal-head h3 { font-size: 16px; }
.modal-close {
  border: none; background: #f3f5fa; width: 28px; height: 28px;
  border-radius: 8px; cursor: pointer; color: var(--muted); font-size: 15px;
  display: flex; align-items: center; justify-content: center;
}
.modal-close:hover { background: #e9edf6; color: var(--text); }
.modal-body { padding: 4px 20px 8px; }
.modal-foot {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 14px 20px 18px;
}

/* toast */
.toast-root {
  position: fixed; top: 18px; right: 18px; z-index: 300;
  display: flex; flex-direction: column; gap: 8px;
}
.toast {
  background: #fff; border: 1px solid var(--border);
  border-left: 3px solid var(--brand);
  padding: 11px 15px; border-radius: 10px;
  box-shadow: var(--shadow-lg); font-size: 13px;
  min-width: 200px; max-width: 340px;
  animation: slideIn .2s ease;
}
.toast.success { border-left-color: var(--green); }
.toast.error { border-left-color: var(--red); }
@keyframes slideIn { from { transform: translateX(20px); opacity: 0; } to { transform: none; opacity: 1; } }

/* markdown */
.markdown { font-size: 13.5px; line-height: 1.85; color: var(--text-2); }
.markdown h1 { font-size: 19px; color: var(--text); margin: 4px 0 14px; }
.markdown h2 {
  font-size: 15px; color: var(--text); margin: 22px 0 10px;
  padding-bottom: 6px; border-bottom: 1px solid var(--border);
}
.markdown h3 { font-size: 13.5px; color: var(--text); margin: 16px 0 8px; }
.markdown p { margin: 8px 0; }
.markdown ul { margin: 8px 0; padding-left: 20px; }
.markdown li { margin: 5px 0; }
.markdown strong { color: var(--text); font-weight: 650; }
.markdown blockquote {
  margin: 12px 0; padding: 10px 14px;
  background: #f8fafd; border-left: 3px solid #d7e0f5;
  border-radius: 0 8px 8px 0; color: var(--muted); font-size: 12.5px;
}
.markdown code {
  background: #f2f5fa; padding: 1px 5px; border-radius: 4px;
  font-size: 12.5px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* 日报编辑 */
.day-picker { display: flex; align-items: center; gap: 8px; }
.week-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.day-cell {
  padding: 10px 6px; border-radius: 10px; border: 1px solid var(--border);
  background: #fff; text-align: center; cursor: pointer; transition: all .14s;
}
.day-cell:hover { border-color: #cfd8ec; }
.day-cell.active { border-color: var(--brand); background: var(--brand-soft); }
.day-cell .dc-w { font-size: 10.5px; color: var(--muted); }
.day-cell .dc-d { font-size: 14px; font-weight: 650; margin: 3px 0 4px; }
.day-cell .dc-dot { width: 5px; height: 5px; border-radius: 50%; margin: 0 auto; background: #dfe5f0; }
.day-cell .dc-dot.on { background: var(--green); }
.day-cell.today .dc-d { color: var(--brand); }

.editor-actions { display: flex; align-items: center; gap: 10px; margin-top: 6px; }

/* 报告列表 */
.report-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 10px; cursor: pointer;
  border: 1px solid transparent;
}
.report-item:hover { background: #f8fafe; border-color: var(--border); }
.report-item.active { background: var(--brand-soft); border-color: #d6dffb; }
.report-item .ri-main { flex: 1; min-width: 0; }
.report-item .ri-title { font-size: 13px; font-weight: 600; }
.report-item .ri-sub { font-size: 11.5px; color: var(--muted); margin-top: 3px; }

/* 图表容器 */
.chart-box { padding: 4px 4px 0; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; font-size: 11.5px; color: var(--muted); }
.chart-legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend-dot { width: 8px; height: 8px; border-radius: 3px; }

/* 权限提示 */
.notice {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px; border-radius: 11px;
  background: #f7f9ff; border: 1px solid #e3eafd;
  font-size: 12.5px; color: var(--text-2); line-height: 1.65;
}
.notice.warn { background: var(--orange-soft); border-color: #f7e2bd; color: #8a5300; }

/* 搜索筛选条 */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .input { width: auto; min-width: 150px; }
.toolbar select.input { padding: 8px 10px; }

/* ============ 场景预警红绿灯 ============ */
.hl {
  display: inline-flex; align-items: center; gap: 6px;
  height: 22px; padding: 0 9px 0 8px; border-radius: 20px;
  font-size: 11px; font-weight: 650; white-space: nowrap;
  border: 1px solid transparent;
}
.hl i {
  width: 7px; height: 7px; border-radius: 50%; flex: none;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, .05);
}
.hl.green { background: var(--green-soft); color: #0b7d52; }
.hl.green i { background: #12a06a; box-shadow: 0 0 0 3px rgba(18, 160, 106, .16); }
.hl.yellow { background: var(--orange-soft); color: #a86200; }
.hl.yellow i { background: #e8890c; box-shadow: 0 0 0 3px rgba(232, 137, 12, .18); }
.hl.red { background: var(--red-soft); color: #b53030; }
.hl.red i { background: #e04b4b; box-shadow: 0 0 0 3px rgba(224, 75, 75, .16); }
.hl.none { background: #f1f4f9; color: var(--muted); }
.hl.none i { background: #b6bfd0; box-shadow: 0 0 0 3px rgba(182, 191, 208, .22); }
.hl.red i { animation: hl-pulse 2.2s ease-in-out infinite; }
@keyframes hl-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(224, 75, 75, .16); }
  50% { box-shadow: 0 0 0 6px rgba(224, 75, 75, .05); }
}
@media (prefers-reduced-motion: reduce) { .hl.red i { animation: none; } }

.scenario-card.is-red { border-color: #f2cccc; }
.scenario-card.is-yellow { border-color: #f6e0bd; }

/* 应达进度刻度 */
.progress-wrap { position: relative; }
.progress-wrap .expect-mark {
  position: absolute; top: -3px; bottom: -3px; width: 2px;
  margin-left: -1px; border-radius: 2px;
  background: #97a2b7; opacity: .75; pointer-events: none;
}

/* 成员头像组 */
.member-faces { display: inline-flex; align-items: center; }
.member-faces .mf {
  width: 18px; height: 18px; border-radius: 50%;
  background: #eef1ff; color: #3a56d4;
  font-size: 10px; font-weight: 650;
  display: flex; align-items: center; justify-content: center;
  border: 1.5px solid #fff; margin-left: -5px;
}
.member-faces .mf:first-child { margin-left: 0; }
.member-faces .mf.more { background: #f1f4f9; color: var(--muted); }

/* 筛选条 */
.filter-bar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 0 0 16px;
}
.filter-bar select, .filter-bar input[type="text"] {
  height: 32px; padding: 0 10px;
  border: 1px solid var(--border); border-radius: 8px;
  background: #fff; font-size: 12.5px; font-family: inherit; color: var(--text-2);
  outline: none; cursor: pointer;
}
.filter-bar input[type="text"] { cursor: text; width: 168px; }
.filter-bar select:focus, .filter-bar input[type="text"]:focus {
  border-color: var(--brand); box-shadow: 0 0 0 3px rgba(79, 110, 247, .1);
}
.seg { display: inline-flex; gap: 4px; background: #f3f5fa; padding: 3px; border-radius: 10px; }
.seg button {
  display: inline-flex; align-items: center; gap: 5px;
  height: 26px; padding: 0 10px; border: none; border-radius: 8px;
  background: transparent; color: var(--text-2);
  font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: background .14s, color .14s, box-shadow .14s;
}
.seg button:hover { background: #e9edf6; }
.seg button.active { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(16, 24, 40, .12); }
.seg button i { width: 6px; height: 6px; border-radius: 50%; flex: none; }
.seg button .n { font-size: 11px; color: var(--muted); font-weight: 600; }
.filter-count { margin-left: auto; font-size: 12px; color: var(--muted); white-space: nowrap; }

/* 成员选择器 */
.chip-picker {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 10px; border: 1px solid var(--border); border-radius: 10px;
  background: #fbfcfe; max-height: 132px; overflow-y: auto;
}
.chip-picker .chip {
  border: 1px solid #dbe2ef; background: #fff; color: var(--text-2);
  font-size: 12.5px; padding: 5px 12px; border-radius: 20px;
  cursor: pointer; transition: all .14s; font-family: inherit;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .03);
}
.chip-picker .chip:hover { border-color: #cfd8ec; }
.chip-picker .chip.on {
  background: var(--brand-soft); border-color: var(--brand);
  color: var(--brand-dark); font-weight: 600;
}
.chip-picker .chip.on::before { content: "✓"; margin-right: 4px; }
.chip-empty { font-size: 12px; color: var(--muted); padding: 2px; }

/* 详情里的预警说明 */
.health-banner {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px; border-radius: 10px; margin-bottom: 16px;
  font-size: 12.5px; line-height: 1.65;
}
.health-banner .hb-title { font-weight: 700; margin-right: 6px; }
.health-banner.green { background: var(--green-soft); color: #0b7d52; }
.health-banner.yellow { background: var(--orange-soft); color: #a86200; }
.health-banner.red { background: var(--red-soft); color: #b53030; }
.health-banner.none { background: #f3f5fa; color: var(--text-2); }


/* 响应式 */
@media (max-width: 1180px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2-1, .grid-1-2 { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .login-wrap { grid-template-columns: 1fr; }
  .login-brand { display: none; }
  .app-shell { flex-direction: column; }
  .sidebar {
    width: 100%; height: auto; position: static;
    border-right: none; border-bottom: 1px solid var(--border);
  }
  .nav { flex-direction: row; overflow-x: auto; padding: 8px 12px 12px; }
  .nav-label { display: none; }
  .nav-item { white-space: nowrap; }
  .sidebar-foot { display: none; }
  .content, .topbar { padding-left: 16px; padding-right: 16px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .topbar h1 { font-size: 17px; }
  .user-meta { display: none; }
}
