/* ==================================================================
   未成年人犯罪预警管理系统 · 设计系统
   主色：政务藏青 / 等级色：蓝 黄 橙 红
   ================================================================== */
:root {
  --c-primary: #1c4e80;
  --c-primary-2: #2a6cab;
  --c-primary-3: #4a8ac4;
  --c-bg: #f2f5f9;
  --c-card: #ffffff;
  --c-line: #e3e9f0;
  --c-line-2: #edf1f6;
  --c-text: #1d2939;
  --c-text-2: #5b6b7f;
  --c-text-3: #8a97a8;
  --c-blue: #2e73c2;
  --c-yellow: #d99a21;
  --c-orange: #dd6a29;
  --c-red: #cc3b3b;
  --c-green: #2f9e6e;
  --shadow-1: 0 1px 2px rgba(20, 40, 70, .05), 0 4px 16px rgba(20, 40, 70, .06);
  --shadow-2: 0 8px 32px rgba(20, 40, 70, .14);
  --radius: 10px;
  --sidebar-w: 236px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0; padding: 0; height: 100%;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Noto Sans CJK SC", sans-serif;
  font-size: 14px; line-height: 1.6;
}

a { color: var(--c-primary-2); text-decoration: none; }
button { font-family: inherit; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #c8d2de; border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------------------------------------------------------------- 登录 */
.login-wrap {
  min-height: 100vh; display: grid; grid-template-columns: 1fr 480px;
  background: linear-gradient(135deg, #0f2f52 0%, #1c4e80 45%, #2a6cab 100%);
}
.login-left { padding: 64px 72px; color: #fff; display: flex; flex-direction: column; justify-content: center; }
.login-left .brand-line { font-size: 13px; letter-spacing: 4px; color: rgba(255,255,255,.72); }
.login-left h1 { font-size: 40px; line-height: 1.35; margin: 18px 0 12px; font-weight: 600; letter-spacing: 1px; }
.login-left p.sub { color: rgba(255,255,255,.78); font-size: 15px; max-width: 560px; }
.login-feats { margin-top: 44px; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; max-width: 640px; }
.login-feat { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); border-radius: 10px; padding: 14px 16px; }
.login-feat b { display: block; font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.login-feat span { font-size: 12.5px; color: rgba(255,255,255,.7); }
.login-right { background: #fff; display: flex; align-items: center; justify-content: center; padding: 40px; }
.login-card { width: 100%; max-width: 340px; }
.login-card h2 { font-size: 22px; margin: 0 0 6px; font-weight: 600; }
.login-card .hint { color: var(--c-text-3); font-size: 13px; margin-bottom: 28px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13px; color: var(--c-text-2); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; height: 42px; padding: 0 12px; border: 1px solid var(--c-line);
  border-radius: 8px; font-size: 14px; color: var(--c-text); background: #fbfcfe; outline: none;
  transition: .15s;
}
.field textarea { height: auto; padding: 10px 12px; resize: vertical; min-height: 84px; line-height: 1.6; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--c-primary-3); background: #fff; box-shadow: 0 0 0 3px rgba(42,108,171,.12); }
.btn-login {
  width: 100%; height: 44px; border: none; border-radius: 8px; color: #fff; font-size: 15px; letter-spacing: 2px;
  background: linear-gradient(90deg, #1c4e80, #2a6cab); cursor: pointer; margin-top: 8px;
}
.btn-login:hover { filter: brightness(1.06); }
.demo-users { margin-top: 26px; border-top: 1px dashed var(--c-line); padding-top: 16px; }
.demo-users .t { font-size: 12px; color: var(--c-text-3); margin-bottom: 8px; }
.demo-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.demo-chip {
  font-size: 12px; padding: 5px 10px; border-radius: 20px; background: #eef3f9; color: var(--c-primary);
  border: 1px solid #dbe6f2; cursor: pointer;
}
.demo-chip:hover { background: #e2ecf7; }

/* ---------------------------------------------------------------- 布局 */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); flex: 0 0 var(--sidebar-w);
  background: linear-gradient(180deg, #163f68 0%, #12314f 100%);
  color: #fff; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.sidebar .logo { padding: 22px 20px 18px; border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar .logo .mark { display: flex; align-items: center; gap: 10px; }
.sidebar .logo .badge {
  width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(135deg, #3b7fc4, #245d95);
  display: grid; place-items: center; font-weight: 700; font-size: 15px; letter-spacing: 0;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18);
}
.sidebar .logo .name { font-size: 14.5px; font-weight: 600; letter-spacing: .5px; }
.sidebar .logo .sub { font-size: 11px; color: rgba(255,255,255,.5); margin-top: 2px; letter-spacing: 1px; }
.nav { padding: 12px 10px; flex: 1; overflow-y: auto; }
.nav .group-title { font-size: 11px; color: rgba(255,255,255,.38); padding: 10px 12px 6px; letter-spacing: 1px; }
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px;
  color: rgba(255,255,255,.78); font-size: 13.5px; margin-bottom: 2px; cursor: pointer; position: relative;
}
.nav a .ic { width: 18px; text-align: center; font-size: 14px; opacity: .85; }
.nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav a.active { background: rgba(74,138,196,.22); color: #fff; box-shadow: inset 3px 0 0 #6aa6d8; }
.nav a .dot { margin-left: auto; min-width: 18px; height: 18px; border-radius: 9px; background: #cc3b3b; font-size: 11px; display: grid; place-items: center; padding: 0 5px; }
.sidebar .foot { padding: 14px 18px; border-top: 1px solid rgba(255,255,255,.08); font-size: 11.5px; color: rgba(255,255,255,.42); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 62px; background: #fff; border-bottom: 1px solid var(--c-line);
  display: flex; align-items: center; gap: 16px; padding: 0 22px; position: sticky; top: 0; z-index: 20;
}
.topbar .crumb { font-size: 13.5px; color: var(--c-text-2); }
.topbar .crumb b { color: var(--c-text); font-weight: 600; }
.topbar .spacer { flex: 1; }
.topbar .search { position: relative; }
.topbar .search input { width: 240px; height: 34px; border-radius: 17px; border: 1px solid var(--c-line); padding: 0 14px 0 34px; background: #f7f9fc; font-size: 13px; outline: none; }
.topbar .search .si { position: absolute; left: 12px; top: 7px; color: var(--c-text-3); font-size: 13px; }
.topbar .clock { font-size: 12.5px; color: var(--c-text-3); font-variant-numeric: tabular-nums; }
.user-chip { display: flex; align-items: center; gap: 9px; padding: 5px 10px 5px 6px; border-radius: 20px; background: #f4f7fb; cursor: pointer; }
.user-chip .av { width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(135deg, #2a6cab, #1c4e80); color: #fff; display: grid; place-items: center; font-size: 12px; }
.user-chip .nm { font-size: 13px; font-weight: 500; }
.user-chip .rl { font-size: 11px; color: var(--c-text-3); }

.content { padding: 20px 22px 32px; flex: 1; }

/* ---------------------------------------------------------------- 通用组件 */
.card { background: var(--c-card); border-radius: var(--radius); box-shadow: var(--shadow-1); border: 1px solid var(--c-line-2); }
.card-hd { display: flex; align-items: center; gap: 10px; padding: 15px 18px 12px; }
.card-hd h3 { margin: 0; font-size: 14.5px; font-weight: 600; }
.card-hd .sub { font-size: 12px; color: var(--c-text-3); }
.card-hd .spacer { flex: 1; }
.card-bd { padding: 4px 18px 16px; }

.page-hd { display: flex; align-items: flex-end; gap: 14px; margin-bottom: 16px; }
.page-hd h2 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: .5px; }
.page-hd p { margin: 0; font-size: 12.5px; color: var(--c-text-3); }
.page-hd .spacer { flex: 1; }

.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 14px; }
.stat {
  background: #fff; border-radius: var(--radius); padding: 16px 18px; border: 1px solid var(--c-line-2);
  box-shadow: var(--shadow-1); position: relative; overflow: hidden;
}
.stat .lb { font-size: 12.5px; color: var(--c-text-2); display: flex; align-items: center; gap: 6px; }
.stat .v { font-size: 30px; font-weight: 600; letter-spacing: .5px; margin-top: 6px; font-variant-numeric: tabular-nums; }
.stat .v small { font-size: 13px; font-weight: 400; color: var(--c-text-3); margin-left: 4px; }
.stat .ft { font-size: 12px; color: var(--c-text-3); margin-top: 4px; }
.stat::after { content: ""; position: absolute; right: -18px; top: -18px; width: 74px; height: 74px; border-radius: 50%; background: rgba(42,108,171,.06); }
.stat.red .v { color: var(--c-red); }
.stat.orange .v { color: var(--c-orange); }
.stat.blue .v { color: var(--c-blue); }
.stat.green .v { color: var(--c-green); }

.grid-2 { display: grid; grid-template-columns: 1.35fr 1fr; gap: 14px; }
.grid-2b { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.chart { width: 100%; height: 268px; }

.tag { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 4px; font-size: 12px; line-height: 1; white-space: nowrap; }
.tag.lv-RED { background: #fbeaea; color: var(--c-red); }
.tag.lv-ORANGE { background: #fdf0e7; color: var(--c-orange); }
.tag.lv-YELLOW { background: #fbf5e3; color: #a8761a; }
.tag.lv-BLUE { background: #eaf1f9; color: var(--c-blue); }
.tag.lv-NONE { background: #f2f4f7; color: var(--c-text-3); }
.tag.st { background: #f2f5f9; color: var(--c-text-2); }
.tag.st-VERIFY { background: #fff4e5; color: #b67212; }
.tag.st-GRADE { background: #eef4ff; color: #2a6cab; }
.tag.st-DISPATCH { background: #eaf1f9; color: #1c4e80; }
.tag.st-PROCESSING { background: #eef7f2; color: #2f7f5e; }
.tag.st-VISIT { background: #f2f0fa; color: #6b58b8; }
.tag.st-CLOSED { background: #f1f4f7; color: #5b6b7f; }
.tag.overdue { background: #fbeaea; color: var(--c-red); font-weight: 500; }

.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar .spacer { flex: 1; }
.seg { display: inline-flex; background: #eff3f8; border-radius: 8px; padding: 3px; gap: 2px; }
.seg button {
  border: none; background: transparent; padding: 6px 12px; border-radius: 6px; font-size: 13px;
  color: var(--c-text-2); cursor: pointer; white-space: nowrap;
}
.seg button.on { background: #fff; color: var(--c-primary); box-shadow: 0 1px 3px rgba(20,40,70,.1); font-weight: 500; }
.seg button .n { color: var(--c-text-3); font-size: 11.5px; margin-left: 3px; }

.inp, .sel {
  height: 34px; border: 1px solid var(--c-line); border-radius: 8px; padding: 0 12px; font-size: 13px;
  color: var(--c-text); background: #fff; outline: none;
}
.inp:focus, .sel:focus { border-color: var(--c-primary-3); box-shadow: 0 0 0 3px rgba(42,108,171,.1); }
.inp.wide { width: 260px; }

.btn {
  height: 34px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--c-line);
  background: #fff; color: var(--c-text); font-size: 13px; cursor: pointer; display: inline-flex;
  align-items: center; gap: 6px; transition: .15s;
}
.btn:hover { border-color: var(--c-primary-3); color: var(--c-primary); }
.btn.primary { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.btn.primary:hover { background: var(--c-primary-2); color: #fff; }
.btn.danger { color: var(--c-red); border-color: #f0d5d5; }
.btn.danger:hover { background: #fbeaea; }
.btn.ghost { background: transparent; }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12px; border-radius: 6px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.tbl { width: 100%; border-collapse: collapse; }
.tbl th {
  text-align: left; font-weight: 500; font-size: 12.5px; color: var(--c-text-2);
  background: #f7f9fc; padding: 10px 12px; border-bottom: 1px solid var(--c-line); white-space: nowrap;
}
.tbl td { padding: 11px 12px; border-bottom: 1px solid var(--c-line-2); font-size: 13px; vertical-align: middle; }
.tbl tr:hover td { background: #fafcff; }
.tbl .num { font-variant-numeric: tabular-nums; }
.tbl .emp { color: var(--c-text-3); }
.tbl .name-cell { font-weight: 500; }
.tbl-wrap { overflow-x: auto; }

.pager { display: flex; align-items: center; gap: 8px; justify-content: flex-end; padding: 12px 4px 2px; font-size: 12.5px; color: var(--c-text-2); }
.pager button { height: 28px; min-width: 28px; border-radius: 6px; border: 1px solid var(--c-line); background: #fff; cursor: pointer; }
.pager button:disabled { opacity: .4; cursor: not-allowed; }

.empty { padding: 40px 0; text-align: center; color: var(--c-text-3); font-size: 13px; }

/* ---------------------------------------------------------------- 抽屉 / 弹窗 */
.mask { position: fixed; inset: 0; background: rgba(15, 30, 50, .42); opacity: 0; pointer-events: none; transition: .2s; z-index: 60; }
.mask.on { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; height: 100vh; width: 760px; max-width: 92vw; background: #fff;
  transform: translateX(100%); transition: transform .26s cubic-bezier(.4,0,.2,1); z-index: 70;
  display: flex; flex-direction: column; box-shadow: var(--shadow-2);
}
.drawer.on { transform: translateX(0); }
.drawer-hd { padding: 16px 22px; border-bottom: 1px solid var(--c-line); display: flex; align-items: center; gap: 10px; }
.drawer-hd h3 { margin: 0; font-size: 16px; font-weight: 600; }
.drawer-hd .sub { font-size: 12px; color: var(--c-text-3); }
.drawer-hd .x { margin-left: auto; width: 30px; height: 30px; border-radius: 6px; border: none; background: #f3f6fa; cursor: pointer; color: var(--c-text-2); font-size: 16px; }
.drawer-bd { padding: 18px 22px; overflow-y: auto; flex: 1; }
.drawer-ft { padding: 12px 22px; border-top: 1px solid var(--c-line); display: flex; gap: 10px; justify-content: flex-end; background: #fcfdff; }

.sect { margin-bottom: 20px; }
.sect h4 { margin: 0 0 10px; font-size: 13.5px; font-weight: 600; color: var(--c-text); display: flex; align-items: center; gap: 8px; }
.sect h4::before { content: ""; width: 3px; height: 13px; border-radius: 2px; background: var(--c-primary-2); }
.kv { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 16px; }
.kv .k { font-size: 12px; color: var(--c-text-3); }
.kv .v { font-size: 13.5px; color: var(--c-text); margin-top: 1px; }
.kv .v.big { font-size: 16px; font-weight: 600; }

.alert-box { background: #fbf7ee; border: 1px solid #f0e2c6; border-radius: 8px; padding: 12px 14px; font-size: 12.5px; color: #7a5a17; line-height: 1.7; }
.alert-box.red { background: #fdf2f2; border-color: #f4d7d7; color: #8f2f2f; }
.alert-box.info { background: #f2f7fd; border-color: #d7e4f3; color: #24548c; }

.timeline { position: relative; padding-left: 20px; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 1px; background: var(--c-line); }
.tl-item { position: relative; padding-bottom: 16px; }
.tl-item::before { content: ""; position: absolute; left: -19px; top: 5px; width: 9px; height: 9px; border-radius: 50%; background: #cbd5e1; box-shadow: 0 0 0 3px #fff; }
.tl-item.done::before { background: var(--c-primary-2); }
.tl-item .t { font-size: 13px; font-weight: 500; }
.tl-item .m { font-size: 12px; color: var(--c-text-3); margin-top: 2px; }

.pill-list { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { font-size: 12.5px; padding: 6px 10px; border-radius: 6px; background: #f4f7fb; color: var(--c-text-2); border: 1px solid var(--c-line-2); }
.pill.sel { background: #e9f1fa; border-color: #b9d2ea; color: var(--c-primary); }

.score-bar { height: 8px; border-radius: 5px; background: #edf1f6; overflow: hidden; }
.score-bar span { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, #4a8ac4, #1c4e80); }

.modal { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -46%) scale(.98); width: 520px; max-width: 92vw; background: #fff; border-radius: 12px; z-index: 80; opacity: 0; pointer-events: none; transition: .2s; box-shadow: var(--shadow-2); }
.modal.on { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%) scale(1); }
.modal-hd { padding: 16px 20px; border-bottom: 1px solid var(--c-line); font-size: 15px; font-weight: 600; }
.modal-bd { padding: 18px 20px; max-height: 62vh; overflow-y: auto; }
.modal-ft { padding: 12px 20px 16px; display: flex; justify-content: flex-end; gap: 10px; }

.toast {
  position: fixed; left: 50%; top: 24px; transform: translateX(-50%) translateY(-12px);
  background: #1d2939; color: #fff; padding: 10px 18px; border-radius: 8px; font-size: 13px;
  opacity: 0; pointer-events: none; transition: .25s; z-index: 200; box-shadow: var(--shadow-2);
}
.toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: #b33232; }

/* 学生卡片 */
.stu-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stu-card { background: #fff; border: 1px solid var(--c-line-2); border-radius: 10px; padding: 14px; cursor: pointer; transition: .15s; box-shadow: var(--shadow-1); }
.stu-card:hover { transform: translateY(-2px); border-color: #c8dbef; }
.stu-card .top { display: flex; align-items: center; gap: 10px; }
.stu-card .ava { width: 38px; height: 38px; border-radius: 10px; background: linear-gradient(135deg, #e8f0f9, #d4e3f2); color: var(--c-primary); display: grid; place-items: center; font-weight: 600; font-size: 14px; }
.stu-card .nm { font-size: 14.5px; font-weight: 600; }
.stu-card .meta { font-size: 12px; color: var(--c-text-3); }
.stu-card .tags { margin-top: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.stu-card .foot { margin-top: 10px; display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--c-text-3); }

/* 看板 */
.kanban { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.kcol { background: #f7f9fc; border-radius: 10px; padding: 10px; min-height: 220px; border: 1px solid var(--c-line-2); }
.kcol h4 { margin: 0 0 10px; font-size: 13px; font-weight: 600; color: var(--c-text-2); display: flex; align-items: center; gap: 6px; }
.kcol h4 .n { margin-left: auto; background: #fff; border-radius: 10px; padding: 0 8px; font-size: 11.5px; color: var(--c-text-3); }
.kcard { background: #fff; border-radius: 8px; padding: 11px 12px; margin-bottom: 8px; border: 1px solid var(--c-line-2); cursor: pointer; box-shadow: 0 1px 2px rgba(20,40,70,.04); }
.kcard:hover { border-color: #c8dbef; }
.kcard .l1 { display: flex; align-items: center; gap: 6px; }
.kcard .nm { font-size: 13.5px; font-weight: 600; }
.kcard .l2 { font-size: 12px; color: var(--c-text-3); margin-top: 5px; }
.kcard .l3 { font-size: 12px; color: var(--c-text-2); margin-top: 6px; display: flex; gap: 6px; align-items: center; }

/* 移动端 ---------------------------------------------------------------- */
.m-body { background: #f2f5f9; min-height: 100vh; padding-bottom: 68px; max-width: 560px; margin: 0 auto; position: relative; }
.m-hd {
  background: linear-gradient(135deg, #163f68, #2a6cab); color: #fff; padding: 18px 16px 18px;
  position: sticky; top: 0; z-index: 10;
}
.m-hd .t1 { font-size: 16px; font-weight: 600; }
.m-hd .t2 { font-size: 12px; color: rgba(255,255,255,.72); margin-top: 2px; }
.m-hd .who { display: flex; align-items: center; gap: 10px; }
.m-hd .who .av { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.16); display: grid; place-items: center; font-size: 14px; }
.m-sec { padding: 14px 14px 0; }
.m-sec h3 { font-size: 14px; margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.m-sec h3 .spacer { flex: 1; }
.m-sec h3 a { font-size: 12px; color: var(--c-text-3); font-weight: 400; }
.m-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.m-stat { background: #fff; border-radius: 12px; padding: 12px; text-align: center; box-shadow: var(--shadow-1); }
.m-stat .v { font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.m-stat .l { font-size: 11.5px; color: var(--c-text-3); margin-top: 2px; }
.m-card { background: #fff; border-radius: 12px; padding: 14px; margin-bottom: 10px; box-shadow: var(--shadow-1); }
.m-card .h { display: flex; align-items: center; gap: 8px; }
.m-card .h .nm { font-size: 15px; font-weight: 600; }
.m-card .lines { margin-top: 8px; font-size: 12.5px; color: var(--c-text-2); line-height: 1.8; }
.m-card .ops { display: flex; gap: 8px; margin-top: 12px; }
.m-card .ops .btn { flex: 1; height: 36px; justify-content: center; }
.m-nav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 560px;
  background: #fff; border-top: 1px solid var(--c-line); display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 6px 0 8px; z-index: 30;
}
.m-nav a { text-align: center; font-size: 11px; color: var(--c-text-3); cursor: pointer; }
.m-nav a .ic { display: block; font-size: 19px; line-height: 1.3; }
.m-nav a.on { color: var(--c-primary); font-weight: 500; }
.m-filter { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.m-filter .chip { flex: 0 0 auto; padding: 6px 12px; border-radius: 16px; background: #fff; border: 1px solid var(--c-line); font-size: 12.5px; color: var(--c-text-2); }
.m-filter .chip.on { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }

/* 大屏 ---------------------------------------------------------------- */
.screen-body {
  margin: 0; background: #061426; color: #dbe9f7; min-height: 100vh; overflow: hidden;
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}
.scr { width: 100vw; height: 100vh; padding: 14px 18px 18px; display: flex; flex-direction: column; gap: 12px;
  background:
    radial-gradient(1200px 600px at 20% -10%, rgba(43,108,171,.35), transparent 60%),
    radial-gradient(900px 500px at 90% 10%, rgba(24,72,120,.4), transparent 55%),
    linear-gradient(180deg, #071A30 0%, #05101F 100%);
}
.scr-hd { display: flex; align-items: center; gap: 16px; height: 56px; position: relative; }
.scr-hd h1 { margin: 0; font-size: 26px; letter-spacing: 4px; font-weight: 600;
  background: linear-gradient(180deg, #ffffff, #9cc4e8); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.scr-hd .line { flex: 1; height: 1px; background: linear-gradient(90deg, rgba(110,170,220,.6), transparent); }
.scr-hd .tm { font-size: 13px; color: #7fa6c8; font-variant-numeric: tabular-nums; }
.scr-kpi { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.kpi { background: linear-gradient(180deg, rgba(28,78,128,.55), rgba(12,38,66,.5)); border: 1px solid rgba(88,152,205,.28);
  border-radius: 6px; padding: 10px 14px; position: relative; overflow: hidden; }
.kpi .l { font-size: 12px; color: #8fb4d4; letter-spacing: 1px; }
.kpi .v { font-size: 28px; font-weight: 600; font-variant-numeric: tabular-nums; color: #eaf4ff; margin-top: 2px; }
.kpi .v small { font-size: 12px; color: #8fb4d4; margin-left: 3px; }
.kpi::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; background: #3f7fbd; }
.kpi.r::before { background: #d9534f; } .kpi.o::before { background: #e08a3c; }
.scr-grid { flex: 1; display: grid; grid-template-columns: 1.1fr 1.3fr 1fr; grid-template-rows: 1.25fr 1fr; gap: 12px; min-height: 0; }
.panel { background: linear-gradient(180deg, rgba(14,40,70,.72), rgba(9,26,46,.72)); border: 1px solid rgba(88,152,205,.22);
  border-radius: 6px; display: flex; flex-direction: column; min-height: 0; position: relative; }
.panel .ph { padding: 9px 14px; font-size: 13.5px; letter-spacing: 1.5px; color: #a9cbe8; border-bottom: 1px solid rgba(88,152,205,.16); display: flex; align-items: center; gap: 8px; }
.panel .ph::before { content: ""; width: 3px; height: 12px; background: #4a90c8; border-radius: 2px; }
.panel .ph .spacer { flex: 1; }
.panel .pb { flex: 1; min-height: 0; position: relative; }
.panel .pb .chart { position: absolute; inset: 4px; width: auto; height: auto; }
.scr-list { position: absolute; inset: 0; overflow: hidden; padding: 6px 12px; }
.scr-row { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-bottom: 1px dashed rgba(88,152,205,.16); font-size: 12.5px; }
.scr-row .t { color: #7fa6c8; font-variant-numeric: tabular-nums; width: 46px; }
.scr-row .nm { color: #dbe9f7; width: 60px; }
.scr-row .sc { color: #8fb4d4; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lv-dot { width: 7px; height: 7px; border-radius: 50%; }
.scr-ft { height: 24px; display: flex; align-items: center; gap: 18px; font-size: 11.5px; color: #5e86a8; }
.scr-ft .spacer { flex: 1; }
.blink { animation: blink 2s infinite; }
@keyframes blink { 0%,100% { opacity: 1 } 50% { opacity: .45 } }


/* ---------------------------------------------------------------- 移动端适配（登录页） */
@media (max-width: 820px) {
  .login-wrap { grid-template-columns: 1fr; min-height: 100vh; }
  .login-left { padding: 44px 24px 20px; justify-content: flex-start; }
  .login-left .brand-line { font-size: 11px; letter-spacing: 3px; }
  .login-left h1 { font-size: 26px; line-height: 1.4; margin: 12px 0 10px; }
  .login-left h1 br { display: none; }
  .login-left p.sub { font-size: 13px; }
  .login-feats { margin-top: 22px; grid-template-columns: 1fr 1fr; gap: 10px; }
  .login-feat { padding: 10px 12px; }
  .login-feat b { font-size: 12.5px; }
  .login-feat span { font-size: 11.5px; }
  .login-right { padding: 26px 24px 44px; border-radius: 18px 18px 0 0; }
  .login-card { max-width: 100%; }
  .login-card h2 { font-size: 19px; }
  .login-card .hint { margin-bottom: 18px; }
  .demo-chips { gap: 8px; }
}

@media (max-width: 1500px) {
  .kpi .v { font-size: 24px; }
  .scr-hd h1 { font-size: 22px; }
}

/* ---------------------------------------------------------------- 智能感知 */
.vz-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.vz-title { font-size: 20px; margin: 0 0 4px; font-weight: 600; }
.vz-sub { font-size: 12.5px; color: var(--c-text-3); }
.vz-sub b { color: var(--c-primary); }
.vz-kpi { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.vc { background: #fff; border-radius: 12px; padding: 16px 18px; box-shadow: var(--shadow-1); border: 1px solid #eef3f9; }
.vc .l { font-size: 12.5px; color: var(--c-text-3); }
.vc .v { font-size: 27px; font-weight: 600; font-variant-numeric: tabular-nums; margin: 6px 0 4px; letter-spacing: -.5px; }
.vc .v em { font-style: normal; font-size: 12.5px; font-weight: 400; color: var(--c-text-3); margin-left: 4px; }
.vc .v.warn { color: #d97706; }
.vc .v.ok { color: #0f8f5f; }
.vc .f { font-size: 12px; color: var(--c-text-3); }

.vz-grid { display: grid; grid-template-columns: 348px 1fr; gap: 16px; align-items: start; }
.vz-cams { padding: 14px 0 6px; }
.vz-cams .ph { padding: 0 16px 10px; }
.cam-hint { padding: 0 16px 10px; font-size: 12px; color: var(--c-text-3); }
.cam-list { max-height: 620px; overflow-y: auto; padding: 0 8px 8px; }
.cam-grp { font-size: 12px; color: var(--c-text-3); padding: 8px 8px 6px; display: flex; gap: 6px; align-items: center; }
.cam-grp span { background: #eef3f9; color: var(--c-primary); border-radius: 9px; padding: 0 7px; font-size: 11px; }
.cam-item { display: flex; align-items: center; gap: 9px; padding: 9px; border-radius: 8px; background: #f9fbfd; margin-bottom: 6px; border: 1px solid #eef3f9; }
.cam-item.off { opacity: .55; }
.cam-item .led { width: 8px; height: 8px; border-radius: 50%; background: #16a34a; box-shadow: 0 0 0 3px rgba(22,163,74,.12); flex: 0 0 auto; }
.cam-item.off .led { background: #c0392b; box-shadow: 0 0 0 3px rgba(192,57,43,.12); }
.cam-item .ci { flex: 1; min-width: 0; }
.cam-item .n { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cam-item .s { font-size: 11.5px; color: var(--c-text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cam-item .cap { font-size: 11px; color: var(--c-primary); background: #eef3f9; border-radius: 6px; padding: 2px 6px; flex: 0 0 auto; }

.vz-events { min-width: 0; }
.vz-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.vz-toolbar .count { font-size: 12px; color: var(--c-text-3); }
.snap-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(272px, 1fr)); gap: 14px; max-height: 1180px; overflow-y: auto; padding-right: 4px; }

.snap-card { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-1); border: 1px solid #eef3f9; display: flex; flex-direction: column; }
.snap-card.done { border-color: #bfe6d2; }
.snap-card.muted { opacity: .72; }
.snap-frame { position: relative; height: 158px; background: linear-gradient(140deg, #24384c 0%, #16283a 45%, #0e1c2b 100%); overflow: hidden; }
.snap-frame.night { background: linear-gradient(140deg, #101f2e 0%, #0a1520 55%, #050c14 100%); }
.snap-frame::before { content: ''; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 22px 22px; }
.snap-frame::after { content: ''; position: absolute; left: 0; right: 0; height: 60px; top: -60px;
  background: linear-gradient(180deg, transparent, rgba(120,200,255,.16), transparent); animation: scanmove 4.6s linear infinite; }
@keyframes scanmove { 0% { top: -60px; } 100% { top: 160px; } }
.snap-face { position: absolute; left: 50%; top: 46px; width: 52px; height: 64px; margin-left: -26px; border: 1.5px solid rgba(88,196,255,.85); border-radius: 6px; box-shadow: 0 0 0 1px rgba(88,196,255,.25), inset 0 0 18px rgba(88,196,255,.12); }
.snap-face.hi { border-color: rgba(255,214,102,.9); box-shadow: 0 0 0 1px rgba(255,214,102,.3), inset 0 0 18px rgba(255,214,102,.12); }
.snap-face .nm { position: absolute; left: -4px; top: -19px; font-size: 10.5px; color: #cde8ff; background: rgba(10,30,48,.75); padding: 1px 5px; border-radius: 3px; white-space: nowrap; }
.snap-hud { position: absolute; left: 8px; right: 8px; display: flex; justify-content: space-between; font-size: 10.5px; color: rgba(200,225,245,.82); letter-spacing: .3px; }
.snap-hud.top { top: 7px; }
.snap-hud.bottom { bottom: 7px; font-variant-numeric: tabular-nums; }
.snap-hud .rec { color: #ff6b6b; }
.snap-bh { position: absolute; left: 8px; bottom: 24px; font-size: 11.5px; color: #eaf4ff; background: rgba(12,32,50,.72); padding: 2px 7px; border-radius: 4px; border: 1px solid rgba(120,190,255,.28); }
.snap-mask { position: absolute; right: 8px; top: 24px; font-size: 10px; color: rgba(180,205,225,.6); border: 1px dashed rgba(180,205,225,.35); border-radius: 3px; padding: 0 4px; }
.snap-body { padding: 11px 12px 12px; display: flex; flex-direction: column; gap: 6px; }
.snap-body .row1 { display: flex; align-items: center; gap: 6px; }
.snap-body .row1 .tm { font-size: 11.5px; color: var(--c-text-3); font-variant-numeric: tabular-nums; }
.snap-body .meta { font-size: 12px; color: var(--c-text-2); line-height: 1.6; overflow-wrap: anywhere; }
.snap-body .meta.rule { color: var(--c-text-3); font-size: 11.5px; }
.snap-body .ops { display: flex; gap: 8px; margin-top: 4px; align-items: center; }
.snap-body .ops .btn { height: 30px; font-size: 12.5px; padding: 0 12px; }
.snap-body .done-note { font-size: 11.5px; color: #0f8f5f; }
.vz-rules { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 16px; }
.vz-rules .ru { background: #fff; border: 1px solid #eef3f9; border-radius: 10px; padding: 13px 14px; box-shadow: var(--shadow-1); }
.vz-rules .ru b { display: block; font-size: 13px; color: var(--c-primary); margin-bottom: 5px; }
.vz-rules .ru span { font-size: 12px; color: var(--c-text-3); line-height: 1.8; }
.panel .ph .sub { font-weight: 400; font-size: 12px; color: var(--c-text-3); margin-left: 8px; }
.risk { display: inline-block; min-width: 34px; text-align: center; background: #fff4e5; color: #b45309; border-radius: 6px; font-weight: 600; font-size: 12px; padding: 1px 6px; }
.loading { padding: 80px 0; text-align: center; color: var(--c-text-3); font-size: 13px; }
@media (max-width: 1400px) { .vz-grid { grid-template-columns: 300px 1fr; } .vz-rules { grid-template-columns: 1fr 1fr; } }

/* 大屏 · 智能感知滚动条 */
.scr-ticker { height: 34px; display: flex; align-items: center; gap: 12px; margin: 2px 0 4px;
  background: linear-gradient(90deg, rgba(24,74,116,.55), rgba(16,48,80,.35)); border: 1px solid rgba(79,141,192,.28); border-radius: 6px; padding: 0 12px; overflow: hidden; }
.scr-ticker .tk-label { flex: 0 0 auto; font-size: 11.5px; color: #7fd3ff; border: 1px solid rgba(127,211,255,.4); border-radius: 4px; padding: 1px 7px; letter-spacing: 1px; }
.scr-ticker .tk-track { flex: 1; overflow: hidden; position: relative; height: 100%; }
.scr-ticker .tk-run { position: absolute; white-space: nowrap; display: flex; gap: 34px; align-items: center; height: 100%; animation: tkrun 42s linear infinite; }
.scr-ticker .tk-run:hover { animation-play-state: paused; }
@keyframes tkrun { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
.scr-ticker .tk-item { font-size: 12px; color: #b9d6ec; display: flex; gap: 8px; align-items: center; }
.scr-ticker .tk-item b { color: #e7f4ff; font-weight: 500; }
.scr-ticker .tk-item .lv { font-size: 11px; border-radius: 3px; padding: 0 5px; }
.scr-ticker .tk-stat { flex: 0 0 auto; font-size: 11.5px; color: #6f9dc0; }
.scr-ticker .lv-RED { background: rgba(217,83,79,.16); color: #ff8b86; border: 1px solid rgba(217,83,79,.4); }
.scr-ticker .lv-ORANGE { background: rgba(224,138,60,.16); color: #ffbb84; border: 1px solid rgba(224,138,60,.4); }
.scr-ticker .lv-YELLOW { background: rgba(217,178,60,.16); color: #f0d98a; border: 1px solid rgba(217,178,60,.4); }
.scr-ticker .lv-BLUE { background: rgba(74,144,200,.16); color: #93c8f0; border: 1px solid rgba(74,144,200,.4); }
