/* ============================================================
   多部门联合办公 H5 —— 全局样式
   ============================================================ */
:root {
  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --text: #172033;
  --text-2: #5b6472;
  --text-3: #8a93a2;
  --border: #e3e7ee;
  --primary: #2563eb;
  --primary-strong: #1d4ed8;
  --primary-soft: #e8efff;
  --danger: #dc2626;
  --danger-soft: #feeaea;
  --ok: #15803d;
  --radius: 14px;
  --radius-s: 10px;
  --header-h: 52px;
  --nav-h: 58px;
  --shadow-1: 0 1px 2px rgba(23, 32, 51, .06);
  --shadow-2: 0 8px 24px rgba(23, 32, 51, .10);
  --ease: cubic-bezier(.22, .9, .35, 1);
  --font: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

a { color: var(--primary); text-decoration: none; }

h1, h2, h3 { text-wrap: balance; line-height: 1.35; }

img { max-width: 100%; display: block; }

/* ---------- 通用工具 ---------- */
.hidden { display: none !important; }

.muted { color: var(--text-2); }
.tiny { font-size: 12.5px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  border-radius: var(--radius-s);
  padding: 10px 18px;
  font-weight: 600;
  cursor: pointer;
  background: var(--primary);
  color: #fff;
  transition: background .18s var(--ease), transform .12s var(--ease);
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-block { width: 100%; }

.btn-soft {
  background: var(--primary-soft);
  color: var(--primary-strong);
}
.btn-soft:hover { background: #dbe7ff; }

.btn-danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.btn-ghost {
  background: transparent;
  color: var(--text-2);
  border: 1px solid var(--border);
}

.field { margin-bottom: 16px; }

.field > label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 6px;
}
.field .req { color: var(--danger); margin-left: 2px; }
.field .opt { color: var(--text-3); font-weight: 400; font-size: 12px; margin-left: 3px; }

.field > input, .field > textarea, .field > select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  padding: 10px 12px;
  background: var(--surface);
  outline: none;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.field > textarea { min-height: 110px; resize: vertical; line-height: 1.7; }
.field > input:focus, .field > textarea:focus, .field > select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .14);
}
.field .hint { font-size: 12.5px; color: var(--text-3); margin-top: 5px; }

/* ---------- 布局 ---------- */
.app {
  max-width: 720px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.app-header .brand {
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: -.01em;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.app-header .brand .dot {
  width: 10px; height: 10px;
  border-radius: 3px;
  background: var(--primary);
}

.app-main { flex: 1; padding: 14px 16px calc(var(--nav-h) + 26px); }

.app-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 720px;
  height: var(--nav-h);
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex;
  z-index: 20;
}
.app-nav button {
  flex: 1;
  border: none;
  background: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--text-3);
  font-size: 11.5px;
  cursor: pointer;
  transition: color .15s var(--ease);
}
.app-nav button .ico { font-size: 19px; line-height: 1; }
.app-nav button.on { color: var(--primary-strong); font-weight: 600; }

/* ---------- 顶部工具栏 ---------- */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 4px 0 12px;
}
.toolbar .title { font-size: 17px; font-weight: 700; }

.search {
  flex: 1;
  max-width: 260px;
  position: relative;
}
.search input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 7px 12px 7px 32px;
  background: var(--surface);
  font-size: 13.5px;
  outline: none;
}
.search::before {
  content: "";
  position: absolute;
  left: 11px; top: 50%;
  width: 12px; height: 12px;
  border: 1.6px solid var(--text-3);
  border-radius: 50%;
  transform: translateY(-60%);
}
.search::after {
  content: "";
  position: absolute;
  left: 21px; top: 55%;
  width: 6px; height: 1.6px;
  background: var(--text-3);
  transform: rotate(45deg);
}

