﻿:root {
  color-scheme: light;
  --bg: #f5f5f3;
  --panel: #ffffff;
  --text: #15171a;
  --muted: #8e9298;
  --line: #ececec;
  --line-dark: #d6d6d6;
  --green: #18bd91;
  --blue: #3d7eea;
  --red: #ef3f5c;
  --amber: #bd7b2d;
  --black: #06070a;
  --shadow: 0 8px 22px rgba(12, 18, 24, 0.04);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100vh;
}

.auth-shell {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  grid-template-rows: 1fr auto;
  align-items: center;
  width: min(100vw, 430px);
  min-height: 100vh;
  margin: auto;
  padding: 48px 24px;
  background: linear-gradient(155deg, #f6ede1 0%, #fbf8f2 55%, #efe1d1 100%);
}

.auth-pending .auth-shell { display: grid; }
.auth-pending .phone-shell { visibility: hidden; }

.auth-brand { align-self: end; margin-bottom: 48px; text-align: center; }
.auth-brand span { color: #2a211b; font-size: 34px; font-weight: 900; letter-spacing: 6px; }
.auth-brand p { margin-top: 10px; color: #8b6a51; font-size: 13px; letter-spacing: 4px; }

.auth-card {
  align-self: start;
  width: 100%;
  padding: 28px 24px;
  border: 1px solid rgba(126, 78, 43, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 18px 48px rgba(79, 48, 27, 0.12);
}

.auth-eyebrow { color: #8a4b24; font-size: 11px; font-weight: 800; letter-spacing: 1.5px; }
.auth-card h1 { margin-top: 12px; font-size: 27px; }
.auth-card > p, .password-dialog p { margin: 8px 0 22px; color: #876f60; font-size: 13px; }
.auth-card label, .password-dialog label { display: grid; gap: 7px; margin-top: 15px; font-size: 12px; font-weight: 700; }
.auth-card input, .password-dialog input { width: 100%; height: 46px; padding: 0 13px; border: 1px solid #ddcbbb; border-radius: 9px; background: #fff; font: inherit; }
.auth-submit { width: 100%; height: 47px; margin-top: 18px; border-radius: 9px; background: #814722; color: #fff; font-weight: 800; }
.auth-submit:disabled { opacity: 0.55; }
.auth-error { min-height: 18px; margin-top: 10px; color: #c22f42; font-size: 12px; }

.password-dialog { width: min(calc(100vw - 32px), 390px); padding: 0; border: 0; border-radius: 16px; }
.password-dialog::backdrop { background: rgba(0, 0, 0, 0.58); }
.password-dialog form { padding: 26px 22px; }
.password-dialog h2 { margin: 0; font-size: 21px; }

body {
  display: grid;
  place-items: center;
  background: #dde0df;
  color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

button {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

h1,
h2,
p {
  margin: 0;
}

.phone-shell {
  position: relative;
  width: min(100vw, 430px);
  height: min(100vh, 932px);
  min-height: 720px;
  overflow: hidden;
  background: var(--bg);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.18);
}

.security-watermark {
  pointer-events: none;
  position: absolute;
  inset: -80px;
  z-index: 80;
  display: grid;
  grid-template-columns: repeat(4, 315px);
  gap: 57px 27px;
  align-content: start;
  overflow: hidden;
  opacity: 0.13;
  color: #111316;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.5;
  transform: rotate(-28deg);
  white-space: pre-wrap;
}

.security-watermark::before,
.security-watermark::after {
  content: attr(id);
  display: none;
}

.security-watermark {
  text-shadow:
    0 0 0 currentColor,
    315px 0 0 currentColor,
    630px 0 0 currentColor,
    0 108px 0 currentColor,
    315px 108px 0 currentColor,
    630px 108px 0 currentColor,
    0 216px 0 currentColor,
    315px 216px 0 currentColor,
    630px 216px 0 currentColor,
    0 324px 0 currentColor,
    315px 324px 0 currentColor,
    630px 324px 0 currentColor,
    0 432px 0 currentColor,
    315px 432px 0 currentColor,
    630px 432px 0 currentColor,
    0 540px 0 currentColor,
    315px 540px 0 currentColor,
    630px 540px 0 currentColor,
    0 648px 0 currentColor,
    315px 648px 0 currentColor,
    630px 648px 0 currentColor,
    0 756px 0 currentColor,
    315px 756px 0 currentColor,
    630px 756px 0 currentColor,
    0 864px 0 currentColor,
    315px 864px 0 currentColor,
    630px 864px 0 currentColor,
    0 972px 0 currentColor,
    315px 972px 0 currentColor,
    630px 972px 0 currentColor,
    0 1080px 0 currentColor,
    315px 1080px 0 currentColor,
    630px 1080px 0 currentColor;
}

.security-warning {
  position: absolute;
  inset: 0;
  z-index: 120;
  display: none;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.46);
}

.security-warning.show {
  display: grid;
}

.security-warning-card {
  width: 100%;
  padding: 20px 18px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
}

.security-warning-card strong {
  display: block;
  margin-bottom: 10px;
  color: var(--red);
  font-size: 17px;
}

.security-warning-card p {
  margin-bottom: 16px;
  color: #3f454c;
  font-size: 12px;
  line-height: 1.7;
}

.screen {
  position: absolute;
  inset: 0;
  display: none;
  padding-bottom: 86px;
  background: var(--bg);
}

.phone-shell.detail-mode .bottom-nav {
  display: none;
}

.phone-shell.detail-mode .screen {
  padding-bottom: 0;
}

.screen.active {
  display: block;
}

.status-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  height: 0;
  padding: 0 28px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0;
}

.home-hero {
  height: 122px;
  color: #fff;
  background: #24282d;
}

.store-top {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: start;
  gap: 8px;
  padding: 24px 14px 0;
}

.store-top h1,
.task-titlebar h1,
.plain-header h1 {
  min-width: 0;
  font-size: 16.5px;
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: 0;
}

.icon-btn {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  font-size: 19.5px;
}

.content-scroll {
  height: calc(100% - 82px);
  overflow-y: auto;
  scrollbar-width: none;
}

#homeScreen .content-scroll {
  height: calc(100% - 122px);
}

.content-scroll::-webkit-scrollbar {
  display: none;
}

.home-content {
  padding: 14px 14px 110px;
}

.account-summary {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 10px;
  align-items: center;
  margin-top: 8px;
  max-width: 330px;
}

.account-summary span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 10.5px;
  font-weight: 800;
  white-space: nowrap;
}

.account-summary em {
  grid-column: 1;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.62);
  font-size: 10.5px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-summary button {
  grid-column: 2;
  grid-row: 1 / 3;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 5px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 10.5px;
}

.card {
  margin-bottom: 14px;
  padding: 19px 14px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.card h2 {
  margin-bottom: 18px;
  font-size: 15.75px;
  line-height: 1.2;
  font-weight: 800;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.section-head h2 {
  margin-bottom: 0;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #96999f;
  font-size: 12px;
  white-space: nowrap;
}

.text-link b,
.badge {
  min-width: 25px;
  height: 25px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 10.5px;
  line-height: 1;
}

.message-row {
  display: grid;
  grid-template-columns: 28px auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  font-size: 12px;
}

.message-row + .message-row {
  margin-top: 8px;
}

.message-row strong {
  font-weight: 800;
  white-space: nowrap;
}

.message-row p {
  min-width: 0;
  overflow: hidden;
  color: #3c3f44;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-row time {
  color: #bfc2c7;
}

.dot {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
}

.dot.green {
  background: var(--green);
}

.dot.blue {
  background: var(--blue);
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  row-gap: 30px;
  column-gap: 8px;
}

.tool {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 9px;
}

.tool-icon {
  position: relative;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #17191d;
  font-size: 23.25px;
  line-height: 1;
}

.tool-icon::after {
  content: "";
  position: absolute;
  right: 3px;
  bottom: 3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
}

.tool:nth-child(3n) .tool-icon::after {
  background: var(--blue);
}

.tool:nth-child(5n) .tool-icon::after {
  background: #e0a339;
}

.tool span:last-child {
  max-width: 88px;
  min-height: 38px;
  font-size: 11.25px;
  line-height: 1.25;
  text-align: center;
}

.focus-list {
  display: grid;
  gap: 10px;
}

.focus-item {
  display: grid;
  gap: 5px;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  background: #fff;
  text-align: left;
}

.focus-item span {
  color: var(--green);
  font-size: 9.75px;
  font-weight: 800;
}

.focus-item strong {
  font-size: 12.75px;
}

.focus-item p {
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.45;
}

.service-card {
  padding-bottom: 26px;
}

.service-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding-top: 8px;
}

.service-links button {
  min-height: 38px;
  font-size: 12px;
  font-weight: 650;
}

.plain-header,
.task-header,
.patrol-page-header {
  background: #fff;
}

.plain-header {
  height: 82px;
  padding: 0 16px;
}

.plain-header h1 {
  padding-top: 24px;
}

.task-header {
  height: 122px;
  border-bottom: 1px solid var(--line);
}

.task-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 15px 0;
}

.done-link {
  color: #96999f;
  font-size: 12px;
}

.top-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 16px 16px 0;
}

.top-tabs button {
  position: relative;
  height: 42px;
  color: #6e7379;
  font-size: 15.75px;
  font-weight: 700;
  text-align: left;
}

.top-tabs button.active {
  color: #15171a;
}

.top-tabs button.active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 34px;
  height: 3px;
  border-radius: 999px;
  background: #15171a;
}

.top-tabs .badge {
  position: absolute;
  top: 0;
  margin-left: 2px;
  transform: scale(0.78);
  transform-origin: left top;
}

.task-filter-wrap {
  height: 66px;
  overflow: hidden;
  background: var(--bg);
}

.filter-tabs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 14px 13px 12px;
  scrollbar-width: none;
}

.filter-tabs::-webkit-scrollbar {
  display: none;
}

.filter-tabs button {
  flex: 0 0 auto;
  min-width: 74px;
  height: 36px;
  padding: 0 13px;
  border-radius: 4px;
  background: #f0f0f0;
  color: #777c84;
  font-size: 12px;
}

.filter-tabs button.active {
  border: 1px solid var(--green);
  background: #e9fbf6;
  color: #0fa77c;
  font-weight: 800;
}

.task-list {
  height: calc(100% - 188px);
  padding: 0 13px 112px;
}

.task-card {
  margin-bottom: 10px;
  background: #fff;
  box-shadow: var(--shadow);
}

.task-card.locked {
  opacity: 0.82;
}

.task-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 9px;
  padding: 13px 12px 11px;
  border-bottom: 1px solid var(--line);
}

.task-card h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin: 0;
  font-size: 13.5px;
  line-height: 1.3;
}

.task-tag {
  flex: 0 0 auto;
  min-width: 34px;
  padding: 1px 5px;
  border: 1px solid #aeb2b7;
  border-radius: 4px;
  color: #33363b;
  font-size: 10.5px;
  font-weight: 500;
  text-align: center;
}

.approval {
  flex: 0 0 auto;
  color: var(--amber);
  font-size: 12.75px;
  font-weight: 800;
}

.muted-approval {
  color: #999da3;
}

.task-meta {
  display: grid;
  grid-template-columns: 84px 1fr;
  row-gap: 8px;
  padding: 12px 12px 13px;
  font-size: 11.25px;
}

.task-meta dt {
  color: #a2a5aa;
}

.task-meta dd {
  margin: 0;
  min-width: 0;
  line-height: 1.35;
}

.card-action {
  display: flex;
  justify-content: flex-end;
  padding: 0 12px 12px;
}

.black-btn,
.outline-btn {
  min-width: 78px;
  height: 36px;
  border-radius: 4px;
  font-size: 11.25px;
  font-weight: 800;
}

.black-btn {
  background: var(--black);
  color: #fff;
}

.outline-btn {
  border: 1px solid #d0d3d7;
  background: #fff;
  color: #44484f;
}

.page-pad {
  padding: 14px 13px 112px;
}

.detail-header {
  height: 82px;
}

.detail-titlebar {
  display: grid;
  grid-template-columns: 40px 1fr;
  align-items: center;
  gap: 8px;
  padding-top: 24px;
}

.patrol-page-header {
  height: 82px;
}

.patrol-titlebar {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  padding: 18px 14px 0;
}

.patrol-titlebar h1 {
  margin: 0;
  text-align: center;
  font-size: 16.5px;
  line-height: 1.25;
}

.patrol-page {
  height: calc(100% - 82px);
  background: #fff;
  padding-bottom: 24px;
}

.patrol-meta {
  padding: 14px 18px 22px;
  background: #fff;
}

.patrol-meta h2 {
  margin: 0 0 18px;
  font-size: 15.75px;
}

.patrol-meta dl {
  display: grid;
  grid-template-columns: 70px 1fr;
  row-gap: 12px;
  margin: 0;
  color: #9ca0a6;
  font-size: 12px;
}

.patrol-meta dd {
  margin: 0;
  color: #8c9096;
}

.patrol-window {
  display: grid;
  gap: 5px;
  margin: 0 18px 14px;
  padding: 10px 12px;
  border-left: 3px solid var(--green);
  background: #eefbf7;
}

.patrol-window strong {
  font-size: 12.75px;
}

.patrol-window span {
  color: #5e666c;
  font-size: 10.5px;
  line-height: 1.45;
}

.patrol-window.late {
  border-left-color: var(--amber);
  background: #fff8ef;
}

.patrol-risk-head {
  display: grid;
  grid-template-columns: 1fr 130px;
  gap: 12px;
  align-items: center;
  padding: 18px;
  background: #fff;
}

.patrol-risk-head h2 {
  margin: 0 0 6px;
  font-size: 15px;
}

.patrol-risk-head p {
  margin: 0;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.45;
}

.risk-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin: 0 18px 12px;
  border: 1px solid var(--line);
  background: var(--line);
}

