/* ============================================================
   道路设施运维管理系统 —— Web 端样式
   设计目标：一份 CSS 同时适配电脑（侧边栏布局）和手机（底部标签栏）
   ============================================================ */

:root {
  --blue: #2b6ef2;
  --blue-dark: #1d55c9;
  --blue-light: #eef4ff;
  --ink: #1b2437;
  --ink-2: #4a5464;
  --gray: #8b93a1;
  --line: #eaeef5;
  --bg: #f2f4f8;
  --white: #fff;
  --green: #12a150;
  --orange: #e08600;
  --red: #e5484d;
  --radius: 14px;
  --shadow: 0 3px 14px rgba(22, 44, 92, .06);
  --shadow-lg: 0 18px 50px rgba(18, 36, 74, .18);
}

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

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

button { font-family: inherit; font-size: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; outline: none; }
code { font-family: ui-monospace, Menlo, Consolas, "Courier New", monospace; }
[hidden] { display: none !important; }

/* ============================================================
   一、登录页
   ============================================================ */
.login {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  position: relative;
  overflow: hidden;
  background: #0d1b3e;
}
.login-bg {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(900px 520px at 12% 8%, rgba(74, 139, 255, .55), transparent 62%),
    radial-gradient(700px 460px at 88% 92%, rgba(43, 110, 242, .45), transparent 60%),
    linear-gradient(150deg, #0f1f47 0%, #16295c 45%, #0d1b3e 100%);
}
.login-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(circle at 50% 40%, #000 30%, transparent 78%);
  -webkit-mask-image: radial-gradient(circle at 50% 40%, #000 30%, transparent 78%);
}
.login-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 392px;
  background: var(--white);
  border-radius: 20px;
  padding: 26px 24px 22px;
  box-shadow: var(--shadow-lg);
}
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.login-logo {
  flex: none;
  width: 46px; height: 46px;
  border-radius: 13px;
  background: linear-gradient(140deg, #2b6ef2, #6aa3ff);
  color: #fff;
  font-size: 19px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 16px rgba(43, 110, 242, .32);
}
.login-brand h1 { font-size: 17px; font-weight: 700; letter-spacing: .3px; }
.login-brand p { font-size: 11px; color: var(--gray); letter-spacing: .2px; margin-top: 1px; }

.seg {
  display: flex;
  background: #f1f4f9;
  border-radius: 11px;
  padding: 3px;
  margin-bottom: 18px;
}
.seg button {
  flex: 1;
  height: 34px;
  border-radius: 9px;
  font-size: 13.5px;
  color: var(--ink-2);
  transition: .18s;
}
.seg button.on {
  background: var(--white);
  color: var(--blue);
  font-weight: 600;
  box-shadow: 0 1px 5px rgba(22, 44, 92, .1);
}

.fl { display: block; margin-bottom: 14px; }
.fl span { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.fl input, .fl select, .fl textarea {
  width: 100%;
  height: 42px;
  border: 1px solid #e2e8f2;
  border-radius: 10px;
  padding: 0 13px;
  background: #fafbfd;
  transition: .16s;
}
.fl textarea { height: auto; min-height: 84px; padding: 11px 13px; resize: vertical; line-height: 1.6; }
.fl input:focus, .fl select:focus, .fl textarea:focus {
  border-color: var(--blue);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(43, 110, 242, .1);
}

.login-err {
  font-size: 12.5px;
  color: var(--red);
  min-height: 18px;
  margin: -4px 0 8px;
}

.btn-primary {
  height: 44px;
  border-radius: 11px;
  background: linear-gradient(135deg, #2b6ef2, #4b8bff);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 2px;
  box-shadow: 0 6px 16px rgba(43, 110, 242, .28);
  transition: .16s;
}
.btn-primary:active { transform: translateY(1px); box-shadow: 0 3px 10px rgba(43, 110, 242, .24); }
.btn-primary:disabled { opacity: .6; letter-spacing: 0; }
.btn-block { width: 100%; }

.login-tip {
  margin-top: 18px;
  padding: 12px 13px;
  background: #f7f9fd;
  border: 1px dashed #dde5f3;
  border-radius: 11px;
  font-size: 12px;
  color: var(--gray);
}
.login-tip b { color: var(--ink-2); font-weight: 600; }
.tip-row { display: flex; justify-content: space-between; margin-top: 5px; }
.tip-row code { color: var(--blue); font-size: 12px; }

/* ============================================================
   二、主布局
   ============================================================ */
.app { display: flex; min-height: 100%; }

/* ---------- 侧边栏（桌面） ---------- */
.sidebar {
  width: 216px;
  flex: none;
  background: #101c3a;
  color: #fff;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 20px 18px 18px; }
.brand-logo {
  flex: none;
  width: 34px; height: 34px;
  border-radius: 10px;
  background: linear-gradient(140deg, #2b6ef2, #6aa3ff);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px;
}
.brand-txt b { display: block; font-size: 13.5px; font-weight: 600; letter-spacing: .3px; }
.brand-txt small { display: block; font-size: 10.5px; color: rgba(255,255,255,.45); letter-spacing: 1.4px; }

.nav { flex: 1; padding: 6px 10px; overflow-y: auto; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 11px;
  border-radius: 10px;
  color: rgba(255,255,255,.66);
  font-size: 13.5px;
  margin-bottom: 3px;
  transition: .16s;
  width: 100%;
  text-align: left;
}
.nav-item svg { flex: none; opacity: .85; }
.nav-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-item.on {
  background: linear-gradient(135deg, #2b6ef2, #3f7ff5);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(43, 110, 242, .35);
}
.nav-item .badge {
  margin-left: auto;
  min-width: 18px; height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}

.side-user {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 14px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.avatar {
  flex: none;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,.14);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600;
}
.side-user-txt { min-width: 0; flex: 1; }
.side-user-txt b { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user-txt small { display: block; font-size: 11px; color: rgba(255,255,255,.45); }
.icon-btn {
  width: 30px; height: 30px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: inherit;
  opacity: .65;
  transition: .16s;
}
.icon-btn:hover { opacity: 1; background: rgba(255,255,255,.1); }

/* ---------- 内容区 ---------- */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 26px 14px;
  background: rgba(242, 244, 248, .9);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar h2 { font-size: 19px; font-weight: 700; letter-spacing: .2px; }
.topbar p { font-size: 12.5px; color: var(--gray); margin-top: 1px; }
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 34px;
  padding: 0 13px;
  border-radius: 9px;
  background: var(--white);
  border: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 13px;
  transition: .16s;
}
.btn-ghost:hover { border-color: #d5dfef; color: var(--blue); }

.content { padding: 0 26px 34px; flex: 1; }

/* ---------- 卡片通用 ---------- */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}
.card + .card { margin-top: 14px; }
.card-hd { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-t { font-size: 14.5px; font-weight: 700; }
.card-sub { font-size: 12px; color: var(--gray); }

/* ---------- 统计卡 ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 13px;
  margin-bottom: 14px;
}
.stat {
  background: var(--white);
  border-radius: var(--radius);
  padding: 16px 16px 14px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.stat::after {
  content: "";
  position: absolute;
  right: -20px; top: -24px;
  width: 78px; height: 78px;
  border-radius: 50%;
  background: var(--accent, #eef4ff);
  opacity: .55;
}
.stat-k { font-size: 12.5px; color: var(--gray); position: relative; z-index: 1; }
.stat-v {
  font-size: 27px;
  font-weight: 700;
  letter-spacing: -.5px;
  margin-top: 3px;
  position: relative; z-index: 1;
  font-variant-numeric: tabular-nums;
}
.stat-v small { font-size: 13px; font-weight: 600; color: var(--gray); margin-left: 2px; }
.stat-foot { font-size: 11.5px; color: var(--gray); margin-top: 4px; position: relative; z-index: 1; }
.stat.hl .stat-v { color: var(--blue); }
.stat.warn .stat-v { color: var(--orange); }
.stat.danger .stat-v { color: var(--red); }
.stat.ok .stat-v { color: var(--green); }

/* ---------- 两列布局 ---------- */
.cols { display: grid; grid-template-columns: 1.15fr .85fr; gap: 14px; align-items: start; }

/* ---------- 条形图 ---------- */
.bars { display: flex; flex-direction: column; gap: 11px; }
.bar-row { display: flex; align-items: center; gap: 10px; font-size: 12.5px; }
.bar-k { flex: none; width: 62px; color: var(--ink-2); }
.bar-track { flex: 1; height: 8px; border-radius: 4px; background: #f0f3f9; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 4px; background: linear-gradient(90deg, #2b6ef2, #6aa3ff); transition: width .5s ease; }
.bar-v { flex: none; width: 34px; text-align: right; color: var(--gray); font-variant-numeric: tabular-nums; }

/* ---------- 折线图 ---------- */
.trend { width: 100%; height: 150px; display: block; }

/* ---------- 排行 ---------- */
.rank { display: flex; flex-direction: column; gap: 2px; }
.rank-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 13px;
}
.rank-item:last-child { border-bottom: none; }
.rank-no {
  flex: none; width: 20px; height: 20px;
  border-radius: 6px;
  background: #f0f3f9;
  color: var(--gray);
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.rank-item:nth-child(1) .rank-no { background: #fff2d9; color: #b37800; }
.rank-item:nth-child(2) .rank-no { background: #eef1f6; color: #6b7688; }
.rank-item:nth-child(3) .rank-no { background: #fdece4; color: #b45b2c; }
.rank-name { flex: 1; }
.rank-v { color: var(--blue); font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- 工单列表 ---------- */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab {
  height: 32px;
  padding: 0 14px;
  border-radius: 8px;
  background: var(--white);
  border: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 13px;
  transition: .16s;
}
.tab:hover { border-color: #d5dfef; }
.tab.on { background: var(--blue); border-color: var(--blue); color: #fff; font-weight: 600; }
.search {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 12px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--gray);
}
.search input { border: none; background: none; width: 160px; font-size: 13px; }

.order-list { display: flex; flex-direction: column; gap: 10px; }
.order {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 15px 17px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: .16s;
  border: 1px solid transparent;
}
.order:hover { border-color: #d7e3fb; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(22,44,92,.09); }
.order-ic {
  flex: none;
  width: 42px; height: 42px;
  border-radius: 11px;
  background: var(--blue-light);
  color: var(--blue);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700;
}
.order-main { flex: 1; min-width: 0; }
.order-t { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.order-m { font-size: 12.5px; color: var(--gray); margin-top: 3px; display: flex; gap: 12px; flex-wrap: wrap; }
.order-r { flex: none; text-align: right; }
.order-no { font-size: 11.5px; color: #a8b0be; font-variant-numeric: tabular-nums; margin-top: 5px; }

.pill {
  display: inline-flex; align-items: center;
  height: 20px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
}
.pill.lv1 { background: #eef1f6; color: #6b7688; }
.pill.lv2 { background: #fff5e5; color: #c47c00; }
.pill.lv3 { background: #ffecec; color: #d93a3f; }

.st { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 7px; font-size: 12px; font-weight: 600; }
.st-CREATED { background: #fff5e5; color: #c47c00; }
.st-DISPATCHED { background: var(--blue-light); color: var(--blue); }
.st-PROCESSING { background: #eaf2ff; color: #2a63d6; }
.st-RECTIFIED { background: #f0ecff; color: #6c4ad4; }
.st-FINISHED { background: #e8f8ef; color: var(--green); }
.st-CANCELLED { background: #f2f4f8; color: #8b93a1; }
.st-REJECTED { background: #ffecec; color: var(--red); }

.empty { text-align: center; padding: 54px 20px; color: var(--gray); font-size: 13px; }
.empty svg { opacity: .35; margin-bottom: 10px; }

.pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 18px; font-size: 13px; color: var(--gray); }
.pager button {
  height: 30px; padding: 0 13px;
  border-radius: 8px;
  background: var(--white);
  border: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 13px;
}
.pager button:disabled { opacity: .4; cursor: default; }

/* ---------- 表单页 ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-grid .full { grid-column: 1 / -1; }
.req::after { content: " *"; color: var(--red); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  height: 34px;
  padding: 0 14px;
  border-radius: 9px;
  border: 1px solid #e2e8f2;
  background: #fafbfd;
  color: var(--ink-2);
  font-size: 13px;
  transition: .16s;
}
.chip.on { border-color: var(--blue); background: var(--blue-light); color: var(--blue); font-weight: 600; }

.uploader { display: flex; flex-wrap: wrap; gap: 9px; }
.up-add {
  width: 76px; height: 76px;
  border-radius: 10px;
  border: 1px dashed #d3ddec;
  background: #fafbfd;
  color: var(--gray);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px;
  font-size: 11px;
}
.up-add:hover { border-color: var(--blue); color: var(--blue); }
.up-item { width: 76px; height: 76px; border-radius: 10px; overflow: hidden; position: relative; background: #f0f3f9; }
.up-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.up-item button {
  position: absolute; top: 2px; right: 2px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size: 12px;
  line-height: 1;
  display: flex; align-items: center; justify-content: center;
}

.form-actions { display: flex; gap: 10px; margin-top: 18px; }
.btn-secondary {
  height: 44px;
  padding: 0 20px;
  border-radius: 11px;
  background: var(--white);
  border: 1px solid #e2e8f2;
  color: var(--ink-2);
  font-size: 14px;
}

/* ---------- 表格（桌面）/ 卡片（手机） ---------- */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th {
  text-align: left;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--gray);
  background: #f8fafd;
  white-space: nowrap;
}
.tbl th:first-child { border-radius: 9px 0 0 9px; }
.tbl th:last-child { border-radius: 0 9px 9px 0; }
.tbl td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: none; }
.tbl .mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; color: var(--blue); }
.tbl .muted { color: var(--gray); font-size: 12.5px; }

.link { color: var(--blue); font-size: 12.5px; padding: 3px 6px; border-radius: 6px; }
.link:hover { background: var(--blue-light); }
.link.danger { color: var(--red); }
.link.danger:hover { background: #ffecec; }

/* ============================================================
   三、抽屉 / 弹窗 / 提示
   ============================================================ */
.mask {
  position: fixed;
  inset: 0;
  background: rgba(15, 27, 55, .42);
  backdrop-filter: blur(2px);
  z-index: 60;
  animation: fade .18s ease;
}
@keyframes fade { from { opacity: 0; } }

.drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 460px;
  max-width: 100%;
  background: var(--bg);
  z-index: 61;
  display: flex;
  flex-direction: column;
  box-shadow: -12px 0 40px rgba(15, 27, 55, .16);
  animation: slideIn .22s cubic-bezier(.22,.8,.32,1);
}
@keyframes slideIn { from { transform: translateX(28px); opacity: .6; } }
.drawer-hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  flex: none;
}
.drawer-hd b { font-size: 15px; }
.drawer-hd .icon-btn { color: var(--ink-2); }
.drawer-bd { flex: 1; overflow-y: auto; padding: 14px; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 27, 55, .42);
  backdrop-filter: blur(2px);
}
.modal-card {
  width: 100%;
  max-width: 420px;
  background: var(--white);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  animation: pop .18s cubic-bezier(.22,.8,.32,1);
  max-height: 86vh;
  display: flex;
  flex-direction: column;
}
@keyframes pop { from { transform: scale(.96); opacity: .5; } }
.modal-hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 16px;
  border-bottom: 1px solid var(--line);
  flex: none;
}
.modal-hd b { font-size: 14.5px; }
.modal-bd { padding: 16px; overflow-y: auto; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 78px;
  transform: translateX(-50%);
  max-width: 86vw;
  padding: 10px 18px;
  border-radius: 10px;
  background: rgba(20, 32, 58, .94);
  color: #fff;
  font-size: 13px;
  z-index: 90;
  box-shadow: 0 8px 24px rgba(10, 20, 40, .28);
  animation: toastIn .2s ease;
}
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 8px); } }

/* ---------- 详情内容 ---------- */
.dv-card { background: var(--white); border-radius: 13px; padding: 16px; box-shadow: var(--shadow); }
.dv-card + .dv-card { margin-top: 11px; }
.dv-title { font-size: 14px; font-weight: 700; margin-bottom: 11px; display: flex; align-items: center; justify-content: space-between; }
.dv-row { display: flex; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.dv-row:last-child { border-bottom: none; }
.dv-k { flex: none; width: 74px; color: var(--gray); }
.dv-v { flex: 1; word-break: break-word; }
.dv-imgs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.dv-imgs img { width: 82px; height: 82px; object-fit: cover; border-radius: 9px; background: #f0f3f9; cursor: zoom-in; }

.tl { position: relative; padding-left: 18px; }
.tl::before { content: ""; position: absolute; left: 4px; top: 6px; bottom: 6px; width: 2px; background: #eef2f8; }
.tl-item { position: relative; padding-bottom: 13px; font-size: 12.5px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: "";
  position: absolute;
  left: -18px; top: 5px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #cfd9e8;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px #e4eaf3;
}
.tl-item:first-child::before { background: var(--blue); box-shadow: 0 0 0 1px #bcd3fd; }
.tl-t { color: var(--ink); }
.tl-d { color: #a8b0be; font-size: 11.5px; margin-top: 1px; }

.actions { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 12px; }
.actions button {
  flex: 1;
  min-width: 92px;
  height: 40px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  border: 1px solid #e2e8f2;
  background: var(--white);
  color: var(--ink-2);
}
.actions button.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.actions button.ok { background: var(--green); border-color: var(--green); color: #fff; }
.actions button.warn { background: #fff; border-color: #ffd9a8; color: #c47c00; }
.actions button.danger { background: #fff; border-color: #ffd2d3; color: var(--red); }

.qr-box { text-align: center; }
.qr-box img { width: 220px; height: 220px; object-fit: contain; border-radius: 10px; background: #fff; }
.qr-url { font-size: 11.5px; color: var(--gray); word-break: break-all; margin-top: 8px; line-height: 1.5; }

/* ============================================================
   四、手机适配
   ============================================================ */
.tabbar { display: none; }

@media (max-width: 980px) {
  .cols { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  body { font-size: 14px; }

  .sidebar { display: none; }

  .topbar { padding: 14px 16px 10px; }
  .topbar h2 { font-size: 17px; }
  .content { padding: 0 14px calc(72px + env(safe-area-inset-bottom)); }

  .card { padding: 15px 14px; border-radius: 13px; }
  .stat-grid { gap: 10px; }
  .stat { padding: 13px 12px 12px; border-radius: 13px; }
  .stat-v { font-size: 23px; }
  .stat-k { font-size: 12px; }

  .search { margin-left: 0; flex: 1; }
  .search input { width: 100%; }
  .toolbar { gap: 8px; }
  .tabs { width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { flex: none; }

  .order { padding: 13px 14px; gap: 11px; border-radius: 13px; }
  .order-ic { width: 38px; height: 38px; font-size: 13px; border-radius: 10px; }
  .order-t { font-size: 13.5px; }
  .order-m { gap: 8px; font-size: 12px; }
  .order-r .st { height: 20px; font-size: 11.5px; }

  /* 表格在手机上转为卡片 */
  .tbl thead { display: none; }
  .tbl, .tbl tbody, .tbl tr, .tbl td { display: block; width: 100%; }
  .tbl tr {
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
    position: relative;
  }
  .tbl tr:last-child { border-bottom: none; }
  .tbl td { border: none; padding: 3px 0; }
  .tbl td[data-k]::before {
    content: attr(data-k) "  ";
    color: var(--gray);
    font-size: 12px;
    margin-right: 6px;
  }

  /* 底部标签栏 */
  .tabbar {
    display: flex;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,.96);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom);
    z-index: 40;
  }
  .tabbar button {
    flex: 1;
    height: 56px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: #98a1b0;
    font-size: 10.5px;
    position: relative;
  }
  .tabbar button.on { color: var(--blue); font-weight: 600; }
  .tabbar button.on::before {
    content: "";
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 22px; height: 3px;
    border-radius: 0 0 3px 3px;
    background: var(--blue);
  }

  .drawer { width: 100%; top: auto; height: 88vh; border-radius: 18px 18px 0 0; }
  @keyframes slideIn { from { transform: translateY(30px); opacity: .6; } }
  .drawer-bd { padding: 12px 12px calc(20px + env(safe-area-inset-bottom)); }

  .toast { bottom: calc(78px + env(safe-area-inset-bottom)); }

  .actions button { min-width: 0; }

  .login-card { padding: 22px 18px 18px; border-radius: 18px; }
  .login-brand h1 { font-size: 16px; }
}
