:root {
  --bg: #eaf4f1;
  --card: #ffffff;
  --side-bg: #d7ebe4;
  --line: rgba(36, 120, 108, .18);
  --text: #1d3b36;
  --muted: #5e7f78;
  --accent: #2a9d8f;
  --accent-ink: #ffffff;
  --blue: #2a7a8c;
  --ok: #2e8b57;
  --warn: #c45c4a;
  --warn-bg: #fdecea;
  --fs: 18px;
  --fs-sm: 15px;
  --side: 230px;
  --pad: 20px;
  --tap: 46px;
  --thumb: 56px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-anchor: none; }
html, body, #app { margin: 0; width: 100%; max-width: 100%; overflow-x: hidden; overflow-anchor: none; }
html, body { min-height: 100%; min-height: 100dvh; background: var(--bg); color: var(--text); font: var(--fs)/1.55 "Microsoft YaHei", sans-serif; }
body { padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
a { color: var(--blue); }
.login { width: min(400px, calc(100% - 32px)); margin: 12vh auto; padding: 28px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.login h1 { margin: 0 0 8px; font-size: 1.45em; }
.use-flag {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  vertical-align: middle;
}
.login .btn { width: 100%; min-height: var(--tap); }
.muted { color: var(--muted); font-size: var(--fs-sm); }
.form-row { display: grid; gap: 6px; margin: 14px 0; }
label { font-size: var(--fs-sm); color: var(--muted); }
.btn { border: 0; border-radius: 8px; padding: 10px 16px; background: var(--accent); color: var(--accent-ink); font-weight: 700; cursor: pointer; min-height: var(--tap); font-size: var(--fs); touch-action: manipulation; }
.btn-ghost { background: #fff; color: var(--text); border: 1px solid var(--line); }
.err { color: var(--warn); font-size: var(--fs-sm); min-height: 20px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; margin-bottom: 12px; }
.card h3 { margin: 0 0 8px; font-size: 1.05em; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; background: rgba(42, 157, 143, .12); color: var(--accent); font-size: var(--fs-sm); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.ok { background: rgba(46, 139, 87, .12); color: var(--ok); }
.shell { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; min-height: 100dvh; }
.side { background: var(--side-bg); border-right: 1px solid var(--line); padding: 18px 12px; overflow: auto; }
.brand { font-weight: 700; margin: 6px 10px 18px; }
.nav { display: block; width: 100%; text-align: left; margin-bottom: 6px; padding: 10px 12px; border: 0; border-radius: 8px; background: transparent; color: var(--text); cursor: pointer; min-height: var(--tap); font-size: var(--fs); touch-action: manipulation; }
.nav.active, .nav:hover { background: rgba(42, 157, 143, .16); color: var(--accent); }
.nav-parent { display: flex; justify-content: space-between; align-items: center; }
.nav-parent.on { color: var(--accent); }
.nav-parent .arrow { width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 6px solid var(--muted); transition: transform .18s ease; }
.menu.open .nav-parent .arrow { transform: rotate(180deg); border-top-color: var(--accent); }
.submenu { display: none; padding: 0 0 4px 8px; }
.menu.open .submenu { display: block; }
.nav-child { font-size: 0.95em; padding-left: 22px; }
.nav-home { font-weight: 700; margin-bottom: 12px; }
.line-sub { margin: 4px 0 0; }
.kpis4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.main { padding: var(--pad) calc(var(--pad) + 4px) 32px; min-width: 0; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 16px; }
.topbar-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.topbar-left b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.role-switch { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 0.9em; white-space: nowrap; }
.role-switch select { width: auto; min-width: 118px; padding: 6px 8px; margin: 0; }
.menu-btn, .nav-mask { display: none; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 14px; }
.select, textarea.input, input.input, input { width: 100%; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--text); font-size: var(--fs); max-width: 100%; }
.table-wrap { overflow: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); min-width: 720px; }
th, td { border-bottom: 1px solid var(--line); padding: 8px 6px; text-align: left; vertical-align: top; }
.empty { padding: 24px; color: var(--muted); text-align: center; }
.toast { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); background: var(--text); color: #fff; border: 0; padding: 10px 14px; border-radius: 8px; z-index: 20; max-width: min(90vw, 420px); }
.hidden { display: none !important; }
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.kpis6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.due-banner {
  margin: 0 2px 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff4f1;
  color: var(--warn);
  font-size: 13px;
  font-weight: 700;
}
.row-overdue { background: #fdecea; }
.row-soon { background: #fff7e8; }
.owner-line { margin: -4px 0 10px 0; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.kpi .n { font-size: 1.7em; font-weight: 700; line-height: 1.2; }
.kpi.warn .n { color: var(--warn); }
.bar-row { display: grid; grid-template-columns: minmax(80px, 148px) 1fr 36px; gap: 8px; align-items: center; margin: 8px 0; font-size: var(--fs-sm); }
.bar { height: 8px; background: rgba(42, 157, 143, .12); border-radius: 99px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.pager { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line); }
.pager .btn { min-height: 40px; padding: 6px 12px; font-size: var(--fs-sm); }
.pager .btn:disabled { opacity: .4; cursor: not-allowed; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filter-bar .input, .filter-bar .select { width: auto; min-width: 118px; max-width: 180px; padding: 7px 9px; font-size: var(--fs-sm); }
.filter-bar .btn { padding: 7px 12px; font-size: var(--fs-sm); min-height: 36px; }
.thumb-wrap { position: relative; display: inline-block; vertical-align: middle; }
.thumb-x {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #c45c4a;
  color: #fff;
  font-size: 14px;
  line-height: 20px;
  font-weight: 700;
  cursor: pointer;
  z-index: 2;
}
.thumb { display: inline-block; width: var(--thumb); height: var(--thumb); border-radius: 6px; overflow: hidden; border: 1px solid var(--line); vertical-align: middle; cursor: pointer; padding: 0; background: #eef6f3; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sheet { position: fixed; inset: 0; background: rgba(0,0,0,.62); z-index: 40; display: grid; place-items: center; padding: 20px; }
.sheet img { max-width: min(92vw, 960px); max-height: 86vh; border-radius: 10px; }
.fix-card { border-top: 1px solid var(--line); padding: 14px 0 8px; }
.fix-card:first-of-type { border-top: 0; }
.toolbar h3 { margin: 0 0 10px; }
.row-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.scanner {
  position: relative;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  margin: 8px 0 10px;
  min-height: 180px;
}
.scanner video { width: 100%; max-height: 52vh; object-fit: cover; display: block; background: #111; }
.scanner .aim {
  position: absolute; inset: 18% 16%;
  border: 2px solid var(--accent);
  border-radius: 12px;
  box-shadow: 0 0 0 999px rgba(0,0,0,.28);
  pointer-events: none;
}
.scan-file-btn { position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; }
.scan-file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* 平板 */
@media (max-width: 1199px) {
  .kpis, .kpis6, .kpis4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 手机 / 小平板：侧栏收成顶栏菜单，表格改卡片 */
@media (max-width: 900px) {
  :root { --pad: 12px; --tap: 48px; --fs: 17px; --fs-sm: 14px; }
  .shell { grid-template-columns: 1fr; }
  .side {
    display: none;
    position: fixed;
    inset: 0 auto 0 0;
    width: min(300px, 88vw);
    z-index: 30;
    border-right: 1px solid var(--line);
    padding: calc(18px + env(safe-area-inset-top)) 12px calc(18px + env(safe-area-inset-bottom));
  }
  .shell.nav-open .side { display: block; }
  .nav-mask { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 25; }
  .shell.nav-open .nav-mask { display: block; }
  .menu-btn { display: inline-flex; align-items: center; }
  .grid3 { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bar-row { grid-template-columns: 1fr 36px; }
  .bar { grid-column: 1 / -1; }
  .login { margin: 8vh auto; padding: 22px 18px; }
  .filter-bar { width: 100%; }
  .filter-bar .input, .filter-bar .select { min-width: 0; max-width: none; flex: 1 1 140px; }
  .filter-bar .btn { flex: 1 1 88px; }
  .assign-bar { grid-template-columns: 1fr; }
  .toast { left: 16px; right: 16px; }
  .actions .btn { flex: 1 1 120px; }
  .pager { justify-content: stretch; }
  .pager .btn { flex: 1; min-height: 44px; }
  table { min-width: 0; }
  thead { display: none; }
  tbody tr {
    display: block;
    border: 1px solid var(--line);
    border-radius: 10px;
    margin: 0 0 10px;
    padding: 8px 10px 4px;
    background: rgba(42, 157, 143, .06);
  }
  tbody td {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    border: 0;
    padding: 7px 2px;
  }
  tbody td::before {
    content: attr(data-label);
    color: var(--muted);
    flex: 0 0 76px;
    font-size: var(--fs-sm);
  }
  tbody td.ops {
    display: flex;
    justify-content: flex-start;
    padding-top: 10px;
  }
  tbody td.ops::before { display: none; }
  tbody td.ops .row-actions { width: 100%; }
  tbody td.ops .btn { flex: 1; }
}

@media (max-width: 480px) {
  :root { --pad: 10px; --thumb: 48px; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpi { padding: 10px 12px; }
  .card { padding: 12px; }
  .topbar { margin-bottom: 10px; }
  .sheet { padding: 10px; }
}

/* 手机横屏 */
@media (max-width: 900px) and (orientation: landscape) {
  .login { margin: 4vh auto; }
  .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (min-width: 1200px) {
  :root { --side: 240px; --pad: 24px; }
}

.phone-tab { display: none; }
.person-pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 14px; }
.person-groups { display: flex; flex-direction: column; gap: 10px; margin: 4px 0 14px; }
.person-groups .person-pills { margin: 0; }
.person-group h4 {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 650;
  color: var(--muted, #5b6b66);
}
.person-group h4 span { font-weight: 500; margin-left: 6px; opacity: .72; }
.assign-dept-hint { margin: 0; }
.pill {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  border-radius: 999px;
  padding: 6px 12px;
  min-height: 36px;
  font-size: var(--fs-sm);
  cursor: pointer;
}
.pill b { color: var(--accent); margin-left: 4px; }
.pill.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.pill.on b { color: #fff; }
.assign-bar { display: grid; grid-template-columns: minmax(140px, 200px) minmax(140px, 200px) minmax(140px, 200px) 1fr; gap: 12px 16px; align-items: end; }
.assign-bar .actions { margin: 0; align-items: center; }
.check-col { width: 36px; text-align: center; }
.check-col input { width: 18px; height: 18px; accent-color: var(--accent); }

/* 用户端始终按手机比例，电脑上也落在 390 宽里 */
body.mode-user {
  --phone-w: 390px;
  --fs: 16px;
  --fs-sm: 13px;
  --pad: 12px;
  --tap: 46px;
  background: #c9ddd6;
}
body.mode-user #app {
  width: 100%;
  max-width: 430px;
  height: 100svh;
  min-height: 100svh;
  max-height: 100svh;
  margin: 0 auto;
  background:
    linear-gradient(180deg, #f3faf7 0%, #eaf4f1 140px, #eaf4f1 100%);
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
body.mode-user #app::-webkit-scrollbar { width: 0; height: 0; display: none; }
body.mode-user .user-shell,
body.mode-user .shell {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  width: 100%;
  grid-template-columns: none;
}
body.mode-user .menu-btn,
body.mode-user .side,
body.mode-user .nav-mask { display: none !important; }
body.mode-user .main {
  flex: 1;
  min-height: 0;
  width: 100%;
  max-width: 100%;
  padding: 8px 14px calc(72px + env(safe-area-inset-bottom));
  overflow-x: hidden;
  overflow-y: auto;
  overflow-anchor: none;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
body.mode-user .main::-webkit-scrollbar { width: 0; height: 0; display: none; }
body.mode-user .phone-tab { display: none !important; }
body.mode-user .fill-tabs {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  flex: none;
  z-index: 20;
  display: flex;
  width: 100%;
  background: #fff;
  border-top: 1px solid var(--line);
  box-shadow: 0 -6px 18px rgba(20, 51, 46, .08);
  padding-bottom: env(safe-area-inset-bottom);
}
body.mode-user .fill-tab {
  flex: 1;
  min-height: 56px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}
body.mode-user .fill-tab.on {
  color: var(--text);
  box-shadow: inset 0 -3px 0 var(--accent);
}
body.mode-user .topbar {
  align-items: center;
  margin: 4px 0 12px;
  padding: 4px 2px 10px;
  border-bottom: 1px solid rgba(36, 120, 108, .1);
}
body.mode-user .topbar-left b { max-width: 8em; font-size: 15px; }
body.mode-user .topbar .btn {
  min-height: 34px;
  padding: 4px 12px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 999px;
}
body.mode-user .role-switch span { display: none; }
body.mode-user .role-switch select {
  min-width: 0;
  width: 7.2em;
  padding: 5px 8px;
  font-size: 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
}
body.mode-user .toast { position: absolute; left: 12px; right: 12px; bottom: 76px; }
body.mode-user .login {
  width: calc(100% - 32px);
  max-width: none;
  margin: 18vh auto 24px;
  padding: 28px 20px;
  border: 0;
  border-radius: 20px;
  box-shadow: 0 12px 32px rgba(20, 51, 46, .08);
}
body.mode-user .login h1 { font-size: 22px; }
body.mode-user .board { margin: 0 0 6px; }
body.mode-user .board-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 2px 12px;
  font-size: 17px;
  letter-spacing: .02em;
}
body.mode-user .insp-card {
  background: #fff;
  border: 0;
  border-radius: 18px;
  padding: 16px 14px 14px;
  margin: 0 0 14px;
  box-shadow: 0 8px 22px rgba(20, 51, 46, .06);
}
body.mode-user .insp-card.focus { box-shadow: 0 0 0 2px var(--accent), 0 8px 22px rgba(20, 51, 46, .06); }
body.mode-user .insp-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
body.mode-user .insp-head b { display: block; font-size: 16px; letter-spacing: .02em; }
body.mode-user .insp-head .badge { margin-top: 6px; }
body.mode-user .insp-basic {
  margin: 6px 0 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
body.mode-user .check-block {
  background: #f4faf8;
  border-radius: 14px;
  padding: 12px 12px 10px;
  margin: 0 0 10px;
}
body.mode-user .check-block strong { display: block; font-size: 14px; margin-bottom: 4px; }
body.mode-user .check-text { margin: 0 0 10px; font-size: 12px; line-height: 1.55; color: var(--muted); }
body.mode-user .check-opts { display: flex; gap: 8px; }
body.mode-user .opt {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: #fff;
  font-weight: 700;
  font-size: 14px;
  color: var(--muted);
}
body.mode-user .opt input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  appearance: none;
  -webkit-appearance: none;
  pointer-events: none;
}
body.mode-user .opt,
body.mode-user .photo-zone,
body.mode-user .insp-submit { touch-action: manipulation; }
body.mode-user .opt.ok:has(input:checked) { background: #2e8b57; color: #fff; }
body.mode-user .opt.bad:has(input:checked) { background: #c45c4a; color: #fff; }
body.mode-user .photo-zone {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 52px;
  margin: 0 0 12px;
  border-radius: 14px;
  border: 1.5px dashed rgba(42, 157, 143, .45);
  background: #f7fbf9;
  color: var(--accent);
  font-weight: 700;
  font-size: 14px;
  position: relative;
  overflow: hidden;
}
body.mode-user .photo-zone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
body.mode-user .photo-zone i {
  width: 18px;
  height: 18px;
  border: 2px solid var(--accent);
  border-radius: 5px;
  position: relative;
}
body.mode-user .photo-zone i::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 6px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  right: 2px;
  top: 2px;
}
body.mode-user .insp-photos { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
body.mode-user .insp-photos:empty { display: none; }
body.mode-user .insp-photos .thumb,
body.mode-user .insp-photos .thumb img { width: 84px; height: 84px; }
body.mode-user .thumb-wrap {
  position: relative;
  width: 84px;
  height: 84px;
  flex: 0 0 84px;
}
body.mode-user .thumb-x {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(20, 24, 28, .62);
  color: #fff;
  font-size: 14px;
  line-height: 20px;
  font-weight: 700;
  cursor: pointer;
  z-index: 2;
}
body.mode-user .insp-submit {
  display: block;
  width: 100%;
  margin-top: 12px;
  min-height: 46px;
  font-size: 16px;
}
body.mode-user .save-hint { min-height: 18px; margin: 8px 0 0; font-size: 12px; color: var(--accent); text-align: center; }
body.mode-user .card-sign { height: 120px; margin-top: 6px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
body.mode-user .repair-form { margin-top: 8px; }
body.mode-user .repair-form .btn { width: 100%; margin-top: 8px; }
body.mode-user .insp-card { overflow-anchor: none; }
body.mode-user .empty { padding: 48px 16px; }
.sign-pad {
  width: 100%;
  height: 148px;
  background: #fff;
  border: 1px dashed var(--line);
  border-radius: 10px;
  touch-action: none;
  display: block;
}

@media (min-width: 480px) {
  body.mode-user {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 28px 0 36px;
    background: #b9d2ca;
    overflow: hidden;
  }
  body.mode-user #app {
    width: 390px;
    height: min(844px, calc(100dvh - 56px));
    min-height: min(844px, calc(100dvh - 56px));
    max-height: calc(100dvh - 56px);
    border-radius: 32px;
    overflow: hidden;
    border: 10px solid #1d3b36;
    box-shadow: 0 24px 60px rgba(20, 51, 46, .22);
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  body.mode-user #app::-webkit-scrollbar { width: 0; height: 0; display: none; }
}

.opt {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  overflow-anchor: none;
}
.opt input[type=checkbox],
.opt input[type=radio] {
  width: 18px;
  height: 18px;
  margin: 0;
  flex: 0 0 18px;
  accent-color: var(--accent);
}

body.mode-admin .phone-tab { display: none !important; }
body.mode-admin .shell { grid-template-columns: var(--side) 1fr; }
body.mode-admin .side { display: block; position: static; width: auto; }
body.mode-admin table { display: table; min-width: 720px; }
body.mode-admin thead { display: table-header-group; }
body.mode-admin tbody tr { display: table-row; border: 0; margin: 0; padding: 0; background: transparent; }
body.mode-admin tbody td { display: table-cell; border-bottom: 1px solid var(--line); padding: 8px 6px; }
body.mode-admin tbody td::before { display: none; }
body.mode-admin tbody td.ops { display: table-cell; }

@media (min-width: 901px) {
  body.mode-admin {
    --fs: 15px;
    --fs-sm: 13px;
    --side: 232px;
    --pad: 24px;
    --tap: 40px;
    background: #e8f2ee;
  }
  body.mode-admin .shell {
    background: #e8f2ee;
  }
  body.mode-admin .side {
    background: #14332e;
    color: #e7f4f0;
    border-right: 0;
    padding: 28px 14px;
  }
  body.mode-admin .brand {
    color: #fff;
    font-size: 18px;
    margin: 2px 12px 26px;
    letter-spacing: .03em;
    line-height: 1.25;
  }
  body.mode-admin .brand small {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    font-weight: 400;
    color: rgba(255,255,255,.52);
    letter-spacing: 0;
  }
  body.mode-admin .nav {
    color: rgba(231, 244, 240, .86);
    border-radius: 10px;
    min-height: 42px;
    font-size: 14px;
    margin-bottom: 4px;
  }
  body.mode-admin .nav.active,
  body.mode-admin .nav:hover {
    background: rgba(42, 157, 143, .32);
    color: #fff;
  }
  body.mode-admin .nav-parent .arrow { border-top-color: rgba(255,255,255,.4); }
  body.mode-admin .nav-child { padding-left: 18px; }
  body.mode-admin .shell,
  body.mode-admin .main,
  body.mode-admin .card,
  body.mode-admin .pill,
  body.mode-admin table,
  body.mode-admin tr {
    overflow-anchor: none;
  }
  body.mode-admin .main {
    padding: 24px 28px 40px;
    max-width: 1480px;
  }
  body.mode-admin .topbar {
    background: #fff;
    border-radius: 16px;
    padding: 12px 18px;
    margin-bottom: 18px;
    box-shadow: 0 10px 28px rgba(20, 51, 46, .06);
  }
  body.mode-admin .card {
    border: 0;
    border-radius: 16px;
    padding: 20px 22px;
    box-shadow: 0 10px 28px rgba(20, 51, 46, .05);
    margin-bottom: 16px;
  }
  body.mode-admin .kpis { gap: 14px; margin-bottom: 16px; }
  body.mode-admin .kpi {
    border: 0;
    box-shadow: 0 10px 28px rgba(20, 51, 46, .05);
    padding: 18px 20px;
    border-radius: 16px;
  }
  body.mode-admin .kpi .n { font-size: 28px; letter-spacing: -.03em; }
  body.mode-admin table { min-width: 880px; font-size: 13px; }
  body.mode-admin th {
    color: var(--muted);
    font-weight: 600;
    padding: 12px 10px;
    background: #f4faf8;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
  }
  body.mode-admin tbody tr:hover { background: #f3faf7; }
  body.mode-admin tbody td {
    padding: 12px 10px;
    border-bottom: 1px solid rgba(36, 120, 108, .1);
    vertical-align: middle;
  }
  body.mode-admin .filter-bar { gap: 10px; }
  body.mode-admin .filter-bar .input,
  body.mode-admin .filter-bar .select { min-height: 38px; }
  body.mode-admin .assign-bar { align-items: end; margin-bottom: 12px; }
  body.mode-admin .assign-bar .form-row { margin: 0; }
}

@media (max-width: 900px) {
  body.mode-admin .shell { grid-template-columns: 1fr; }
  body.mode-admin .side {
    display: none;
    position: fixed;
    inset: 0 auto 0 0;
    width: min(300px, 88vw);
    z-index: 30;
  }
  body.mode-admin .shell.nav-open .side { display: block; }
  body.mode-admin .menu-btn { display: inline-flex; }
}

.check-edit {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 12px;
  background: #f7fbf9;
}
.check-edit-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.check-edit .photo-flag { margin: 8px 0 0; }
.row-link { cursor: pointer; }
.row-link:hover { background: rgba(42, 157, 143, .08); }
.rec-device {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 12px 0 0;
  background: #f7fbf9;
}