.risk-summary-grid div {
  display: grid;
  justify-items: center;
  gap: 5px;
  padding: 12px 8px;
  background: #fff;
}

.risk-summary-grid strong {
  font-size: 16.5px;
}

.risk-summary-grid span {
  color: var(--muted);
  font-size: 10.5px;
}

.patrol-risk-list {
  display: grid;
  gap: 10px;
  padding: 0 18px 16px;
}

.patrol-submitted-reports {
  padding: 0 18px 16px;
}

.patrol-risk-card {
  border: 1px solid var(--line);
  background: #fff;
}

.patrol-risk-card > button {
  display: block;
  width: 100%;
  padding: 13px;
  text-align: left;
}

.risk-card-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
}

.risk-level {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 2px 7px;
  background: #fff8ef;
  color: var(--amber);
  font-size: 9.75px;
  font-weight: 900;
}

.risk-level.high {
  background: #fff1f3;
  color: #e5425f;
}

.risk-card-head strong {
  min-width: 0;
  overflow: hidden;
  font-size: 12.75px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.risk-card-head em {
  color: var(--muted);
  font-size: 9.75px;
  font-style: normal;
}

.patrol-risk-card h3 {
  margin: 10px 0 7px;
  font-size: 14.25px;
}

.patrol-risk-card p {
  margin: 0;
  color: #596068;
  font-size: 11.25px;
  line-height: 1.55;
}

.risk-card-foot {
  display: grid;
  gap: 5px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 9.75px;
}

.risk-card-foot b {
  color: #111316;
}

.risk-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 13px 13px;
}

