:root {
  --bg: #edf3f1;
  --ink: #1a2328;
  --muted: #5a676f;
  --card: rgba(255, 255, 255, 0.9);
  --surface: rgba(255, 255, 255, 0.96);
  --line: rgba(26, 35, 40, 0.09);
  --brand: #0f766e;
  --brand-deep: #0b4f4a;
  --ok: #187245;
  --warn: #c88000;
  --danger: #bf3640;
  --idle: #61707c;
  --shadow: 0 18px 46px rgba(15, 23, 42, 0.1);
  --shadow-soft: 0 10px 28px rgba(15, 23, 42, 0.08);
  --interactive-glow: 0 0 0 4px rgba(15, 118, 110, 0.14), 0 16px 34px rgba(15, 23, 42, 0.14);
  --interactive-bg: rgba(15, 118, 110, 0.09);
  --text-base-size: 14px;
  --text-small-size: 12px;
  --text-tiny-size: 11px;
  --heading-size: 20px;
  --section-title-size: 18px;
  --metric-size: 18px;
  --font-main: "Pretendard", "Noto Sans KR", "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  min-width: 0;
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 100%;
  overflow-x: hidden;
  font-family: var(--font-main);
  font-size: var(--text-base-size);
  color: var(--ink);
  -webkit-user-select: none;
  user-select: none;
  background: linear-gradient(180deg, #f8fbfa 0%, var(--bg) 100%);
}

html {
  overflow-x: clip;
}

button,
input,
select,
summary {
  font: inherit;
}

button {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: center;
}

input,
textarea,
.ocr-raw {
  min-width: 0;
  max-width: 100%;
  -webkit-user-select: text;
  user-select: text;
}

button,
label,
summary,
a {
  -webkit-user-select: none;
  user-select: none;
}

:where(a[href], button:not(:disabled), summary, label[for], .capture-button, .pick-button, .app-entry-action) {
  transition:
    color 160ms ease,
    background 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    filter 160ms ease,
    opacity 160ms ease,
    transform 160ms ease;
}

:where(a[href], button:not(:disabled), summary, label[for], .capture-button, .pick-button) {
  cursor: pointer;
}

:where(a[href]) {
  border-radius: 8px;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

:where(a[href], button:not(:disabled), summary, label[for], .capture-button, .pick-button):focus-visible {
  outline: 3px solid rgba(15, 118, 110, 0.24);
  outline-offset: 3px;
}

:where(button:not(:disabled), summary, label[for], .capture-button, .pick-button):active {
  transform: translateY(0) scale(0.98);
}

@media (hover: hover) and (pointer: fine) {
  :where(a[href]):hover {
    color: var(--brand-deep);
    background: var(--interactive-bg);
    text-decoration-line: underline;
    text-decoration-thickness: 0.14em;
    text-underline-offset: 0.22em;
  }

  :where(button:not(:disabled), summary, label[for], .capture-button, .pick-button, .app-entry-action):hover {
    transform: translateY(-2px);
    filter: saturate(1.08) brightness(1.02);
    border-color: rgba(15, 118, 110, 0.28);
    box-shadow: var(--interactive-glow);
  }

  :where(.ghost-btn, .secondary-btn, .mobile-tab-btn, .admin-work-nav button, .operator-home-grid button, .contact-summary-card, .operation-summary-card, .resident-summary article, .resident-action-card):hover {
    background: linear-gradient(135deg, rgba(240, 253, 250, 0.98), rgba(255, 255, 255, 0.92));
  }

  :where(.primary-btn, .danger-btn, .mobile-tab-btn.is-active, .admin-work-nav button.is-active):hover {
    filter: saturate(1.14) brightness(1.06);
  }
}

@media (prefers-reduced-motion: reduce) {
  :where(a[href], button:not(:disabled), summary, label[for], .capture-button, .pick-button, .app-entry-action) {
    transition: none;
  }
}

img,
video,
canvas,
table {
  max-width: 100%;
}

main,
section,
article,
aside,
nav,
header,
footer,
div,
form,
label,
details,
summary,
ul,
li {
  max-width: 100%;
}

h1,
h2,
h3,
h4,
p,
small,
span,
strong,
td,
th {
  overflow-wrap: anywhere;
}

.auth-body,
.app-body {
  position: relative;
  overflow-x: hidden;
}

.auth-shell,
.app-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  min-width: 0;
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px;
}

.app-shell {
  display: grid;
  gap: 18px;
  align-items: start;
}

@media (min-width: 1280px) {
  .app-shell {
    max-width: 1760px;
  }
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.topbar {
  order: 1;
}

#cctv-mini-dashboard {
  order: 2;
}

.hero-card {
  order: 3;
}

.admin-work-nav-global {
  order: 0;
}

.guide-panel {
  order: 5;
}

#mobile-section-admin {
  order: 6;
}

.ops-grid {
  order: 7;
}

#mobile-section-cctv {
  order: 8;
}

#mobile-section-contacts {
  order: 9;
}

#mobile-section-recent {
  order: 10;
}

#mobile-section-vehicle-db {
  order: 11;
}

.auth-layout {
  width: min(1120px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  gap: 20px;
  align-items: stretch;
}

.auth-card,
.panel,
.hero-card {
  min-width: 0;
  backdrop-filter: blur(14px);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.auth-card {
  width: 100%;
  padding: 38px;
}

.auth-card h1,
.auth-card h2,
.topbar h1,
.hero-card h2,
.panel h3 {
  margin: 0;
  letter-spacing: -0.03em;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--brand-deep);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.subtle {
  color: var(--muted);
}

.auth-copy {
  margin: 14px 0 28px;
  color: var(--muted);
  line-height: 1.6;
}

.auth-intro-card {
  display: grid;
  gap: 18px;
}

.auth-panel {
  align-self: center;
}

.auth-panel-head {
  display: grid;
  gap: 8px;
  margin-bottom: 24px;
}

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

.auth-feature,
.auth-notice,
.auth-alert {
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid rgba(26, 35, 40, 0.08);
  background: rgba(247, 250, 249, 0.9);
}

.auth-feature strong,
.auth-notice strong,
.auth-alert strong {
  display: block;
  margin-bottom: 6px;
}

.auth-feature p,
.auth-notice p,
.auth-alert p,
.auth-help p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.auth-notice {
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.08), rgba(255, 255, 255, 0.92));
}

.success-alert {
  border-color: rgba(15, 118, 110, 0.22);
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.12), rgba(255, 255, 255, 0.94));
}

.app-entry-layout {
  align-items: center;
}

.app-entry-hero {
  background:
    radial-gradient(circle at 15% 15%, rgba(15, 118, 110, 0.16), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(240, 253, 250, 0.88));
}

.app-entry-actions {
  display: grid;
  gap: 12px;
}

.app-entry-action {
  display: grid;
  gap: 6px;
  padding: 18px;
  border: 1px solid rgba(31, 36, 40, 0.1);
  border-radius: 18px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  box-shadow: var(--shadow-soft);
}

.app-entry-action.primary {
  border-color: rgba(15, 118, 110, 0.28);
  background: linear-gradient(135deg, rgba(236, 253, 245, 0.96), rgba(255, 255, 255, 0.88));
}

.app-entry-action span,
.app-entry-action small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.app-entry-action strong {
  font-size: 20px;
  letter-spacing: -0.03em;
}

.app-entry-action:hover,
.app-entry-action:focus {
  transform: translateY(-1px);
  border-color: rgba(15, 118, 110, 0.38);
}

.auth-trial-guide {
  display: grid;
  gap: 10px;
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid rgba(15, 118, 110, 0.18);
  background: rgba(232, 246, 243, 0.72);
}

.auth-trial-guide > strong {
  color: var(--brand-deep);
}

.auth-trial-guide p,
.auth-trial-guide small {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.auth-trial-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.auth-trial-grid span {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 10px;
  border-radius: 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(31, 36, 40, 0.07);
  font-size: 13px;
  font-weight: 900;
}

.auth-trial-grid b {
  color: var(--muted);
  font-size: 11px;
}

.auth-start-guide {
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid rgba(15, 118, 110, 0.14);
  background: rgba(255, 255, 255, 0.76);
}

.auth-start-guide > strong {
  display: block;
  margin-bottom: 10px;
}

.auth-start-guide ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.auth-start-guide li {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  color: var(--muted);
  line-height: 1.55;
}

.auth-start-guide li span {
  color: var(--brand-deep);
  font-size: 13px;
  font-weight: 900;
}

.auth-alert {
  margin-bottom: 18px;
  border-color: rgba(191, 54, 64, 0.18);
  background: linear-gradient(135deg, rgba(191, 54, 64, 0.08), rgba(255, 255, 255, 0.94));
}

.auth-form,
.stack-form {
  display: grid;
  gap: 16px;
}

.auth-form label,
.stack-form label {
  display: grid;
  gap: 8px;
}

label span {
  font-size: 14px;
  font-weight: 700;
}

input[type="text"],
input[type="password"],
input[type="datetime-local"],
input[type="number"],
select,
input[type="file"],
textarea {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 54px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(26, 35, 40, 0.13);
  background: var(--surface);
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="datetime-local"]:focus,
input[type="number"]:focus,
select:focus,
input[type="file"]:focus,
textarea:focus {
  outline: 0;
  border-color: rgba(15, 118, 110, 0.42);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.13);
  background: white;
}

textarea {
  resize: vertical;
  line-height: 1.5;
}

.primary-btn,
.secondary-btn,
.danger-btn,
.ghost-btn,
.capture-button,
.pick-button {
  border: 0;
  border-radius: 12px;
  min-height: 42px;
  min-width: 0;
  max-width: 100%;
  padding: 0 14px;
  font-weight: 800;
  line-height: 1.2;
  word-break: keep-all;
  white-space: normal;
  overflow-wrap: anywhere;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, border-color 160ms ease;
}

.primary-btn:hover,
.secondary-btn:hover,
.danger-btn:hover,
.ghost-btn:hover,
.capture-button:hover,
.pick-button:hover {
  transform: translateY(-1px);
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.primary-btn:focus-visible,
.secondary-btn:focus-visible,
.danger-btn:focus-visible,
.ghost-btn:focus-visible,
.capture-button:focus-within,
.pick-button:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(15, 118, 110, 0.2);
  outline-offset: 2px;
}

.primary-btn {
  color: white;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  box-shadow: 0 10px 24px rgba(15, 118, 110, 0.24);
}

.secondary-btn {
  color: var(--ink);
  background: rgba(31, 36, 40, 0.07);
  border: 1px solid rgba(31, 36, 40, 0.06);
}

.danger-btn {
  color: white;
  background: linear-gradient(135deg, #d8454d, #bf2f36);
}

.ghost-btn {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(31, 36, 40, 0.1);
}

.pick-button {
  padding: 0;
  min-height: auto;
  color: var(--ink);
  background: transparent;
}

.auth-help {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: grid;
  gap: 10px;
}

.auth-support-actions {
  display: grid;
  gap: 10px;
  margin-top: 6px;
}

.auth-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  text-decoration: none;
}

.auth-help a {
  color: var(--brand-deep);
  font-weight: 800;
}

.admin-login-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% 16%, rgba(34, 211, 238, 0.26), transparent 26%),
    radial-gradient(circle at 88% 12%, rgba(15, 118, 110, 0.2), transparent 30%),
    linear-gradient(135deg, #e7f2f4 0%, #f8fbfa 46%, #dbe8e4 100%);
}

.admin-login-body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(15, 118, 110, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 118, 110, 0.055) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.42), transparent 78%);
}

.admin-login-shell {
  position: relative;
  z-index: 1;
  width: min(1220px, calc(100% - 48px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 28px 0;
  display: grid;
  align-content: center;
  gap: 18px;
}

.admin-login-board {
  min-height: 650px;
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(380px, 0.72fr);
  overflow: hidden;
  border: 1px solid rgba(15, 118, 110, 0.14);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.16);
  backdrop-filter: blur(18px);
}

.admin-login-showcase {
  position: relative;
  padding: 58px 62px;
  display: grid;
  align-content: space-between;
  gap: 34px;
  background:
    radial-gradient(circle at 18% 84%, rgba(15, 118, 110, 0.11), transparent 28%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 249, 0.84));
}