/* ---------- 筛选栏 ---------- */
.filter-bar { display: flex; gap: 8px; margin: 0 0 8px; align-items: center; }
.filter-bar input[type="date"], .filter-bar select {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  background: var(--surface);
  font-size: 13px;
  color: var(--text-2);
  outline: none;
}
.filter-bar .btn { flex-shrink: 0; padding: 8px 12px; font-size: 13px; }
.filter-sep { color: var(--text-3); font-size: 13px; flex-shrink: 0; }
.date-range-btn { flex: 1; min-width: 0; justify-content: flex-start; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 日历范围选择 ---------- */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-nav {
  border: 1px solid var(--border);
  background: var(--surface-2);
  width: 34px; height: 34px;
  border-radius: 9px;
  font-size: 18px;
  cursor: pointer;
  color: var(--text-2);
}
.cal-title { font-weight: 700; font-size: 15px; }
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-auto-rows: 40px;
  gap: 2px;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.cal-w {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--text-3);
}
.cal-d {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  font-size: 13.5px;
  cursor: pointer;
  color: var(--text);
}
.cal-d.empty { cursor: default; }
.cal-d.today { font-weight: 700; color: var(--primary-strong); }
.cal-d.in { background: var(--primary-soft); border-radius: 0; }
.cal-d.edge { background: var(--primary); color: #fff; font-weight: 700; border-radius: 9px; }
.cal-tip { margin-top: 12px; font-size: 13px; color: var(--text-2); min-height: 20px; }
.cal-actions { display: flex; gap: 10px; margin-top: 12px; }
.cal-actions .btn { flex: 1; }

/* ---------- 列表 ---------- */
.list { display: flex; flex-direction: column; }

.list-item {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease), transform .12s var(--ease);
}
.list-item:active { transform: scale(.985); }
.list-item h3 {
  font-size: 15.5px;
  font-weight: 650;
  margin-bottom: 5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.list-item .desc {
  font-size: 13px;
  color: var(--text-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 9px;
}
.list-item .meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-3);
  flex-wrap: wrap;
}
.list-item .meta > span { white-space: nowrap; }
.list-item .meta .tag {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1px 7px;
  color: var(--text-2);
}

/* ---------- 详情页 ---------- */
.detail-top {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 12px;
}
.detail-top .back {
  border: none;
  background: none;
  font-size: 20px;
  padding: 4px 8px 4px 0;
  cursor: pointer;
  color: var(--text-2);
}

.detail-ops {
  display: flex;
  gap: 10px;
  margin: 2px 0 14px;
}
.detail-ops .btn { flex: 1; white-space: nowrap; }

.clue .head .time { margin-left: auto; text-align: right; white-space: nowrap; font-size: 11.5px; color: var(--text-3); }
.clue .head .time .tiny { font-size: 11px; }

.clue-ops { display: flex; justify-content: flex-end; gap: 8px; margin-top: 9px; }
.clue-ops button {
  border: 1px solid var(--border);
  background: var(--surface-2);
  border-radius: 6px;
  padding: 3px 12px;
  font-size: 12.5px;
  cursor: pointer;
  color: var(--text-2);
}
.clue-ops button.del { color: var(--danger); }

.e-ops { display: flex; gap: 8px; margin-top: 7px; }
.e-ops button {
  border: 1px solid var(--border);
  background: var(--surface-2);
  border-radius: 6px;
  padding: 3px 12px;
  font-size: 12.5px;
  cursor: pointer;
  color: var(--text-2);
}
.e-ops button.del { color: var(--danger); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}
.card h2 { font-size: 18px; margin-bottom: 8px; }
.card .meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  font-size: 12.5px;
  color: var(--text-3);
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--border);
}
.card .meta-row span { white-space: nowrap; }
.card .content { font-size: 14.5px; line-height: 1.75; white-space: pre-wrap; word-break: break-word; }

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-2);
  margin: 18px 0 10px;
}
.section-title .count {
  background: var(--primary-soft);
  color: var(--primary-strong);
  border-radius: 10px;
  padding: 0 8px;
  font-size: 12px;
}

