:root {
  --bg: #f2f4f8;
  --card: #ffffff;
  --ink: #172033;
  --sub: #6b7385;
  --line: #e3e7ef;
  --brand: #1b2a4a;
  --brand-2: #2a3f6b;
  --gold: #c7943f;
  --ok: #169b62;
  --issue: #e07a1f;
  --review: #7c5cd6;
  --none: #a6adbb;
  --danger: #c0392b;
  --radius: 16px;
  --shadow: 0 8px 24px rgba(23, 32, 51, .08);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
  line-height: 1.55;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
.hidden { display: none !important; }

/* ---------- 登录 ---------- */
.login-wrap {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at 15% 0%, rgba(199, 148, 63, .18), transparent 45%),
    radial-gradient(circle at 90% 100%, rgba(42, 63, 107, .25), transparent 50%),
    var(--brand);
}
.login-card {
  width: 100%;
  max-width: 360px;
  background: #fff;
  border-radius: 22px;
  padding: 30px 24px 26px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .28);
  text-align: center;
}
.logo-mark {
  width: 58px; height: 58px;
  margin: 0 auto 14px;
  border-radius: 16px;
  background: linear-gradient(145deg, var(--brand-2), var(--brand));
  color: #f3d8a8;
  font-size: 26px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  letter-spacing: 2px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18), 0 8px 18px rgba(27,42,74,.28);
}
.login-card h1 { margin: 0; font-size: 21px; letter-spacing: .5px; }
.login-sub { margin: 4px 0 22px; color: var(--sub); font-size: 13px; }
.pin-input {
  width: 100%;
  height: 52px;
  border: 1px solid var(--line);
  background: #f8f9fc;
  border-radius: 12px;
  padding: 0 16px;
  font-size: 17px;
  text-align: center;
  letter-spacing: 2px;
  outline: none;
  transition: border-color .15s, background .15s;
}
.pin-input:focus { border-color: var(--brand-2); background: #fff; box-shadow: 0 0 0 3px rgba(42,63,107,.1); }
.login-card .btn { margin-top: 14px; }
.form-error { color: var(--danger); font-size: 13px; min-height: 20px; margin: 8px 0 0; }
.login-foot { color: rgba(255,255,255,.55); font-size: 12px; margin-top: 20px; }

/* ---------- 通用按钮 ---------- */
.btn {
  border: 0;
  border-radius: 12px;
  padding: 10px 16px;
  font-weight: 600;
  font-size: 15px;
  min-height: 44px;
  background: #eef1f7;
  color: var(--ink);
  transition: transform .08s, filter .15s, background .15s;
}
.btn:active { transform: scale(.985); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-gold { background: var(--gold); color: #fff; }
.btn-ghost { background: transparent; border: 1px solid var(--line); }
.btn-danger { background: #fdecea; color: var(--danger); }
.btn-lg { width: 100%; height: 50px; font-size: 16px; }
.btn-sm { min-height: 34px; padding: 5px 12px; font-size: 13px; border-radius: 9px; }
.btn:disabled { opacity: .55; cursor: default; }

/* ---------- 顶栏 ---------- */
.app { min-height: 100vh; min-height: 100dvh; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(12px + env(safe-area-inset-top)) 16px 12px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  box-shadow: 0 2px 14px rgba(23, 32, 51, .18);
}
.topbar-title { font-size: 17px; font-weight: 700; letter-spacing: .5px; line-height: 1.2; }
.topbar-sub { font-size: 11px; color: rgba(255,255,255,.62); letter-spacing: 3px; margin-top: 2px; }
.topbar-actions { display: flex; gap: 8px; }
.icon-btn {
  border: 1px solid rgba(255,255,255,.24);
  background: rgba(255,255,255,.08);
  color: #fff;
  border-radius: 10px;
  padding: 7px 11px;
  font-size: 12px;
  min-height: 34px;
}

main { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
.page { padding: 14px 14px 20px; }

/* ---------- 概览 ---------- */
.summary {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.summary-item {
  flex: 1;
  background: var(--card);
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow: 0 1px 3px rgba(23,32,51,.05);
  border: 1px solid rgba(227,231,239,.7);
}
.summary-item b { display: block; font-size: 20px; line-height: 1.15; }
.summary-item span { font-size: 11px; color: var(--sub); }
.summary-item.issue b { color: var(--issue); }
.summary-item.ok b { color: var(--ok); }

.floors {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
  margin-bottom: 10px;
  scrollbar-width: none;
}
.floors::-webkit-scrollbar { display: none; }
.floor-tab {
  flex: none;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 10px;
  padding: 7px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--sub);
  min-height: 38px;
}
.floor-tab.active { background: var(--brand); color: #fff; border-color: var(--brand); }

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 0 2px 10px;
  color: var(--sub);
  font-size: 11.5px;
}
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--none); }
.dot.st-ok { background: var(--ok); }
.dot.st-issue { background: var(--issue); }
.dot.st-review { background: var(--review); }
.dot.st-none { background: var(--none); }

/* ---------- 房间格子 ---------- */
.room-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}
.room-tile {
  position: relative;
  background: var(--card);
  border: 1px solid rgba(227,231,239,.9);
  border-radius: 14px;
  padding: 12px 10px 10px;
  text-align: left;
  min-height: 86px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 1px 2px rgba(23,32,51,.04);
  transition: transform .1s, box-shadow .15s;
}
.room-tile:active { transform: scale(.97); }
.room-tile .room-no { font-size: 20px; font-weight: 700; letter-spacing: .5px; line-height: 1.1; }
.room-tile .room-type { font-size: 11px; color: var(--sub); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.room-tile .tile-dot {
  position: absolute; top: 11px; right: 11px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--none);
  box-shadow: 0 0 0 3px rgba(166,173,187,.16);
}
.room-tile.st-ok .tile-dot { background: var(--ok); box-shadow: 0 0 0 3px rgba(22,155,98,.14); }
.room-tile.st-issue .tile-dot { background: var(--issue); box-shadow: 0 0 0 3px rgba(224,122,31,.16); }
.room-tile.st-review .tile-dot { background: var(--review); box-shadow: 0 0 0 3px rgba(124,92,214,.16); }
.room-tile .tile-badge {
  align-self: flex-start;
  margin-top: 6px;
  font-size: 10.5px;
  line-height: 1.4;
  padding: 1px 7px;
  border-radius: 20px;
  background: rgba(224,122,31,.1);
  color: var(--issue);
  font-weight: 600;
}
.room-tile .tile-badge.soft { background: #eef1f7; color: var(--sub); font-weight: 500; }
.room-tile.empty { opacity: .55; }
.list-hint { text-align: center; color: var(--sub); font-size: 11.5px; margin: 16px 0 4px; }

/* ---------- 详情 ---------- */
.detail-top {
  position: sticky;
  top: 0;
  z-index: 15;
  margin: -14px -14px 12px;
  padding: calc(10px + env(safe-area-inset-top)) 14px 10px;
  background: rgba(242,244,248,.94);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(227,231,239,.8);
}
.back-btn {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  width: 38px; height: 38px;
  font-size: 18px;
  line-height: 1;
  display: flex; align-items: center; justify-content: center;
  flex: none;
}
.detail-title { flex: 1; min-width: 0; }
.detail-title b { font-size: 19px; letter-spacing: .5px; }
.detail-title span { display: block; font-size: 11.5px; color: var(--sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status-pill {
  flex: none;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  background: #eef1f7;
  color: var(--sub);
}
.status-pill.st-ok { background: rgba(22,155,98,.12); color: var(--ok); }
.status-pill.st-issue { background: rgba(224,122,31,.13); color: var(--issue); }
.status-pill.st-review { background: rgba(124,92,214,.13); color: var(--review); }

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 11px;
  box-shadow: 0 1px 3px rgba(23,32,51,.05);
  border: 1px solid rgba(227,231,239,.75);
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.card-head h3 { margin: 0; font-size: 14.5px; font-weight: 700; }
.card-head .muted { font-size: 11.5px; color: var(--sub); }
.card-note { font-size: 12px; color: var(--sub); margin: 8px 0 0; }

.meta-line { display: flex; flex-wrap: wrap; gap: 6px; }
.meta-chip {
  font-size: 12px;
  padding: 4px 9px;
  border-radius: 8px;
  background: #f3f5fa;
  color: #4b5568;
  white-space: nowrap;
}
.meta-chip.warn { background: rgba(224,122,31,.1); color: var(--issue); }

/* 拍照 */
.photo-add {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 76px;
  border: 1.5px dashed #c6cddd;
  border-radius: 14px;
  background: #f8f9fc;
  color: var(--sub);
  font-size: 13.5px;
  font-weight: 600;
}
.photo-add:active { background: #eef1f7; }
.photo-add .plus { font-size: 22px; line-height: 1; color: var(--gold); }
.photo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin-top: 9px; }
.photo-item { position: relative; border-radius: 10px; overflow: hidden; background: #e8ecf3; aspect-ratio: 1 / 1; }
.photo-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-item .del {
  position: absolute; top: 4px; right: 4px;
  width: 24px; height: 24px; border-radius: 50%;
  border: 0; background: rgba(0,0,0,.55); color: #fff;
  font-size: 13px; line-height: 1; display: flex; align-items: center; justify-content: center;
}

/* 标签 */
.tag-list { display: flex; flex-wrap: wrap; gap: 7px; }
.tag-chip {
  border: 1px solid var(--line);
  background: #f8f9fc;
  color: #4b5568;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 13.5px;
  min-height: 40px;
  transition: all .12s;
}
.tag-chip.on {
  background: rgba(224,122,31,.12);
  border-color: rgba(224,122,31,.45);
  color: #b3580c;
  font-weight: 700;
}
.tag-chip.base { border-style: dashed; }

textarea.note-input {
  width: 100%;
  min-height: 76px;
  border: 1px solid var(--line);
  background: #f8f9fc;
  border-radius: 11px;
  padding: 11px 12px;
  font-size: 16px;
  resize: vertical;
  outline: none;
}
textarea.note-input:focus { border-color: var(--brand-2); background: #fff; box-shadow: 0 0 0 3px rgba(42,63,107,.09); }

select.select-input {
  width: 100%;
  border: 1px solid var(--line);
  background: #f8f9fc;
  border-radius: 11px;
  padding: 11px 12px;
  font-size: 16px;
  outline: none;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #8a94a6 50%), linear-gradient(135deg, #8a94a6 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
select.select-input:focus { border-color: var(--brand-2); background-color: #fff; box-shadow: 0 0 0 3px rgba(42,63,107,.09); }

/* 朝向 */
.compass {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  width: 100%;
  max-width: 280px;
  margin: 0 auto;
}
.orient-btn {
  height: 44px;
  border: 1px solid var(--line);
  background: #f8f9fc;
  border-radius: 10px;
  font-size: 13.5px;
  color: #4b5568;
  font-weight: 600;
}
.orient-btn.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.compass-center {
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: var(--sub);
  background: transparent;
}
.seg-row { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.seg-btn {
  border: 1px solid var(--line);
  background: #f8f9fc;
  border-radius: 9px;
  padding: 7px 12px;
  font-size: 13px;
  min-height: 38px;
  color: #4b5568;
}
.seg-btn.on { background: rgba(42,63,107,.1); border-color: rgba(42,63,107,.4); color: var(--brand); font-weight: 700; }
.batch-link {
  border: 0;
  background: transparent;
  color: var(--brand-2);
  font-size: 12.5px;
  padding: 6px 0 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* 历史 */
.history-item { padding: 11px 0; border-top: 1px solid var(--line); }
.history-item:first-child { border-top: 0; padding-top: 2px; }
.history-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.history-time { font-size: 11.5px; color: var(--sub); }
.history-del { border: 0; background: transparent; color: #b5bcc9; font-size: 11.5px; padding: 2px 0; }
.history-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.history-tag { font-size: 11.5px; padding: 2px 8px; border-radius: 6px; background: rgba(224,122,31,.09); color: #b3580c; }
.history-note { font-size: 12.5px; color: #4b5568; margin-top: 6px; white-space: pre-wrap; word-break: break-word; }
.history-photos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; margin-top: 7px; }
.history-photos img { width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: 8px; display: block; background: #e8ecf3; }

.save-bar {
  position: sticky;
  bottom: 0;
  z-index: 16;
  margin: 0 -14px calc(-20px - env(safe-area-inset-bottom));
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: rgba(242,244,248,.96);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(227,231,239,.9);
}
.save-bar .btn { width: 100%; height: 48px; font-size: 16px; }

/* ---------- 浮层 ---------- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(15, 22, 38, .6);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
}
.overlay.center { align-items: center; }
.sheet {
  width: 100%;
  max-width: 520px;
  background: #fff;
  border-radius: 20px;
  padding: 18px;
  max-height: 86vh;
  overflow: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,.30);
}
.sheet h3 { margin: 0 0 4px; font-size: 17px; }
.sheet p { margin: 0 0 14px; font-size: 12.5px; color: var(--sub); }
.sheet-rooms { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.sheet-room {
  border: 1px solid var(--line);
  background: #f8f9fc;
  border-radius: 9px;
  min-height: 40px;
  font-size: 13.5px;
  font-weight: 600;
  color: #4b5568;
}
.sheet-room.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.sheet-actions { display: flex; gap: 8px; margin-top: 16px; }
.sheet-actions .btn { flex: 1; }

.photo-view {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(5, 8, 14, .94);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.photo-view img { max-width: 100%; max-height: 90vh; border-radius: 8px; }
.photo-view .close {
  position: absolute; top: calc(14px + env(safe-area-inset-top)); right: 16px;
  width: 38px; height: 38px; border-radius: 50%;
  border: 0; background: rgba(255,255,255,.16); color: #fff; font-size: 18px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(84px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(12px);
  z-index: 100;
  background: rgba(23, 32, 51, .94);
  color: #fff;
  font-size: 13.5px;
  padding: 10px 18px;
  border-radius: 30px;
  max-width: 86vw;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: rgba(165, 42, 32, .96); }

/* ---------- 电脑后台 ---------- */
.admin-wrap { max-width: 1220px; margin: 0 auto; padding: 20px 20px 50px; }
.admin-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0 18px;
}
.admin-top h1 { margin: 0; font-size: 22px; letter-spacing: .5px; }
.admin-top .sub { color: var(--sub); font-size: 12.5px; margin-top: 2px; }
.admin-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.stat-card {
  background: var(--card);
  border-radius: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(227,231,239,.8);
  box-shadow: 0 1px 3px rgba(23,32,51,.04);
}
.stat-card b { display: block; font-size: 26px; line-height: 1.15; }
.stat-card b small { font-size: 14px; font-weight: 500; color: var(--sub); }
.stat-card span { font-size: 12px; color: var(--sub); }
.stat-card.issue b { color: var(--issue); }
.stat-card.ok b { color: var(--ok); }
.stat-card.review b { color: var(--review); }

.filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  background: var(--card);
  border: 1px solid rgba(227,231,239,.8);
  border-radius: 14px;
  padding: 10px 12px;
  margin-bottom: 12px;
}
.filters select, .filters input[type="search"] {
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0 10px;
  background: #f8f9fc;
  font-size: 13.5px;
  outline: none;
}
.filters input[type="search"] { flex: 1; min-width: 150px; }
.filters label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: #4b5568; }
.filters .spacer { flex: 1; }

.table-wrap {
  background: var(--card);
  border: 1px solid rgba(227,231,239,.8);
  border-radius: 16px;
  overflow: auto;
  box-shadow: 0 1px 3px rgba(23,32,51,.04);
}
table.rooms { width: 100%; border-collapse: collapse; min-width: 860px; font-size: 13.5px; }
table.rooms th, table.rooms td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #eef1f6; vertical-align: top; }
table.rooms th {
  position: sticky; top: 0; z-index: 2;
  background: #f8f9fc;
  color: var(--sub);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
table.rooms tbody tr { cursor: pointer; }
table.rooms tbody tr:hover { background: #f8fafd; }
table.rooms tbody tr:last-child td { border-bottom: 0; }
table.rooms td.no { font-weight: 700; font-size: 15px; white-space: nowrap; }
table.rooms td.tags { max-width: 340px; color: #4b5568; }
.pill {
  display: inline-block;
  font-size: 11.5px;
  padding: 2px 8px;
  border-radius: 20px;
  background: #eef1f7;
  color: var(--sub);
  white-space: nowrap;
}
.pill.st-ok { background: rgba(22,155,98,.1); color: var(--ok); }
.pill.st-issue { background: rgba(224,122,31,.11); color: var(--issue); }
.pill.st-review { background: rgba(124,92,214,.11); color: var(--review); }
.empty-row { text-align: center; color: var(--sub); padding: 40px 0 !important; }

.orient-panel {
  margin-top: 16px;
  background: var(--card);
  border: 1px solid rgba(227,231,239,.8);
  border-radius: 16px;
  padding: 16px;
}
.orient-panel h2 { margin: 0 0 12px; font-size: 15px; }
.bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 7px; font-size: 12.5px; }
.bar-row .bar-label { width: 48px; color: var(--sub); flex: none; }
.bar-track { flex: 1; height: 9px; background: #eef1f7; border-radius: 20px; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, var(--brand-2), var(--gold)); border-radius: 20px; }
.bar-row .bar-num { width: 34px; text-align: right; color: var(--sub); flex: none; }
.orient-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.orient-cols h3 { font-size: 12.5px; color: var(--sub); margin: 0 0 8px; font-weight: 600; }

.drawer-mask {
  position: fixed; inset: 0; z-index: 70;
  background: rgba(15,22,38,.45);
  display: flex; justify-content: flex-end;
}
.drawer {
  width: 100%;
  max-width: 520px;
  height: 100%;
  background: var(--bg);
  box-shadow: -12px 0 40px rgba(0,0,0,.2);
  overflow: auto;
  padding: 20px;
}
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.drawer-head h2 { margin: 0; font-size: 22px; letter-spacing: .5px; }
.drawer-head .sub { color: var(--sub); font-size: 12.5px; margin-top: 2px; }
.drawer .card { box-shadow: none; }
.drawer .history-photos { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* ---------- 维修工单 ---------- */
.admin-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}
.admin-tab {
  border: 0;
  background: transparent;
  padding: 10px 4px;
  margin-right: 18px;
  font-size: 15px;
  font-weight: 600;
  color: var(--sub);
  border-bottom: 2px solid transparent;
  border-radius: 0;
  min-height: 44px;
}
.admin-tab.active { color: var(--brand); border-bottom-color: var(--gold); }
.tab-badge {
  display: inline-block;
  min-width: 20px;
  padding: 0 6px;
  border-radius: 20px;
  background: rgba(224,122,31,.14);
  color: var(--issue);
  font-size: 11.5px;
  line-height: 19px;
  text-align: center;
  vertical-align: 1px;
}
.tab-badge.zero { background: #eef1f7; color: var(--sub); }

.worker-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  background: var(--card);
  border: 1px solid rgba(227,231,239,.8);
  border-radius: 14px;
  padding: 9px 12px;
  margin-bottom: 12px;
  font-size: 13px;
}
.worker-bar-label { color: var(--sub); font-size: 12px; }
.worker-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.worker-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #eef1f7;
  border-radius: 20px;
  padding: 3px 5px 3px 10px;
  font-size: 12.5px;
}
.worker-chip button {
  border: 0;
  background: rgba(23,32,51,.08);
  color: var(--sub);
  width: 18px; height: 18px;
  border-radius: 50%;
  font-size: 12px;
  line-height: 1;
  padding: 0;
}
.worker-empty { color: var(--sub); font-size: 12px; }
#workerName {
  height: 34px;
  width: 110px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0 10px;
  background: #f8f9fc;
  font-size: 13.5px;
  outline: none;
}
.worker-bar-note { margin-left: auto; color: var(--sub); font-size: 11.5px; }

.wo-table { min-width: 980px; }
.mini-select {
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8f9fc;
  font-size: 12.5px;
  padding: 0 6px;
  outline: none;
}
.sev-select.sev-stop { background: #fdecea; border-color: #f2c1bb; color: #b42318; font-weight: 700; }
.sev-select.sev-soon { background: #fff6e6; border-color: #f0d3a2; color: #9a6100; font-weight: 700; }
.sev-select.sev-plan { background: #eef4fb; border-color: #c5d7ee; color: #2a5a8f; }
.wo-title { font-weight: 600; }
.wo-note {
  font-size: 12px;
  color: var(--sub);
  margin-top: 2px;
  max-width: 320px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wo-time { color: var(--sub); font-size: 12.5px; white-space: nowrap; }
.wo-actions { display: flex; gap: 5px; flex-wrap: wrap; }
.wo-hint { color: var(--sub); font-size: 12px; margin: 10px 2px 0; }
.pill.wo-open { background: rgba(224,122,31,.12); color: var(--issue); }
.pill.wo-doing { background: rgba(42,63,107,.12); color: var(--brand-2); }
.pill.wo-done { background: rgba(199,148,63,.16); color: #96691f; }
.pill.wo-ok { background: rgba(22,155,98,.11); color: var(--ok); }

.wo-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: end; }
.wo-detail-grid label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--sub); }
.wo-detail-grid b { font-size: 14px; color: var(--ink); }
.wo-timeline-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 12.5px;
  color: var(--sub);
}
.wo-timeline-item:last-child { border-bottom: 0; }
.wo-drawer-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 16px; }
.wo-drawer-actions .btn { flex: 1; min-width: 120px; }
.wo-mini { padding: 8px 0; border-top: 1px solid var(--line); }
.wo-mini:first-of-type { border-top: 0; padding-top: 2px; }
.wo-mini-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.wo-mini-top b { font-size: 13.5px; }
.wo-mini-sub { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 5px; font-size: 11.5px; color: var(--sub); }
.wo-sev { flex: none; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 20px; }
.wo-sev.sev-stop { background: #fdecea; color: #b42318; }
.wo-sev.sev-soon { background: #fff6e6; color: #9a6100; }
.wo-sev.sev-plan { background: #eef4fb; color: #2a5a8f; }
.wo-to-btn { margin-top: 12px; }

.room-ticket {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 0;
  border-top: 1px solid var(--line);
  cursor: pointer;
}
.room-ticket:first-of-type { border-top: 0; }
.room-ticket-main { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: 13px; }
.room-ticket-meta { color: var(--sub); font-size: 11.5px; }
.room-ticket-time { color: var(--sub); font-size: 11.5px; white-space: nowrap; }

.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(15,22,38,.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal {
  width: 100%;
  max-width: 460px;
  background: #fff;
  border-radius: 18px;
  padding: 18px;
  max-height: 90vh;
  overflow: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.modal h3 { margin: 0 0 14px; font-size: 17px; }
.field-label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--sub); margin-bottom: 10px; }
.text-input {
  border: 1px solid var(--line);
  background: #f8f9fc;
  border-radius: 11px;
  padding: 11px 12px;
  font-size: 16px;
  outline: none;
}
.text-input:focus { border-color: var(--brand-2); background: #fff; }
.modal-actions { display: flex; gap: 8px; margin-top: 6px; }
.modal-actions .btn { flex: 1; }

/* 维修工手机页 */
.pick-list { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.pick-btn {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--line);
  background: #f8f9fc;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  color: var(--brand);
}
.pick-btn:active { background: #eef1f7; }

.fix-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 11px;
  border: 1px solid rgba(227,231,239,.75);
  box-shadow: 0 1px 3px rgba(23,32,51,.05);
}
.fix-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.fix-room { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.fix-room b { font-size: 22px; letter-spacing: .5px; }
.fix-room span { font-size: 11.5px; color: var(--sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fix-title { font-size: 15px; font-weight: 700; margin-top: 6px; }
.fix-note { font-size: 12.5px; color: #4b5568; margin-top: 6px; white-space: pre-wrap; word-break: break-word; }
.fix-meta { font-size: 11.5px; color: var(--sub); margin-top: 9px; }
.fix-photos { margin-top: 8px; }
.fix-repair-label { font-size: 11.5px; color: var(--sub); margin-top: 9px; }
.fix-card .btn-lg { margin-top: 11px; }
.fix-wait {
  margin-top: 11px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: #96691f;
  background: rgba(199,148,63,.12);
  border-radius: 11px;
  padding: 11px;
}
.fix-empty {
  background: var(--card);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 36px 16px;
  text-align: center;
  color: var(--sub);
  font-size: 13.5px;
}
.fix-done-add { margin-top: 10px; min-height: 58px; }

@media (max-width: 1100px) {
  .admin-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .admin-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .orient-cols { grid-template-columns: 1fr; gap: 18px; }
  .admin-wrap { padding: 14px 12px 40px; }
  .admin-top { flex-direction: column; align-items: flex-start; }
  .drawer { max-width: 100%; }
}

@media (max-width: 360px) {
  .room-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
  .room-tile { padding: 10px 8px 9px; min-height: 80px; }
  .room-tile .room-no { font-size: 18px; }
  .page { padding-left: 10px; padding-right: 10px; }
  .summary-item { padding: 9px 10px; }
  .summary-item b { font-size: 18px; }
  .history-photos { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------------- 日常查房 ---------------- */
.summary-item small { font-size: 13px; font-weight: 500; color: var(--sub); }
.summary-item.stop b { color: #c53030; }

.chk-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--sub);
  margin: 2px 0 10px;
}
.chk-toggle input { width: 18px; height: 18px; accent-color: var(--brand); }

.dot.dot-sale { background: var(--ok); }
.dot.dot-fix { background: var(--issue); }
.dot.dot-stop { background: #d63d3d; }

.room-tile.checked-normal { background: #f4fbf7; }
.room-tile.checked-issue { background: #fff8f2; }
.room-tile.sale-stop { background: #fff6f6; border-color: rgba(214, 61, 61, .28); }
.room-tile.sale-fix { background: #fffaf3; border-color: rgba(224, 122, 31, .26); }

.room-tile.checked-normal .tile-dot { background: var(--ok); box-shadow: 0 0 0 3px rgba(22, 155, 98, .14); }
.room-tile.checked-issue .tile-dot { background: var(--issue); box-shadow: 0 0 0 3px rgba(224, 122, 31, .16); }
.room-tile.sale-stop .tile-dot { background: #d63d3d; box-shadow: 0 0 0 3px rgba(214, 61, 61, .14); }
.room-tile.sale-fix .tile-dot { background: var(--issue); box-shadow: 0 0 0 3px rgba(224, 122, 31, .16); }

.tile-badge.ok { background: #e7f7ef; color: var(--ok); }
.tile-badge.issue { background: #fdeee0; color: #b96a10; }
.tile-badge.stop { background: #fdeaea; color: #c53030; }
.tile-badge.fix { background: #fdf2e3; color: #b96a10; }

.sale-pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.sale-pill.ok { background: #e7f7ef; color: var(--ok); }
.sale-pill.fix { background: #fdf2e3; color: #b96a10; }
.sale-pill.stop { background: #fdeaea; color: #c53030; }

.check-sheet { max-height: 88vh; overflow-y: auto; }
.check-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.check-head h3 { margin: 0; font-size: 24px; }
.check-sub { font-size: 12px; color: var(--sub); margin-top: 3px; }

.must-list {
  background: #f5f7fb;
  border-radius: 10px;
  padding: 10px 12px;
  margin: 12px 0;
  font-size: 12.5px;
  color: #3b455c;
}
.must-list b { display: block; margin-bottom: 4px; }
.must-list ul { margin: 0; padding-left: 18px; line-height: 1.7; }

.normal-btn { width: 100%; margin: 2px 0 4px; }
.check-sep { text-align: center; font-size: 12px; color: var(--sub); margin: 14px 0 8px; }
.check-sheet .tag-chips { display: flex; flex-wrap: wrap; gap: 7px; }

.check-sheet .sheet-actions {
  position: sticky;
  bottom: -18px;
  z-index: 2;
  margin: 12px -18px -18px;
  padding: 12px 18px 18px;
  background: #fff;
  border-top: 1px solid var(--line);
}
.check-sheet .note-input { margin-top: 10px; }