.risk-decision-panel {
  display: grid;
  gap: 12px;
  margin: 0 18px 14px;
  padding: 13px;
  border-left: 3px solid #e5425f;
  background: #fff7f8;
}

.risk-decision-panel strong {
  display: block;
  margin: 8px 0 5px;
  font-size: 13.5px;
}

.risk-decision-panel p {
  margin: 0 0 7px;
  color: #596068;
  font-size: 10.5px;
  line-height: 1.5;
}

.risk-decision-panel em {
  color: var(--muted);
  font-size: 9.75px;
  font-style: normal;
}

.risk-action-done {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  background: #eefbf7;
  color: var(--green);
  font-size: 10.5px;
  font-weight: 800;
}

.patrol-all-reports {
  padding: 0 18px 96px;
}

.compact-head {
  margin: 4px 0 10px;
  padding: 0;
}

.patrol-report-grid {
  display: grid;
  gap: 8px;
}

.patrol-report-entry {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 11px 12px;
  border: 1px solid var(--line);
  background: #fff;
  text-align: left;
}

.patrol-report-entry span {
  display: grid;
  place-items: center;
  min-height: 26px;
  border: 1px solid #aeb2b7;
  color: #33363b;
  font-size: 10.5px;
  font-weight: 800;
}

.patrol-report-entry strong {
  overflow: hidden;
  font-size: 12.75px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.patrol-report-entry em {
  color: var(--muted);
  font-size: 9.75px;
  font-style: normal;
}

.patrol-report-entry b {
  grid-column: 2 / -1;
  color: var(--green);
  font-size: 10.5px;
}

.patrol-report-entry b.warning {
  color: var(--amber);
}

.patrol-report-entry.is-submitted {
  border-color: rgba(35, 191, 149, 0.45);
  background: #f2fffb;
}

.patrol-report-entry.is-submitted b {
  color: var(--green);
}

.compact-empty {
  min-height: 72px;
  padding: 12px;
  box-shadow: none;
  font-size: 10.5px;
  text-align: center;
}

.camera-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.camera-result-box {
  display: grid;
  gap: 5px;
  margin-top: 10px;
  padding: 10px;
  border-left: 3px solid var(--green);
  background: #eefbf7;
}

.camera-result-box b {
  color: #173d34;
  font-size: 11.25px;
}

.camera-result-box small {
  color: #5a6864;
  font-size: 9.75px;
  line-height: 1.45;
}

.patrol-total {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.patrol-total strong {
  font-size: 15.75px;
}

.patrol-total span {
  color: var(--muted);
  font-size: 10.5px;
}

.patrol-check-layout {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  min-height: 520px;
  background: #fff;
}

.patrol-category-list {
  display: grid;
  align-content: start;
  border-right: 1px solid var(--line);
  background: #fff;
}

.patrol-category-list button {
  position: relative;
  display: grid;
  gap: 5px;
  min-height: 76px;
  padding: 12px 9px;
  text-align: left;
}

.patrol-category-list button::after {
  content: "";
  position: absolute;
  top: 12px;
  bottom: 12px;
  right: -1px;
  width: 2px;
  background: transparent;
}

.patrol-category-list button.active::after {
  background: #111316;
}

.patrol-category-list strong {
  font-size: 12.75px;
  line-height: 1.25;
}

.patrol-category-list span {
  color: #4b4f56;
  font-size: 10.5px;
}

.patrol-item-panel {
  min-width: 0;
  padding: 18px 14px 30px;
}

.late-notice {
  margin-bottom: 12px;
  padding: 10px 11px;
  border-left: 3px solid var(--amber);
  background: #fff8ef;
  color: #7a5a2a;
  font-size: 10.5px;
  line-height: 1.5;
}

.patrol-item-panel > h2 {
  display: inline-block;
  margin: 0 0 14px;
  padding: 7px 14px;
  border-left: 3px solid var(--green);
  background: #eefbf7;
  font-size: 15.75px;
}

.patrol-check-item {
  padding: 18px 0 22px;
  border-bottom: 1px solid var(--line);
}

.patrol-check-item h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  font-size: 15.75px;
}

.patrol-check-item h3 span {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #202225;
  color: #fff;
  font-size: 10.5px;
}

.patrol-check-item p {
  color: #9a9ea4;
  font-size: 12.75px;
  line-height: 1.65;
}

.check-result {
  margin-top: 16px;
  padding: 14px;
  background: #f5f5f5;
}

.check-result.report-evidence-only {
  margin-top: 8px;
  padding: 0;
  background: transparent;
}

.check-result strong,
.check-result span {
  display: block;
}

.check-result strong {
  margin-bottom: 9px;
  font-size: 13.5px;
}

.check-result > span {
  color: #5e636a;
  font-size: 12px;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-top: 12px;
}

.media-thumb {
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.2), rgba(0,0,0,0.08)),
    #c8c2b8;
}

