/* ==========================================================================
   基层综治事件上报与办理平台 · 后台管理样式
   设计语言：大气简约 · 政务深蓝 + 三色风险分级
   ========================================================================== */

:root {
  --bg: #F2F4F8;
  --panel: #FFFFFF;
  --ink: #111A2E;
  --ink-2: #4A5A75;
  --ink-3: #8A97AC;
  --line: #E6EAF2;
  --line-2: #EFF2F7;
  --brand: #1D4ED8;
  --brand-2: #2F6BFF;
  --brand-dark: #0D1B34;
  --brand-soft: #EEF3FF;
  --blue: #2F6BFF;
  --orange: #F08C00;
  --red: #E03E48;
  --green: #12A150;
  --purple: #7C5CFC;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(17, 26, 46, .04), 0 10px 28px rgba(17, 26, 46, .06);
  --shadow-sm: 0 1px 2px rgba(17, 26, 46, .05);
  --side-w: 236px;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
          "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC", sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p { margin: 0; }
a { color: var(--brand); text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.hidden { display: none !important; }
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

/* ---------------- 滚动条 ---------------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #D3DAE6; border-radius: 8px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #B9C3D4; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ==========================================================================
   登录
   ========================================================================== */
.login {
  position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
  background: #0B1730; overflow: hidden; z-index: 50;
}
.login-bg {
  position: absolute; inset: -20%;
  background:
    radial-gradient(58% 46% at 18% 22%, rgba(47, 107, 255, .38) 0%, rgba(47, 107, 255, 0) 62%),
    radial-gradient(48% 42% at 82% 76%, rgba(124, 92, 252, .30) 0%, rgba(124, 92, 252, 0) 60%),
    linear-gradient(150deg, #0B1730 0%, #12244A 48%, #0B1730 100%);
}
.login-bg::after {
  content: ""; position: absolute; inset: 0; opacity: .16;
  background-image: linear-gradient(rgba(255,255,255,.6) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.6) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(70% 60% at 50% 40%, #000 0%, transparent 78%);
          mask-image: radial-gradient(70% 60% at 50% 40%, #000 0%, transparent 78%);
}
.login-card {
  position: relative; width: 420px; max-width: calc(100vw - 32px);
  background: rgba(255, 255, 255, .97); border-radius: 20px; padding: 34px 32px 26px;
  box-shadow: 0 30px 80px rgba(3, 10, 26, .5);
}
.login-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; }
.brand-mark {
  width: 46px; height: 46px; flex: 0 0 46px; border-radius: 13px;
  background: linear-gradient(145deg, var(--brand-2), var(--brand));
  color: #fff; font-size: 22px; font-weight: 700; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 18px rgba(29, 78, 216, .35);
}
.login-brand h1 { font-size: 19px; letter-spacing: .5px; }
.login-brand p { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.login-form { display: flex; flex-direction: column; gap: 14px; }
.fld { display: block; }
.fld > span { display: block; font-size: 12.5px; color: var(--ink-2); margin-bottom: 6px; font-weight: 500; }
.fld input, .fld select, .fld textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: #FBFCFE; outline: none; transition: border-color .16s, box-shadow .16s, background .16s;
}
.fld input:focus, .fld select:focus, .fld textarea:focus {
  border-color: var(--brand-2); background: #fff; box-shadow: 0 0 0 3px rgba(47, 107, 255, .12);
}
.fld textarea { resize: vertical; min-height: 84px; line-height: 1.7; }
.fld .tip { font-size: 11.5px; color: var(--ink-3); margin-top: 5px; }
.fld.err input, .fld.err select, .fld.err textarea { border-color: var(--red); background: #FFF7F7; }
.fld .errmsg { display: none; font-size: 11.5px; color: var(--red); margin-top: 5px; }
.fld.err .errmsg { display: block; }
.req::after { content: " *"; color: var(--red); }
.login-error {
  background: #FFF1F1; border: 1px solid #FFD9D9; color: #C42B35;
  padding: 8px 11px; border-radius: 9px; font-size: 12.5px;
}
.login-demo { margin-top: 22px; border-top: 1px dashed var(--line); padding-top: 16px; }
.login-demo-title { font-size: 12px; color: var(--ink-3); margin-bottom: 9px; }
.demo-accounts { display: flex; gap: 8px; }
.demo {
  flex: 1; border: 1px solid var(--line); background: #fff; border-radius: 10px;
  padding: 8px 6px; cursor: pointer; text-align: center; transition: .16s;
}
.demo:hover { border-color: var(--brand-2); background: var(--brand-soft); }
.demo b { display: block; font-size: 12px; font-weight: 600; }
.demo i { display: block; font-style: normal; font-size: 10.5px; color: var(--ink-3); margin-top: 1px; }

/* ==========================================================================
   框架布局
   ========================================================================== */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--side-w); flex: 0 0 var(--side-w); background: var(--brand-dark);
  color: #C6D2E8; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.side-brand { display: flex; align-items: center; gap: 11px; padding: 20px 18px 18px; }
.side-brand .brand-mark { width: 38px; height: 38px; flex: 0 0 38px; font-size: 18px; border-radius: 11px; }
.side-brand-text b { display: block; color: #fff; font-size: 14.5px; letter-spacing: .3px; }
.side-brand-text i { display: block; font-style: normal; font-size: 11px; color: #7E8FB0; margin-top: 1px; }
.side-nav { flex: 1; overflow-y: auto; padding: 6px 12px 16px; }
.side-group { font-size: 10.5px; color: #6C7C9C; letter-spacing: 1.4px; padding: 16px 10px 7px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 10px;
  cursor: pointer; color: #B9C6DE; font-size: 13.5px; margin-bottom: 3px; position: relative;
  transition: background .15s, color .15s; user-select: none;
}
.nav-item:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nav-item.active { background: linear-gradient(90deg, rgba(47,107,255,.92), rgba(47,107,255,.55)); color: #fff; box-shadow: 0 6px 16px rgba(15, 42, 110, .45); }
.nav-item .ico { width: 17px; height: 17px; flex: 0 0 17px; }
.nav-item .badge-dot {
  margin-left: auto; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px;
  background: var(--red); color: #fff; font-size: 11px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}
.side-foot { border-top: 1px solid rgba(255, 255, 255, .09); padding: 12px; display: flex; align-items: center; gap: 8px; }
.side-user { display: flex; align-items: center; gap: 9px; flex: 1; min-width: 0; }
.avatar {
  width: 32px; height: 32px; flex: 0 0 32px; border-radius: 50%; background: rgba(255,255,255,.14);
  color: #fff; font-size: 13px; display: flex; align-items: center; justify-content: center; font-weight: 600;
}
.side-user-text { min-width: 0; }
.side-user-text b { display: block; color: #fff; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user-text i { display: block; font-style: normal; font-size: 10.5px; color: #7E8FB0; white-space: nowrap; }
.btn-ghost {
  background: transparent; border: 1px solid rgba(255,255,255,.18); color: #C6D2E8;
  border-radius: 8px; padding: 4px 9px; cursor: pointer; font-size: 12px; transition: .15s;
}
.btn-ghost:hover { background: rgba(255,255,255,.1); color: #fff; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 66px; background: rgba(255,255,255,.9); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 18px;
  padding: 0 24px; position: sticky; top: 0; z-index: 20;
}
.topbar-left { min-width: 0; }
.topbar-left h2 { font-size: 17px; letter-spacing: .3px; }
.topbar-left p { font-size: 12px; color: var(--ink-3); margin-top: 1px; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.search { position: relative; }
.search .ico { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--ink-3); }
.search input {
  width: 260px; padding: 8px 12px 8px 32px; border: 1px solid var(--line); border-radius: 999px;
  background: #F7F9FC; outline: none; transition: .16s;
}
.search input:focus { background: #fff; border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(47,107,255,.1); width: 300px; }
.clock { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.view { padding: 22px 24px 8px; flex: 1; }
.foot { padding: 14px 24px 22px; font-size: 11.5px; color: var(--ink-3); }
.foot code { background: #fff; padding: 1px 5px; border-radius: 4px; border: 1px solid var(--line); }

/* ==========================================================================
   通用控件
   ========================================================================== */
.ico { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line);
  background: #fff; color: var(--ink); cursor: pointer; font-size: 13px; font-weight: 500;
  transition: .15s; white-space: nowrap;
}
.btn:hover { border-color: #C9D3E4; background: #FAFBFD; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: linear-gradient(135deg, var(--brand-2), var(--brand)); border-color: transparent; color: #fff; box-shadow: 0 6px 16px rgba(29,78,216,.24); }
.btn-primary:hover { filter: brightness(1.06); background: linear-gradient(135deg, var(--brand-2), var(--brand)); }
.btn-danger { background: #fff; border-color: #F3C9CB; color: var(--red); }
.btn-danger:hover { background: #FFF6F6; border-color: var(--red); }
.btn-sm { padding: 5px 10px; font-size: 12px; border-radius: 8px; }
.btn-block { width: 100%; padding: 11px; font-size: 14.5px; letter-spacing: 3px; }
.btn-link { background: none; border: none; color: var(--brand); cursor: pointer; padding: 0; font-size: 12.5px; }
.btn-link:hover { text-decoration: underline; }
.btn-link.danger { color: var(--red); }

.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card-head {
  display: flex; align-items: center; gap: 10px; padding: 15px 18px; border-bottom: 1px solid var(--line-2);
}
.card-head h3 { font-size: 14.5px; font-weight: 600; }
.card-head .sub { font-size: 12px; color: var(--ink-3); }
.card-head .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.card-body { padding: 18px; }
.card-body.tight { padding: 0; }

.tag {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 500; line-height: 20px; white-space: nowrap;
}
.tag .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tag-blue { background: #EAF1FF; color: #1D4ED8; }
.tag-orange { background: #FFF3E0; color: #B4690E; }
.tag-red { background: #FFECEC; color: #C42B35; }
.tag-green { background: #E7F7EE; color: #0B7A3C; }
.tag-gray { background: #F0F2F6; color: #5A6A85; }
.tag-purple { background: #F1EDFF; color: #5B3FD6; }
.tag-dark { background: var(--brand-dark); color: #fff; }
.tag-outline { background: #fff; border: 1px solid var(--line); color: var(--ink-2); }

.chip {
  padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff;
  font-size: 12.5px; color: var(--ink-2); cursor: pointer; transition: .14s; white-space: nowrap;
}
.chip:hover { border-color: #C9D3E4; }
.chip.on { background: var(--brand-soft); border-color: rgba(47,107,255,.4); color: var(--brand); font-weight: 600; }

/* ==========================================================================
   概览看板
   ========================================================================== */
.kpi-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; margin-bottom: 16px; }
.kpi {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 17px; position: relative; overflow: hidden; box-shadow: var(--shadow-sm);
  cursor: pointer; transition: transform .16s, box-shadow .16s;
}
.kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.kpi .k-label { font-size: 12.5px; color: var(--ink-3); display: flex; align-items: center; gap: 6px; }
.kpi .k-value { font-size: 30px; font-weight: 700; letter-spacing: -.5px; margin-top: 6px; line-height: 1.1; }
.kpi .k-sub { font-size: 11.5px; color: var(--ink-3); margin-top: 5px; }
.kpi .k-bar { position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--brand-2); }
.kpi.k-red .k-bar { background: var(--red); } .kpi.k-red .k-value { color: var(--red); }
.kpi.k-orange .k-bar { background: var(--orange); } .kpi.k-orange .k-value { color: #B4690E; }
.kpi.k-green .k-bar { background: var(--green); } .kpi.k-green .k-value { color: var(--green); }
.kpi.k-blue .k-bar { background: var(--blue); } .kpi.k-blue .k-value { color: var(--brand); }
.kpi.k-purple .k-bar { background: var(--purple); } .kpi.k-purple .k-value { color: var(--purple); }

.grid-2 { display: grid; grid-template-columns: 1.55fr 1fr; gap: 14px; margin-bottom: 16px; }
.grid-2-eq { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 16px; }

/* 柱状趋势图（纯 CSS，无依赖） */
.chart { display: flex; align-items: flex-end; gap: 6px; height: 176px; padding: 8px 2px 0; }
.chart .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
.chart .bars { display: flex; align-items: flex-end; gap: 3px; height: 100%; width: 100%; justify-content: center; }
.chart .bar { width: 9px; border-radius: 4px 4px 2px 2px; background: var(--brand-2); min-height: 2px; transition: height .5s cubic-bezier(.2,.7,.3,1); position: relative; }
.chart .bar.closed { background: #BFD3FF; }
.chart .col:hover .bar { filter: brightness(1.1); }
.chart .x { font-size: 10.5px; color: var(--ink-3); white-space: nowrap; }
.chart-legend { display: flex; gap: 14px; font-size: 11.5px; color: var(--ink-3); }
.chart-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

/* 三色环图 */
.donut-wrap { display: flex; align-items: center; gap: 20px; }
.donut {
  width: 132px; height: 132px; border-radius: 50%; flex: 0 0 132px; position: relative;
  display: flex; align-items: center; justify-content: center;
}
.donut::after { content: ""; position: absolute; inset: 20px; background: #fff; border-radius: 50%; }
.donut .donut-hole { position: relative; z-index: 1; text-align: center; }
.donut .donut-hole b { display: block; font-size: 24px; font-weight: 700; line-height: 1.1; }
.donut .donut-hole i { display: block; font-style: normal; font-size: 11px; color: var(--ink-3); }
.legend { flex: 1; display: flex; flex-direction: column; gap: 9px; }
.legend-row { display: flex; align-items: center; gap: 9px; font-size: 13px; }
.legend-row i { width: 10px; height: 10px; border-radius: 3px; flex: 0 0 10px; }
.legend-row span { color: var(--ink-2); }
.legend-row b { margin-left: auto; font-variant-numeric: tabular-nums; }
.legend-row em { font-style: normal; color: var(--ink-3); font-size: 11.5px; width: 42px; text-align: right; }

/* 横向条形 */
.hbar-list { display: flex; flex-direction: column; gap: 12px; }
.hbar { display: grid; grid-template-columns: 92px 1fr 44px; align-items: center; gap: 10px; font-size: 12.5px; }
.hbar .h-name { color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar .h-track { height: 8px; background: var(--line-2); border-radius: 999px; overflow: hidden; }
.hbar .h-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand-2), #6E9BFF); transition: width .6s cubic-bezier(.2,.7,.3,1); }
.hbar .h-val { text-align: right; color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }

/* ==========================================================================
   表格 / 筛选
   ========================================================================== */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.toolbar .spacer { flex: 1; }
.filters { display: flex; flex-wrap: wrap; gap: 9px; align-items: flex-end; padding: 14px 16px; }
.filter { display: flex; flex-direction: column; gap: 5px; }
.filter > span { font-size: 11.5px; color: var(--ink-3); }
.filter input, .filter select {
  height: 33px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px;
  background: #FBFCFE; outline: none; min-width: 128px; transition: .15s;
}
.filter input:focus, .filter select:focus { border-color: var(--brand-2); background: #fff; box-shadow: 0 0 0 3px rgba(47,107,255,.1); }
.filter input[type="date"] { min-width: 142px; }

.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tbl th {
  text-align: left; font-weight: 600; color: var(--ink-2); font-size: 12px;
  background: #FAFBFD; border-bottom: 1px solid var(--line); padding: 10px 12px; white-space: nowrap;
  position: sticky; top: 0; z-index: 1;
}
table.tbl td { padding: 11px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.tbl tbody tr { transition: background .12s; cursor: pointer; }
table.tbl tbody tr:hover { background: #F8FAFF; }
table.tbl tbody tr:last-child td { border-bottom: none; }
.cell-title { font-weight: 500; max-width: 320px; }
.cell-title .t { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cell-title .s { display: block; font-size: 11.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.cell-id { font-family: ui-monospace, Menlo, monospace; font-size: 11.5px; color: var(--ink-3); }
.cell-nowrap { white-space: nowrap; }
.row-actions { display: flex; gap: 10px; justify-content: flex-end; }

.pager { display: flex; align-items: center; gap: 8px; padding: 13px 16px; border-top: 1px solid var(--line-2); font-size: 12.5px; color: var(--ink-3); }
.pager .pages { margin-left: auto; display: flex; gap: 5px; }
.pager button {
  min-width: 30px; height: 30px; padding: 0 8px; border: 1px solid var(--line); background: #fff;
  border-radius: 8px; cursor: pointer; font-size: 12.5px; color: var(--ink-2);
}
.pager button:hover:not(:disabled) { border-color: var(--brand-2); color: var(--brand); }
.pager button.on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.pager button:disabled { opacity: .45; cursor: not-allowed; }

.empty { padding: 54px 20px; text-align: center; color: var(--ink-3); }
.empty .e-ico { font-size: 34px; opacity: .35; margin-bottom: 8px; }
.empty p { font-size: 13px; }
.empty .hint { font-size: 12px; margin-top: 4px; }

.loading { padding: 60px; text-align: center; color: var(--ink-3); font-size: 13px; }
.spinner {
  width: 22px; height: 22px; border: 2.5px solid var(--line); border-top-color: var(--brand-2);
  border-radius: 50%; margin: 0 auto 12px; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ==========================================================================
   详情页
   ========================================================================== */
.detail-head { display: flex; gap: 16px; align-items: flex-start; padding: 20px 22px; }
.detail-head .dh-main { flex: 1; min-width: 0; }
.detail-head h2 { font-size: 20px; line-height: 1.4; letter-spacing: .2px; }
.dh-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.dh-actions { display: flex; gap: 9px; flex-wrap: wrap; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 22px; padding: 14px 22px; border-top: 1px solid var(--line-2); font-size: 12.5px; color: var(--ink-3); }
.detail-meta b { color: var(--ink-2); font-weight: 600; }

.info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; }
.info-item { padding: 13px 18px; border-bottom: 1px solid var(--line-2); display: flex; gap: 14px; align-items: flex-start; }
.info-item.full { grid-column: 1 / -1; }
.info-item .k { width: 108px; flex: 0 0 108px; color: var(--ink-3); font-size: 12.5px; padding-top: 1px; }
.info-item .v { flex: 1; min-width: 0; font-size: 13.5px; word-break: break-word; white-space: pre-wrap; }
.info-item .v.muted { color: var(--ink-3); }

.level-banner { display: flex; align-items: center; gap: 12px; padding: 13px 18px; border-radius: 12px; margin-bottom: 14px; font-size: 13px; }
.level-banner.blue { background: #EAF1FF; border: 1px solid #CFE0FF; }
.level-banner.orange { background: #FFF5E6; border: 1px solid #FFE0B2; }
.level-banner.red { background: #FFEDED; border: 1px solid #FFD3D5; }
.level-banner b { font-size: 14px; }
.level-banner .lb-desc { color: var(--ink-2); font-size: 12.5px; }

/* 时间轴 */
.timeline { position: relative; padding: 4px 0 0 0; }
.tl-item { display: flex; gap: 14px; padding: 0 18px 20px; position: relative; }
.tl-item::before {
  content: ""; position: absolute; left: 26px; top: 22px; bottom: -2px; width: 2px; background: var(--line);
}
.tl-item:last-child::before { display: none; }
.tl-dot {
  width: 20px; height: 20px; flex: 0 0 20px; border-radius: 50%; background: #fff;
  border: 2px solid var(--brand-2); margin-top: 2px; position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: center;
}
.tl-dot::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--brand-2); }
.tl-item.done .tl-dot { border-color: var(--green); } .tl-item.done .tl-dot::after { background: var(--green); }
.tl-item.log .tl-dot { border-color: #C6CFDE; width: 14px; height: 14px; flex-basis: 14px; margin-left: 3px; margin-top: 5px; }
.tl-item.log .tl-dot::after { width: 5px; height: 5px; background: #C6CFDE; }
.tl-body { flex: 1; min-width: 0; }
.tl-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tl-head b { font-size: 13.5px; }
.tl-head .time { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.tl-head .who { font-size: 12px; color: var(--ink-3); margin-left: auto; }
.tl-text { margin-top: 6px; font-size: 13px; color: var(--ink-2); white-space: pre-wrap; word-break: break-word; line-height: 1.75; }

/* 附件 */
.att-list { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 9px; }
.att {
  width: 92px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff;
  cursor: pointer; transition: .15s; position: relative;
}
.att:hover { border-color: var(--brand-2); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.att .thumb { width: 100%; height: 68px; object-fit: cover; display: block; background: #F3F5F9; }
.att .file-ico { width: 100%; height: 68px; display: flex; align-items: center; justify-content: center; background: linear-gradient(140deg,#F5F7FB,#E9EDF5); color: var(--ink-3); font-size: 11px; font-weight: 600; letter-spacing: .5px; }
.att .nm { padding: 5px 6px; font-size: 10.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.att.demo .nm::after { content: " · 演示"; color: var(--ink-3); }

/* ==========================================================================
   弹窗 / 提示
   ========================================================================== */
.mask {
  position: fixed; inset: 0; background: rgba(11, 20, 40, .48); backdrop-filter: blur(2px);
  display: flex; align-items: flex-start; justify-content: center; z-index: 100; padding: 5vh 16px 16px;
  animation: fade .18s ease;
}
@keyframes fade { from { opacity: 0; } }
.modal {
  width: 720px; max-width: 100%; background: #fff; border-radius: 16px; box-shadow: 0 26px 70px rgba(6,14,32,.35);
  display: flex; flex-direction: column; max-height: 90vh; animation: pop .22s cubic-bezier(.2,.8,.3,1);
}
@keyframes pop { from { transform: translateY(-12px) scale(.985); opacity: 0; } }
.modal.sm { width: 480px; }
.modal.lg { width: 900px; }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 17px 22px; border-bottom: 1px solid var(--line-2); }
.modal-head h3 { font-size: 16px; }
.modal-head .sub { font-size: 12px; color: var(--ink-3); }
.modal-close { margin-left: auto; background: none; border: none; cursor: pointer; color: var(--ink-3); padding: 4px; border-radius: 7px; }
.modal-close:hover { background: var(--line-2); color: var(--ink); }
.modal-body { padding: 20px 22px; overflow-y: auto; flex: 1; }
.modal-foot { padding: 14px 22px; border-top: 1px solid var(--line-2); display: flex; gap: 10px; align-items: center; }
.modal-foot .left { margin-right: auto; font-size: 12px; color: var(--ink-3); }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid .span2 { grid-column: 1 / -1; }
.section-title {
  grid-column: 1 / -1; font-size: 12.5px; font-weight: 600; color: var(--brand);
  padding-top: 6px; margin-top: 2px; border-top: 1px dashed var(--line);
  display: flex; align-items: center; gap: 8px;
}
.section-title:first-child { border-top: none; margin-top: 0; padding-top: 0; }
.section-title .st-tip { font-weight: 400; color: var(--ink-3); font-size: 11.5px; }

.radio-row { display: flex; gap: 8px; flex-wrap: wrap; }
.radio-card {
  border: 1px solid var(--line); border-radius: 10px; padding: 8px 13px; cursor: pointer;
  background: #FBFCFE; font-size: 13px; transition: .15s; user-select: none; display: flex; align-items: center; gap: 7px;
}
.radio-card:hover { border-color: #C9D3E4; }
.radio-card.on { border-color: var(--brand-2); background: var(--brand-soft); color: var(--brand); font-weight: 600; box-shadow: 0 0 0 3px rgba(47,107,255,.08); }
.radio-card .dot { width: 8px; height: 8px; border-radius: 50%; }
.radio-card.lv-blue .dot { background: var(--blue); } .radio-card.lv-orange .dot { background: var(--orange); } .radio-card.lv-red .dot { background: var(--red); }

.check-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.check-card {
  border: 1px solid var(--line); border-radius: 10px; padding: 8px 11px; cursor: pointer; background: #FBFCFE;
  font-size: 12.5px; transition: .15s; user-select: none; display: flex; align-items: center; gap: 7px;
}
.check-card:hover { border-color: #C9D3E4; }
.check-card.on { border-color: var(--brand-2); background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.check-box { width: 14px; height: 14px; border: 1.5px solid #C3CCDC; border-radius: 4px; flex: 0 0 14px; position: relative; }
.check-card.on .check-box { background: var(--brand); border-color: var(--brand); }
.check-card.on .check-box::after {
  content: ""; position: absolute; left: 3.6px; top: .8px; width: 4px; height: 8px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(42deg);
}

.uploads { display: flex; flex-wrap: wrap; gap: 9px; }
.up-item { width: 86px; position: relative; }
.up-item .thumb { width: 86px; height: 64px; object-fit: cover; border-radius: 9px; border: 1px solid var(--line); display: block; background: #F3F5F9; }
.up-item .file-box {
  width: 86px; height: 64px; border-radius: 9px; border: 1px solid var(--line); background: #F7F9FC;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 10.5px; color: var(--ink-2); padding: 4px; text-align: center; word-break: break-all; overflow: hidden;
}
.up-item .nm { font-size: 10.5px; color: var(--ink-3); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.up-item .rm {
  position: absolute; top: -6px; right: -6px; width: 19px; height: 19px; border-radius: 50%;
  background: var(--red); color: #fff; border: 2px solid #fff; cursor: pointer; font-size: 11px;
  line-height: 15px; text-align: center; padding: 0;
}
.up-add {
  width: 86px; height: 64px; border: 1.5px dashed #CBD5E6; border-radius: 9px; background: #FBFCFE;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  cursor: pointer; color: var(--ink-3); font-size: 11px; transition: .15s;
}
.up-add:hover { border-color: var(--brand-2); color: var(--brand); background: var(--brand-soft); }
.up-add .plus { font-size: 19px; line-height: 1; }

.toast-root { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  background: rgba(17, 26, 46, .94); color: #fff; padding: 9px 16px; border-radius: 999px;
  font-size: 13px; box-shadow: 0 10px 26px rgba(6,14,32,.3); animation: toastIn .22s cubic-bezier(.2,.8,.3,1);
  display: flex; align-items: center; gap: 8px; max-width: 80vw;
}
.toast.ok { background: rgba(11, 122, 60, .95); }
.toast.err { background: rgba(180, 32, 42, .95); }
@keyframes toastIn { from { transform: translateY(-12px); opacity: 0; } }

/* ==========================================================================
   协助分流卡片
   ========================================================================== */
.assist-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.assist-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 17px 18px; box-shadow: var(--shadow-sm); transition: .16s; }
.assist-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.assist-card .ac-top { display: flex; gap: 10px; align-items: flex-start; }
.assist-card h4 { font-size: 15px; line-height: 1.5; flex: 1; cursor: pointer; }
.assist-card h4:hover { color: var(--brand); }
.assist-card .ac-desc { font-size: 12.5px; color: var(--ink-2); margin-top: 8px; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.assist-card .ac-note {
  margin-top: 10px; background: #FFF9EE; border: 1px solid #FFE9BF; border-radius: 10px;
  padding: 9px 11px; font-size: 12.5px; color: #8A5A09;
}
.assist-card .ac-note b { color: #7A4E05; }
.ac-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 12px; font-size: 12px; color: var(--ink-3); }
.ac-meta b { color: var(--ink-2); font-weight: 500; }
.ac-foot { display: flex; gap: 9px; margin-top: 14px; align-items: center; }
.ac-foot .dept-chips { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; }

/* ==========================================================================
   说明页
   ========================================================================== */
.doc h4 { font-size: 14.5px; margin: 20px 0 10px; }
.doc h4:first-child { margin-top: 0; }
.doc p, .doc li { font-size: 13px; color: var(--ink-2); line-height: 1.85; }
.doc ul { padding-left: 20px; margin: 6px 0; }
.doc table { width: 100%; border-collapse: collapse; font-size: 12.5px; margin: 8px 0; }
.doc th, .doc td { border: 1px solid var(--line); padding: 9px 11px; text-align: left; vertical-align: top; }
.doc th { background: #FAFBFD; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.doc td.c { text-align: center; }
.level-scale { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 12px 0 4px; }
.level-card { border-radius: 12px; padding: 14px 15px; border: 1px solid var(--line); }
.level-card b { font-size: 14px; display: block; }
.level-card p { font-size: 12px; margin-top: 5px; color: var(--ink-2); line-height: 1.7; }
.level-card.l-blue { background: #F2F7FF; border-color: #D3E2FF; } .level-card.l-blue b { color: var(--brand); }
.level-card.l-orange { background: #FFF9EE; border-color: #FFE7BE; } .level-card.l-orange b { color: #B4690E; }
.level-card.l-red { background: #FFF4F4; border-color: #FFD8DA; } .level-card.l-red b { color: #C42B35; }

.kv { display: grid; grid-template-columns: 132px 1fr; gap: 9px 14px; font-size: 13px; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; }

/* ==========================================================================
   响应式
   ========================================================================== */
@media (max-width: 1500px) { .kpi-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 1200px) {
  .grid-2, .grid-2-eq, .assist-grid { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .search input { width: 180px; } .search input:focus { width: 200px; }
}
@media (max-width: 900px) {
  .shell { flex-direction: column; }
  .sidebar { width: 100%; flex: none; height: auto; position: static; }
  .side-nav { display: flex; overflow-x: auto; padding: 8px 12px; }
  .side-group { display: none; }
  .nav-item { white-space: nowrap; margin: 0 3px 0 0; }
  .side-foot { display: none; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: 1fr; }
  .check-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .topbar { height: auto; padding: 10px 14px; flex-wrap: wrap; }
  .view { padding: 14px; }
}