.admin-login-showcase::after {
  content: "";
  position: absolute;
  top: 0;
  right: -78px;
  width: 156px;
  height: 100%;
  background: linear-gradient(180deg, rgba(34, 161, 204, 0.96), rgba(15, 118, 110, 0.96));
  transform: skewX(-10deg);
  transform-origin: top;
  opacity: 0.98;
}

.admin-login-brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 22px;
  font-weight: 950;
  letter-spacing: -0.05em;
}

.admin-login-brand small {
  margin-left: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-login-mark {
  display: inline-flex;
  width: 54px;
  height: 54px;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  color: #fff;
  font-size: 16px;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #0ea5e9, #0f766e);
  box-shadow: 0 18px 34px rgba(14, 165, 233, 0.24);
}

.admin-login-copy {
  position: relative;
  z-index: 1;
  max-width: 610px;
}

.admin-login-copy h1 {
  margin: 0;
  color: #111c22;
  font-size: clamp(38px, 4.7vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.075em;
}

.admin-login-copy p:last-child {
  max-width: 540px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.72;
}

.admin-login-feature-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  max-width: 650px;
}

.admin-login-feature-grid section {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 12px;
  align-items: start;
  padding: 17px;
  border: 1px solid rgba(15, 118, 110, 0.1);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.admin-login-feature-grid i {
  grid-row: 1 / span 2;
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: var(--brand-deep);
  background: rgba(15, 118, 110, 0.09);
  font-size: 12px;
  font-style: normal;
  font-weight: 950;
  letter-spacing: 0.04em;
}

.admin-login-feature-grid strong {
  color: var(--ink);
  font-size: 16px;
  letter-spacing: -0.03em;
}

.admin-login-feature-grid span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.admin-login-panel {
  position: relative;
  display: grid;
  align-items: center;
  padding: 48px 54px;
  color: #fff;
  background:
    radial-gradient(circle at 90% 18%, rgba(255, 255, 255, 0.28), transparent 24%),
    linear-gradient(155deg, #22a6d5 0%, #1187b7 42%, #0f766e 100%);
}

.admin-login-panel::before {
  content: "";
  position: absolute;
  inset: 22px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 24px;
  pointer-events: none;
}

.admin-login-panel-inner {
  position: relative;
  z-index: 1;
}

.admin-login-panel .eyebrow,
.admin-login-panel .subtle,
.admin-login-panel .auth-help p {
  color: rgba(255, 255, 255, 0.78);
}

.admin-login-panel h2 {
  color: #fff;
  font-size: 34px;
  letter-spacing: -0.055em;
}

.admin-login-form {
  gap: 13px;
}

.admin-login-form label span {
  color: rgba(255, 255, 255, 0.84);
  font-size: 12px;
  font-weight: 900;
}

.admin-login-form input[type="text"],
.admin-login-form input[type="password"] {
  min-height: 50px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 15px;
  color: #0f172a;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.admin-login-form input:focus {
  border-color: rgba(255, 255, 255, 0.72);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.2);
}

.admin-login-submit {
  min-height: 52px;
  margin-top: 4px;
  border-radius: 15px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow: 0 18px 34px rgba(30, 64, 175, 0.32);
  font-size: 17px;
}

.admin-login-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  justify-content: center;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.24);
}

.admin-login-links a,
.admin-login-support a {
  color: #fff;
  font-weight: 900;
  text-decoration: none;
}

.admin-login-support {
  display: grid;
  gap: 5px;
  margin-top: 18px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.11);
}

.admin-login-support span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  line-height: 1.4;
}

.admin-login-contact {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid rgba(15, 118, 110, 0.12);
  border-radius: 24px;
  background: rgba(15, 118, 110, 0.12);
  box-shadow: 0 16px 44px rgba(15, 23, 42, 0.1);
}

.admin-login-contact div {
  display: grid;
  gap: 4px;
  padding: 20px 24px;
  background: rgba(255, 255, 255, 0.88);
}

.admin-login-contact strong {
  color: var(--ink);
  font-size: 16px;
}

.admin-login-contact span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.privacy-shell {
  place-items: start center;
}

.privacy-card {
  width: min(860px, 100%);
}

