﻿:root {
  --brand: #2563eb;
  --brand-600: #1d4ed8;
  --brand-dark: #1e40af;
  --brand-soft: #eef4ff;
  --brand-glow: rgba(37, 99, 235, .16);
  --bg: #f4f7fc;
  --card: #ffffff;
  --ink: #0f172a;
  --text: #1b2a41;
  --text-2: #495a73;
  --muted: #7b8aa3;
  --line: #e6ecf6;
  --line-strong: #d3dded;
  --ok: #0f9d58;
  --ok-soft: #e8f8ef;
  --warn: #e08600;
  --warn-soft: #fff6e6;
  --danger: #db2b20;
  --danger-soft: #fdecea;
  --nav: #0b1b31;
  --shadow: 0 1px 2px rgba(16, 32, 58, .05), 0 12px 28px -18px rgba(16, 32, 58, .22);
  --shadow-lg: 0 24px 64px -20px rgba(8, 20, 40, .34);
  --radius: 16px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Source Han Sans SC", "Segoe UI", system-ui, sans-serif;
  background:
    radial-gradient(1100px 460px at 6% -10%, rgba(59, 130, 246, .10), transparent 62%),
    radial-gradient(820px 420px at 102% -4%, rgba(13, 148, 136, .07), transparent 58%),
    var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font-family: inherit; font-size: 14px; color: inherit; }
