:root {
  --navy: #1f3864;
  --navy-2: #2e4d8e;
  --bg: #f4f6f9;
  --card: #ffffff;
  --line: #bfbfbf;
  --head: #ededed;
  --text: #1a1a1a;
  --muted: #6b7280;
  --green: #2e9e5b;
  --yellow: #e0a800;
  --red: #d64545;
  --accent: #1f3864;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --radius: 12px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Microsoft YaHei", "微软雅黑", -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  padding-bottom: 78px;
  -webkit-font-smoothing: antialiased;
}
.app-header {
  position: sticky; top: 0; z-index: 30;
  background: linear-gradient(135deg, var(--navy), var(--navy-2));
  color: #fff; padding: 14px 16px 12px;
}
.app-header .title-row { display: flex; align-items: center; justify-content: space-between; }
.app-header h1 { font-size: 17px; margin: 0; font-weight: 700; letter-spacing: .5px; }
.app-header .date { font-size: 12px; opacity: .85; }
.freshness {
  margin-top: 8px; display: flex; align-items: center; gap: 6px;
  font-size: 12px; background: rgba(255,255,255,.14); padding: 4px 10px; border-radius: 20px; width: fit-content;
}
.freshness.stale { background: rgba(214,69,69,.85); }
.freshness .dot { width: 7px; height: 7px; border-radius: 50%; background: #8ff0b0; }
.freshness.stale .dot { background: #ffd0d0; }

.content { padding: 12px; }
.section-title { font-size: 14px; font-weight: 700; color: var(--navy); margin: 18px 4px 10px; display: flex; align-items: center; gap: 6px; }
.section-title::before { content: ""; width: 4px; height: 15px; background: var(--navy); border-radius: 2px; }

.card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 14px; margin-bottom: 12px; border: 1px solid #eef0f3;
}
.kpi-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.kpi {
  background: var(--card); border: 1px solid #eef0f3; border-radius: 10px; padding: 12px;
  box-shadow: var(--shadow);
}
.kpi .label { font-size: 12px; color: var(--muted); }
.kpi .value { font-size: 22px; font-weight: 700; margin-top: 2px; }
.kpi .sub { font-size: 12px; margin-top: 2px; }
.up { color: var(--green); }
.down { color: var(--red); }

table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tbl th { background: var(--head); border: 1px solid var(--line); padding: 7px 6px; font-weight: 700; text-align: center; }
table.tbl td { border: 1px solid var(--line); padding: 7px 6px; text-align: center; }
table.tbl td.name { text-align: left; font-weight: 600; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 11px; font-weight: 700; color: #fff; }
.tag.g { background: var(--green); }
.tag.y { background: var(--yellow); color: #5a4500; }
.tag.r { background: var(--red); }
.tag.ns { background: #9aa3b2; }
.mono { font-variant-numeric: tabular-nums; }

.alert-item { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px dashed #e6e8ec; }
.alert-item:last-child { border-bottom: none; }
.alert-bar { width: 4px; border-radius: 3px; flex: 0 0 4px; }
.alert-bar.r { background: var(--red); }
.alert-bar.y { background: var(--yellow); }
.alert-bar.g { background: var(--green); }
.alert-body .t { font-weight: 600; font-size: 14px; }
.alert-body .d { font-size: 12px; color: var(--muted); margin-top: 2px; }

.task { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-bottom: 1px solid #eef0f3; }
.task:last-child { border-bottom: none; }
.task .chk { width: 20px; height: 20px; border: 2px solid var(--navy); border-radius: 6px; flex: 0 0 20px; margin-top: 2px; cursor: pointer; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 13px; }
.task.done .chk { background: var(--green); border-color: var(--green); }
.task.done .tt { text-decoration: line-through; color: var(--muted); }
.task .tt { font-weight: 600; font-size: 14px; flex: 1; }
.task .meta { font-size: 11px; color: var(--muted); margin-top: 3px; }
.task .del { color: #c2c7d0; font-size: 18px; cursor: pointer; padding: 0 4px; }
.task-add { display: flex; gap: 8px; margin-top: 10px; }
.task-add input, .task-add select {
  flex: 1; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; font-family: inherit;
}
.task-form input, .task-form select {
  padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; font-family: inherit; width: 100%;
}
.task-form .row > * { min-width: 0; }

/* 日程时间线 */
.timeline { position: relative; padding-left: 14px; }
.timeline::before { content: ""; position: absolute; left: 4px; top: 4px; bottom: 4px; width: 2px; background: #e3e6ea; }
.slot { position: relative; padding: 8px 0 8px 14px; }
.slot::before { content: ""; position: absolute; left: -12px; top: 14px; width: 9px; height: 9px; border-radius: 50%; background: var(--navy); }
.slot.p1::before { background: var(--red); }
.slot.p2::before { background: var(--yellow); }
.slot.p3::before { background: #9aa3b2; }
.slot .tm { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.slot .ttl { font-weight: 600; font-size: 14px; margin-top: 1px; }
.slot .meta { font-size: 11px; color: var(--muted); margin-top: 2px; }
.slot.done .ttl { text-decoration: line-through; color: var(--muted); }

.remind { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid #eef0f3; align-items: flex-start; }
.remind:last-child { border-bottom: none; }
.remind .ic { font-size: 18px; }
.remind .rb .t { font-weight: 600; font-size: 14px; }
.remind .rb .d { font-size: 12px; color: var(--muted); margin-top: 2px; }
.remind.over .t { color: var(--red); }

/* 预警开方 */
.alert-card-block { border: 1px solid #eef0f3; border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; }
.alert-card-block .ah { font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 6px; }
.alert-card-block .ad { font-size: 12px; color: var(--muted); margin: 3px 0 6px; }
.measures { margin-top: 6px; }
.measures .mg { font-size: 12px; font-weight: 700; color: var(--navy); margin: 6px 0 3px; }
.measures li { font-size: 12.5px; margin: 2px 0 2px 16px; line-height: 1.45; }
.case-box { background: #f7f9fc; border-radius: 8px; padding: 8px 10px; margin-top: 8px; }
.case-box .ct { font-weight: 600; font-size: 13px; }
.case-box .cs { font-size: 12px; color: #455066; margin-top: 2px; line-height: 1.45; }
.case-box .cb { font-size: 11px; color: var(--navy-2); margin-top: 3px; }

/* 板块卡片 */
.board-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.board { background: var(--card); border: 1px solid #eef0f3; border-radius: 10px; padding: 11px; box-shadow: var(--shadow); }
.board .bn { font-weight: 700; color: var(--navy); font-size: 14px; }
.board .bd { font-size: 12px; color: var(--muted); margin: 3px 0 6px; }
.board ul { margin: 0; padding-left: 15px; }
.board li { font-size: 12px; margin: 2px 0; line-height: 1.4; }

/* 作战方案 */
.battle-store { border-left: 4px solid var(--red); background: #fff5f5; border-radius: 8px; padding: 10px 12px; margin-bottom: 10px; }
.battle-store .bs { font-weight: 700; font-size: 14px; color: var(--red); }
.battle-row { margin-top: 6px; }
.battle-row .brh { font-size: 12px; font-weight: 700; color: var(--navy); }
.battle-row li { font-size: 12.5px; margin: 2px 0 2px 16px; line-height: 1.45; }
.btn {
  background: var(--navy); color: #fff; border: none; border-radius: 8px; padding: 10px 14px;
  font-size: 14px; font-weight: 600; cursor: pointer; font-family: inherit;
}
.btn.block { width: 100%; }
.btn.ghost { background: #eef1f6; color: var(--navy); }
.btn.sm { padding: 6px 10px; font-size: 12px; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; }

.okr-obj { margin-bottom: 14px; }
.okr-obj .obj-name { font-weight: 700; color: var(--navy); font-size: 14px; }
.kr { margin-top: 8px; }
.kr .kr-top { display: flex; justify-content: space-between; font-size: 13px; }
.kr .kr-name { font-weight: 600; }
.kr .kr-val { color: var(--muted); }
.bar { height: 8px; background: #e9edf3; border-radius: 6px; margin-top: 5px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--navy-2), var(--navy)); border-radius: 6px; }

.camp { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid #eef0f3; }
.camp:last-child { border-bottom: none; }
.camp .when { font-size: 12px; color: var(--muted); width: 86px; flex: 0 0 86px; }
.camp .info .nm { font-weight: 600; font-size: 14px; }
.camp .info .kp { font-size: 12px; color: var(--muted); margin-top: 2px; }

.inv { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1px solid #eef0f3; font-size: 13px; }
.inv:last-child { border-bottom: none; }
.inv .qq { font-weight: 600; }
.inv .low { color: var(--red); font-weight: 700; }

.tabs {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 40;
  background: #fff; border-top: 1px solid #e3e6ea; display: flex;
  box-shadow: 0 -2px 8px rgba(0,0,0,.05);
}
.tabs button {
  flex: 1; background: none; border: none; padding: 8px 2px 9px; font-size: 11px; color: var(--muted);
  font-family: inherit; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 3px;
}
.tabs button .ic { font-size: 19px; line-height: 1; }
.tabs button.active { color: var(--navy); font-weight: 700; }
.tabs button.active .ic { transform: translateY(-1px); }

.view { display: none; }
.view.active { display: block; }

.empty { text-align: center; color: var(--muted); font-size: 13px; padding: 30px 0; }
.note-line { font-size: 12px; color: var(--muted); margin-top: 6px; }
.pill { display:inline-block; background:#eef1f6; color:var(--navy); border-radius:10px; padding:2px 9px; font-size:11px; margin-left:6px;}
.src-note { font-size: 11px; color: var(--muted); margin-top: 8px; text-align: right; }