.privacy-section {
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.privacy-section h2 {
  margin: 0 0 8px;
  font-size: 18px;
  letter-spacing: 0;
}

.privacy-section p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.privacy-actions {
  padding-top: 18px;
}

.topbar,
.panel-head,
.hero-layout,
.search-row,
.save-strip,
.quick-head,
.geo-head {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
  min-width: 0;
}

.topbar {
  margin-bottom: 16px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.cctv-mini-dashboard {
  position: relative;
  z-index: 12;
  margin: -6px 0 12px;
}

.cctv-mini-toggle {
  width: 100%;
  min-height: 38px;
  padding: 6px 10px;
  border: 1px solid rgba(15, 118, 110, 0.14);
  border-radius: 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.07);
  backdrop-filter: blur(14px);
  display: flex;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.cctv-mini-dashboard.is-urgent .cctv-mini-toggle {
  border-color: rgba(191, 54, 64, 0.22);
  background: rgba(255, 246, 246, 0.9);
}

.cctv-mini-toggle span:first-child {
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.cctv-mini-toggle span:last-child {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cctv-mini-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  max-height: min(62vh, 520px);
  overflow: auto;
  padding: 10px;
  border: 1px solid rgba(26, 35, 40, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 20px 46px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(18px);
}

.cctv-mini-panel-head,
.cctv-mini-item-head,
.cctv-mini-item-actions,
.cctv-mini-forward-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.cctv-mini-panel-head {
  justify-content: space-between;
  margin-bottom: 8px;
}

.cctv-mini-panel-head .ghost-btn {
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

.cctv-mini-list {
  display: grid;
  gap: 8px;
}

.cctv-mini-item {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(247, 250, 249, 0.84);
}

.cctv-mini-item.is-overdue {
  border-color: rgba(191, 54, 64, 0.22);
  background: rgba(255, 246, 246, 0.86);
}

.cctv-mini-item-head {
  justify-content: space-between;
  align-items: flex-start;
}

.cctv-mini-title {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.cctv-mini-title strong {
  font-size: 14px;
  line-height: 1.25;
}

.cctv-mini-title span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.cctv-mini-item-actions {
  flex-wrap: wrap;
}

.cctv-mini-item-actions button,
.cctv-mini-forward-row button {
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

.cctv-mini-forward-row {
  flex-wrap: wrap;
}

.cctv-mini-forward-row select {
  flex: 0 1 180px;
  min-height: 34px;
  padding: 6px 9px;
  border-radius: 10px;
  font-size: 12px;
}

.cctv-mini-forward-row input {
  flex: 1 1 220px;
  min-height: 34px;
  padding: 6px 9px;
  border-radius: 10px;
  font-size: 12px;
}

.cctv-mini-empty {
  padding: 12px;
  border-radius: 12px;
  color: var(--muted);
  background: rgba(31, 36, 40, 0.04);
  text-align: center;
  font-size: 12px;
  font-weight: 800;
}

.topbar > div,
.panel-head > div,
.hero-layout > div,
.quick-head > div,
.geo-head > div,
.result-top > div {
  min-width: 0;
}

.hero-card {
  padding: 22px;
  margin-bottom: 16px;
}

.guide-panel {
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px);
}

.guide-panel summary {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  list-style: none;
}

.guide-panel summary::-webkit-details-marker {
  display: none;
}

.guide-summary-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 auto;
}

.guide-summary-title {
  flex: 0 0 auto;
  font-size: 18px;
  font-weight: 900;
  white-space: nowrap;
}

.guide-panel summary small {
  min-width: 0;
  flex: 1 1 auto;
  color: var(--muted);
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.guide-summary-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: #7c2d12;
  background: rgba(251, 191, 36, 0.2);
  border: 1px solid rgba(251, 191, 36, 0.34);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.guide-panel.is-attention {
  border-color: rgba(15, 118, 110, 0.24);
  box-shadow: var(--shadow-soft), 0 0 0 0 rgba(15, 118, 110, 0.24);
  animation: guidePulse 2.4s ease-in-out infinite;
}

@keyframes guidePulse {
  0%, 100% {
    box-shadow: var(--shadow-soft), 0 0 0 0 rgba(15, 118, 110, 0.08);
  }
  50% {
    box-shadow: var(--shadow-soft), 0 0 0 7px rgba(15, 118, 110, 0.14);
  }
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.guide-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.guide-card-wide {
  grid-column: span 2;
}

.guide-card h3 {
  margin: 0 0 12px;
}

.guide-lead {
  margin: -4px 0 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.guide-table-wrap {
  position: relative;
  overflow-x: auto;
  border: 1px solid rgba(31, 36, 40, 0.08);
  border-radius: 12px;
  background: #fbfcfc;
  scrollbar-color: rgba(15, 118, 110, 0.7) rgba(31, 36, 40, 0.08);
  scrollbar-width: thin;
}

.guide-table-wrap::-webkit-scrollbar {
  height: 10px;
}

.guide-table-wrap::-webkit-scrollbar-track {
  background: rgba(31, 36, 40, 0.08);
  border-radius: 999px;
}

.guide-table-wrap::-webkit-scrollbar-thumb {
  background: rgba(15, 118, 110, 0.7);
  border-radius: 999px;
}

.guide-scroll-hint {
  display: none;
}

.guide-excel-table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
  font-size: 13px;
}

.guide-excel-table th,
.guide-excel-table td {
  padding: 10px 11px;
  border-bottom: 1px solid rgba(31, 36, 40, 0.08);
  text-align: left;
  white-space: nowrap;
}

.guide-excel-table th {
  color: var(--muted);
  font-weight: 900;
  background: #f4f7f6;
}

.guide-excel-table td {
  color: var(--ink);
  font-weight: 700;
}

.guide-excel-table tbody tr:last-child td {
  border-bottom: 0;
}

.guide-checks {
  display: grid;
  gap: 7px;
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.guide-checks strong {
  color: var(--ink);
}

.guide-steps {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.guide-steps li {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.guide-steps strong {
  color: var(--brand-deep);
  font-size: 13px;
}

.guide-steps span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.guide-upload-box {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(31, 36, 40, 0.08);
}

.guide-upload-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.excel-help-box {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 12px;
  background: rgba(232, 246, 243, 0.7);
}

.excel-help-box strong {
  color: var(--brand-deep);
  font-size: 13px;
}

.excel-help-box span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.4;
}

.excel-help-box small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.hero-layout {
  align-items: flex-start;
}

.workflow-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.workflow-step {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(31, 36, 40, 0.06);
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
}

.workflow-step.is-active {
  color: white;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
}

.ops-grid {
  display: grid;
  grid-template-columns: 1.45fr 0.95fr;
  gap: 16px;
  align-items: start;
}

.side-stack {
  display: grid;
  gap: 16px;
}

.panel {
  padding: 20px;
}

.capture-panel {
  position: relative;
}

.capture-panel .panel-head {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.capture-panel .stack-form {
  gap: 14px;
}

.status-banner {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  font-weight: 800;
  white-space: nowrap;
}

.status-idle {
  color: white;
  background: var(--idle);
}

.status-active {
  color: white;
  background: #37517e;
}

.status-success {
  color: white;
  background: var(--ok);
}

.status-warn {
  color: white;
  background: var(--warn);
}

.status-danger {
  color: white;
  background: var(--danger);
}

.camera-stage {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.62);
}

.preview-shell {
  min-height: 300px;
  border-radius: 14px;
  border: 1px dashed rgba(31, 36, 40, 0.18);
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.05), rgba(255, 255, 255, 0.84)),
    rgba(255, 255, 255, 0.78);
  overflow: hidden;
  display: grid;
  place-items: center;
}

.preview-placeholder {
  display: grid;
  gap: 10px;
  text-align: center;
  padding: 32px;
  color: var(--muted);
  width: 100%;
  height: 100%;
  min-height: 320px;
  align-content: center;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.preview-placeholder.has-custom-image {
  color: #24313a;
}

.preview-placeholder.has-default-image {
  background-size: min(58%, 260px) auto;
}

.preview-placeholder strong {
  color: var(--ink);
  font-size: 20px;
}

.preview-placeholder span {
  font-size: 15px;
}

.photo-preview {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: cover;
}

.capture-actions {
  display: grid;
  grid-template-columns: 1.35fr 0.95fr 0.95fr;
  gap: 10px;
}

.capture-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 46px;
  padding: 0 14px;
  color: white;
  background: linear-gradient(135deg, #213244, #111a24);
  box-shadow: 0 10px 24px rgba(16, 27, 42, 0.18);
}

.capture-actions .capture-button {
  font-size: 15px;
}

.capture-button.is-disabled {
  opacity: 0.56;
  cursor: not-allowed;
}

.capture-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.action-tall {
  min-height: 46px;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.capture-panel .field-grid {
  gap: 10px;
}

.capture-panel .field-grid label {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.58);
}

.field-grid > *,
.capture-actions > *,
.save-strip > *,
.admin-upload-row > *,
.guide-upload-row > *,
.history-filter-actions > *,
.enforcement-edit-grid > *,
.cctv-edit-grid > *,
.cctv-assignment-grid > *,
.quick-memo-form > *,
.user-form-grid > * {
  min-width: 0;
}

.quick-section {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.54);
}

.quick-chip-row,
.candidate-list,
.capture-shot-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.capture-shot-list {
  margin-top: 12px;
}

.capture-shot-item {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  flex: 1 1 180px;
  min-width: 0;
  max-width: 100%;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
}

.capture-shot-item img {
  width: 58px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  background: #e2e8f0;
}

.capture-shot-item strong,
.capture-shot-item span {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.capture-shot-item strong {
  font-size: 13px;
}

.capture-shot-item span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.photo-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.enforcement-item .photo-link-row {
  padding: 8px;
  border-radius: 12px;
  background: rgba(15, 118, 110, 0.045);
  border: 1px solid rgba(15, 118, 110, 0.08);
}

.enforcement-item .photo-link-row .contact-action {
  min-height: 28px;
  padding: 0 9px;
  font-size: 12px;
}

.candidate-empty {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(31, 36, 40, 0.06);
  font-size: 12px;
  font-weight: 700;
}

.quick-chip,
.candidate-chip {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(31, 36, 40, 0.1);
  background: var(--surface);
  cursor: pointer;
  font-weight: 700;
  line-height: 1.2;
  word-break: keep-all;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

.quick-chip.is-active,
.candidate-chip.is-primary {
  color: white;
  border-color: transparent;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
}

.quick-memo-empty {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(31, 36, 40, 0.06);
  font-weight: 700;
}

.quick-memo-manager {
  border-top: 1px solid rgba(31, 36, 40, 0.08);
  padding-top: 8px;
}

.quick-memo-manager-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.quick-memo-manager-head > span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--brand-deep);
  background: rgba(15, 118, 110, 0.08);
  font-size: 12px;
  font-weight: 800;
}

.quick-memo-toggle-btn {
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

.quick-memo-manager-body {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.quick-memo-form {
  display: grid;
  grid-template-columns: minmax(105px, 0.75fr) minmax(170px, 1.25fr) minmax(120px, 0.7fr) minmax(78px, 0.45fr) auto;
  gap: 8px;
  align-items: end;
}

.quick-memo-form label {
  display: grid;
  gap: 4px;
}

.quick-memo-form .inline-check {
  display: inline-flex;
}

.quick-memo-active-check {
  min-height: 42px;
  align-self: end;
}

.quick-memo-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, auto));
  gap: 6px;
}

.quick-memo-admin-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.quick-memo-admin-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid rgba(31, 36, 40, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
}

.quick-memo-admin-item.is-editing {
  border-color: rgba(15, 118, 110, 0.34);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.08);
}

.quick-memo-admin-item strong,
.quick-memo-admin-item span,
.quick-memo-admin-item small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.quick-memo-admin-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.quick-memo-admin-actions .ghost-btn,
.quick-memo-admin-actions .danger-btn {
  min-height: 30px;
  padding: 0 9px;
  font-size: 12px;
}

.save-strip {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(191, 54, 64, 0.14);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(191, 54, 64, 0.06), rgba(255, 255, 255, 0.8));
}

#save-btn {
  min-height: 52px;
  font-size: 16px;
  box-shadow: 0 12px 28px rgba(191, 54, 64, 0.22);
}

.note-box,
.learning-panel,
.status-board,
.list-board,
.ocr-raw,
.geo-box,
.ocr-details,
.admin-upload-box {
  margin-top: 16px;
  padding: 14px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.admin-upload-box {
  display: grid;
  gap: 12px;
}

.learning-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border-left: 4px solid #cbd5e1;
}

.learning-panel strong,
.learning-panel span {
  display: block;
}

.learning-panel strong {
  margin-top: 2px;
  font-size: 15px;
}

.learning-panel #ocr-learning-text {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.learning-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
  color: #334155;
  background: #e2e8f0;
  white-space: nowrap;
}

.learning-ready .learning-badge {
  color: #075985;
  background: #bae6fd;
}

.learning-ready {
  border-left-color: #0ea5e9;
}

.learning-accepted .learning-badge {
  color: #065f46;
  background: #bbf7d0;
}

.learning-accepted {
  border-left-color: var(--ok);
}

.learning-corrected .learning-badge {
  color: #7c2d12;
  background: #fed7aa;
}

.learning-corrected {
  border-left-color: #ea580c;
}

.history-filter-box {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.history-filter-box summary {
  cursor: pointer;
  font-weight: 900;
  color: var(--ink);
}

.history-filter-form {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.history-filter-form label {
  display: grid;
  gap: 8px;
}

.history-custom-range {
  display: none;
}

.history-custom-range.is-visible {
  display: grid;
}

.history-filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.load-more-btn {
  width: 100%;
  margin-top: 12px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  width: 100%;
  max-width: 100vw;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.46);
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-panel {
  width: min(1180px, calc(100vw - 48px));
  min-width: 0;
  max-height: min(860px, calc(100vh - 48px));
  overflow: auto;
  padding: 22px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(31, 36, 40, 0.12);
  box-shadow: var(--shadow);
}

.export-panel {
  display: grid;
  gap: 14px;
}

.export-preview {
  overflow: auto;
  width: 100%;
  max-width: 100%;
  border: 1px solid rgba(31, 36, 40, 0.12);
  border-radius: 16px;
  background: white;
}

.export-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 13px;
}

.export-table th,
.export-table td {
  padding: 9px 8px;
  border: 1px solid rgba(31, 36, 40, 0.18);
  vertical-align: middle;
  word-break: break-word;
}

.export-table th {
  background: #eaf1ee;
  text-align: center;
  font-weight: 900;
}

.export-table td:nth-child(2),
.export-table td:nth-child(3),
.export-table td:nth-child(6),
.export-table td:nth-child(7),
.export-table td:nth-child(8),
.export-table td:nth-child(12) {
  text-align: center;
}

.export-actions {
  justify-content: flex-end;
}

.export-empty {
  padding: 34px;
  text-align: center;
}

.admin-upload-row {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 12px;
}

.admin-upload-label {
  min-width: 0;
}

.registry-file-note {
  white-space: pre-line;
}

.registry-file-note.is-error {
  color: var(--danger);
  font-weight: 800;
}

.inline-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--muted);
  font-weight: 800;
}

.inline-check input {
  width: auto;
  min-height: auto;
}

.import-file-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.import-file-item {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  min-width: 0;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(31, 36, 40, 0.08);
}

.import-file-item > * {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.import-file-item span {
  color: var(--muted);
  font-size: 13px;
}

.ocr-details summary {
  cursor: pointer;
  font-weight: 800;
}

.ocr-raw {
  margin: 12px 0 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.verdict-card {
  padding: 20px;
  border-radius: 14px;
  color: white;
  min-height: 300px;
  display: grid;
  align-content: start;
  gap: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.verdict-card h4 {
  margin: 0;
  font-size: clamp(24px, 4vw, 38px);
  letter-spacing: -0.03em;
}

.verdict-match-nav {
  display: flex;
  gap: 10px;
  align-items: center;
}

.match-nav-btn {
  min-width: 38px;
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  color: white;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
  font-weight: 800;
}

.match-nav-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.match-counter {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  font-weight: 800;
}

.match-note {
  margin: 0;
}

.verdict-card .subtle {
  color: rgba(255, 255, 255, 0.84);
}

.verdict-label {
  margin: 0;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  opacity: 0.92;
}

.verdict-idle {
  background: linear-gradient(135deg, #6f7d88, #485863);
}

.verdict-ok {
  background: linear-gradient(135deg, #219653, #156c3b);
}

.verdict-temp {
  background: linear-gradient(135deg, #ef9a00, #bc6f00);
}

.verdict-danger {
  background: linear-gradient(135deg, #d8454d, #9e232b);
}

.meta-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 12px 0 0;
}

.meta-list div {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.meta-list dt {
  font-size: 12px;
  opacity: 0.8;
}

.meta-list dd {
  margin: 6px 0 0;
  font-weight: 700;
}

.contact-link {
  color: var(--brand-deep);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-all;
}

.contact-link-light {
  color: white;
}

.contact-line {
  display: grid;
  gap: 6px;
}

.contact-actions {
  display: grid;
  gap: 8px;
}

.contact-number {
  color: var(--ink);
  font-weight: 800;
  word-break: break-all;
}

.contact-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.contact-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(15, 118, 110, 0.2);
  border-radius: 999px;
  color: var(--brand-deep);
  background: rgba(15, 118, 110, 0.08);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  word-break: keep-all;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.contact-sms {
  color: white;
  border-color: transparent;
  background: var(--brand);
}

.contact-actions-light .contact-number {
  color: white;
}

.contact-actions-light .contact-action {
  color: white;
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.14);
}

.contact-actions-light .contact-sms {
  background: rgba(255, 255, 255, 0.24);
}

.search-row input {
  flex: 1;
}

.log-panel,
.cctv-panel,
.contact-panel,
.admin-panel {
  margin-top: 18px;
}

.admin-panel {
  display: grid;
  gap: 18px;
}

.contact-toolbar {
  display: grid;
  grid-template-columns: 140px 140px minmax(0, 1fr) minmax(90px, auto);
  gap: 8px;
  margin-top: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.62);
}

.contact-quick-board {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.contact-summary-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.contact-summary-card,
.contact-search-state {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
}

.contact-summary-card strong {
  font-size: 18px;
  line-height: 1;
}

.contact-summary-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.contact-section {
  display: grid;
  gap: 8px;
}

.contact-section-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.contact-card-stack,
.contact-group-list {
  display: grid;
  gap: 8px;
}

.contact-group {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  overflow: hidden;
}

.contact-group summary {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 12px;
  cursor: pointer;
  list-style: none;
  font-weight: 800;
}

.contact-group summary::-webkit-details-marker {
  display: none;
}

.contact-group[open] summary {
  border-bottom: 1px solid rgba(31, 36, 40, 0.08);
}

.contact-group-title {
  min-width: 0;
}

.contact-group-count {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.contact-group .contact-card-stack {
  padding: 10px;
}

.contact-full-list-panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  overflow: hidden;
}

.contact-full-list-panel summary {
  padding: 12px;
  cursor: pointer;
  list-style: none;
  font-weight: 800;
}

.contact-full-list-panel summary::-webkit-details-marker {
  display: none;
}

.contact-full-list-panel[open] summary {
  border-bottom: 1px solid rgba(31, 36, 40, 0.08);
}

.contact-full-list-panel .contact-card-stack {
  padding: 10px;
}

.contact-form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
  margin-top: 14px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.62);
}

.contact-form-wide {
  grid-column: span 2;
}

.contact-favorite-field,
.contact-row-favorite {
  display: flex;
  flex-direction: row;
  gap: 8px;
  align-self: stretch;
  align-items: center;
}

.contact-favorite-field input,
.contact-row-favorite input {
  width: 18px;
  height: 18px;
  margin: 0;
}

.contact-list {
  margin-top: 14px;
}

.contact-item {
  gap: 10px;
  border-left: 4px solid rgba(15, 118, 110, 0.38);
}

.contact-item-compact {
  gap: 6px;
  padding: 10px 12px;
}

.contact-item.is-inactive {
  opacity: 0.72;
  border-left-color: rgba(97, 112, 124, 0.45);
}

.contact-item:has(.self-chip) {
  border-left-color: var(--brand);
}

.contact-muted-chip {
  background: rgba(97, 112, 124, 0.12);
  color: var(--idle);
}

.floating-contact-dock {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 24;
  display: grid;
  justify-items: end;
  gap: 5px;
  width: auto;
  touch-action: none;
  transition:
    left 220ms cubic-bezier(0.22, 0.74, 0.24, 1),
    top 220ms cubic-bezier(0.22, 0.74, 0.24, 1);
  will-change: left, top;
}

.floating-contact-dock.is-dragging {
  transition: none;
}

.floating-contact-toggle,
.floating-contact-icon-btn {
  border: 0;
  cursor: pointer;
}

.floating-contact-toggle {
  position: relative;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  color: var(--brand-deep);
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(15, 118, 110, 0.24);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
  backdrop-filter: blur(14px);
  opacity: 0.72;
  display: grid;
  place-items: center;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    opacity 180ms ease,
    background 180ms ease,
    border-color 180ms ease;
}

.floating-contact-toggle:hover,
.floating-contact-toggle:focus-visible,
.floating-contact-dock.is-open .floating-contact-toggle,
.floating-contact-dock.is-dragging .floating-contact-toggle {
  opacity: 0.96;
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(15, 118, 110, 0.36);
}

.floating-contact-dock.is-collapsed .floating-contact-toggle {
  transform: scale(0.86);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
  opacity: 0.78;
}

.floating-contact-toggle svg,
.floating-contact-icon-btn svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.floating-contact-count {
  position: absolute;
  right: -3px;
  top: -3px;
  min-width: 15px;
  height: 15px;
  padding: 0 3px;
  border-radius: 999px;
  color: var(--ink);
  background: #f8d66d;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  font-weight: 900;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.13);
}

.floating-contact-panel {
  width: min(196px, calc(100vw - 24px));
  display: grid;
  gap: 6px;
  padding: 7px;
  border-radius: 14px;
  border: 1px solid rgba(26, 35, 40, 0.1);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.14);
  backdrop-filter: blur(18px);
  touch-action: none;
}

.floating-contact-handle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: grab;
  min-height: 28px;
}

.floating-contact-handle:active {
  cursor: grabbing;
}

.floating-contact-head-copy {
  display: grid;
  gap: 1px;
}

.floating-contact-head-copy strong {
  font-size: 12px;
  letter-spacing: 0;
  line-height: 1.2;
}

.floating-contact-head-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.floating-contact-icon-btn {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  color: var(--muted);
  background: rgba(31, 36, 40, 0.06);
  display: grid;
  place-items: center;
}

.floating-contact-list {
  display: grid;
  gap: 5px;
  max-height: min(48vh, 420px);
  overflow: auto;
  padding-right: 2px;
}

.floating-contact-item {
  display: grid;
  gap: 3px;
  padding: 7px 8px;
  border-radius: 10px;
  background: rgba(247, 250, 249, 0.94);
  border: 1px solid rgba(31, 36, 40, 0.08);
}

.floating-contact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.floating-contact-name {
  font-size: 11px;
  font-weight: 900;
  line-height: 1.25;
}

.floating-contact-duty {
  font-size: 10px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.floating-contact-empty {
  padding: 12px 10px;
  border-radius: 12px;
  color: var(--muted);
  background: rgba(31, 36, 40, 0.04);
  text-align: center;
  font-size: 11px;
}

.floating-contact-panel .subtle {
  font-size: 10px;
}

.floating-contact-panel .result-badge {
  min-height: 20px;
  padding: 0 7px;
  font-size: 10px;
}

.floating-contact-panel .contact-actions {
  gap: 4px;
}

.floating-contact-panel .contact-number {
  font-size: 11px;
  font-weight: 900;
  line-height: 1.25;
}

.floating-contact-panel .contact-action-row {
  gap: 5px;
}

.floating-contact-panel .contact-action {
  min-height: 22px;
  padding: 0 8px;
  font-size: 10px;
}

.contact-title-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.contact-phone-block {
  max-width: 100%;
}

.contact-context-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.contact-context-chip,
.contact-alert-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.contact-context-chip {
  color: var(--brand-deep);
  background: rgba(15, 118, 110, 0.08);
}

.contact-alert-chip {
  color: #8a4b00;
  background: rgba(200, 128, 0, 0.14);
}

.contact-item .contact-phone-block {
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(15, 118, 110, 0.08);
  background: rgba(15, 118, 110, 0.045);
}

.contact-item .contact-actions {
  gap: 6px;
}

.contact-item .contact-number {
  font-size: 16px;
  font-weight: 900;
}

.contact-item-compact .contact-number {
  font-size: 14px;
}

.contact-item-compact .contact-phone-block {
  padding: 8px;
}

.contact-recent-line {
  font-size: 12px;
}

.contact-item,
.contact-item-compact {
  scroll-margin-top: 8px;
}

.contact-memo {
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(31, 36, 40, 0.04);
  line-height: 1.5;
}

.contact-editor {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.contact-editor summary {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 10px;
  color: var(--brand-deep);
  background: rgba(15, 118, 110, 0.07);
  border: 1px solid rgba(15, 118, 110, 0.12);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}

.contact-editor summary::-webkit-details-marker {
  display: none;
}

.contact-editor[open] summary {
  margin-bottom: 10px;
}

.contact-edit-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
  border-radius: 12px;
  background: rgba(31, 36, 40, 0.035);
}

.contact-edit-wide {
  grid-column: span 2;
}

.contact-edit-grid label {
  display: grid;
  gap: 6px;
}

.contact-edit-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.contact-editor-actions {
  margin-top: 10px;
}

.cctv-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
  gap: 18px;
  align-items: start;
  margin-top: 16px;
}

.cctv-workflow-strip,
.cctv-request-checklist,
.cctv-time-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cctv-workflow-strip {
  margin-top: 14px;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid rgba(15, 118, 110, 0.12);
  background: rgba(255, 255, 255, 0.64);
}

.cctv-workflow-step,
.cctv-request-checklist span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(31, 36, 40, 0.06);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.cctv-workflow-step.is-active,
.cctv-request-checklist span.is-ready {
  color: var(--brand-deep);
  background: rgba(15, 118, 110, 0.12);
  border: 1px solid rgba(15, 118, 110, 0.14);
}

.cctv-form {
  display: grid;
  gap: 12px;
}

.cctv-request-checklist {
  padding: 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.56);
}

.cctv-photo-field {
  display: grid;
  gap: 8px;
}

.cctv-photo-field > span {
  font-size: 14px;
  font-weight: 700;
}

.cctv-photo-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.cctv-photo-capture,
.cctv-photo-file {
  position: relative;
  min-height: 54px;
}

.cctv-photo-file {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cctv-photo-capture input,
.cctv-photo-file input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.cctv-photo-source-note {
  min-height: 28px;
  padding: 6px 8px;
  border-radius: 10px;
  background: rgba(31, 36, 40, 0.045);
  font-size: 12px;
  line-height: 1.35;
}

.cctv-photo-source-note.is-selected {
  color: var(--brand-deep);
  background: rgba(15, 118, 110, 0.08);
  font-weight: 800;
}

.cctv-time-presets {
  margin-top: -4px;
}

.cctv-time-presets .ghost-btn {
  min-height: 34px;
  padding: 0 10px;
  font-size: 12px;
}

.cctv-enforcement-picker {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(15, 118, 110, 0.12);
  border-radius: 14px;
  background: rgba(15, 118, 110, 0.045);
}

.cctv-picker-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.cctv-picker-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cctv-enforcement-picker-list {
  display: grid;
  gap: 8px;
  max-height: 360px;
  overflow: auto;
  padding-right: 2px;
}

.cctv-source-item {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.cctv-source-copy {
  display: grid;
  gap: 3px;
}

.cctv-source-copy strong {
  font-size: 17px;
  line-height: 1.1;
}

.cctv-source-copy span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.cctv-source-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cctv-list {
  max-height: 620px;
  overflow: auto;
  padding-right: 4px;
}

.cctv-item {
  gap: 10px;
}

.cctv-content,
.cctv-instruction-view {
  line-height: 1.55;
}

.cctv-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

.cctv-meta-row span {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(31, 36, 40, 0.06);
  font-weight: 700;
  white-space: normal;
}

.cctv-assignment-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr 0.9fr;
  gap: 10px;
}

.cctv-edit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(31, 36, 40, 0.08);
}

.cctv-edit-content {
  grid-column: 1 / -1;
}

.cctv-edit-grid label,
.cctv-assignment-grid label,
.cctv-instruction-label {
  display: grid;
  gap: 6px;
}

.cctv-edit-grid span,
.cctv-assignment-grid span,
.cctv-instruction-label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.admin-work-nav {
  position: sticky;
  top: 12px;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(15, 118, 110, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(12px);
}

.admin-work-nav a,
.admin-work-nav button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(31, 36, 40, 0.09);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(247, 250, 249, 0.92);
  font-size: 13px;
  font-weight: 900;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
}

.admin-work-nav a:hover,
.admin-work-nav a:focus,
.admin-work-nav button:hover,
.admin-work-nav button:focus,
.admin-work-nav button.is-active {
  color: white;
  border-color: transparent;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
}

.admin-section {
  grid-column: span 6;
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(31, 36, 40, 0.1);
  border-left: 4px solid rgba(15, 118, 110, 0.42);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(247, 250, 249, 0.82), rgba(255, 255, 255, 0.72));
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.admin-group-title {
  grid-column: 1 / -1;
  scroll-margin-top: 92px;
  display: grid;
  gap: 4px;
  padding: 10px 2px 0;
}

.admin-group-title h4 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.03em;
}

.admin-group-title p {
  margin: 0;
}

.admin-group-operations {
  order: 9;
}

.admin-section-operations {
  grid-column: 1 / -1;
  order: 10;
}

.admin-group-schedule {
  order: 19;
}

.admin-section-schedule {
  grid-column: span 6;
  order: 20;
}

.admin-group-residents {
  order: 29;
}

.admin-section-residents {
  grid-column: span 6;
  order: 30;
}

.admin-group-service {
  order: 39;
}

.admin-section-service {
  grid-column: 1 / -1;
  order: 40;
}

.admin-group-system {
  order: 59;
}

.admin-section-system {
  grid-column: span 6;
  order: 60;
}

.admin-section > .panel-head {
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(31, 36, 40, 0.08);
}

.admin-section .admin-upload-box,
.admin-section .admin-task-box,
.admin-section .history-filter-box,
.admin-section .note-box,
.admin-section .list-board,
.admin-section .status-board {
  border-color: rgba(31, 36, 40, 0.11);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: inset 3px 0 0 rgba(15, 118, 110, 0.12);
}

.operations-summary-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 10px;
}

