/* ============================================================
   消防全业务平台 · 原型统一样式（大厂风：蓝黄渐变 + 全终端自适应）
   ============================================================ */
:root {
  --primary: #2E5CD5;
  --primary-light: #4A7BFF;
  --accent: #F5A623;
  --accent-light: #FFC53D;
  --bg: #F4F7FB;
  --card: #FFFFFF;
  --text: #1F2329;
  --text-sub: #646A73;
  --border: #E5E6EB;
  --danger: #E5484D;
  --success: #30A46C;
  --grad: linear-gradient(135deg, #2E5CD5 0%, #4A7BFF 55%, #F5A623 130%);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  background: var(--bg); color: var(--text); font-size: 14px;
}
a { text-decoration: none; color: var(--primary); }
ul { list-style: none; }

/* ---------- 登录 / 解锁 / 注册 ---------- */
.auth-wrap {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #0F2A6B 0%, #2E5CD5 45%, #4A7BFF 72%, #F5A623 130%);
  padding: 20px;
}
.auth-card {
  width: 100%; max-width: 400px; background: #fff; border-radius: 16px;
  padding: 36px 32px 28px; box-shadow: 0 16px 48px rgba(15, 42, 107, .35);
}
.auth-logo { text-align: center; margin-bottom: 8px; }
.auth-logo .logo-mark {
  width: 52px; height: 52px; border-radius: 14px; background: var(--grad);
  color: #fff; font-size: 26px; font-weight: 700; display: inline-flex;
  align-items: center; justify-content: center; letter-spacing: 1px;
}
.auth-title { text-align: center; font-size: 20px; font-weight: 600; margin: 12px 0 4px; }
.auth-sub { text-align: center; color: var(--text-sub); font-size: 13px; margin-bottom: 22px; }
.auth-field { margin-bottom: 14px; }
.auth-field label { display: block; font-size: 13px; color: var(--text-sub); margin-bottom: 6px; }
.auth-field input {
  width: 100%; height: 42px; border: 1px solid var(--border); border-radius: 8px;
  padding: 0 12px; font-size: 14px; outline: none; transition: border-color .2s;
}
.auth-field input:focus { border-color: var(--primary); }
.auth-btn {
  width: 100%; height: 44px; border: none; border-radius: 8px; cursor: pointer;
  background: var(--grad); color: #fff; font-size: 15px; font-weight: 600;
  margin-top: 6px; transition: opacity .2s;
}
.auth-btn:hover { opacity: .92; }
.auth-tip { font-size: 12px; color: var(--text-sub); margin-top: 14px; text-align: center; line-height: 1.8; }
.auth-err {
  background: #FDF0F0; color: var(--danger); border: 1px solid #F3C1C2;
  border-radius: 8px; padding: 8px 12px; font-size: 13px; margin-bottom: 12px; display: none;
}
.auth-err.show { display: block; }

/* ---------- PC 后台布局 ---------- */
.pc-layout { display: flex; min-height: 100vh; }
.pc-side {
  width: 220px; background: #101A33; color: #CFD6E6; flex-shrink: 0;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.pc-side .brand {
  height: 60px; display: flex; align-items: center; gap: 10px; padding: 0 18px;
  color: #fff; font-weight: 600; font-size: 15px; border-bottom: 1px solid rgba(255,255,255,.08);
}
.pc-side .brand .logo-mark {
  width: 34px; height: 34px; border-radius: 9px; background: var(--grad);
  display: inline-flex; align-items: center; justify-content: center; font-size: 17px;
}
.pc-nav { flex: 1; padding: 10px 8px; overflow-y: auto; }
.pc-nav a {
  display: flex; align-items: center; gap: 10px; padding: 11px 14px; margin: 2px 0;
  color: #CFD6E6; border-radius: 8px; font-size: 14px; transition: background .2s;
}
.pc-nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.pc-nav a.active { background: var(--grad); color: #fff; font-weight: 500; }
.pc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pc-top {
  height: 60px; background: #fff; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; padding: 0 24px;
}
.pc-top .crumb { font-size: 15px; font-weight: 600; }
.pc-top .user { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.pc-top .avatar {
  width: 34px; height: 34px; border-radius: 50%; background: var(--grad);
  color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 14px;
}
.pc-top .logout { color: var(--text-sub); font-size: 13px; }
.pc-top .logout:hover { color: var(--danger); }
.pc-content { padding: 20px 24px; flex: 1; }

/* ---------- 卡片 / 统计 ---------- */
.card { background: var(--card); border-radius: 12px; border: 1px solid var(--border); padding: 18px 20px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat-item {
  background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px;
  border-top: 3px solid var(--primary);
}
.stat-item .num { font-size: 26px; font-weight: 700; color: var(--primary); margin: 6px 0 2px; }
.stat-item .lab { color: var(--text-sub); font-size: 13px; }
.section-title { font-size: 15px; font-weight: 600; margin-bottom: 12px; }

/* ---------- 通用表格 ---------- */
.table-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; flex-wrap: wrap; gap: 10px; }
.table-toolbar h2 { font-size: 17px; }
.search-box { display: flex; gap: 8px; }
.search-box input {
  height: 34px; width: 240px; border: 1px solid var(--border); border-radius: 8px; padding: 0 12px; font-size: 13px; outline: none;
}
.search-box input:focus { border-color: var(--primary); }
.search-box button {
  height: 34px; padding: 0 18px; border: none; border-radius: 8px; background: var(--grad);
  color: #fff; font-size: 13px; cursor: pointer;
}
.data-table { width: 100%; border-collapse: collapse; background: #fff; }
.data-table th {
  background: #F2F5FA; text-align: left; padding: 10px 12px; font-size: 13px;
  color: var(--text-sub); font-weight: 600; border-bottom: 1px solid var(--border);
}
.data-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); font-size: 13px; }
.data-table tr:hover td { background: #FAFBFF; }
.tag {
  display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px;
  background: #EEF1F6; color: var(--text-sub);
}
.tag.blue { background: #E8F0FE; color: var(--primary); }
.tag.green { background: #E6F6EF; color: var(--success); }
.tag.orange { background: #FDF3E3; color: var(--accent); }
.tag.red { background: #FDF0F0; color: var(--danger); }
.pager { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; font-size: 13px; align-items: center; }
.pager a, .pager span {
  display: inline-flex; min-width: 28px; height: 28px; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: 6px; padding: 0 6px; color: var(--text);
}
.pager .current { background: var(--primary); color: #fff; border-color: var(--primary); }
.empty-tip { text-align: center; color: var(--text-sub); padding: 40px 0; }

/* ---------- H5 ---------- */
.h5-app { max-width: 480px; margin: 0 auto; min-height: 100vh; background: var(--bg); }
.h5-header {
  background: var(--grad); color: #fff; padding: 20px 16px 16px;
  border-radius: 0 0 18px 18px;
}
.h5-header .hi { font-size: 18px; font-weight: 600; margin-bottom: 4px; }
.h5-header .sub { font-size: 12px; opacity: .9; }
.h5-body { padding: 14px 12px 70px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.grid-item {
  background: #fff; border-radius: 12px; border: 1px solid var(--border);
  padding: 14px 6px; text-align: center; font-size: 12px; color: var(--text);
}
.grid-item .ic { width: 40px; height: 40px; margin: 0 auto 6px; border-radius: 10px; background: var(--grad); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.h5-card { background: #fff; border-radius: 12px; border: 1px solid var(--border); padding: 14px 16px; margin-bottom: 12px; }
.h5-card .t { font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.h5-row { display: flex; justify-content: space-between; padding: 7px 0; font-size: 13px; border-bottom: 1px dashed #F0F1F3; }
.h5-row:last-child { border-bottom: none; }
.h5-row .k { color: var(--text-sub); }
.h5-tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px; background: #fff; border-top: 1px solid var(--border);
  display: flex; z-index: 10;
}
.h5-tabbar a {
  flex: 1; text-align: center; padding: 9px 0 8px; font-size: 11px; color: var(--text-sub);
}
.h5-tabbar a.active { color: var(--primary); font-weight: 600; }
.h5-tabbar .ic { font-size: 18px; display: block; margin-bottom: 2px; }
.h5-fab {
  position: fixed; right: 16px; bottom: 76px; width: 46px; height: 46px; border-radius: 50%;
  background: var(--grad); color: #fff; font-size: 22px; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 20px rgba(46, 92, 213, .4); z-index: 9;
}
.badge {
  background: var(--danger); color: #fff; font-size: 11px; border-radius: 10px;
  padding: 0 6px; margin-left: 4px;
}

@media (max-width: 900px) {
  .pc-side { width: 76px; }
  .pc-side .brand span.txt, .pc-nav a span { display: none; }
  .pc-nav a { justify-content: center; }
  .search-box input { width: 160px; }
}