a { color: var(--brand); text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; color: var(--ink); }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #cbd6e7; border-radius: 9px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #adbed4; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------------- 登录 ---------------- */
.login-wrap {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(20px, 4vw, 48px);
  overflow: hidden;
  background:
    radial-gradient(900px 520px at 10% 2%, rgba(96, 165, 250, .30), transparent 60%),
    radial-gradient(760px 520px at 92% 98%, rgba(45, 212, 191, .20), transparent 60%),
    linear-gradient(145deg, #0f2c49 0%, #1b4670 48%, #123451 100%);
}
.login-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(circle at 50% 42%, #000 8%, transparent 74%);
  mask-image: radial-gradient(circle at 50% 42%, #000 8%, transparent 74%);
}
.login-card {
  position: relative;
  width: 100%;
  max-width: 1060px;
  background: #fff;
  border-radius: 26px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  box-shadow: 0 46px 110px -30px rgba(2, 10, 22, .68), 0 0 0 1px rgba(255, 255, 255, .12);
}
.login-side {
  position: relative;
  isolation: isolate;
  background:
    radial-gradient(560px 340px at 86% 4%, rgba(147, 197, 253, .30), transparent 62%),
    radial-gradient(440px 320px at 4% 98%, rgba(45, 212, 191, .22), transparent 62%),
    linear-gradient(155deg, #2b5f99 0%, #234c78 58%, #1e4269 100%);
  color: #eaf1ff;
  padding: 54px 48px 46px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}
.login-side::after {
  content: "";
  position: absolute;
  right: -110px;
  bottom: -130px;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: 0 0 0 36px rgba(255, 255, 255, .035), 0 0 0 72px rgba(255, 255, 255, .022);
  pointer-events: none;
  z-index: -1;
}
.login-side h1 {
  margin: 6px 0 0;
  color: #fff;
  font-size: clamp(27px, 2.5vw, 35px);
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: 3px;
  text-shadow: 0 8px 26px rgba(3, 16, 32, .38);
}
/* 平台名称固定两行展示，两行均为白色，避免宽度变化时折行错位 */
.login-side h1 span {
  display: block;
  margin-top: 2px;
  color: #fff;
  letter-spacing: 3px;
}
.login-side h1::after {
  content: "";
  display: block;
  width: 54px;
  height: 3px;
  margin-top: 18px;
  border-radius: 2px;
  background: linear-gradient(90deg, #7dd3fc, #34d399);
  box-shadow: 0 0 14px rgba(125, 211, 252, .45);
}
.login-side p { color: #c8dcf5; margin: 20px 0 0; font-size: 13.5px; line-height: 1.95; max-width: 94%; }
.login-side ul { margin: 26px 0 0; padding: 0; list-style: none; }
.login-side li { font-size: 13px; color: #dcebfd; padding: 8px 0 8px 25px; position: relative; }
.login-side li::before {
  content: "";
  position: absolute; left: 2px; top: 15px; width: 7px; height: 7px;
  border-radius: 50%; background: #45d19a;
  box-shadow: 0 0 0 4px rgba(69, 209, 154, .14);
}
.login-side-foot {
  margin-top: 26px;
  font-size: 12px;
  letter-spacing: .6px;
  color: #a9c8e8;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, .10);
}
.login-form {
  position: relative;
  padding: clamp(38px, 5vw, 58px) clamp(24px, 4vw, 52px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}
.login-form::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, #3b82f6, #34d399);
}
.login-form h2 { font-size: 25px; letter-spacing: .8px; margin-bottom: 8px; }
.login-form .sub { color: #5f748c; font-size: 13px; margin-bottom: 26px; }
.login-form label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 8px; letter-spacing: .3px; }
.login-form .field { margin-bottom: 17px; }
/* 登录输入框需高于全局 input 规则的特异性，避免高度被 36px 覆盖 */
.login-form .field input {
  width: 100%; height: 50px; padding: 0 16px; border: 1px solid #dce6f2;
  border-radius: 12px; background: #f6f9fd; outline: none; font-size: 14px;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
.login-form .field input::placeholder { color: #a8b7c8; }
.login-form .field input:hover { border-color: var(--line-strong); }
.login-form .field input:focus { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 4px var(--brand-glow); }
.login-form .btn-primary {
  width: 100%; height: 50px; margin-top: 12px; font-size: 15.5px;
  letter-spacing: 4px; border-radius: 12px;
  box-shadow: 0 16px 28px -14px rgba(37, 99, 235, .65);
}
.login-err { color: var(--danger); font-size: 13px; min-height: 20px; margin-top: 10px; }
.login-tip { margin-top: 22px; font-size: 12px; color: #62748c; line-height: 1.9; border-top: 1px dashed var(--line); padding-top: 15px; }
@media (max-width: 860px) {
  .login-card { grid-template-columns: 1fr; }
  .login-side { display: none; }
  .login-form { padding: 40px 24px; }
  .login-form::before { height: 4px; }
  .login-form h2 { font-size: 23px; }
}

/* ---------------- 主框架 ---------------- */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 212px; flex: 0 0 212px;
  background:
    radial-gradient(420px 260px at -10% 0%, rgba(120, 170, 255, .28), transparent 68%),
    radial-gradient(360px 280px at 108% 96%, rgba(45, 212, 191, .16), transparent 66%),
    linear-gradient(180deg, #2c4b70 0%, #24405f 62%, #2a4a6d 100%);
  color: #cddbec; display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
  border-right: 1px solid rgba(255, 255, 255, .08);
}
.brand {
  position: relative; display: flex; flex-direction: column; align-items: center;
  padding: 24px 10px 17px; border-bottom: 1px solid rgba(255, 255, 255, .10);
  background: radial-gradient(150px 78px at 50% -14%, rgba(96, 165, 250, .22), transparent 72%);
}
.brand .brand-text { text-align: center; }
.brand .t {
  color: #fff; font-size: 15px; font-weight: 700; line-height: 1.72;
  letter-spacing: 2.5px; text-indent: 2.5px; text-shadow: 0 2px 12px rgba(6, 22, 40, .45);
}
.brand::after {
  content: ''; width: 34px; height: 3px; margin-top: 11px; border-radius: 2px;
  background: linear-gradient(90deg, #60a5fa, #34d399);
  box-shadow: 0 0 12px rgba(96, 165, 250, .5);
}
.nav { padding: 14px 14px 16px; flex: 1; overflow-y: auto; }
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 11px;
  color: #c6d6e9; cursor: pointer; margin-bottom: 5px; font-size: 15px; transition: .18s;
  border: 1px solid transparent; position: relative;
}
.nav-item:hover { background: rgba(255, 255, 255, .10); color: #fff; }
.nav-item.active {
  background: linear-gradient(100deg, rgba(59, 130, 246, .30), rgba(59, 130, 246, .05));
  border-color: rgba(120, 170, 255, .30); color: #fff;
  box-shadow: inset 3px 0 0 #60a5fa, 0 10px 24px -16px rgba(10, 28, 48, .55);
}
.nav-item .ico { width: 20px; text-align: center; opacity: .92; font-size: 16px; }
/* 侧栏左下角：当前机构与账号操作 */
.side-user {
  margin: 0 14px 16px; padding: 12px 13px; border-radius: 12px;
  background: rgba(255, 255, 255, .035); border: 1px solid rgba(255, 255, 255, .07);
  backdrop-filter: blur(4px);
}
.side-user .who {
  color: #fff; font-size: 14px; font-weight: 600; line-height: 1.45;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.side-user-acts { display: flex; gap: 8px; margin-top: 10px; }
.side-user-acts .btn {
  flex: 1; height: 32px; padding: 0 6px; font-size: 12.5px; border-radius: 8px;
  background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .14); color: #e2ebf8;
}
.side-user-acts .btn:hover { background: rgba(96, 165, 250, .22); border-color: rgba(120, 170, 255, .42); color: #fff; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
/* 顶部栏：左侧为页面标题，移动端显示菜单按钮 */
.topbar {
  height: 72px; background: rgba(255, 255, 255, .86); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; padding: 0 32px;
  position: sticky; top: 0; z-index: 20; backdrop-filter: blur(14px) saturate(1.3);
}
.topbar .crumb { display: flex; flex-direction: column; line-height: 1.35; }
.topbar .crumb b { color: var(--ink); font-weight: 600; font-size: 17.5px; letter-spacing: .2px; }
.topbar .crumb span { color: var(--muted); font-size: 12px; margin-top: 2px; }
/* 顶栏右侧页面级操作（如总体情况的导出报表） */
.topbar-acts { margin-left: auto; display: flex; align-items: center; gap: 8px; flex: none; }
.topbar-acts .btn { height: 34px; padding: 0 14px; font-size: 13px; }
.content { padding: 28px 32px 60px; width: 100%; max-width: 1640px; margin: 0 auto; }

/* 菜单按钮：仅移动端用于打开导航抽屉 */
.topbar-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.icon-btn {
  display: none; flex: none; width: 40px; height: 40px; border-radius: 11px;
  border: 1px solid var(--line-strong); background: #fff; color: var(--text-2);
  align-items: center; justify-content: center; font-size: 15px; cursor: pointer; transition: .18s;
}
.icon-btn:hover { border-color: #b7caea; color: var(--brand); background: #f7faff; }
.drawer-mask { display: none; }

/* 移动端：侧栏为抽屉，主内容占满屏幕 */
@media (max-width: 900px) {
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 80;
    width: 244px; flex: none; height: 100vh;
    transform: translateX(-102%); transition: transform .24s ease;
    box-shadow: 24px 0 60px -20px rgba(3, 12, 26, .6);
  }
  body.drawer-open .sidebar { transform: translateX(0); }
  body.drawer-open { overflow: hidden; }
  .nav { padding: 0 14px 16px; overflow-y: auto; }
  .drawer-mask {
    display: block; position: fixed; inset: 0; z-index: 70;
    background: rgba(8, 18, 32, .48); opacity: 0; pointer-events: none;
    transition: opacity .2s ease;
  }
  body.drawer-open .drawer-mask { opacity: 1; pointer-events: auto; }
  .icon-btn { display: inline-flex; }
  .topbar { padding: 0 14px; height: 58px; }
  .topbar .crumb span { display: none; }
  .topbar .crumb b { font-size: 15.5px; }
  .content { padding: 16px 14px 44px; }
}

/* 移动端：筛选区与表格自适应 */
@media (max-width: 900px) {
  .filterbar { gap: 10px; }
  .filterbar .field { flex: 1 1 46%; min-width: 0; }
  .filterbar .field.grow { flex: 1 1 100%; }
  .filterbar .btn { flex: 1 1 auto; height: 40px; }
  .filterbar.inline { flex-wrap: wrap; gap: 10px; }
  .filterbar.inline .field { flex: 1 1 100%; flex-direction: column; align-items: stretch; gap: 6px; }
  .filterbar.inline .field > select,
  .filterbar.inline .field > input { width: 100%; min-width: 0; }
  .filterbar.inline .btn { flex: 1 1 auto; }
  .card-head { padding: 14px 16px; }
  .card-body { padding: 16px; }
  .card-body.tight { -webkit-overflow-scrolling: touch; }
  .stat-grid { grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); gap: 12px; }
  .stat-card { padding: 15px 16px; }
  .stat-card .v { font-size: 24px; }
  .field input, .field select, .field textarea { font-size: 16px; }
}
@media (max-width: 640px) {
  .filterbar .field { flex: 1 1 100%; }
  .mask { padding: 0; align-items: stretch; }
  .modal, .modal.wide { max-width: 100%; border-radius: 0; min-height: 100%; display: flex; flex-direction: column; }
  .modal-head { padding: 16px 18px; }
  .modal-body { padding: 18px; flex: 1 1 auto; max-height: none; }
  .modal-foot { padding: 14px 18px max(14px, env(safe-area-inset-bottom)); border-radius: 0; }
  .btn { height: 40px; padding: 0 14px; }
  .btn-sm { height: 32px; padding: 0 10px; }
  .two-col, .two-col.even, .form-grid { grid-template-columns: 1fr; }
  .tabs { overflow-x: auto; }
  .pager { align-items: flex-start; }
}

/* ---------------- 通用组件 ---------------- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); transition: border-color .2s, box-shadow .2s;
}
.card + .card { margin-top: 18px; }
.card-head {
  padding: 17px 22px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.card-head h3 { font-size: 15.5px; position: relative; padding-left: 12px; letter-spacing: .2px; }
.card-head h3::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 16px; border-radius: 3px;
  background: linear-gradient(180deg, #60a5fa, var(--brand));
}
.card-body { padding: 18px 22px; }
.card-body.tight { padding: 0; overflow-x: auto; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 15px; border-radius: 10px; border: 1px solid var(--line-strong);
  background: #fff; color: var(--text-2); cursor: pointer; transition: .18s; white-space: nowrap;
  font-weight: 500;
}
.btn:hover { border-color: #b7caea; color: var(--brand); background: #f7faff; box-shadow: 0 4px 12px -6px rgba(20, 50, 90, .3); }
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(180deg, #3b82f6, var(--brand)); border-color: var(--brand);
  color: #fff; box-shadow: 0 8px 18px -8px rgba(37, 99, 235, .8), inset 0 1px 0 rgba(255, 255, 255, .22);
}
.btn-primary:hover { background: linear-gradient(180deg, #2f74e8, var(--brand-600)); border-color: var(--brand-600); color: #fff; }
.btn-danger { color: var(--danger); border-color: #f0c4bf; background: #fff; }
.btn-danger:hover { background: var(--danger-soft); color: var(--danger); border-color: #e8aaa3; }
.btn-ok { background: linear-gradient(180deg, #17b268, var(--ok)); border-color: var(--ok); color: #fff; box-shadow: 0 8px 18px -8px rgba(15, 157, 88, .7); }
.btn-ok:hover { background: #0d8a4d; border-color: #0d8a4d; color: #fff; }
.btn-sm { height: 29px; padding: 0 11px; font-size: 12.5px; border-radius: 8px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; box-shadow: none; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font-size: 12.5px; color: var(--text-2); }
.field label .req { color: var(--danger); }
input[type="text"], input[type="password"], input[type="number"], input[type="date"], select, textarea {
  height: 36px; padding: 0 11px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; outline: none; transition: .18s; width: 100%;
}
input[type="text"]:hover, input[type="password"]:hover, input[type="number"]:hover,
input[type="date"]:hover, select:hover, textarea:hover { border-color: var(--line-strong); }
textarea { height: auto; padding: 9px 11px; resize: vertical; line-height: 1.6; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-glow); }
input:disabled, select:disabled, textarea:disabled { background: #f4f7fb; color: var(--muted); cursor: not-allowed; }

.filterbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.filterbar .field { min-width: 132px; }
/* 筛选区卡片：轻微底色区分，避免与数据卡片混为一体 */
.card.filter-card { background: linear-gradient(180deg, #fbfdff, #ffffff); }
.card.filter-card > .card-body { padding: 14px 18px; }
.filterbar .btn { height: 36px; }
.filterbar .grow { flex: 1; min-width: 180px; }
/* 清退明细：筛选项与标签同一行，操作按钮排在行末 */
.filterbar.inline { flex-wrap: nowrap; align-items: center; gap: 8px; }
.filterbar.inline .field { flex-direction: row; align-items: center; min-width: 0; gap: 5px; }
.filterbar.inline .field > label { white-space: nowrap; }
.filterbar.inline .field > select { width: auto; min-width: 88px; }
.filterbar.inline .field.grow { flex: 1 1 120px; min-width: 120px; }
.filterbar.inline .field.grow input { min-width: 0; }
.filterbar.inline .btn { flex: none; white-space: nowrap; }
@media (max-width: 1300px) { .filterbar.inline { flex-wrap: wrap; } }

/* 两行式筛选卡：第一行筛选项，第二行操作按钮 */
.filter-rows { display: flex; flex-direction: column; gap: 12px; }
.filter-rows .frow { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.filter-rows .frow > .field { flex: 1 1 166px; min-width: 138px; }
.filter-rows .frow > .field.grow { flex: 2 1 260px; }
.filter-rows .frow-btns {
  align-items: center; justify-content: flex-end; gap: 10px;
  padding-top: 12px; border-top: 1px dashed var(--line);
}
.filter-rows .frow-spacer { flex: 1 1 auto; }
@media (max-width: 900px) {
  .filter-rows .frow > .field { flex: 1 1 46%; }
  .filter-rows .frow > .field.grow { flex: 1 1 100%; }
  .filter-rows .frow-btns .btn { flex: 1 1 auto; }
  .filter-rows .frow-spacer { display: none; }
}
@media (max-width: 640px) {
  .filter-rows .frow > .field { flex: 1 1 100%; }
}

/* 当日清退情况：两张统计卡 + 日期筛选卡 */
.daily-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(340px, 1.1fr); gap: 16px; margin-bottom: 18px; align-items: stretch; }
.daily-top > .stat-card { display: flex; flex-direction: column; justify-content: center; }
.daily-filter { display: flex; min-width: 0; }
.daily-filter > .card-body { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 14px 18px; }
.daily-filter .filterbar.inline { align-items: center; }
.daily-filter .filterbar.inline .field > input { width: auto; min-width: 150px; }
.daily-filter .mt8 { margin-top: 8px; }
@media (max-width: 1250px) {
  .daily-top { grid-template-columns: 1fr 1fr; }
  .daily-top > .daily-filter { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .daily-top { grid-template-columns: 1fr; }
  .daily-top > .daily-filter { grid-column: auto; }
}

/* 统计卡与筛选卡同处一行：筛选卡占右侧 50% */
.stat-filter-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-bottom: 18px; align-items: stretch; }
.stat-filter-row .stat-grid { margin-bottom: 0; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.stat-filter-row .stat-card { padding: 16px; }
.stat-filter-row .stat-card .v { font-size: 21px; }
.stat-filter-row .stat-card .k { font-size: 12px; }
.stat-filter-row > .filter-card { margin: 0; display: flex; }
.stat-filter-row > .filter-card > .card-body { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 14px 16px; }
.stat-filter-row .filter-rows { gap: 10px; }
.stat-filter-row .filter-rows .frow { gap: 10px; }
.stat-filter-row .filter-rows .frow > .field { flex: 1 1 92px; min-width: 88px; gap: 4px; }
.stat-filter-row .filter-rows .frow > .field.grow { flex: 1.4 1 110px; }
.stat-filter-row .filter-rows .frow-btns { padding-top: 10px; border-top: 1px dashed var(--line); gap: 8px; }
.stat-filter-row .filter-rows .frow-btns .btn { height: 32px; padding: 0 10px; font-size: 12px; }
@media (max-width: 1200px) {
  .stat-filter-row { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .stat-filter-row .stat-grid { grid-template-columns: 1fr; }
}
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(214px, 1fr)); gap: 16px; margin-bottom: 18px; }
.stat-card {
  background:
    radial-gradient(240px 150px at 100% 0%, rgba(37, 99, 235, .075), transparent 72%),
    linear-gradient(180deg, #ffffff, #fcfdff);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 19px 22px;
  box-shadow: var(--shadow); position: relative; overflow: hidden;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.stat-card:hover { transform: translateY(-2px); border-color: #dbe6f7; box-shadow: 0 3px 6px rgba(16, 32, 58, .05), 0 20px 38px -22px rgba(16, 32, 58, .3); }
.stat-card::after {
  content: ""; position: absolute; left: 0; top: 16px; bottom: 16px; width: 4px; border-radius: 0 4px 4px 0;
  background: linear-gradient(180deg, #7cb2ff, var(--brand));
}
.stat-card.ok::after { background: linear-gradient(180deg, #45d18c, var(--ok)); }
.stat-card.warn::after { background: linear-gradient(180deg, #f7b955, var(--warn)); }
.stat-card.danger::after { background: linear-gradient(180deg, #f2796c, var(--danger)); }
.stat-card .k { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; letter-spacing: .2px; }
.stat-card .v { font-size: 30px; font-weight: 700; letter-spacing: -.8px; margin-top: 7px; font-variant-numeric: tabular-nums; line-height: 1.22; color: var(--ink); }
.stat-card .v small { font-size: 13px; font-weight: 400; color: var(--muted); margin-left: 3px; letter-spacing: 0; }
.stat-card .x { font-size: 12px; color: var(--muted); margin-top: 4px; }

.table-wrap { overflow: auto; max-height: none; }
table.data { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
table.data th {
  text-align: center; padding: 12px 14px; color: #56667e;
  background: #f7f9fd;
  font-weight: 600; font-size: 12.5px; letter-spacing: .2px;
  border-bottom: 1px solid #e3eaf5; white-space: nowrap;
}
table.data th:first-child { border-top-left-radius: 0; }
table.data td { text-align: center; padding: 12px 14px; border-bottom: 1px solid #f0f4fa; vertical-align: middle; transition: background .14s; }
table.data tbody tr:nth-child(even) { background: #fbfcfe; }
table.data tbody tr:hover { background: #f2f7ff; }
table.data tbody tr:last-child td { border-bottom: none; }
table.data td.num, table.data th.num { text-align: center; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.data td input, table.data td select { text-align: center; }
/* 台账操作列：小号按钮，每排 3 个，最多两排 */
.row-actions { display: grid; grid-template-columns: repeat(3, 58px); gap: 5px; justify-content: center; }
.row-actions .btn { width: 100%; padding: 0 4px; }
.row-actions .btn.btn-sm { height: 26px; font-size: 11.5px; border-radius: 7px; }
/* 表格内操作按钮统一紧凑尺寸；横向并排的操作项统一间距 */
table.data td .btn-sm { height: 26px; padding: 0 9px; font-size: 11.5px; border-radius: 7px; }
.actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
/* 操作列下方的辅助说明：单行省略，悬停查看全文 */
.cell-note {
  font-size: 11px; color: var(--muted); margin: 3px auto 0; max-width: 200px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cell-note.warn {
  color: #d92d20; white-space: normal;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
/* 当日清退操作列固定宽度，保证审核/退回/记录三个按钮同一排 */
table.data th.w-actions { width: 190px; }
/* 问题描述列：最多两行，超出省略，悬停查看全文 */
table.data td.problem-cell { text-align: left; max-width: 220px; min-width: 120px; color: var(--text-2); }
table.data td.problem-cell .clamp2 {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; line-height: 1.55;
}
/* 当日清退明细：问题描述列加宽，人次/费用/状态列收窄 */
table.data.daily-table td.problem-cell { min-width: 230px; max-width: 360px; }
table.data th.w-dtimes, table.data td.w-dtimes { width: 96px; }
table.data th.w-damount, table.data td.w-damount { width: 124px; }
table.data th.w-status, table.data td.w-status { width: 92px; }
table.data th.w-actions, table.data td.w-actions { width: 190px; }
/* 清退基数：操作列收窄，腾出的宽度留给涉及问题 */
table.data.base-table td.problem-cell { min-width: 280px; max-width: 420px; }
table.data.base-table th.w-actions, table.data.base-table td.w-actions { width: 150px; }
table.data.base-table .row-actions { grid-template-columns: repeat(3, 40px); gap: 4px; }
table.data.base-table .row-actions .btn.btn-sm { height: 23px; font-size: 10.5px; padding: 0 1px; border-radius: 6px; }
input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--brand); vertical-align: middle; cursor: pointer; }
input[type="checkbox"]:disabled { cursor: not-allowed; opacity: .4; }
/* 机构名称列内容靠左对齐，名称不折行 */
table.data td.org { text-align: left; white-space: nowrap; }
/* 文书信息列：年度与类别一行，反馈时间与文书编号一行 */
table.data td.doc-cell { text-align: left; white-space: nowrap; }
table.data td.doc-cell .doc-t1 { display: flex; align-items: center; gap: 8px; }
table.data td.doc-cell .doc-t1 b { font-weight: 600; color: var(--ink); }
table.data td.doc-cell .doc-t2 { font-size: 12px; color: var(--muted); margin-top: 2px; max-width: 228px; overflow: hidden; text-overflow: ellipsis; }
/* 列宽随内容自适应：表头与数字不换行，列间距一致，纵向对齐 */
table.data.fit { min-width: 980px; }
/* 表头较长时允许换行，避免把最后一列挤出可视区域导致内容与标签错位 */
table.data.fit th { white-space: normal; line-height: 1.35; }
table.data.fit .rate-cell { width: 100%; min-width: 0; justify-content: center; }
table.data.fit .rate-cell .progress { flex: 0 1 88px; min-width: 40px; }
table.data.fit-sm { min-width: 700px; }
table.data.fit th, table.data.fit td { padding-left: 14px; padding-right: 14px; }
table.data.fit-sm th, table.data.fit-sm td { padding-left: 10px; padding-right: 10px; }
/* 按年度/按类别两张表首列统一最小宽度，保证两表总宽一致、滚动位置一致 */
table.data.fit-sm th:first-child, table.data.fit-sm td:first-child { min-width: 110px; }
/* 半宽卡片允许收缩，空间不足时仅在表格内部横向滚动；网格内取消上下外边距，保证两张卡片顶部齐平 */
.two-col > .card { min-width: 0; margin-top: 0; }
table.data.fit tbody td:first-child,
table.data.fit-sm tbody td:first-child { white-space: nowrap; }
/* 类型、问题数两列收窄，避免占位过宽 */
table.data.fit th.w-org, table.data.fit td.w-org { width: 132px; padding-left: 22px; padding-right: 8px; }
table.data.fit td.w-org { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table.data.fit th.w-type, table.data.fit td.w-type { width: 88px; padding-left: 8px; padding-right: 8px; }
table.data.fit th.w-cases, table.data.fit td.w-cases { width: 72px; padding-left: 8px; padding-right: 8px; }
/* 台账：文本型标签与数字统一居中，列间距收紧以便一屏展示 */
table.data.center-labels { font-size: 12.5px; }
table.data.center-labels th { text-align: center; }
table.data.center-labels td { text-align: center; }
table.data.center-labels th, table.data.center-labels td { padding-left: 10px; padding-right: 10px; }
table.data.center-labels td.num { text-align: center; }
table.data.center-labels td.org { text-align: left; }
table.data tr.total-row td { background: #eef4ff; font-weight: 600; color: var(--ink); }
table.data tr.child-row td:first-child { padding-left: 34px; }
table.data tr.child-row td:first-child::before { content: "└ "; color: #b7c4d8; }
.mono { font-variant-numeric: tabular-nums; }
.empty {
  padding: 46px 16px; text-align: center; color: var(--muted); font-size: 13px;
  margin: 8px; border: 1px dashed var(--line); border-radius: 14px; background: #fbfcfe;
}
.empty .big { font-size: 26px; opacity: .45; margin-bottom: 8px; }

.badge {
  display: inline-flex; align-items: center; gap: 5px; height: 23px; padding: 0 10px;
  border-radius: 20px; font-size: 11.5px; white-space: nowrap; font-weight: 500;
}
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .75; }
.badge.locked { background: var(--ok-soft); color: #0b7a3f; }
.badge.reported { background: #e8f1fe; color: #1a5fb4; }
.badge.unlocked { background: var(--warn-soft); color: #a76500; }
.badge.agreement { background: #eaf1ff; color: #1a5fd0; }
.badge.penalty { background: #fdecea; color: #c02a20; }
.badge.gray { background: #eef1f6; color: #5d6b80; }
.badge.submitted { background: #e9f5ff; color: #1769b0; }
.badge.miss { background: #fdecea; color: #c02a20; }

.progress { height: 7px; border-radius: 6px; background: #edf1f8; overflow: hidden; min-width: 60px; }
.progress > i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #60a5fa, var(--brand)); }
.progress.ok > i { background: linear-gradient(90deg, #35c983, var(--ok)); }
.progress.warn > i { background: linear-gradient(90deg, #f7b955, var(--warn)); }
.progress.danger > i { background: linear-gradient(90deg, #f2796c, var(--danger)); }
.rate-cell { display: flex; align-items: center; gap: 9px; min-width: 104px; margin: 0 auto; }
.rate-cell span { font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; width: 38px; text-align: right; }

.pagerow { display: flex; gap: 8px; flex-wrap: wrap; }

/* 弹窗 */
.mask {
  position: fixed; inset: 0; background: rgba(8, 18, 32, .48); z-index: 60;
  display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow: auto;
  backdrop-filter: blur(3px); animation: fade .16s ease;
}
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
.modal {
  background: #fff; border-radius: 18px; width: 100%; max-width: 640px;
  box-shadow: var(--shadow-lg); animation: pop .18s ease;
}
.modal.wide { max-width: 900px; }
@keyframes pop { from { transform: translateY(-8px) scale(.99); opacity: .6 } to { transform: none; opacity: 1 } }
.modal-head { padding: 18px 24px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.modal-head h3 { font-size: 16px; }
.modal-head .x { cursor: pointer; color: var(--muted); font-size: 18px; line-height: 1; border: none; background: none; transition: color .16s; }
.modal-head .x:hover { color: var(--text); }
.modal-body { padding: 20px 24px; max-height: 66vh; overflow: auto; }
.modal-foot { padding: 15px 24px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; background: #fbfcfe; border-radius: 0 0 18px 18px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 620px) { .form-grid { grid-template-columns: 1fr; } }

/* 提示条 */
#toast { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 99; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast-item {
  background: rgba(14, 30, 52, .96); color: #fff; padding: 10px 20px; border-radius: 11px; font-size: 13px;
  box-shadow: 0 16px 40px -12px rgba(6, 16, 32, .6); animation: drop .2s ease; max-width: 80vw;
  backdrop-filter: blur(6px);
}
.toast-item.ok { background: rgba(13, 122, 63, .97); }
.toast-item.err { background: rgba(181, 35, 26, .97); }
@keyframes drop { from { transform: translateY(-10px); opacity: 0 } to { transform: none; opacity: 1 } }

.notice {
  display: flex; gap: 10px; padding: 12px 16px; border-radius: 12px; font-size: 12.5px;
  background: var(--brand-soft); color: #1a4a94; border: 1px solid #d3e2fb;
  border-left: 3px solid #6aa4ff; margin-bottom: 14px;
}
.notice.warn { background: var(--warn-soft); color: #8a5500; border-color: #f6e0b8; border-left-color: #f0a732; }
.notice.ok { background: var(--ok-soft); color: #0b6b36; border-color: #c6ecd7; border-left-color: #35c983; }

.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tab {
  padding: 10px 16px; cursor: pointer; font-size: 13.5px; color: var(--text-2);
  border-bottom: 2px solid transparent; margin-bottom: -1px; transition: .16s;
}
.tab:hover { color: var(--brand); }
.tab.active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }

.chart-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.chart-grid > .card { margin-top: 0; }
/* 页面内各区之间的统一纵向间距 */
.content > * + .stat-grid,
.content > * + .chart-grid,
.content > * + .two-col { margin-top: 18px; }
.content > * + .notice { margin-top: 14px; }
.chart-grid, .two-col { margin-bottom: 18px; }
@media (max-width: 1080px) { .chart-grid { grid-template-columns: 1fr; } }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); padding: 4px 14px 10px; }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; }

.two-col { display: grid; grid-template-columns: 1.5fr 1fr; gap: 18px; }
/* 按年度、按类别统计各占页面 50% */
.two-col.even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
/* 两张统计表等高：行高统一，行数少的一侧用空白行补足，保证合计行高度一致 */
.two-col.even > .card { display: flex; flex-direction: column; }
.two-col.even > .card > .card-body.tight { flex: 1; }
.two-col.even > .card table.data tbody tr { height: 50px; }
.two-col.even > .card table.data tbody tr.pad-row td { height: 50px; padding: 0; border-bottom: 0; }
@media (max-width: 1080px) {
  .two-col.even > .card table.data tbody tr { height: 46px; }
  .two-col.even > .card table.data tbody tr.pad-row td { height: 46px; }
}
@media (max-width: 1080px) { .two-col { grid-template-columns: 1fr; } }

.kv { display: grid; grid-template-columns: 96px 1fr; gap: 8px 12px; font-size: 13px; }
.kv .k { color: var(--muted); }
.kv .v { color: var(--text); word-break: break-all; }

.nowrap { white-space: nowrap; }
.muted { color: var(--muted); }
.right { text-align: right; }
.small { font-size: 12px; }
.mt8 { margin-top: 8px; }
.mt14 { margin-top: 14px; }
.flex { display: flex; }
.gap8 { gap: 8px; }
.between { justify-content: space-between; }
.center { align-items: center; }

/* ---------------- 列表分页 ---------------- */
.pager {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: 12px 18px; border-top: 1px solid var(--line); background: #fcfdff;
}
.pager-info { font-size: 12px; color: var(--muted); }
.pager-btns { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pager-btns .pg {
  min-width: 30px; height: 30px; padding: 0 9px; border-radius: 8px;
  border: 1px solid var(--line-strong); background: #fff; color: var(--text-2);
  font-size: 12px; cursor: pointer; transition: .16s;
}
.pager-btns .pg:hover:not(:disabled) { border-color: #b7caea; color: var(--brand); background: #f7faff; }
.pager-btns .pg.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.pager-btns .pg:disabled { opacity: .45; cursor: not-allowed; }
.pager-size { width: auto; height: 30px; padding: 0 8px; font-size: 12px; }

/* ---------------- 表单校验提示 ---------------- */
.field.has-err input, .field.has-err select, .field.has-err textarea {
  border-color: var(--danger); box-shadow: 0 0 0 3px rgba(219, 43, 32, .12);
}
.field-err { font-size: 11.5px; color: var(--danger); line-height: 1.5; margin-top: -2px; }