.admin-section-operations .operations-summary-board {
  grid-template-columns: repeat(7, minmax(118px, 1fr));
}

.operation-summary-card {
  display: grid;
  gap: 5px;
  padding: 14px;
  border: 1px solid rgba(26, 35, 40, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.86);
}

.operation-summary-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.operation-summary-card strong {
  font-size: 24px;
  letter-spacing: -0.03em;
}

.operation-summary-card small {
  color: var(--brand-deep);
  font-weight: 800;
}

.operations-dashboard {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.admin-section-operations .operations-dashboard {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.operations-command-center {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(220px, 0.42fr) minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
  padding: 18px;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 18px;
  background:
    radial-gradient(circle at top right, rgba(15, 118, 110, 0.16), transparent 34%),
    linear-gradient(135deg, rgba(240, 253, 250, 0.9), rgba(255, 255, 255, 0.86));
}

.operations-command-center h4 {
  margin: 0 0 6px;
  font-size: 22px;
  letter-spacing: -0.03em;
}

.operations-command-center p {
  margin: 0;
}

.operations-focus-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.operations-focus-card {
  display: grid;
  gap: 5px;
  min-height: 110px;
  padding: 14px;
  border: 1px solid rgba(31, 36, 40, 0.09);
  border-radius: 16px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
}

.operations-focus-card.has-work {
  border-color: rgba(202, 138, 4, 0.24);
  background: linear-gradient(135deg, rgba(255, 251, 235, 0.96), rgba(255, 255, 255, 0.84));
}

.operations-focus-card span,
.operations-focus-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.operations-focus-card strong {
  font-size: 28px;
  letter-spacing: -0.04em;
}

.operations-focus-card:hover,
.operations-focus-card:focus {
  transform: translateY(-1px);
  border-color: rgba(15, 118, 110, 0.32);
}

.operations-dashboard-section {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(31, 36, 40, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.86);
}

.operations-dashboard-section h4 {
  margin: 0;
  letter-spacing: -0.02em;
}

.operations-dashboard-section ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.operations-dashboard-section li {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 10px;
  border-radius: 12px;
  background: rgba(247, 250, 249, 0.9);
  border: 1px solid rgba(31, 36, 40, 0.07);
}

.operations-dashboard-section li > div:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.operations-dashboard-section li strong,
.operations-dashboard-section li span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.operations-dashboard-section li span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.operations-dashboard-actions {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 6px;
  align-items: center;
}

.operations-dashboard-actions em {
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--brand-deep);
  background: rgba(15, 118, 110, 0.1);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.admin-task-box {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.86);
  overflow: hidden;
}

.admin-task-box > summary {
  min-height: 46px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  color: var(--ink);
  font-weight: 900;
  list-style: none;
}

.admin-task-box > summary::-webkit-details-marker {
  display: none;
}

.admin-task-box > summary::after {
  content: "+";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  color: var(--brand-deep);
  background: rgba(15, 118, 110, 0.12);
  font-weight: 900;
}

.admin-task-box[open] > summary::after {
  content: "-";
}

.admin-task-box > .admin-upload-box {
  margin: 0;
  border-width: 1px 0 0;
  border-radius: 0;
  box-shadow: none;
}

.admin-inline-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.test-site-chip {
  color: #7c2d12;
  background: rgba(251, 146, 60, 0.16);
}

.billing-section {
  grid-column: 1 / -1;
}

.operator-home-panel {
  display: grid;
  gap: 12px;
}

.operator-home-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.operator-home-grid button {
  display: grid;
  gap: 6px;
  min-height: 92px;
  padding: 14px;
  border: 1px solid rgba(15, 118, 110, 0.14);
  border-radius: 16px;
  color: var(--ink);
  background: rgba(247, 250, 249, 0.92);
  text-align: left;
  cursor: pointer;
}

.operator-home-grid button strong {
  font-size: 16px;
}

.operator-home-grid button span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

@media (min-width: 1081px) {
  .app-body[data-role="admin"] .app-shell {
    padding-top: 68px;
  }

  .app-body[data-role="admin"] .topbar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    width: 100%;
    transform: none;
    display: grid;
    grid-template-columns: minmax(250px, 0.75fr) minmax(0, 1.55fr) auto;
    gap: 8px;
    align-items: center;
    margin: 0;
    padding: 6px 14px;
    border-width: 0 0 1px;
    border-radius: 0;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    backdrop-filter: none;
  }

  .app-body[data-role="admin"] .topbar > div {
    min-width: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 3px 10px;
    align-items: baseline;
  }

  .app-body[data-role="admin"] .topbar h1 {
    margin: 0;
    font-size: 22px;
    line-height: 1;
    letter-spacing: -0.05em;
  }

  .app-body[data-role="admin"] .topbar .eyebrow {
    grid-column: 1 / -1;
    margin: 0;
    font-size: 9px;
    line-height: 1;
  }

  .app-body[data-role="admin"] .topbar .subtle {
    min-width: 0;
    margin: 0;
    overflow: hidden;
    color: rgba(71, 85, 105, 0.9);
    font-size: 12px;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .app-body[data-role="admin"] .topbar form {
    align-self: center;
  }

  .app-body[data-role="admin"] .topbar .ghost-btn {
    min-height: 30px;
    padding: 0 12px;
    border-radius: 12px;
  }

  .app-body[data-role="admin"] .mobile-tab-panel,
  .app-body[data-role="admin"] .admin-group-title {
    scroll-margin-top: 76px;
  }

  .app-body[data-role="admin"] .hero-card {
    display: none;
  }

  .app-body[data-role="admin"] .workflow-strip {
    display: none;
  }

  .app-body[data-role="admin"] .operator-home-panel {
    display: none;
  }

  .app-body[data-role="admin"] .hero-layout {
    align-items: flex-start;
  }

  .admin-panel {
    gap: 0;
    padding: 0;
    overflow: visible;
  }

  .admin-panel > .panel-head {
    display: none;
  }

  .app-body[data-role="admin"][data-admin-desktop-view] #cctv-mini-dashboard,
  .app-body[data-role="admin"][data-admin-desktop-view] .guide-panel,
  .app-body[data-role="admin"][data-admin-desktop-view] .contact-panel,
  .app-body[data-role="admin"][data-admin-desktop-view] .log-panel,
  .app-body[data-role="admin"][data-admin-desktop-view] .ops-grid,
  .app-body[data-role="admin"][data-admin-desktop-view] #mobile-section-admin,
  .app-body[data-role="admin"][data-admin-desktop-view] #mobile-section-cctv,
  .app-body[data-role="admin"][data-admin-desktop-view] #mobile-section-vehicle-db {
    display: none;
  }

  .app-body[data-role="admin"][data-admin-desktop-view="operations"] #mobile-section-admin,
  .app-body[data-role="admin"][data-admin-desktop-view="schedule"] #mobile-section-admin,
  .app-body[data-role="admin"][data-admin-desktop-view="residents"] #mobile-section-admin,
  .app-body[data-role="admin"][data-admin-desktop-view="service"] #mobile-section-admin,
  .app-body[data-role="admin"][data-admin-desktop-view="system"] #mobile-section-admin {
    display: grid;
  }

  .app-body[data-role="admin"][data-admin-desktop-view="enforce"] .ops-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.16fr) minmax(360px, 0.84fr);
    gap: 14px;
  }

  .app-body[data-role="admin"][data-admin-desktop-view="cctv"] #mobile-section-cctv,
  .app-body[data-role="admin"][data-admin-desktop-view="vehicle-db"] #mobile-section-vehicle-db {
    display: block;
    margin-top: 0;
  }

  .admin-work-nav-global {
    position: static;
    grid-column: auto;
    align-self: stretch;
    margin: 0;
    padding: 3px;
    border-radius: 11px;
    box-shadow: none;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .admin-work-nav-global::-webkit-scrollbar {
    display: none;
  }

  .admin-work-nav-global a,
  .admin-work-nav-global button {
    flex: 0 0 auto;
    min-height: 30px;
    padding: 0 11px;
    font-size: 12px;
  }

  .admin-grid {
    gap: 12px;
    padding: 12px 16px 18px;
    min-height: 0;
  }

  .admin-group-title {
    padding-top: 0;
  }

  .admin-group-title h4 {
    font-size: 20px;
  }

  .admin-panel[data-admin-view] .admin-group-title,
  .admin-panel[data-admin-view] .admin-section {
    display: none;
  }

  .admin-panel[data-admin-view="operations"] .admin-group-operations,
  .admin-panel[data-admin-view="operations"] .admin-section-operations,
  .admin-panel[data-admin-view="schedule"] .admin-group-schedule,
  .admin-panel[data-admin-view="schedule"] .admin-section-schedule,
  .admin-panel[data-admin-view="residents"] .admin-group-residents,
  .admin-panel[data-admin-view="residents"] .admin-section-residents,
  .admin-panel[data-admin-view="service"] .admin-group-service,
  .admin-panel[data-admin-view="service"] .admin-section-service,
  .admin-panel[data-admin-view="system"] .admin-group-system,
  .admin-panel[data-admin-view="system"] .admin-section-system {
    display: grid;
  }

  .admin-panel[data-admin-view="schedule"] .admin-section-schedule,
  .admin-panel[data-admin-view="residents"] .admin-section-residents,
  .admin-panel[data-admin-view="system"] .admin-section-system {
    grid-column: span 6;
  }

  .admin-panel[data-admin-view="service"] .admin-section-service {
    grid-column: 1 / -1;
  }

  .admin-section .list-board,
  .admin-section .status-board {
    max-height: 50vh;
    overflow: auto;
  }

  .admin-section-operations .status-board,
  .admin-section-operations .list-board {
    max-height: none;
  }
}