.media-thumb.is-evidence {
  color: inherit;
  text-decoration: none;
}

.media-thumb img,
.media-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-thumb:nth-child(2n) {
  background:
    linear-gradient(135deg, rgba(255,255,255,0.25), rgba(0,0,0,0.12)),
    #b9c4b6;
}

.media-thumb i {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-style: normal;
  font-size: 9px;
}

.media-thumb span {
  position: absolute;
  left: 5px;
  right: 5px;
  bottom: 5px;
  overflow: hidden;
  color: #fff;
  font-size: 7.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.patrol-submit-bar {
  position: sticky;
  bottom: 0;
  display: grid;
  gap: 10px;
  padding: 12px 18px 18px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
}

.patrol-submit-bar div {
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.45;
}

.monthly-meta {
  padding-bottom: 20px;
}

.monthly-meta dl {
  grid-template-columns: 74px 1fr;
}

.monthly-store-select {
  width: 100%;
  height: 34px;
  padding: 0 8px;
  border: 1px solid var(--line-dark);
  background: #fff;
  color: #111316;
  font: inherit;
  font-size: 11.25px;
}

.monthly-score-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 0 18px 14px;
  background: var(--line);
  border: 1px solid var(--line);
}

.monthly-score-panel div {
  min-height: 66px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 6px;
  background: #fff;
}

