/* ============================================================
 * 园区租赁管理系统 — 样式表（浅色专业风格）
 * ============================================================ */

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

:root {
  --primary: #2458e6;
  --primary-600: #1c46c4;
  --primary-50: #eef3ff;
  --bg: #f2f5fa;
  --card: #ffffff;
  --line: #e6eaf2;
  --line-soft: #f0f3f8;
  --text: #1a2233;
  --text-2: #5b6478;
  --text-3: #8a93a8;
  --navy: #101f3c;
  --navy-2: #1a2f52;
  --green: #16a34a;
  --green-bg: #e7f7ee;
  --red: #dc2626;
  --red-bg: #fdecec;
  --amber: #d97706;
  --amber-bg: #fdf3e3;
  --gray: #64748b;
  --gray-bg: #eef1f6;
  --blue-bg: #e8effc;
  --navy-bg: #e8ecf5;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 4px 16px rgba(16, 24, 40, .06);
}

html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* ---------- 布局 ---------- */
#app { display: flex; height: 100vh; overflow: hidden; }

#sidebar {
  width: 232px;
  flex-shrink: 0;
  background: var(--navy);
  color: #cdd7ea;
  display: flex;
  flex-direction: column;
  z-index: 40;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.brand-logo {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, #3b74f0, #2458e6);
  color: #fff;
  font-weight: 700;
  font-size: 19px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.brand-name { color: #fff; font-weight: 600; font-size: 15px; letter-spacing: .5px; }
.brand-sub { font-size: 11.5px; color: #7f8fb1; margin-top: 1px; }

#nav { flex: 1; overflow-y: auto; padding: 12px 10px; }
.nav-group {
  font-size: 11px;
  color: #6b7a99;
  letter-spacing: 1px;
  padding: 12px 12px 5px;
  font-weight: 600;
}
.nav-group:first-child { padding-top: 2px; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 9px;
  color: #b6c2d9;
  font-size: 13.5px;
  margin-bottom: 2px;
  transition: background .15s, color .15s;
  position: relative;
}
.nav-item svg { width: 17px; height: 17px; flex-shrink: 0; }
.nav-item:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav-item.active { background: var(--primary); color: #fff; }
.nav-badge {
  margin-left: auto;
  background: var(--red);
  color: #fff;
  font-style: normal;
  font-size: 11px;
  font-weight: 600;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}
.nav-item.active .nav-badge { background: rgba(255, 255, 255, .25); }

.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid rgba(255, 255, 255, .08);
}
.storage-tip { font-size: 11px; color: #6d7c9c; line-height: 1.6; }

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.topbar {
  height: 60px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
  flex-shrink: 0;
}
.topbar h1 { font-size: 16.5px; font-weight: 600; white-space: nowrap; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.top-date { font-size: 12.5px; color: var(--text-3); white-space: nowrap; }
.global-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 7px 12px;
  width: 280px;
}
.global-search svg { width: 15px; height: 15px; color: var(--text-3); flex-shrink: 0; }
.global-search input { border: none; outline: none; background: transparent; font-size: 13px; width: 100%; color: var(--text); }
.user-chip {
  background: var(--primary-50);
  color: var(--primary);
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 13px;
  border-radius: 999px;
  white-space: nowrap;
}
.menu-toggle {
  display: none;
  border: none; background: transparent; cursor: pointer;
  width: 34px; height: 34px; color: var(--text-2);
}
.menu-toggle svg { width: 20px; height: 20px; }

#content { flex: 1; overflow-y: auto; padding: 22px 24px 40px; }

/* ---------- 页面头部 ---------- */
.view-hd {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.view-hd h2 { font-size: 19px; font-weight: 650; }
.view-sub { font-size: 12.5px; color: var(--text-3); margin-top: 3px; }
.view-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  border-radius: 9px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
  white-space: nowrap;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-600); }
.btn-ghost { background: var(--card); border: 1px solid var(--line); color: var(--text-2); }
.btn-ghost:hover { border-color: #c8d2e4; color: var(--text); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-danger-ghost { background: var(--card); border: 1px solid #f3caca; color: var(--red); }
.btn-danger-ghost:hover { background: var(--red-bg); }
.btn-sm { padding: 4px 11px; font-size: 12px; border-radius: 7px; }
.btn-block { width: 100%; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  margin-bottom: 16px;
}
.card-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
.card-hd h3 { font-size: 14.5px; font-weight: 650; }
.card-sub { font-size: 12px; color: var(--text-3); }
.card-more { font-size: 12.5px; color: var(--primary); }
.card-more:hover { text-decoration: underline; }

/* ---------- 统计卡 ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}
.stat-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 15px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.stat-ico {
  width: 34px; height: 34px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
}
.stat-ico svg { width: 17px; height: 17px; }
.stat-ico.blue { background: var(--blue-bg); color: var(--primary); }
.stat-ico.navy { background: var(--navy-bg); color: var(--navy-2); }
.stat-ico.green { background: var(--green-bg); color: var(--green); }
.stat-ico.red { background: var(--red-bg); color: var(--red); }
.stat-ico.amber { background: var(--amber-bg); color: var(--amber); }
.stat-label { font-size: 12.5px; color: var(--text-2); }
.stat-val { font-size: 20px; font-weight: 700; letter-spacing: .2px; }
.stat-val.red { color: var(--red); }
.stat-val.green { color: var(--green); }
.stat-sub { font-size: 11.5px; color: var(--text-3); }

/* ---------- 网格 ---------- */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ---------- 图表 ---------- */
.chart {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  height: 210px;
  padding-top: 10px;
}
.bar-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  height: 100%;
}
.bars {
  display: flex;
  gap: 5px;
  align-items: flex-end;
  height: 165px;
  width: 100%;
  justify-content: center;
}
.bar { width: 20px; border-radius: 5px 5px 0 0; min-height: 2px; transition: height .3s; }
.bar-due { background: #c9d8f7; }
.bar-paid { background: var(--primary); }
.bar-out { background: var(--amber); }
.bar-label { font-size: 12px; color: var(--text-2); }
.legend { display: flex; align-items: center; gap: 14px; font-size: 12px; color: var(--text-2); }
.legend .dot { width: 9px; height: 9px; border-radius: 3px; display: inline-block; margin-right: 5px; vertical-align: -1px; }
.dot-1 { background: #c9d8f7; }
.dot-2 { background: var(--primary); }
.dot-3 { background: var(--amber); }

/* ---------- 列表 ---------- */
.list { display: flex; flex-direction: column; }
.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 2px;
  border-bottom: 1px solid var(--line-soft);
}
.list-row:last-child { border-bottom: none; }
.list-main { min-width: 0; }
.list-main b { font-size: 13.5px; display: block; }
.list-main span { font-size: 12px; color: var(--text-3); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-side { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.list-note { font-size: 12px; color: var(--text-2); white-space: nowrap; }
.list-empty { padding: 26px; text-align: center; color: var(--text-3); font-size: 13px; }

/* ---------- 结构条 ---------- */
.struct { display: flex; flex-direction: column; gap: 13px; padding-top: 4px; }
.struct-row { display: flex; align-items: center; gap: 12px; }
.struct-name { width: 92px; font-size: 12.5px; color: var(--text-2); flex-shrink: 0; }
.struct-bar { flex: 1; height: 9px; background: var(--gray-bg); border-radius: 5px; overflow: hidden; }
.struct-bar i { display: block; height: 100%; background: linear-gradient(90deg, #5b8af0, var(--primary)); border-radius: 5px; }
.struct-val { width: 96px; text-align: right; font-size: 12.5px; font-weight: 600; flex-shrink: 0; }
.struct-bar i.neg { background: linear-gradient(90deg, #f2a33c, var(--red)); }

/* ---------- 通用文字色 ---------- */
.t-red { color: var(--red); }
.t-green { color: var(--green); }
.t-amber { color: var(--amber); }

/* ---------- 账龄 ---------- */
.age-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.age-chip {
  flex: 1;
  min-width: 118px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 12px;
  background: #fbfcfe;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.age-chip span { font-size: 11.5px; color: var(--text-3); }
.age-chip b { font-size: 14px; font-weight: 650; color: var(--text-3); }
.age-chip.on { background: #fff7f7; border-color: #f3caca; }
.age-chip.on b { color: var(--red); }

/* ---------- 多项勾选 ---------- */
.chk-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  max-height: 150px;
  overflow-y: auto;
}

/* ---------- 徽章 ---------- */
.bd {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.bd-green { background: var(--green-bg); color: var(--green); }
.bd-red { background: var(--red-bg); color: var(--red); }
.bd-amber { background: var(--amber-bg); color: var(--amber); }
.bd-gray { background: var(--gray-bg); color: var(--gray); }
.bd-blue { background: var(--blue-bg); color: var(--primary); }
.bd-navy { background: var(--navy-bg); color: var(--navy-2); }

/* ---------- 工具栏 / 筛选 ---------- */
.toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.fctl {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 9px;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text);
  outline: none;
  min-width: 130px;
}
.fctl:focus { border-color: var(--primary); }
input.fctl { flex: 1; min-width: 180px; max-width: 300px; }

/* ---------- 表格 ---------- */
.tbl-card { padding: 6px 18px 14px; }
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th {
  text-align: left;
  font-weight: 600;
  color: var(--text-3);
  font-size: 12.5px;
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
  white-space: nowrap;
}
.tbl th:first-child { border-radius: 8px 0 0 0; }
.tbl th:last-child { border-radius: 0 8px 0 0; }
.tbl td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}
.tbl tbody tr:hover { background: #f8fafc; }
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl td b { white-space: nowrap; }
.cell-sub { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }
/* 文字颜色工具类 */
.t-red { color: var(--red); }
.t-green { color: var(--green); }
.t-amber { color: var(--amber); }
.t-blue { color: var(--primary-600); }
/* 停车：车号标签与表单预览 */
.plate-list { display: flex; flex-wrap: wrap; gap: 7px; }
.plate-chip {
  display: inline-block; padding: 4px 9px; border-radius: 7px;
  background: var(--primary-50); color: var(--primary-600);
  border: 1px solid #d7e2fb; font-size: 12.5px; font-weight: 600;
  letter-spacing: .4px;
}
.pk-preview {
  border: 1px solid var(--line); border-radius: 8px; background: var(--bg);
  padding: 8px 10px; font-size: 13px; color: var(--text-2);
}
.pk-preview b { color: var(--primary-600); }
/* 停车：地块车辆统计 */
.pk-landstat {
  border: 1px dashed #d7e2fb; border-radius: 8px; background: #f7f9fe;
  padding: 8px 10px; font-size: 12.5px; color: var(--text-2); line-height: 1.7;
}
.pk-landstat b { color: var(--primary-600); }
.pk-landstat .over { color: var(--red); font-weight: 600; }
.land-dist-card { padding: 16px 18px 18px; }
.land-dist { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 12px; }
.dist-item {
  text-align: left; border: 1px solid var(--line); border-radius: 10px;
  background: var(--card); padding: 10px 12px 11px; cursor: pointer;
  transition: border-color .16s, box-shadow .16s, transform .16s; font-family: inherit;
}
.dist-item:hover { border-color: #b9cdf7; box-shadow: 0 4px 14px rgba(36, 88, 230, .12); transform: translateY(-1px); }
.dist-item.is-static { cursor: default; background: #fbfcfe; }
.dist-item.is-static:hover { border-color: var(--line); box-shadow: none; transform: none; }
.dist-hd { display: flex; align-items: baseline; gap: 6px; }
.dist-hd b { font-size: 13px; color: var(--text); }
.dist-hd span { font-size: 11.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dist-val { font-size: 21px; font-weight: 700; color: var(--text); line-height: 1.3; margin: 4px 0 6px; }
.dist-val i { font-style: normal; font-size: 11.5px; font-weight: 500; color: var(--text-3); margin-left: 2px; }
.dist-val em { font-style: normal; font-size: 11.5px; font-weight: 500; color: var(--primary-600); margin-left: 8px; }
.dist-val em.t-amber { color: var(--amber); }
.dist-bar { height: 6px; border-radius: 4px; background: #eef1f7; overflow: hidden; }
.dist-bar i { display: block; height: 100%; border-radius: 4px; background: var(--primary); transition: width .3s; }
.dist-item.over .dist-bar i { background: var(--red); }
.dist-item.over .dist-val { color: var(--red); }
.dist-sub { font-size: 11.5px; color: var(--text-3); margin-top: 6px; }
.slot-bar { height: 8px; border-radius: 5px; background: #eef1f7; overflow: hidden; margin-top: 10px; }
.slot-bar i { display: block; height: 100%; background: var(--primary); border-radius: 5px; }
.slot-bar.over i { background: var(--red); }
.pg-row { border-bottom: 1px dashed var(--line-soft); padding: 8px 0; }
.pg-row:last-child { border-bottom: none; }
.pg-hd { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
.pg-hd b { font-size: 13px; }
.pg-hd span { font-size: 11.5px; color: var(--text-3); }
.cell-items { font-size: 12px; color: var(--text-2); line-height: 1.5; }
.td-ops { white-space: nowrap; }
.td-ops .btn { margin-right: 6px; }
.td-ops .btn:last-child { margin-right: 0; }
.tbl-sum { display: flex; gap: 22px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-2); padding: 12px 2px 4px; border-top: 1px dashed var(--line); margin-top: 6px; }
.tbl-sum b { color: var(--text); }
.tbl-total td { background: #f8fafc; font-weight: 600; }

/* ---------- 空状态 ---------- */
.empty {
  padding: 48px 20px;
  text-align: center;
  color: var(--text-3);
}
.empty svg { width: 44px; height: 44px; margin-bottom: 10px; opacity: .5; }
.empty p { font-size: 13px; }

/* ---------- 楼宇房间 ---------- */
.rooms {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 12px;
}
.room {
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 13px 14px;
  background: #fff;
  transition: box-shadow .15s;
}
.room:hover { box-shadow: var(--shadow); }
.room-hd { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 7px; }
.room-hd b { font-size: 13.5px; }
.room-meta { font-size: 12px; color: var(--text-3); margin-bottom: 4px; }
.room-tenant { font-size: 12.5px; color: var(--text-2); margin-bottom: 10px; min-height: 20px; }
.room-green { border-color: #bfe6cd; background: #f6fcf8; }
.room-navy { background: #f7f9fd; }
.room-amber { border-color: #f3ddba; background: #fffaf2; }
.floor-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); margin-bottom: 14px; }
.floor-legend .bd { font-weight: 500; }

/* ---------- 模态框 ---------- */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .45);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 6vh 16px 4vh;
  z-index: 100;
  overflow-y: auto;
  animation: fadeIn .15s ease;
}
.modal {
  background: #fff;
  border-radius: 14px;
  width: 660px;
  max-width: 100%;
  box-shadow: 0 20px 50px rgba(15, 23, 42, .25);
  animation: slideUp .18s ease;
  flex-shrink: 0;
}
.modal-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line-soft);
}
.modal-hd h3 { font-size: 15.5px; font-weight: 650; }
.modal-x {
  border: none; background: transparent; cursor: pointer;
  font-size: 20px; color: var(--text-3);
  width: 30px; height: 30px; border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
}
.modal-x:hover { background: var(--gray-bg); color: var(--text); }
.modal-bd { padding: 20px 22px; max-height: 68vh; overflow-y: auto; }
.modal-ft {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 22px;
  border-top: 1px solid var(--line-soft);
}
.confirm-msg { font-size: 14px; line-height: 1.7; color: var(--text); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- 表单 ---------- */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
}
.field label {
  display: block;
  font-size: 12.5px;
  color: var(--text-2);
  margin-bottom: 6px;
  font-weight: 500;
}
.field input, .field select, .field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 11px;
  font-size: 13.5px;
  font-family: inherit;
  color: var(--text);
  background: #fff;
  outline: none;
  transition: border-color .15s;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); }
.field textarea { resize: vertical; }
.field.full { grid-column: 1 / -1; }
.field-tip { font-size: 11.5px; color: var(--text-3); margin-top: 4px; }
.chk { display: flex !important; align-items: center; gap: 8px; font-weight: 400 !important; cursor: pointer; }
.chk input { width: 15px; height: 15px; accent-color: var(--primary); }

.item-row { display: flex; gap: 8px; margin-bottom: 8px; align-items: center; }
.item-row input:first-child { flex: 2; }
.item-row input:nth-child(2) { flex: 1; }
.item-row .item-del {
  border: none; background: var(--gray-bg); color: var(--text-3);
  width: 28px; height: 28px; border-radius: 7px; cursor: pointer; font-size: 15px; flex-shrink: 0;
}
.item-row .item-del:hover { background: var(--red-bg); color: var(--red); }
.items-total { font-size: 13px; color: var(--text-2); margin: 4px 0 10px; }
.items-total b { color: var(--text); font-size: 14px; }

/* ---------- 详情 ---------- */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 18px;
  margin-bottom: 16px;
}
.detail-item { font-size: 13px; }
.detail-item .k { color: var(--text-3); font-size: 12px; display: block; margin-bottom: 2px; }
.detail-item .v { font-weight: 500; }
.detail-actions { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.detail-sec { font-size: 13px; font-weight: 650; margin: 14px 0 8px; color: var(--text); }

/* ---------- 搜索结果 ---------- */
.search-res { display: flex; flex-direction: column; }
.search-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 8px;
  border-bottom: 1px solid var(--line-soft);
  cursor: pointer;
  border-radius: 8px;
}
.search-item:hover { background: var(--primary-50); }
.search-item:last-child { border-bottom: none; }
.search-tag { font-size: 11px; background: var(--gray-bg); color: var(--text-2); border-radius: 6px; padding: 2px 8px; flex-shrink: 0; }
.search-item b { font-size: 13.5px; }
.search-item span { font-size: 12px; color: var(--text-3); }

/* ---------- 顶栏提醒铃铛 ---------- */
.bell-btn {
  position: relative;
  width: 36px; height: 36px;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 9px;
  color: var(--text-2);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.bell-btn:hover { border-color: #c8d2e4; color: var(--primary); }
.bell-btn svg { width: 17px; height: 17px; }
.bell-badge {
  position: absolute; top: -5px; right: -5px;
  min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 9px;
  background: var(--red); color: #fff;
  font-size: 10.5px; font-style: normal; font-weight: 600;
  display: none; align-items: center; justify-content: center;
  border: 2px solid #fff;
}

/* ---------- 紧急提醒横幅 ---------- */
.alert-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff7f7;
  border: 1px solid #f5cccc;
  border-left: 4px solid var(--red);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 16px;
}
.alert-ico {
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--red-bg); color: var(--red);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.alert-ico svg { width: 16px; height: 16px; }
.alert-main { flex: 1; min-width: 0; }
.alert-main b { display: block; font-size: 13.5px; color: var(--red); }
.alert-main span { font-size: 12px; color: var(--text-2); }

/* ---------- 分段切换 ---------- */
.seg {
  display: inline-flex;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 3px;
  gap: 2px;
}
.seg-btn {
  border: none; background: transparent; color: var(--text-2);
  font-size: 12.5px; padding: 5px 14px; border-radius: 7px; cursor: pointer;
}
.seg-btn:hover { color: var(--text); }
.seg-btn.active { background: var(--card); color: var(--primary); font-weight: 600; box-shadow: 0 1px 3px rgba(16, 24, 40, .1); }

/* ---------- 提醒中心 ---------- */
.rem-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.rem-card .card-hd h3 { display: flex; align-items: center; gap: 8px; }
.rem-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.rem-dot.red { background: var(--red); }
.rem-dot.amber { background: var(--amber); }
.rem-dot.blue { background: var(--primary); }
.rem-list { display: flex; flex-direction: column; }
.rem-item {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 12px 2px;
  border-bottom: 1px solid var(--line-soft);
}
.rem-item:last-child { border-bottom: none; }
.rem-main { min-width: 0; flex: 1; }
.rem-main b { font-size: 13.5px; display: block; }
.rem-main span { font-size: 12px; color: var(--text-3); display: block; margin-top: 2px; }
.rem-side { display: flex; align-items: center; gap: 8px; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }
.rem-cat { font-size: 11px; background: var(--gray-bg); color: var(--text-2); border-radius: 6px; padding: 2px 8px; white-space: nowrap; }
.rem-tag { font-size: 11px; font-style: normal; font-weight: 600; border-radius: 6px; padding: 2px 7px; margin-left: 4px; }
.rem-tag.red { background: var(--red-bg); color: var(--red); }
.rem-tag.amber { background: var(--amber-bg); color: var(--amber); }
.rem-tag.blue { background: var(--blue-bg); color: var(--primary); }

/* ---------- 核销弹窗 ---------- */
.wo-hd {
  display: flex; gap: 22px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--text-2);
  background: var(--bg); border-radius: 9px;
  padding: 10px 14px; margin-bottom: 12px;
}
.wo-hd b { color: var(--text); font-size: 13.5px; }
/* 核销弹窗：本次核销日期 / 方式 / 备注 */
.wo-meta {
  display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap;
  padding: 10px 14px; margin-bottom: 12px;
  border: 1px dashed var(--line); border-radius: 9px; background: #fcfdff;
}
.wo-meta label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--text-2); }
.wo-meta input[type="date"], .wo-meta input[type="text"], .wo-meta select {
  border: 1px solid var(--line); border-radius: 7px; padding: 6px 8px;
  font-size: 13px; font-family: inherit; color: var(--text); background: #fff; outline: none;
  min-width: 130px;
}
.wo-meta input:focus, .wo-meta select:focus { border-color: var(--primary); }
.wo-meta .wo-note { flex: 1; min-width: 170px; }
.wo-meta .wo-note input { width: 100%; }
.wo-meta .wo-origin { margin-left: auto; font-size: 11.5px; color: var(--text-3, #8b94a7); }
.wo-wrap { border: 1px solid var(--line); border-radius: 9px; }
.wo-tbl th { background: #fbfcfe; }
.wo-input {
  width: 112px; border: 1px solid var(--line); border-radius: 7px;
  padding: 6px 8px; font-size: 13px; text-align: right; outline: none;
  font-family: inherit; color: var(--text);
}
.wo-input:focus { border-color: var(--primary); }
.wo-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 12px; font-size: 12.5px; color: var(--text-2);
}
.wo-foot b { color: var(--text); font-size: 13.5px; }

/* ---------- 报表 ---------- */
.progress { height: 8px; background: var(--gray-bg); border-radius: 5px; overflow: hidden; min-width: 80px; }
.progress i { display: block; height: 100%; background: var(--primary); border-radius: 5px; }
.progress i.low { background: var(--amber); }
.report-hd { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 10px; flex-wrap: wrap; }
.report-hd h3 { font-size: 14.5px; font-weight: 650; }
.chip-row { display: flex; gap: 10px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 13px;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}
.chip b { font-size: 16px; }

/* ---------- 设置 ---------- */
.set-rows { display: flex; flex-direction: column; }
.set-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 2px;
  border-bottom: 1px solid var(--line-soft);
}
.set-row:last-child { border-bottom: none; }
.set-row b { font-size: 13.5px; display: block; }
.set-row p { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.help { font-size: 13px; color: var(--text-2); line-height: 1.9; }
.help b { color: var(--text); }
.help ol { padding-left: 20px; }

/* ---------- Toast ---------- */
#toastRoot { position: fixed; top: 18px; right: 18px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(16, 24, 40, .14);
  padding: 11px 18px;
  font-size: 13px;
  opacity: 0;
  transform: translateX(20px);
  transition: opacity .25s, transform .25s;
  max-width: 320px;
}
.toast.show { opacity: 1; transform: none; }
.toast-error { border-left-color: var(--red); }

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #cbd3e2; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: #aeb9cf; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- 响应式 ---------- */
@media (max-width: 1280px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1024px) {
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 920px) {
  #sidebar {
    position: fixed;
    left: 0; top: 0; bottom: 0;
    transform: translateX(-100%);
    transition: transform .22s ease;
  }
  #app.sidebar-open #sidebar { transform: none; }
  .menu-toggle { display: flex; }
  .global-search { width: 170px; }
  .top-date { display: none; }
  .rem-item { flex-direction: column; align-items: flex-start; }
  .rem-side { justify-content: flex-start; }
  .alert-banner { flex-wrap: wrap; }
}
@media (max-width: 640px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  #content { padding: 16px 14px 32px; }
  .topbar { padding: 0 14px; }
  .user-chip { display: none; }
  .global-search { width: 130px; }
  .form-grid { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
}