.billing-board {
  display: grid;
  gap: 12px;
}

.billing-price {
  font-size: 20px;
  font-weight: 900;
}

.billing-usage-grid,
.billing-plan-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.billing-usage-row,
.billing-plan-card,
.billing-inquiry-list {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(31, 36, 40, 0.08);
}

.billing-usage-row div:first-child,
.billing-inquiry-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.billing-usage-row span,
.billing-inquiry-row span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.billing-meter {
  overflow: hidden;
  height: 8px;
  border-radius: 999px;
  background: rgba(31, 36, 40, 0.08);
}

.billing-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--brand), var(--warn));
}

.billing-usage-row.is-limit-hit {
  border-color: rgba(220, 38, 38, 0.24);
  background: rgba(255, 241, 242, 0.88);
}

.billing-usage-row.is-limit-hit .billing-meter span {
  background: var(--danger);
}

.billing-limit-notice {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  color: #991b1b;
  background: rgba(254, 226, 226, 0.72);
  border: 1px solid rgba(220, 38, 38, 0.22);
  font-size: 13px;
  font-weight: 800;
}

.billing-trial-notice {
  display: grid;
  gap: 4px;
  margin: 8px 0;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--brand-deep);
  background: rgba(232, 246, 243, 0.82);
  border: 1px solid rgba(15, 118, 110, 0.2);
}

.billing-trial-notice.is-dev-mode {
  border-color: rgba(15, 118, 110, 0.18);
  background: rgba(236, 253, 245, 0.88);
}

.billing-trial-notice strong {
  font-size: 13px;
}

.billing-trial-notice.is-dev-mode strong {
  color: var(--brand-deep);
}

.billing-trial-notice span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.billing-plan-card.is-current {
  border-color: rgba(15, 118, 110, 0.3);
  background: rgba(240, 250, 247, 0.92);
}

.billing-play-btn {
  width: 100%;
  min-height: 40px;
}

.billing-inquiry-list {
  grid-column: 1 / -1;
}

.user-item {
  gap: 12px;
}

.user-title {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.self-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(217, 93, 57, 0.12);
  color: var(--brand-deep);
  font-size: 12px;
  font-weight: 800;
}

.online-chip {
  color: #0f4d45;
  background: rgba(15, 118, 110, 0.12);
}