.monthly-score-panel span {
  color: var(--muted);
  font-size: 10.5px;
}

.monthly-score-panel strong {
  font-size: 17.25px;
}

.monthly-upload-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  margin: 0 18px 14px;
  padding: 14px;
  background: #f5f5f5;
}

.monthly-upload-card h2 {
  margin: 0 0 6px;
  font-size: 13.5px;
}

.monthly-upload-card p {
  margin: 0;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.5;
}

.monthly-overview-list {
  display: grid;
  gap: 8px;
  margin: 0 18px 14px;
}

.monthly-overview-list article {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px 13px;
  border: 1px solid var(--line);
  background: #fff;
}

.monthly-overview-list strong {
  display: block;
  margin-bottom: 5px;
  font-size: 12.75px;
}

.monthly-overview-list p {
  margin: 0;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.45;
}

.monthly-overview-list span {
  color: var(--green);
  font-size: 10.5px;
  font-weight: 800;
  white-space: nowrap;
}

.monthly-overview-list span.warning {
  color: var(--amber);
}

.monthly-category-list {
  display: grid;
  gap: 12px;
  padding: 0 18px 96px;
}

.monthly-category {
  border: 1px solid var(--line);
  background: #fff;
}

.monthly-category header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-left: 3px solid var(--green);
  border-bottom: 1px solid var(--line);
  background: #f7fffc;
}