/* 线索 */
.clue {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 13px 14px;
  margin-bottom: 9px;
}
.clue .head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-2);
  margin-bottom: 6px;
}
.clue .head .who {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.clue .avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.clue .body { font-size: 14px; line-height: 1.7; white-space: pre-wrap; word-break: break-word; }

/* 附件 */
.attach-list { display: flex; flex-direction: column; gap: 7px; }
.attach {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  padding: 8px 11px;
  font-size: 13px;
  cursor: pointer;
}
.attach .f-ico { font-size: 16px; }
.attach .f-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attach .f-size { color: var(--text-3); font-size: 12px; flex-shrink: 0; }

/* ---------- 专家 ---------- */
.field-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 12px;
  scrollbar-width: none;
}
.field-chips::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 16px;
  padding: 6px 14px;
  font-size: 13px;
  color: var(--text-2);
  cursor: pointer;
  transition: all .15s var(--ease);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.chip .cnt { color: var(--text-3); font-size: 12px; }
.chip.on {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 600;
}
.chip.on .cnt { color: rgba(255,255,255,.8); }

.expert-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 10px;
}
.expert-card .e-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-size: 17px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.expert-card .e-info { flex: 1; min-width: 0; }.expert-card .e-info .name { font-weight: 650; font-size: 15px; }
.expert-card .e-info .field { font-size: 12.5px; color: var(--text-2); margin: 1px 0 3px; }
.expert-card .e-info .contact {
  font-size: 13px;
  color: var(--text-3);
  display: flex;
  align-items: center;
  gap: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.expert-card .e-meta { color: var(--text-3); font-size: 11.5px; margin-top: 5px; line-height: 1.5; }

/* ---------- 悬浮发布按钮 ---------- */
.fab {
  position: fixed;
  bottom: calc(var(--nav-h) + 18px);
  right: max(18px, calc(50% - 342px));
  width: 50px; height: 50px;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  color: #fff;
  font-size: 24px;
  font-weight: 400;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(37, 99, 235, .35);
  transition: transform .15s var(--ease), background .15s var(--ease);
  z-index: 15;
}
.fab:active { transform: scale(.92); }

/* ---------- 弹层（表单 sheet） ---------- */
.sheet-mask {
  position: fixed;
  inset: 0;
  background: rgba(23, 32, 51, .45);
  z-index: 40;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  transition: opacity .2s var(--ease);
}
.sheet-mask.open { opacity: 1; }

.sheet {
  width: 100%;
  max-width: 720px;
  max-height: 88vh;
  overflow-y: auto;
  background: var(--surface);
  border-radius: 18px 18px 0 0;
  padding: 18px 18px calc(18px + env(safe-area-inset-bottom));
  transform: translateY(100%);
  transition: transform .24s var(--ease);
}
.sheet-mask.open .sheet { transform: translateY(0); }
.sheet .sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.sheet .sheet-head h3 { font-size: 17px; }
.sheet .sheet-close {
  border: none;
  background: var(--surface-2);
  width: 30px; height: 30px;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  color: var(--text-2);
}

/* ---------- 登录 ---------- */
.login-view {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.login-box {
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px 24px;
  box-shadow: var(--shadow-2);
}
.login-box .logo {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 14px;
}
.login-box h1 { font-size: 19px; margin-bottom: 4px; }
.login-box .sub { font-size: 13px; color: var(--text-3); margin-bottom: 20px; }
.login-box .login-tip {
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--text-3);
  text-align: center;
  line-height: 1.8;
}

/* ---------- 我的页 ---------- */
.me-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 16px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.me-card .avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.me-card .m-info .name { font-size: 17px; font-weight: 700; }
.me-card .m-info .dept { font-size: 13px; color: var(--text-2); margin-top: 2px; }

/* ---------- 空态 / 加载 ---------- */
.empty {
  text-align: center;
  color: var(--text-3);
  padding: 46px 20px;
  font-size: 13.5px;
}
.empty .e-ico { font-size: 36px; margin-bottom: 10px; opacity: .7; }

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

/* ---------- Toast ---------- */
.toast-wrap {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  width: max-content;
  max-width: 88vw;
  pointer-events: none;
}
.toast {
  background: rgba(23, 32, 51, .92);
  color: #fff;
  font-size: 13.5px;
  border-radius: 10px;
  padding: 9px 16px;
  box-shadow: var(--shadow-2);
  animation: toast-in .22s var(--ease);
}
.toast.err { background: rgba(185, 28, 28, .95); }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   控制台（console）
   ============================================================ */
.console-body { background: var(--bg); }

.console-head {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  height: 54px;
}
.console-head .brand { font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.console-head .brand .dot { width: 9px; height: 9px; border-radius: 3px; background: var(--primary); }
.console-head .who { font-size: 13px; color: var(--text-2); display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.console-head .logout {
  border: 1px solid var(--border);
  background: none;
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 12.5px;
  color: var(--text-2);
  cursor: pointer;
}

.console-tabs {
  display: flex;
  gap: 4px;
  padding: 12px 18px 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.console-tabs button {
  border: none;
  background: none;
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-3);
  cursor: pointer;
  border-bottom: 2.5px solid transparent;
  margin-bottom: -1px;
}
.console-tabs button.on { color: var(--primary-strong); border-bottom-color: var(--primary); }

.console-main { max-width: 860px; margin: 0 auto; padding: 18px 16px 60px; }

.console-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
.console-bar .title { font-size: 16px; font-weight: 700; }
.console-bar .sub { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }

.table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
@media (max-width: 600px) {
  .console-head { padding: 0 12px; gap: 6px; }
  .console-head .brand { font-size: 13px; }
  .console-tabs { padding: 10px 12px 0; gap: 2px; }
  .console-tabs button { font-size: 13px; padding: 7px 10px; }
  .console-main { padding: 12px 10px 60px; }
  .console-bar { flex-direction: column; align-items: flex-start; gap: 8px; }
  .console-bar .title { font-size: 15px; }

  /* 表格在小屏隐藏，改用卡片 */
  .table-wrap table.tbl { display: none; }
  .card-list { display: block !important; }

  .card-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 14px;
    margin-bottom: 10px;
  }
  .card-item .ci-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
  .card-item .ci-row:last-child { margin-bottom: 0; }
  .card-item .ci-label { font-size: 12.5px; color: var(--text-3); flex-shrink: 0; margin-right: 8px; }
  .card-item .ci-value { font-size: 13.5px; text-align: right; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .card-item .ci-name { font-weight: 700; font-size: 15px; }
  .card-item .ci-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
  .card-item .ci-actions button {
    flex: 1; min-width: 60px;
    border: none;
    border-radius: 7px;
    padding: 7px 0;
    font-size: 13px;
    cursor: pointer;
    background: var(--primary-soft);
    color: var(--primary-strong);
    text-align: center;
  }
  .card-item .ci-actions button.del { background: var(--danger-soft); color: var(--danger); }
  .card-item .ci-actions button.approve { background: #e8f7ee; color: var(--ok); }
}
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th {
  text-align: left;
  font-size: 12px;
  color: var(--text-3);
  font-weight: 600;
  padding: 10px 14px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.tbl td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.tbl tr:last-child td { border-bottom: none; }
.tbl .row-actions { display: flex; gap: 8px; }
.tbl .row-actions button {
  border: none;
  background: var(--primary-soft);
  color: var(--primary-strong);
  border-radius: 7px;
  padding: 4px 10px;
  font-size: 12.5px;
  cursor: pointer;
}
.tbl .row-actions button.del { background: var(--danger-soft); color: var(--danger); }

.badge {
  display: inline-block;
  border-radius: 6px;
  padding: 1px 8px;
  font-size: 12px;
}
.badge.on { background: #e8f7ee; color: var(--ok); }
.badge.off { background: var(--surface-2); color: var(--text-3); }

/* ---------- 桌面适配 ---------- */
@media (min-width: 720px) {
  .app { border-left: 1px solid var(--border); border-right: 1px solid var(--border); }
  .fab { right: calc(50% - 342px); }
  .sheet { border-radius: 18px; margin-bottom: 20px; }
}

/* ---------- 动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