.user-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.badge-role-admin {
  color: white;
  background: linear-gradient(135deg, #223550, #101b2a);
}

.badge-role-director,
.badge-role-manager,
.badge-role-section-chief,
.badge-role-team-lead {
  color: white;
  background: linear-gradient(135deg, #37517e, #223550);
}

.badge-role-staff {
  color: white;
  background: var(--warn);
}

.badge-role-guard {
  color: white;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
}

.badge-role-cleaner {
  color: white;
  background: var(--idle);
}

.list-board {
  display: grid;
  gap: 12px;
  min-height: 120px;
}

.mobile-scroll-list {
  --mobile-list-max-h: none;
}

.empty-state {
  color: var(--muted);
}

.result-item {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.enforcement-item {
  gap: 11px;
  border-left: 4px solid rgba(97, 112, 124, 0.5);
}

.enforcement-item:has(.badge-ok) {
  border-left-color: var(--ok);
}

.enforcement-item:has(.badge-temp) {
  border-left-color: var(--warn);
}

.enforcement-item:has(.badge-danger) {
  border-left-color: var(--danger);
}

.result-head-copy {
  display: grid;
  gap: 3px;
}

.enforcement-stamp {
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}

.enforcement-primary-line {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.45;
}

.enforcement-secondary-line {
  line-height: 1.45;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(31, 36, 40, 0.04);
}

.record-editor {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.record-editor summary {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 10px;
  color: var(--brand-deep);
  background: rgba(15, 118, 110, 0.07);
  border: 1px solid rgba(15, 118, 110, 0.12);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}

.record-editor summary::-webkit-details-marker {
  display: none;
}

.record-editor[open] summary {
  margin-bottom: 10px;
}

.enforcement-edit-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
  border-radius: 12px;
  background: rgba(31, 36, 40, 0.035);
}

.enforcement-edit-grid label {
  display: grid;
  gap: 6px;
}

.enforcement-edit-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.vehicle-item {
  gap: 10px;
}

.result-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.result-title {
  color: var(--ink);
  font-weight: 800;
  text-align: left;
  min-width: 0;
  overflow-wrap: anywhere;
}

.enforcement-item .result-title {
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
}

.result-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.badge-ok {
  color: white;
  background: var(--ok);
}

.badge-temp {
  color: white;
  background: var(--warn);
}

.badge-danger {
  color: white;
  background: var(--danger);
}

.badge-idle {
  color: white;
  background: var(--idle);
}

.mobile-tabbar {
  display: none;
}

.app-toast {
  position: fixed;
  left: 50%;
  bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  z-index: 60;
  width: min(420px, calc(100vw - 24px));
  padding: 12px 14px;
  border: 1px solid rgba(15, 118, 110, 0.16);
  border-radius: 14px;
  color: #f8fafc;
  background: rgba(15, 23, 42, 0.94);
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.26);
  transform: translate(-50%, 12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.app-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

.app-toast-message {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

.app-toast-action {
  min-height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  color: var(--brand-deep);
  background: #f8fafc;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.bg-orb {
  display: none;
}

.orb-a {
  top: -80px;
  right: -80px;
  background: rgba(15, 118, 110, 0.38);
}

.orb-b {
  bottom: -120px;
  left: -60px;
  background: rgba(200, 138, 0, 0.32);
}

@media (max-width: 1080px) {
  .admin-login-shell {
    width: min(760px, calc(100% - 28px));
    align-content: start;
  }

  .admin-login-board {
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .admin-login-showcase {
    padding: 38px;
  }

  .admin-login-showcase::after {
    top: auto;
    right: 0;
    bottom: -44px;
    width: 100%;
    height: 88px;
    transform: skewY(-4deg);
  }

  .admin-login-panel {
    padding: 40px 38px;
  }

  .admin-login-contact {
    grid-template-columns: 1fr;
  }

  .auth-layout {
    grid-template-columns: 1fr;
  }

  .ops-grid {
    grid-template-columns: 1fr;
  }

  .cctv-grid {
    grid-template-columns: 1fr;
  }

  .admin-grid {
    grid-template-columns: 1fr;
  }

  .admin-section,
  .admin-section-operations,
  .admin-section-schedule,
  .admin-section-residents,
  .admin-section-service,
  .admin-section-system,
  .billing-section {
    grid-column: 1 / -1;
  }

  .admin-work-nav {
    position: static;
  }

  .admin-section-operations .operations-summary-board {
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  }

  .operations-dashboard {
    grid-template-columns: 1fr;
  }

  .admin-section-operations .operations-dashboard {
    grid-template-columns: 1fr;
  }

  .operations-command-center,
  .operations-focus-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .admin-login-shell {
    width: 100%;
    min-height: 100vh;
    padding: 8px;
    gap: 8px;
  }

  .admin-login-board {
    border-radius: 20px;
  }

  .admin-login-showcase {
    padding: 22px;
    gap: 22px;
  }

  .admin-login-brand {
    flex-wrap: wrap;
    gap: 8px;
    font-size: 20px;
  }

  .admin-login-brand small {
    width: 100%;
    margin-left: 0;
    font-size: 10px;
  }

  .admin-login-mark {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    font-size: 13px;
  }

  .admin-login-copy h1 {
    font-size: 32px;
  }

  .admin-login-copy p:last-child {
    margin-top: 12px;
    font-size: 14px;
    line-height: 1.55;
  }

  .admin-login-feature-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .admin-login-feature-grid section {
    padding: 12px;
    border-radius: 16px;
  }

  .admin-login-feature-grid i {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    font-size: 10px;
  }

  .admin-login-feature-grid strong {
    font-size: 14px;
  }

  .admin-login-feature-grid span {
    font-size: 12px;
  }

  .admin-login-panel {
    padding: 24px 20px;
  }

  .admin-login-panel::before {
    inset: 10px;
    border-radius: 18px;
  }

  .admin-login-panel h2 {
    font-size: 28px;
  }

  .admin-login-form input[type="text"],
  .admin-login-form input[type="password"],
  .admin-login-submit {
    min-height: 44px;
  }

  .admin-login-contact {
    border-radius: 18px;
  }

  .admin-login-contact div {
    padding: 14px 16px;
  }

  .admin-login-contact strong {
    font-size: 14px;
  }

  .admin-login-contact span {
    font-size: 12px;
  }

  .admin-work-nav-global {
    display: none;
  }

  .bg-orb {
    display: none;
  }

  .auth-shell,
  .app-shell {
    padding: 6px;
  }

  .app-body {
    font-size: 12px;
  }

  .app-shell {
    gap: 8px;
  }

  .app-body.mobile-tabs-ready .app-shell {
    padding-top: calc(112px + env(safe-area-inset-top, 0px));
    padding-bottom: 8px;
  }

  .cctv-mini-dashboard {
    margin: 0 0 8px;
  }

  .cctv-mini-toggle {
    min-height: 34px;
    padding: 5px 8px;
    border-radius: 11px;
    gap: 6px;
  }

  .cctv-mini-toggle span:first-child {
    font-size: 12px;
  }

  .cctv-mini-toggle span:last-child {
    font-size: 11px;
  }

  .cctv-mini-panel {
    max-height: min(66vh, 520px);
    padding: 8px;
    border-radius: 12px;
  }

  .cctv-mini-forward-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .cctv-mini-forward-row select,
  .cctv-mini-forward-row input,
  .cctv-mini-forward-row button {
    width: 100%;
  }

  .auth-card {
    padding: 24px 18px;
  }

  .auth-copy,
  .auth-feature p,
  .auth-notice p,
  .auth-alert p,
  .auth-help p,
  .auth-trial-guide p,
  .auth-trial-guide small {
    font-size: 14px;
    line-height: 1.6;
  }

  .auth-trial-grid span {
    font-size: 14px;
  }

  .auth-start-guide li {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 8px;
    font-size: 14px;
    line-height: 1.55;
  }

  .auth-start-guide li span {
    font-size: 13px;
  }

  .app-body.mobile-tabs-ready .hero-card {
    display: none;
  }

  .app-body.mobile-tabs-ready .guide-panel {
    display: block;
    margin-bottom: 6px;
    padding: 8px;
    border-radius: 12px;
  }

  .guide-panel summary {
    flex-direction: row;
    align-items: center;
    gap: 8px;
  }

  .guide-summary-main {
    gap: 8px;
  }

  .guide-summary-title {
    font-size: 13px;
  }

  .guide-panel summary small {
    font-size: 10px;
    text-align: left;
  }

  .guide-summary-badge {
    min-height: 24px;
    padding: 0 8px;
    font-size: 10px;
  }

  .guide-grid {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 10px;
  }

  .guide-card-wide {
    grid-column: auto;
  }

  .guide-card {
    padding: 8px;
    border-radius: 12px;
  }

  .guide-card h3 {
    margin-bottom: 6px;
    font-size: 13px;
  }

  .guide-steps {
    gap: 6px;
  }

  .guide-steps li {
    grid-template-columns: 62px minmax(0, 1fr);
    gap: 6px;
  }

  .guide-steps strong,
  .guide-steps span {
    font-size: 11px;
    line-height: 1.35;
  }

  .guide-lead,
  .guide-checks {
    font-size: 11px;
    line-height: 1.35;
  }

  .guide-scroll-hint {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
    padding: 8px 10px;
    border-radius: 12px;
    color: var(--brand-deep);
    background: rgba(232, 246, 243, 0.92);
    border: 1px solid rgba(15, 118, 110, 0.18);
    font-size: 12px;
    font-weight: 900;
  }

  .guide-scroll-hint strong {
    flex: 0 0 auto;
    font-size: 16px;
    letter-spacing: 0;
  }

  .guide-table-wrap {
    margin-bottom: 2px;
    padding-bottom: 2px;
  }

  .guide-table-wrap::after {
    content: "더 보기 →";
    position: sticky;
    right: 0;
    display: inline-flex;
    float: right;
    align-items: center;
    min-height: 34px;
    margin-top: -34px;
    padding: 0 8px 0 18px;
    color: var(--brand-deep);
    background: linear-gradient(90deg, rgba(251, 252, 252, 0), #fbfcfc 38%);
    font-size: 11px;
    font-weight: 900;
    pointer-events: none;
  }

  .guide-excel-table {
    min-width: 760px;
    font-size: 12px;
  }

  .guide-excel-table th,
  .guide-excel-table td {
    padding: 8px 9px;
  }

  .excel-help-box {
    padding: 10px;
  }

  .excel-help-box span,
  .excel-help-box strong,
  .excel-help-box small {
    font-size: 12px;
  }

  .app-body.mobile-tabs-ready .ops-grid,
  .app-body.mobile-tabs-ready .side-stack {
    display: contents;
  }

  .app-body.mobile-tabs-ready .mobile-tab-panel {
    display: none;
    margin-top: 0;
    scroll-margin-top: calc(118px + env(safe-area-inset-top, 0px));
  }

  .app-body.mobile-tabs-ready .mobile-tab-panel.is-mobile-active {
    display: block;
  }

  .app-body.mobile-tabs-ready.mobile-tabs-scrollspy .mobile-tab-panel {
    display: block;
  }

  .app-body.mobile-tabs-ready.mobile-tabs-scrollspy .mobile-tab-panel + .mobile-tab-panel {
    margin-top: 12px;
  }

  .app-body.mobile-tabs-ready .mobile-tab-panel.is-mobile-active + .mobile-tab-panel.is-mobile-active {
    margin-top: 12px;
  }

  .app-body.mobile-tabs-ready .mobile-tabbar {
    position: fixed;
    left: 8px;
    right: 8px;
    top: calc(60px + env(safe-area-inset-top, 0px));
    bottom: auto;
    z-index: 90;
    display: flex;
    flex-wrap: nowrap;
    gap: 5px;
    padding: 5px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14);
  }

  .app-body.mobile-tabs-ready .app-toast {
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  }

  .mobile-tab-btn {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    min-height: 46px;
    padding: 5px 3px;
    border: 0;
    border-radius: 13px;
    color: var(--muted);
    background: transparent;
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 3px;
    font-size: 10px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0;
    cursor: pointer;
  }

  .mobile-tab-btn svg {
    width: 19px;
    height: 19px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex: 0 0 auto;
  }

  .mobile-tab-label {
    max-width: 100%;
    font-size: 10px;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: clip;
  }

  .mobile-tab-btn:not(.is-active) .mobile-tab-label {
    display: none;
  }

  .mobile-tab-btn.is-active {
    flex: 1.35 1 0;
  }

  .mobile-tab-btn.is-active {
    color: white;
    background: linear-gradient(135deg, var(--brand), var(--brand-deep));
    box-shadow: 0 8px 18px rgba(15, 118, 110, 0.2);
  }

  .mobile-tab-badge {
    position: absolute;
    top: 2px;
    right: 6px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    color: #fff;
    background: #dc2626;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 4px 10px rgba(220, 38, 38, 0.28);
  }

  .app-body.mobile-tabs-ready .verdict-panel.is-mobile-active {
    margin-top: 8px;
  }

  .android-webview {
    scroll-behavior: auto;
  }

  .android-webview .panel,
  .android-webview .hero-card,
  .android-webview .guide-panel,
  .android-webview .resident-card,
  .android-webview .resident-bottom-nav,
  .android-webview .mobile-tabbar {
    backdrop-filter: none;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.1);
  }

  .android-webview .mobile-tab-panel,
  .android-webview .mobile-tab-btn,
  .android-webview .resident-bottom-nav a {
    transition: none;
  }

  .panel,
  .hero-card {
    padding: 10px;
    border-radius: 12px;
  }

  .topbar {
    gap: 6px;
    margin-bottom: 2px;
    padding: 7px 8px;
    border-radius: 12px;
  }

  .topbar h1 {
    font-size: 18px;
    letter-spacing: 0;
  }

  .topbar,
  .hero-layout,
  .panel-head,
  .search-row,
  .geo-head,
  .verdict-match-nav {
    gap: 8px;
    flex-direction: row;
    align-items: center;
  }

  .topbar,
  .hero-layout,
  .panel-head {
    align-items: flex-start;
  }

  .topbar form,
  .panel-head > button,
  .geo-head > button {
    flex: 0 0 auto;
  }

  .topbar .subtle,
  .quick-head .subtle {
    font-size: 11px;
    line-height: 1.3;
  }

  .panel h3 {
    font-size: 16px;
    letter-spacing: 0;
  }

  .eyebrow {
    margin-bottom: 3px;
    font-size: 9px;
    letter-spacing: 0.08em;
  }

  label span {
    font-size: 11px;
  }

  input,
  select,
  textarea {
    min-height: 38px;
    padding: 8px 10px;
    font-size: 12px;
  }

  .ghost-btn,
  .secondary-btn,
  .primary-btn {
    min-height: 36px;
    padding: 0 12px;
    font-size: 12px;
  }

  .operator-home-panel {
    gap: 8px;
  }

  .operator-home-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .operator-home-grid button {
    min-height: 70px;
    padding: 10px;
    border-radius: 13px;
  }

  .operator-home-grid button strong {
    font-size: 13px;
    line-height: 1.2;
  }

  .operator-home-grid button span {
    font-size: 10px;
    line-height: 1.3;
  }

  .capture-panel .panel-head {
    padding-bottom: 8px;
  }

  .capture-panel .stack-form,
  .stack-form,
  .field-grid,
  .search-row {
    gap: 8px;
  }

  input[type="text"],
  input[type="password"],
  input[type="datetime-local"],
  input[type="number"],
  select,
  input[type="file"],
  textarea {
    min-height: 46px;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 16px;
  }

  .primary-btn,
  .secondary-btn,
  .danger-btn,
  .ghost-btn,
  .capture-button {
    min-height: 44px;
    padding: 0 12px;
    border-radius: 10px;
    font-size: 14px;
  }

  .action-tall {
    min-height: 46px;
  }

  .workflow-strip,
  .quick-chip-row,
  .candidate-list {
    justify-content: flex-start;
    gap: 6px;
  }

  .capture-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .field-grid,
  .meta-list,
  .contact-form-grid,
  .contact-edit-grid,
  .cctv-assignment-grid,
  .quick-memo-form,
  .user-form-grid,
  .billing-usage-grid,
  .billing-plan-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .quick-memo-form-wide,
  .quick-memo-actions {
    grid-column: 1 / -1;
  }

  .quick-memo-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .quick-memo-admin-item {
    grid-template-columns: 1fr;
  }

  .quick-memo-admin-actions {
    justify-content: stretch;
  }

  .save-strip,
  .admin-upload-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(72px, auto);
  }

  .contact-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 8px;
    border-radius: 12px;
  }

  .contact-summary-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .floating-contact-dock {
    width: auto;
  }

  .floating-contact-toggle {
    width: 30px;
    height: 30px;
  }

  .floating-contact-panel {
    width: min(188px, calc(100vw - 16px));
    border-radius: 14px;
    padding: 7px;
  }

  .floating-contact-list {
    max-height: min(46vh, 380px);
  }

  .contact-form-wide,
  .contact-edit-wide {
    grid-column: 1 / -1;
  }

  .history-filter-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .enforcement-edit-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .cctv-edit-grid,
  .contact-edit-grid,
  .cctv-assignment-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .cctv-photo-actions {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .cctv-workflow-strip,
  .cctv-request-checklist,
  .cctv-time-presets {
    gap: 6px;
  }

  .cctv-workflow-strip,
  .cctv-request-checklist {
    padding: 8px;
    border-radius: 12px;
  }

  .cctv-workflow-step,
  .cctv-request-checklist span {
    min-height: 26px;
    padding: 0 8px;
    font-size: 11px;
  }

  .cctv-enforcement-picker {
    padding: 8px;
    border-radius: 12px;
  }

  .cctv-picker-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .cctv-enforcement-picker-list {
    max-height: 320px;
  }

  .contact-form-grid {
    padding: 8px;
    border-radius: 12px;
  }

  .contact-quick-board,
  .contact-card-stack,
  .contact-group-list {
    gap: 6px;
  }

  .contact-summary-card,
  .contact-search-state,
  .contact-group summary,
  .contact-group .contact-card-stack,
  .contact-full-list-panel summary,
  .contact-full-list-panel .contact-card-stack {
    padding: 8px 10px;
  }

  .contact-item .contact-phone-block,
  .contact-memo,
  .contact-edit-grid {
    padding: 8px;
    border-radius: 10px;
  }

  .contact-editor summary {
    width: 100%;
    justify-content: center;
  }

  .contact-item .contact-number {
    font-size: 15px;
  }

  .history-filter-form {
    gap: 10px;
    margin-top: 10px;
  }

  .quick-section,
  .camera-stage,
  .stack-form,
  .admin-upload-box {
    gap: 8px;
  }

  .camera-stage,
  .quick-section,
  .save-strip {
    padding: 8px;
    border-radius: 12px;
  }

  .capture-panel .field-grid label {
    padding: 8px;
    border-radius: 12px;
  }

  .quick-chip,
  .candidate-chip {
    min-height: 34px;
    padding: 0 10px;
    font-size: 13px;
  }

  .candidate-empty {
    min-height: 32px;
    padding: 0 9px;
    font-size: 12px;
  }

  .import-file-item {
    flex-direction: column;
    align-items: flex-start;
    padding: 10px;
    border-radius: 12px;
  }

  .contact-action-row,
  .cctv-meta-row {
    gap: 6px;
  }

  .user-action-row,
  .billing-inquiry-row {
    align-items: stretch;
    flex-direction: column;
  }

  .preview-shell {
    min-height: 164px;
    border-radius: 12px;
  }

  .preview-placeholder {
    gap: 6px;
    padding: 18px;
    font-size: 14px;
    min-height: 164px;
  }

  .preview-placeholder strong {
    font-size: 17px;
  }

  .preview-placeholder span {
    font-size: 13px;
  }

  .photo-preview {
    max-height: 260px;
  }

  .verdict-card {
    min-height: 150px;
    padding: 12px;
    border-radius: 12px;
    gap: 6px;
  }

  .verdict-card h4 {
    font-size: 22px;
    letter-spacing: 0;
  }

  .verdict-label {
    letter-spacing: 0.08em;
  }

  .meta-list {
    margin-top: 8px;
  }

  .meta-list div {
    padding: 9px 10px;
    border-radius: 12px;
  }

  #ocr-note,
  .ocr-details {
    display: none;
  }

  .note-box,
  .learning-panel,
  .status-board,
  .list-board,
  .geo-box,
  .admin-upload-box,
  .history-filter-box {
    margin-top: 10px;
    padding: 10px;
    border-radius: 12px;
  }

  .admin-section {
    padding: 12px;
    border-radius: 14px;
    border-left-width: 3px;
  }

  .admin-section > .panel-head {
    padding-bottom: 8px;
  }

  .admin-task-box > summary {
    min-height: 44px;
    padding: 0 12px;
  }

  .admin-inline-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .admin-inline-options .ghost-btn {
    width: 100%;
  }

  .list-board {
    min-height: 80px;
  }

  .mobile-scroll-list {
    max-height: calc((var(--mobile-card-height, 5.4rem) * 5) + (var(--mobile-list-gap, 0.5rem) * 4) + var(--mobile-list-extra, 0rem));
    overflow: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    align-content: start;
  }

  #contact-quick-board {
    --mobile-card-height: 5.6rem;
    --mobile-list-gap: 0.375rem;
    --mobile-list-extra: 4.5rem;
  }

  #contact-list,
  #search-results,
  #vehicle-list,
  #site-list {
    --mobile-card-height: 5.5rem;
    --mobile-list-gap: 0.5rem;
  }

  #recent-results,
  #cctv-request-list,
  #user-list {
    --mobile-card-height: 6.8rem;
    --mobile-list-gap: 0.5rem;
  }

  #user-list.mobile-scroll-list .user-item {
    min-height: auto;
  }

  .contact-card-stack,
  .contact-group-list,
  .contact-group .contact-card-stack,
  .contact-full-list-panel .contact-card-stack {
    max-height: calc((5.55rem * 5) + (0.375rem * 4));
    overflow: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    align-content: start;
  }

  .status-banner {
    min-height: 38px;
    padding: 0 12px;
    font-size: 13px;
    white-space: normal;
  }

  .result-top {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .mobile-scroll-list > .result-item,
  .mobile-scroll-list .contact-item,
  .mobile-scroll-list .user-item,
  .mobile-scroll-list .cctv-item,
  .mobile-scroll-list .enforcement-item {
    gap: 8px;
    padding: 12px 14px;
    border-radius: 12px;
  }

  .enforcement-item .result-title {
    font-size: 23px;
    line-height: 1.1;
  }

  .result-badge {
    flex: 0 0 auto;
    min-height: 28px;
    padding: 0 10px;
    font-size: 12px;
  }

  .result-head-copy,
  .enforcement-stamp,
  .enforcement-primary-line,
  .enforcement-secondary-line {
    width: 100%;
  }

  .enforcement-primary-line {
    font-size: 16px;
    line-height: 1.5;
  }

  .enforcement-secondary-line,
  .enforcement-item .photo-link-row,
  .enforcement-edit-grid {
    padding: 8px;
    border-radius: 10px;
  }

.record-editor summary {
    width: 100%;
    justify-content: center;
  }
}

.resident-body {
  scroll-behavior: smooth;
}

.resident-auth-layout {
  align-items: center;
}

.resident-shell {
  display: grid;
  gap: 18px;
}

.resident-topbar {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0 6px;
}

.resident-topbar h1 {
  margin: 0;
  letter-spacing: -0.03em;
}

.resident-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.resident-summary article {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.resident-summary span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.resident-summary strong {
  font-size: 22px;
}

.resident-quick-nav {
  position: sticky;
  top: 8px;
  z-index: 20;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px;
  border: 1px solid rgba(26, 35, 40, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(16px);
}

.resident-quick-nav a {
  flex: 0 0 auto;
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--text);
  background: rgba(247, 250, 249, 0.86);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.resident-quick-nav a:hover,
.resident-quick-nav a:focus {
  color: #fff;
  background: var(--brand);
}

.resident-bottom-nav {
  display: none;
}

.resident-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(320px, 1.2fr);
  gap: 16px;
  align-items: center;
  padding: 22px;
  background:
    radial-gradient(circle at top right, rgba(15, 118, 110, 0.14), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(239, 246, 255, 0.88));
}

.resident-hero h2 {
  margin: 0 0 8px;
  letter-spacing: -0.03em;
}

.resident-action-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.resident-action-card {
  display: grid;
  gap: 8px;
  min-height: 112px;
  padding: 16px;
  border-radius: 18px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(26, 35, 40, 0.08);
  text-decoration: none;
  box-shadow: var(--shadow-soft);
}

.resident-action-card strong {
  font-size: 18px;
}

.resident-action-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.resident-action-card:hover,
.resident-action-card:focus {
  transform: translateY(-1px);
  border-color: rgba(15, 118, 110, 0.3);
}

.resident-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 0.42fr);
  gap: 16px;
  align-items: start;
}