.monthly-category header span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 9.75px;
}

.monthly-category h2 {
  margin: 0;
  font-size: 14.25px;
}

.monthly-category header strong {
  font-size: 14.25px;
}

.monthly-items {
  display: grid;
}

.monthly-item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 42px;
  gap: 10px;
  padding: 13px 14px;
  border-top: 1px solid var(--line);
}

.monthly-item:first-child {
  border-top: 0;
}

.monthly-item > span {
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-dark);
  color: #31353a;
  font-size: 10.5px;
  font-weight: 800;
}

.monthly-item strong {
  display: block;
  margin-bottom: 6px;
  font-size: 12.75px;
}

.monthly-item p {
  margin: 0;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.55;
}

.camera-note {
  margin-top: 8px;
  padding: 7px 9px;
  border-left: 3px solid var(--green);
  background: #eefbf7;
  color: #315c50;
  font-size: 9.75px;
  line-height: 1.45;
}

.camera-note.assist {
  border-left-color: var(--amber);
  background: #fff8ef;
  color: #7a5a2a;
}

.monthly-item em {
  color: #111316;
  font-size: 10.5px;
  font-style: normal;
  font-weight: 800;
  text-align: right;
}

.monthly-item.is-form {
  grid-template-columns: 36px minmax(0, 1fr);
}

.monthly-item.is-form em {
  grid-column: 1;
  grid-row: 2;
  text-align: center;
}

.monthly-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 12px;
}

.monthly-form-grid label {
  display: grid;
  gap: 5px;
}

.monthly-form-grid small {
  color: var(--muted);
  font-size: 9.75px;
}

.monthly-form-grid input,
.monthly-form-grid select,
.monthly-form-grid textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line-dark);
  background: #fff;
  color: #111316;
  font: inherit;
  font-size: 11.25px;
}

.monthly-form-grid input,
.monthly-form-grid select {
  height: 34px;
  padding: 0 8px;
}

.monthly-form-grid textarea {
  min-height: 58px;
  padding: 8px;
  resize: vertical;
}

.monthly-note {
  grid-column: 1 / -1;
}

.monthly-upload-row {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
}

.compact-upload-row {
  grid-template-columns: auto 1fr;
}

.monthly-upload-row .outline-btn,
.upload-btn,
.camera-capture-btn {
  min-height: 32px;
  padding: 0 10px;
  font-size: 10.5px;
}

.upload-btn,
.camera-capture-btn {
  display: inline-grid;
  place-items: center;
  border: 1px solid #d0d3d7;
  background: #fff;
  color: #44484f;
  font-weight: 800;
}

.camera-capture-btn {
  border-color: #05070a;
  background: #05070a;
  color: #fff;
}

.upload-btn input,
.camera-capture-btn input {
  display: none;
}

.monthly-upload-row span {
  color: var(--muted);
  font-size: 9.75px;
  line-height: 1.4;
}

.upload-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.upload-preview-grid:empty {
  display: none;
}

.upload-preview-thumb {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #f5f5f5;
}