.resident-main-column,
.resident-side-column {
  display: grid;
  gap: 16px;
}

.resident-side-column {
  position: sticky;
  top: 70px;
}

.resident-panel {
  padding: 20px;
  scroll-margin-top: 88px;
}

.resident-panel h2 {
  margin: 0;
}

.resident-vehicle-list,
.resident-roadmap {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.resident-task-panel {
  display: grid;
  gap: 14px;
}

.resident-form-card {
  padding: 16px;
  border: 1px solid rgba(26, 35, 40, 0.08);
  border-radius: 16px;
  background: rgba(247, 250, 249, 0.72);
}

.resident-help-box {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 14px;
  color: var(--brand-deep);
  background: rgba(15, 118, 110, 0.09);
  border: 1px solid rgba(15, 118, 110, 0.14);
}

.resident-help-box span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.resident-status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--brand-deep);
  background: rgba(15, 118, 110, 0.1);
  font-size: 12px;
  font-weight: 900;
}

.resident-profile-summary {
  display: grid;
  gap: 10px;
}

.resident-profile-summary section {
  display: grid;
  gap: 4px;
  padding: 13px;
  border: 1px solid rgba(26, 35, 40, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
}

.resident-profile-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.resident-profile-summary strong {
  overflow-wrap: anywhere;
  font-size: 17px;
}

.resident-vehicle-item {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(26, 35, 40, 0.09);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
}

.resident-vehicle-item > div:first-child {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: baseline;
  justify-content: space-between;
}

.resident-vehicle-item strong {
  font-size: 22px;
}

.resident-vehicle-item span,
.resident-roadmap span {
  color: var(--muted);
  font-weight: 700;
}

.resident-vehicle-item dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.resident-vehicle-item dl div {
  display: grid;
  gap: 4px;
}

.resident-vehicle-item dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.resident-vehicle-item dd {
  margin: 0;
  font-weight: 800;
}

.resident-roadmap > span,
.resident-empty {
  padding: 12px;
  border-radius: 12px;
  background: rgba(247, 250, 249, 0.9);
  border: 1px solid rgba(26, 35, 40, 0.08);
}

.resident-notice-item,
.resident-list-item {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(26, 35, 40, 0.08);
}

.resident-notice-item.is-pinned {
  border-color: rgba(15, 118, 110, 0.22);
  background: linear-gradient(135deg, rgba(236, 253, 245, 0.94), rgba(255, 255, 255, 0.86));
}

.resident-notice-item > div,
.resident-list-item {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: baseline;
  justify-content: space-between;
}

.resident-notice-item p {
  margin: 0;
  color: var(--text);
  line-height: 1.6;
}

.resident-notice-item small {
  color: var(--muted);
  font-weight: 800;
}

.resident-list-item span {
  color: var(--muted);
  font-weight: 800;
}

.resident-request-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(26, 35, 40, 0.08);
  background: rgba(255, 255, 255, 0.82);
}

.resident-request-card > div:first-child,
.resident-request-video {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: baseline;
  justify-content: space-between;
}

.resident-request-card p {
  margin: 0;
  color: var(--text);
  line-height: 1.6;
}

.resident-request-card dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.resident-request-card dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.resident-request-card dd {
  margin: 2px 0 0;
  font-weight: 800;
}

.resident-request-link {
  width: fit-content;
}

.resident-request-video,
.resident-request-response {
  padding: 12px;
  border-radius: 12px;
  background: rgba(15, 118, 110, 0.08);
  border: 1px solid rgba(15, 118, 110, 0.14);
}

.resident-request-response {
  background: rgba(255, 250, 235, 0.86);
  border-color: rgba(202, 138, 4, 0.16);
}

@media (max-width: 820px) {
  .resident-body {
    padding-bottom: calc(78px + env(safe-area-inset-bottom, 0px));
    scroll-behavior: auto;
    font-size: 13px;
  }

  .resident-shell {
    gap: 8px;
    padding: 8px;
  }

  .resident-topbar {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
    padding: 6px 0 2px;
  }

  .resident-topbar .eyebrow {
    margin-bottom: 3px;
    font-size: 10px;
  }

  .resident-topbar h1 {
    max-width: 100%;
    overflow: hidden;
    font-size: 24px;
    line-height: 1.05;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .resident-topbar .subtle {
    margin-top: 5px;
    overflow: hidden;
    font-size: 13px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .resident-topbar .ghost-btn {
    min-height: 36px;
    width: fit-content;
    padding: 0 14px;
    border-radius: 12px;
  }

  .resident-summary,
  .resident-layout,
  .resident-hero,
  .resident-vehicle-item dl,
  .resident-request-card dl {
    grid-template-columns: 1fr;
  }

  .resident-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .resident-summary article {
    gap: 3px;
    min-height: 78px;
    padding: 11px 12px;
    border-radius: 13px;
  }

  .resident-summary span {
    font-size: 11px;
    line-height: 1.2;
  }

  .resident-summary strong {
    font-size: 20px;
    line-height: 1.1;
  }

  .resident-side-column {
    position: static;
  }

  .resident-action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .resident-quick-nav {
    display: none;
  }

  .resident-panel,
  .resident-hero {
    padding: 12px;
    border-radius: 14px;
  }

  .resident-panel {
    scroll-margin-top: 14px;
    scroll-margin-bottom: 82px;
  }

  .resident-body.resident-tabs-ready .resident-layout {
    display: contents;
  }

  .resident-body.resident-tabs-ready .resident-tab-panel {
    display: none;
  }

  .resident-body.resident-tabs-ready .resident-tab-panel.is-resident-active {
    display: block;
  }

  .resident-body.resident-tabs-ready .resident-summary.is-resident-active {
    display: grid;
  }

  .resident-body.resident-tabs-ready #resident-profile.is-resident-active {
    display: grid;
    gap: 8px;
  }

  .resident-hero {
    gap: 10px;
  }

  .resident-hero h2 {
    margin-bottom: 5px;
    font-size: 18px;
    line-height: 1.25;
  }

  .resident-hero .subtle {
    font-size: 12px;
    line-height: 1.45;
  }

  .resident-action-card {
    gap: 4px;
    min-height: 72px;
    padding: 11px;
    border-radius: 13px;
  }

  .resident-action-card strong {
    font-size: 14px;
    line-height: 1.2;
  }

  .resident-action-card span {
    font-size: 11px;
    line-height: 1.35;
  }

  .resident-panel .panel-head {
    margin-bottom: 8px;
    padding-bottom: 7px;
  }

  .resident-panel h2 {
    font-size: 18px;
    line-height: 1.2;
  }

  .resident-panel .subtle,
  .resident-panel p,
  .resident-panel li,
  .resident-panel label span,
  .resident-panel input,
  .resident-panel select,
  .resident-panel textarea {
    font-size: 12px;
  }

  .resident-panel .field-grid,
  .resident-panel .user-form-grid,
  .resident-panel .auth-form,
  .resident-panel .stack-form {
    gap: 9px;
  }

  .resident-panel input,
  .resident-panel select,
  .resident-panel textarea {
    min-height: 38px;
    padding: 8px 10px;
  }

  .resident-bottom-nav {
    position: fixed;
    right: 10px;
    bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    left: 10px;
    z-index: 80;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
    padding: 6px;
    border: 1px solid rgba(15, 118, 110, 0.2);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14);
  }

  .resident-bottom-nav a {
    display: grid;
    gap: 3px;
    justify-items: center;
    align-content: center;
    min-height: 48px;
    padding: 5px 3px;
    border-radius: 15px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 950;
    text-decoration: none;
  }

  .resident-bottom-nav svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .resident-bottom-nav a.is-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--brand-deep));
    box-shadow: 0 8px 18px rgba(15, 118, 110, 0.2);
  }

  .resident-bottom-nav a:hover,
  .resident-bottom-nav a:focus {
    color: #fff;
    background: var(--brand);
  }
}

/* Keep web and app screens on a restrained, operations-friendly text scale. */
.auth-body,
.app-body,
.resident-body {
  font-size: var(--text-base-size);
}

.auth-copy,
.subtle,
.auth-help p,
.auth-feature p,
.auth-notice p,
.auth-alert p,
.guide-lead,
.guide-checks,
.guide-steps span,
.guide-excel-table,
.excel-help-box small,
.preview-placeholder p,
.cctv-source-copy span,
.contact-summary-card span,
.operation-summary-card small,
.operations-focus-card small,
.billing-trial-notice p,
.result-head-copy,
.resident-panel .subtle,
.resident-panel p,
.resident-panel li,
.resident-action-card span,
.resident-notice-item small,
.resident-profile-summary span,
.resident-vehicle-item span,
.floating-contact-panel .subtle,
.admin-login-copy p:last-child,
.admin-login-feature-grid span,
.admin-login-contact span,
.admin-login-panel .subtle {
  font-size: var(--text-small-size);
  line-height: 1.45;
}

.eyebrow,
.guide-panel summary small,
.guide-summary-badge,
.floating-contact-panel small,
small,
label span {
  font-size: var(--text-tiny-size);
  line-height: 1.35;
}

.auth-card h1,
.topbar h1,
.resident-topbar h1,
.admin-login-copy h1 {
  font-size: var(--heading-size);
  line-height: 1.16;
}

.auth-card h2,
.hero-card h2,
.panel h3,
.resident-panel h2,
.resident-hero h2,
.admin-login-panel h2 {
  font-size: var(--section-title-size);
  line-height: 1.18;
}

.admin-login-brand,
.admin-login-feature-grid strong,
.app-entry-action strong,
.guide-summary-title,
.preview-placeholder strong,
.contact-summary-card strong,
.operation-summary-card strong,
.operations-focus-card strong,
.operator-home-grid button strong,
.resident-summary strong,
.resident-action-card strong,
.resident-profile-summary strong,
.resident-vehicle-item strong,
.verdict-card strong {
  font-size: var(--metric-size);
  line-height: 1.15;
}

.admin-login-submit,
.primary-btn,
.secondary-btn,
.danger-btn,
.ghost-btn,
.capture-button,
.pick-button,
.admin-login-link-button {
  font-size: var(--text-small-size);
}

@media (max-width: 720px) {
  :root {
    --text-base-size: 12px;
    --text-small-size: 11px;
    --text-tiny-size: 10px;
    --heading-size: 18px;
    --section-title-size: 16px;
    --metric-size: 18px;
  }
}

.cctv-unread-chip {
  display: inline-flex;
  margin-left: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--brand-deep);
  background: rgba(15, 118, 110, 0.12);
  font-size: 11px;
  font-weight: 800;
  vertical-align: middle;
}

@media (max-width: 360px) {
  .mobile-tab-btn {
    min-height: 44px;
    font-size: 10px;
  }

  .floating-contact-dock {
    width: auto;
  }

  .floating-contact-panel {
    width: min(180px, calc(100vw - 12px));
  }

  .app-body.mobile-tabs-ready .mobile-tabbar {
    left: 4px;
    right: 4px;
  }

  .capture-actions,
  .save-strip,
  .admin-upload-row,
  .guide-upload-row,
  .history-filter-actions,
  .enforcement-edit-grid,
  .contact-toolbar,
  .contact-summary-strip,
  .contact-form-grid,
  .contact-edit-grid,
  .cctv-edit-grid,
  .field-grid,
  .meta-list,
  .cctv-assignment-grid,
  .user-form-grid,
  .billing-usage-grid,
  .billing-plan-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 430px) {
  .modal-backdrop {
    padding: 8px;
  }

  .modal-panel {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
    padding: 12px;
    border-radius: 16px;
  }

  .capture-actions,
  .save-strip,
  .admin-upload-row,
  .guide-upload-row,
  .history-filter-actions,
  .enforcement-edit-grid,
  .contact-toolbar,
  .contact-form-grid,
  .contact-edit-grid,
  .cctv-edit-grid,
  .field-grid,
  .meta-list,
  .user-form-grid,
  .billing-usage-grid,
  .billing-plan-grid {
    grid-template-columns: 1fr;
  }

  .guide-steps li {
    grid-template-columns: 1fr;
  }

  .contact-action-row > *,
  .user-action-row > *,
  .billing-inquiry-row > *,
  .cctv-meta-row > * {
    width: 100%;
  }

  .panel-head,
  .geo-head,
  .topbar {
    flex-wrap: wrap;
  }

  .panel-head > button,
  .geo-head > button,
  .topbar form,
  .topbar form button {
    width: 100%;
  }

  .export-table {
    min-width: 720px;
  }
}

@media (max-width: 720px) {
  .app-body.mobile-tabs-ready .app-shell {
    gap: 6px;
    padding-top: calc(102px + env(safe-area-inset-top, 0px));
  }

  .app-body.mobile-tabs-ready .mobile-tabbar {
    left: 6px;
    right: 6px;
    top: calc(56px + env(safe-area-inset-top, 0px));
    gap: 3px;
    padding: 4px;
    border-radius: 14px;
  }

  .app-body.mobile-tabs-ready .mobile-tab-btn {
    min-height: 38px;
    padding: 3px 2px;
    border-radius: 11px;
  }

  .app-body.mobile-tabs-ready .mobile-tab-btn svg {
    width: 16px;
    height: 16px;
  }

  .app-body.mobile-tabs-ready .mobile-tab-label {
    font-size: 9px;
  }

  .app-body.mobile-tabs-ready .topbar {
    position: fixed;
    top: calc(4px + env(safe-area-inset-top, 0px));
    left: 6px;
    right: 6px;
    z-index: 92;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 8px;
    align-items: center;
    margin-bottom: 5px;
    padding: 7px 9px;
    border-radius: 13px;
  }

  .app-body.mobile-tabs-ready .topbar > div {
    min-width: 0;
    display: grid;
    gap: 2px;
  }

  .app-body.mobile-tabs-ready .topbar .eyebrow {
    margin: 0;
    font-size: 8px;
    line-height: 1;
  }

  .app-body.mobile-tabs-ready .topbar h1 {
    font-size: 16px;
    line-height: 1;
  }

  .app-body.mobile-tabs-ready .topbar .subtle {
    margin: 0;
    font-size: 10px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .app-body.mobile-tabs-ready .topbar form {
    width: auto;
    align-self: center;
  }

  .app-body.mobile-tabs-ready .topbar form button,
  .app-body.mobile-tabs-ready .topbar .ghost-btn {
    width: auto;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 10px;
    font-size: 11px;
  }

  .app-body.mobile-tabs-ready .admin-work-nav-global {
    display: none;
  }
}