.upload-preview-thumb img,
.upload-preview-thumb video {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: block;
  object-fit: cover;
  background: #ddd;
}

.upload-preview-thumb span {
  display: block;
  overflow: hidden;
  padding: 5px;
  color: #4f555c;
  font-size: 8.75px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-preview-thumb button {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.58);
  color: #fff;
  font-size: 13px;
  line-height: 1;
}

.monthly-submit-bar {
  position: sticky;
  bottom: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 12px 18px 18px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
}

.monthly-submit-summary {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 10.5px;
}

.back-btn {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  font-size: 24px;
  line-height: 1;
}

.module-section {
  margin-bottom: 18px;
}

.module-section-title {
  margin: 4px 0 10px;
  font-size: 13.5px;
}

.module-card {
  margin-bottom: 12px;
  padding: 14px;
  background: #fff;
  box-shadow: var(--shadow);
}

.module-card-main {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px;
  width: 100%;
  text-align: left;
}

.module-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid #d5d8dc;
  background: #f8f8f8;
  color: #111316;
  font-size: 15.75px;
  font-weight: 900;
}

.module-card-main strong {
  display: block;
  margin-bottom: 6px;
  font-size: 12.75px;
}

.module-card-main em {
  display: block;
  color: var(--muted);
  font-size: 10.5px;
  font-style: normal;
  line-height: 1.45;
}

.module-card-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 13px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 8px;
  border: 1px solid var(--line-dark);
  color: #4e5359;
  font-size: 9.75px;
}

.module-detail-head {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 12px;
  align-items: start;
}

.module-detail-head h2 {
  margin-bottom: 8px;
}

.module-detail-head p {
  color: var(--muted);
  font-size: 11.25px;
  line-height: 1.5;
}

.scope-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.scope-grid.compact {
  margin-top: 12px;
}

.scope-item {
  min-height: 38px;
  display: grid;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--line);
  background: #fafafa;
  font-size: 10.5px;
}

.boundary-list {
  display: grid;
  gap: 9px;
}

.boundary-list.compact {
  margin-top: 12px;
}

.boundary-list p {
  padding: 10px 11px;
  border-left: 3px solid var(--amber);
  background: #fbfaf8;
  color: #53575d;
  font-size: 10.5px;
  line-height: 1.45;
}

.addon-list {
  display: grid;
  gap: 12px;
}

.addon-card {
  padding: 13px;
  border: 1px solid var(--line);
  background: #fbfbfb;
}

.addon-card strong {
  display: block;
  margin-bottom: 7px;
  font-size: 12.75px;
}

.addon-card > p {
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.5;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 180px;
  color: var(--muted);
  background: #fff;
  box-shadow: var(--shadow);
}

.placeholder-card {
  min-height: 180px;
}

.placeholder-card p {
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 12.75px;
  line-height: 1.6;
}

.inventory-item,
.rank-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.inventory-item:first-child,
.rank-item:first-child {
  border-top: 0;
}

.inventory-item strong,
.rank-item strong {
  display: block;
  margin-bottom: 6px;
  font-size: 12.75px;
}

.inventory-item p,
.rank-item p,
.muted {
  color: var(--muted);
  font-size: 10.5px;
}

.metric-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.metric-card {
  min-height: 94px;
  padding: 16px 14px;
  background: #fff;
  box-shadow: var(--shadow);
}

.metric-card span {
  display: block;
  color: var(--muted);
  font-size: 10.5px;
}

.metric-card strong {
  display: block;
  margin-top: 10px;
  font-size: 21px;
}

.bottom-nav {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  height: 86px;
  padding-bottom: 18px;
  border-top: 1px solid #e2e2e2;
  background: rgba(255, 255, 255, 0.96);
}

.bottom-nav button {
  position: relative;
  display: grid;
  place-items: center;
  color: #85888e;
  font-size: 12.75px;
  font-weight: 700;
}

.bottom-nav button.active {
  color: #111316;
  font-weight: 900;
}

.bottom-nav .badge {
  position: absolute;
  top: 13px;
  left: calc(50% + 10px);
  transform: scale(0.82);
}

@media (max-width: 430px) {
  body {
    display: block;
    background: var(--bg);
  }

  .phone-shell {
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
    box-shadow: none;
  }
}

@media (max-width: 370px) {
  .tool-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .status-bar {
    padding: 0 18px;
  }

  .task-meta {
    grid-template-columns: 84px 1fr;
    font-size: 12px;
  }
}


