:root {
  color-scheme: dark;
  --bg: #070b10;
  --surface: #0a1017;
  --surface-2: #13202c;
  --surface-3: #1b2d3d;
  --line: #31475b;
  --line-bright: #5d7f9a;
  --ink: #e6edf3;
  --muted: #8fa3b5;
  --green: #39ff9f;
  --green-bg: #0d2b22;
  --yellow: #ffd166;
  --yellow-bg: #33280d;
  --red: #ff6b6b;
  --red-bg: #351817;
  --blue: #69b7ff;
  --blue-bg: #10263b;
  --cyan: #64f4ff;
  --purple: #d6a3ff;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.45);
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(rgba(105, 183, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(105, 183, 255, 0.03) 1px, transparent 1px),
    radial-gradient(circle at top left, rgba(100, 244, 255, 0.1), transparent 38%),
    var(--bg);
  background-size: 28px 28px, 28px 28px, auto;
  color: var(--ink);
}

body.signature-active {
  overflow: hidden;
}

body.auth-locked .app-shell {
  display: none;
}

body.auth-enabled .dev-panel {
  display: none;
}

.tripwire-poop {
  position: fixed;
  top: -48px;
  z-index: 9999;
  font-size: clamp(1.8rem, 5vw, 3.4rem);
  line-height: 1;
  pointer-events: none;
  animation: tripwire-poop-fall 5s linear forwards;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.48));
}

@keyframes tripwire-poop-fall {
  from {
    transform: translate3d(0, -64px, 0) rotate(0deg);
    opacity: 0;
  }

  8% {
    opacity: 1;
  }

  92% {
    opacity: 1;
  }

  to {
    transform: translate3d(var(--poop-drift), calc(100vh + 96px), 0) rotate(var(--poop-spin));
    opacity: 0;
  }
}

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

.auth-gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    linear-gradient(rgba(105, 183, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(105, 183, 255, 0.03) 1px, transparent 1px),
    radial-gradient(circle at top left, rgba(100, 244, 255, 0.13), transparent 42%),
    var(--bg);
  background-size: 28px 28px, 28px 28px, auto;
}

.auth-card {
  width: min(100%, 430px);
  border: 1px solid var(--line-bright);
  border-left: 10px solid var(--cyan);
  background: #0b1118;
  padding: 24px;
  box-shadow: 0 0 34px rgba(100, 244, 255, 0.12), var(--shadow);
}

.auth-copy {
  margin: 8px 0 18px;
  color: var(--muted);
  line-height: 1.5;
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.auth-form input {
  min-height: 42px;
  border: 1px solid var(--line-bright);
  border-radius: 0;
  background: #071019;
  color: var(--ink);
  padding: 9px 11px;
}

.auth-form input:focus {
  border-color: var(--cyan);
  outline: none;
  box-shadow: 0 0 0 2px rgba(100, 244, 255, 0.12);
}

.app-shell {
  min-height: 100vh;
  padding: 18px;
}

.dashboard-modal {
  width: 100%;
  min-height: calc(100vh - 36px);
  background: rgba(7, 11, 16, 0.98);
  border: 1px solid var(--line-bright);
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
  position: relative;
}

.dashboard-modal::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(100, 244, 255, 0.12);
  pointer-events: none;
}

.dashboard-header {
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  background: #0b1118;
  position: relative;
}

.dashboard-header::after {
  content: "";
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, var(--cyan), transparent 45%, var(--purple));
}

.context-bar {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 8px 24px;
  border-bottom: 1px solid var(--line);
  background: #05090e;
  color: var(--muted);
  font-size: 0.86rem;
  text-transform: uppercase;
}

.context-bar div {
  display: grid;
  gap: 3px;
}

.context-bar .db-status {
  min-width: 92px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  background: #081018;
}

.context-bar strong {
  color: var(--green);
}

.db-status[data-state="checking"] strong {
  color: var(--yellow);
}

.db-status[data-state="shared"] {
  border-color: rgba(57, 255, 159, 0.5);
}

.db-status[data-state="shared"] strong {
  color: var(--green);
}

.db-status[data-state="local"] strong,
.db-status[data-state="error"] strong {
  color: var(--red);
}

.view-tabs {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.view-tab {
  min-height: 36px;
  border: 1px solid var(--line-bright);
  border-radius: 0;
  padding: 0 12px;
  background: #142130;
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
}

.view-tab:hover,
.view-tab:focus-visible,
.view-tab.active {
  border-color: var(--cyan);
  color: var(--cyan);
  background: #1b3042;
  box-shadow: 0 0 0 1px rgba(100, 244, 255, 0.18), 0 0 18px rgba(100, 244, 255, 0.1);
  outline: none;
}

.lead-only-action {
  min-height: 36px;
  white-space: nowrap;
}

.app-view {
  display: none;
}

.app-view.active {
  display: block;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(1.35rem, 2vw, 2rem);
  letter-spacing: 0;
  color: #f8fbff;
  text-shadow: 0 0 18px rgba(100, 244, 255, 0.14);
}

.header-meta {
  display: grid;
  align-content: center;
  gap: 4px;
  min-width: 210px;
  color: var(--muted);
  text-align: right;
  font-size: 0.92rem;
}

.header-meta strong {
  color: var(--green);
}

.user-menu {
  position: relative;
  justify-items: end;
}

.user-menu-trigger {
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 7px 10px;
  background: #111a24;
  color: var(--green);
  cursor: pointer;
}

.user-menu-trigger:hover,
.user-menu-trigger:focus-visible {
  border-color: var(--cyan);
  outline: none;
}

.user-menu-options {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 8;
  min-width: 210px;
  border: 1px solid var(--line-bright);
  background: #080d13;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.42);
}

.user-menu-options button {
  width: 100%;
  min-height: 38px;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 0 12px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.user-menu-options button:hover,
.user-menu-options button:focus-visible {
  background: #142231;
  color: var(--cyan);
  outline: none;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--line);
  background: #0b1118;
}

.summary-strip article {
  padding: 14px 20px;
  border-right: 1px solid var(--line);
  position: relative;
}

.summary-strip article:last-child {
  border-right: 0;
}

.summary-value {
  display: block;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--cyan);
}

.summary-label {
  color: var(--muted);
  font-size: 0.86rem;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 292px;
  min-height: 620px;
}

.content-grid:has(.attention-panel.collapsed) {
  grid-template-columns: minmax(0, 1fr) 48px;
}

.floor-list {
  padding: 14px;
}

.dashboard-view-toggle {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.schedule-page,
.map-page,
.profile-page,
.roster-page {
  padding: 14px;
}

.page-heading {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  margin-bottom: 14px;
  border: 1px solid var(--line-bright);
  background: #050a10;
}

.page-heading h2 {
  margin: 0;
  color: var(--cyan);
  font-size: 1.1rem;
}

.schedule-days,
.shift-list {
  display: grid;
  gap: 14px;
}

.schedule-day-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 292px;
  gap: 14px;
  align-items: start;
}

.schedule-day,
.shift-block {
  border: 1px solid var(--line-bright);
  background: #050a10;
}

.shift-block {
  margin: 12px;
  background: #0f1924;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
}

.shift-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: #172636;
}

.shift-header h3 {
  margin: 0;
  color: var(--purple);
  font-size: 0.96rem;
}

.shift-header > div:first-child {
  display: grid;
  gap: 3px;
}

.shift-edit-controls {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.shift-edit-controls select {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 0 10px;
  color: var(--ink);
  background: #080d13;
}

.shift-header span,
.schedule-permission,
.profile-note {
  color: var(--muted);
  font-size: 0.84rem;
}

.shift-members {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
  padding: 12px;
}

.schedule-member-card {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line-bright);
  background: #142130;
  box-shadow: inset 6px 0 0 var(--line-bright), 0 8px 18px rgba(0, 0, 0, 0.22);
}

.schedule-member-card.present {
  border-color: rgba(57, 255, 159, 0.72);
  box-shadow: inset 6px 0 0 rgba(57, 255, 159, 0.85);
}

.member-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.member-card-head div {
  display: grid;
  gap: 4px;
}

.member-card-head span {
  color: var(--muted);
  font-size: 0.82rem;
}

.member-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.compact-check {
  grid-column: auto;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line-bright);
  background: #050a10;
}

.key-times-panel {
  position: sticky;
  top: 14px;
  border: 1px solid var(--line-bright);
  background: #050a10;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.24);
}

.key-times-header {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: #172636;
}

.key-times-header div {
  display: grid;
  gap: 3px;
}

.key-times-header span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.key-times-header strong {
  color: var(--cyan);
}

.key-time-add {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 10px;
  border-bottom: 1px solid var(--line);
}

.key-time-add input {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 0 9px;
  color: var(--ink);
  background: #080d13;
}

.key-time-add .form-error {
  margin: 0;
}

.key-time-list {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.key-time-card {
  position: relative;
  min-height: 42px;
  display: grid;
  gap: 2px;
  padding: 7px 28px 7px 9px;
  border: 1px solid var(--cyan);
  background: rgba(16, 38, 59, 0.92);
  box-shadow: inset 4px 0 0 var(--cyan);
}

.key-time-card strong {
  color: var(--cyan);
  font-size: 0.74rem;
}

.key-time-card span {
  color: var(--ink);
  font-size: 0.8rem;
  overflow-wrap: anywhere;
}

.key-time-remove {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 22px;
  height: 22px;
  border: 1px solid var(--line);
  background: #081018;
  color: var(--muted);
  cursor: pointer;
}

.key-time-remove:hover,
.key-time-remove:focus-visible {
  border-color: var(--red);
  color: var(--red);
  outline: none;
}

.key-time-empty {
  margin: 10px;
  color: var(--muted);
  font-size: 0.84rem;
}

.roster-lead-check {
  color: var(--yellow);
}

.roster-lead-check input:disabled {
  cursor: not-allowed;
}

.profile-card {
  max-width: 820px;
}

.collapsible-panel {
  display: block;
  margin-bottom: 14px;
  border: 1px solid var(--line-bright);
  background: #03070b;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28), inset 0 0 0 1px rgba(100, 244, 255, 0.04);
}

.collapsible-panel > summary {
  min-height: 68px;
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border-left: 12px solid var(--cyan);
  background: #13202c;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}

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

.collapsible-panel > summary::after {
  content: "+";
  margin-left: auto;
  color: var(--cyan);
  font-size: 1.2rem;
  font-weight: 900;
}

.collapsible-panel[open] > summary {
  border-bottom: 1px solid var(--line);
  background: #182838;
}

.collapsible-panel[open] > summary::after {
  content: "-";
}

.collapsible-panel > summary:hover,
.collapsible-panel > summary:focus-visible {
  background: #1c3144;
  box-shadow: inset 0 0 0 1px rgba(100, 244, 255, 0.2);
  outline: none;
}

.collapsible-panel > summary span {
  display: grid;
  gap: 3px;
}

.collapsible-panel > summary strong {
  color: var(--cyan);
  font-size: 0.96rem;
  text-transform: uppercase;
}

.collapsible-panel > summary small {
  color: var(--muted);
  font-size: 0.8rem;
}

.collapsible-panel > .roster-grid,
.collapsible-panel > .details-grid,
.collapsible-panel > .panel-actions,
.collapsible-panel > .form-error {
  margin: 12px;
}

.collapsible-panel > .survey-matrix-wrap {
  margin: 12px;
}

.profile-survey-card {
  max-width: 980px;
  margin-top: 18px;
}

.profile-admin-card {
  max-width: 980px;
  margin-top: 18px;
  border-color: rgba(255, 107, 107, 0.5);
  box-shadow: inset 8px 0 0 rgba(255, 107, 107, 0.55), 0 14px 34px rgba(0, 0, 0, 0.32);
}

.admin-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.admin-table-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
}

.admin-table-card {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  min-height: 72px;
  border: 1px solid rgba(255, 107, 107, 0.24);
  padding: 10px;
  background: #0b1016;
}

.admin-table-card div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.admin-table-card strong {
  color: var(--ink);
}

.admin-table-card small {
  color: var(--muted);
  line-height: 1.35;
}

.admin-wipe-all {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 107, 107, 0.25);
}

.profile-survey-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 8px;
}

.survey-check-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 52px;
  padding: 10px;
  border: 1px solid var(--line);
  background: #080d13;
  box-shadow: inset 4px 0 0 rgba(255, 203, 107, 0.45);
}

.survey-check-row.complete {
  box-shadow: inset 4px 0 0 rgba(82, 211, 138, 0.72);
}

.survey-check-row input {
  accent-color: var(--green);
}

.survey-check-row span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.survey-check-row strong,
.survey-check-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.survey-check-row small {
  color: var(--muted);
  font-size: 0.78rem;
}

.survey-matrix-card {
  margin-bottom: 14px;
}

.survey-matrix-wrap {
  max-width: 100%;
  overflow: auto;
  border: 1px solid var(--line);
  background: #060a0f;
}

.survey-matrix {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.survey-matrix th,
.survey-matrix td {
  border: 1px solid rgba(69, 88, 109, 0.74);
  padding: 8px;
  text-align: center;
}

.survey-matrix td.complete {
  background: rgba(82, 211, 138, 0.12);
  box-shadow: inset 0 0 0 1px rgba(82, 211, 138, 0.45);
}

.survey-matrix thead th,
.survey-matrix tbody th {
  position: sticky;
  background: #0d141c;
  z-index: 1;
}

.survey-matrix thead th {
  top: 0;
  color: var(--cyan);
}

.survey-matrix tbody th {
  left: 0;
  width: 220px;
  text-align: left;
}

.survey-matrix tbody th strong,
.survey-matrix tbody th span {
  display: block;
}

.survey-matrix tbody th span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.76rem;
}

.survey-matrix input {
  width: 16px;
  height: 16px;
  accent-color: var(--green);
}

.survey-matrix td.complete input {
  opacity: 1;
  filter: drop-shadow(0 0 5px rgba(82, 211, 138, 0.9));
}

.survey-complete-mark {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  margin-left: 4px;
  color: var(--green);
  font-size: 1rem;
  font-weight: 900;
  text-shadow: 0 0 8px rgba(82, 211, 138, 0.9);
}

.activity-feed-card {
  max-width: 1100px;
}

.activity-feed-list {
  display: grid;
  gap: 8px;
}

.data-state-pill {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border: 1px solid var(--line);
  padding: 0 9px;
  background: #081018;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.data-state-pill.shared {
  border-color: var(--green);
  color: var(--green);
}

.data-state-pill.checking {
  border-color: var(--yellow);
  color: var(--yellow);
}

.data-state-pill.local,
.data-state-pill.error {
  border-color: var(--red);
  color: var(--red);
}

.activity-feed-item {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  background: #080d13;
  box-shadow: inset 5px 0 0 rgba(126, 224, 255, 0.46);
}

.activity-feed-time {
  display: grid;
  gap: 4px;
  align-content: start;
  color: var(--muted);
  font-size: 0.78rem;
}

.activity-feed-time strong {
  color: var(--green);
}

.activity-feed-body {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.activity-feed-body div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.activity-feed-body p {
  margin: 0;
  color: var(--ink);
}

.activity-feed-body small {
  color: var(--muted);
}

.activity-type {
  border-color: rgba(126, 224, 255, 0.45);
  color: var(--cyan);
}

.report-editor-layout {
  display: block;
}

.report-editor-main {
  display: grid;
  gap: 14px;
  margin-right: 370px;
}

.report-editor-actions {
  margin-top: 0;
}

.report-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.stat-card {
  padding: 12px;
  border: 1px solid var(--line-bright);
  background: #050a10;
  box-shadow: inset 4px 0 0 rgba(100, 244, 255, 0.62);
}

.stat-card span {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.stat-card strong {
  display: block;
  margin-top: 6px;
  color: var(--cyan);
  font-size: 1.2rem;
}

.report-textarea {
  width: 100%;
  border: 1px solid var(--line-bright);
  border-radius: 0;
  padding: 10px;
  background: #050a10;
  color: var(--ink);
  line-height: 1.45;
  resize: vertical;
}

.report-editor-fields {
  display: grid;
  gap: 12px;
  margin: 12px;
}

.report-survey-panel {
  position: fixed;
  top: 214px;
  right: 32px;
  bottom: 32px;
  z-index: 6;
  width: 340px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  padding: 12px;
  border: 1px solid var(--line-bright);
  background: #050a10;
  box-shadow: inset 6px 0 0 rgba(100, 244, 255, 0.48), 0 12px 28px rgba(0, 0, 0, 0.24);
}

.report-survey-panel .section-heading {
  flex: 0 0 auto;
}

.report-filter-stack {
  flex: 0 0 auto;
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  background: #050a10;
}

.survey-reference-list {
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
  display: grid;
  align-content: start;
  gap: 8px;
}

.survey-reference-card {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  background: #101a25;
}

.survey-reference-card > div {
  display: grid;
  gap: 3px;
}

.survey-reference-card strong {
  color: var(--cyan);
}

.survey-reference-card span {
  color: var(--muted);
  font-size: 0.76rem;
}

.survey-reference-card dl {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 4px 8px;
  margin: 0;
  font-size: 0.82rem;
}

.survey-reference-card dt {
  color: var(--muted);
}

.survey-reference-card dd {
  margin: 0;
  color: var(--ink);
}

.survey-reference-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 292px;
  gap: 14px;
  align-items: start;
}

.map-card,
.map-room-list {
  position: relative;
  border: 1px solid var(--line);
  background: #090f15;
}

.map-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: #101923;
}

.map-tools {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}

.map-floor-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.map-floor-button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 0 10px;
  background: #081018;
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
}

.map-zoom-controls {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.map-zoom-button {
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #081018;
  color: var(--cyan);
  font-weight: 900;
  cursor: pointer;
}

.map-zoom-button:hover,
.map-zoom-button:focus-visible {
  border-color: var(--cyan);
  background: #142231;
  outline: none;
}

.map-zoom-controls strong {
  min-width: 48px;
  color: var(--green);
  font-size: 0.8rem;
  text-align: center;
}

.map-floor-button:hover,
.map-floor-button:focus-visible,
.map-floor-button.active {
  border-color: var(--cyan);
  color: var(--cyan);
  background: #142231;
  outline: none;
}

.map-toolbar strong {
  color: var(--cyan);
}

.map-toolbar span,
.map-room-list h3 {
  color: var(--muted);
  font-size: 0.84rem;
}

.map-canvas {
  padding: 12px;
  overflow: auto;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-x pan-y;
}

.map-viewport {
  --map-zoom: 1;
  width: max-content;
  min-width: 100%;
  min-height: 360px;
  position: relative;
}

.map-viewport .community-map-svg {
  transform: scale(var(--map-zoom));
  transform-origin: top left;
}

.community-map-svg {
  width: min(1000px, 100vw);
  min-width: 760px;
  height: auto;
  display: block;
}

.map-floor-hidden {
  display: none !important;
  visibility: hidden !important;
}

.map-room {
  cursor: pointer;
  outline: none;
}

.community-map-svg .map-base :is(path, polygon, polyline, line, rect, circle, ellipse) {
  fill: none !important;
  stroke: rgba(134, 190, 211, 0.72) !important;
  stroke-width: 2px;
  vector-effect: non-scaling-stroke;
}

.community-map-svg .map-base :is(text, tspan) {
  fill: rgba(203, 240, 255, 0.92) !important;
  stroke: none !important;
}

.community-map-svg .map-base :is(path, polygon, polyline, line, rect, circle, ellipse)[fill]:not([fill="none"]) {
  fill: rgba(8, 20, 29, 0.34) !important;
}

.community-map-svg .map-room > * {
  stroke-width: 3px;
  transition: fill 140ms ease, stroke 140ms ease, opacity 140ms ease, filter 140ms ease;
  vector-effect: non-scaling-stroke;
}

.community-map-svg .map-room.awaiting > * {
  fill: rgba(100, 244, 255, 0.42) !important;
  stroke: var(--cyan) !important;
}

.community-map-svg .map-room.normal > * {
  fill: rgba(57, 255, 159, 0.48) !important;
  stroke: var(--green) !important;
}

.community-map-svg .map-room.soon > * {
  fill: rgba(255, 209, 102, 0.58) !important;
  stroke: var(--yellow) !important;
}

.community-map-svg .map-room.overdue > * {
  fill: rgba(255, 107, 107, 0.62) !important;
  stroke: var(--red) !important;
  filter: drop-shadow(0 0 8px rgba(255, 107, 107, 0.42));
}

.community-map-svg .map-room.unassigned > *,
.community-map-svg .map-room.wrong-floor > * {
  fill: rgba(73, 95, 111, 0.46) !important;
  stroke: rgba(196, 222, 235, 0.72) !important;
  opacity: 0.78;
}

.community-map-svg .map-room:hover > *,
.community-map-svg .map-room:focus-visible > * {
  stroke: #f8fbff !important;
  filter: drop-shadow(0 0 10px rgba(100, 244, 255, 0.5));
}

.community-map-svg .map-room.map-pulse > * {
  animation: map-room-pulse 900ms ease-in-out 3;
}

@keyframes map-room-pulse {
  0%,
  100% {
    filter: drop-shadow(0 0 0 rgba(255, 209, 102, 0));
  }

  50% {
    fill: rgba(255, 209, 102, 0.95);
    stroke: #fff4bf !important;
    filter: drop-shadow(0 0 14px rgba(255, 209, 102, 0.9));
  }
}

.map-hover-card {
  position: fixed;
  z-index: 30;
  min-width: 190px;
  max-width: 260px;
  padding: 10px;
  border: 1px solid var(--cyan);
  background: rgba(8, 13, 19, 0.96);
  color: var(--ink);
  box-shadow: inset 4px 0 0 var(--cyan), 0 16px 34px rgba(0, 0, 0, 0.42);
  white-space: pre-line;
  pointer-events: none;
  font-size: 0.84rem;
  line-height: 1.45;
}

.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.map-legend span,
.map-community-link {
  border: 1px solid var(--line);
  background: #081018;
}

.map-legend span {
  padding: 6px 8px;
  font-size: 0.76rem;
  font-weight: 800;
}

.map-legend .awaiting {
  color: var(--cyan);
}

.map-legend .normal {
  color: var(--green);
}

.map-legend .soon {
  color: var(--yellow);
}

.map-legend .overdue {
  color: var(--red);
}

.map-room-list {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.map-room-list h3 {
  margin: 0 0 4px;
  color: var(--cyan);
}

.map-community-link {
  display: grid;
  gap: 4px;
  padding: 10px;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.map-community-link:hover,
.map-community-link:focus-visible {
  border-color: var(--cyan);
  background: #142231;
  outline: none;
}

.map-community-link span {
  color: var(--muted);
  font-size: 0.82rem;
}

.roster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.roster-card {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line-bright);
  background: #142130;
  box-shadow: inset 6px 0 0 rgba(214, 163, 255, 0.72), 0 8px 18px rgba(0, 0, 0, 0.22);
}

.roster-contact-grid {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 6px 10px;
  padding: 10px;
  border: 1px solid var(--line-bright);
  background: #050a10;
  overflow-wrap: anywhere;
}

.roster-contact-details {
  border: 1px solid var(--line-bright);
  background: #050a10;
}

.roster-contact-details summary {
  min-height: 38px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  color: var(--cyan);
  font-weight: 800;
  cursor: pointer;
}

.roster-contact-details[open] summary {
  border-bottom: 1px solid var(--line);
  background: #101923;
}

.roster-contact-details .roster-contact-grid {
  border: 0;
}

.roster-contact-grid span {
  color: var(--muted);
  font-size: 0.82rem;
}

.roster-add-card {
  max-width: 980px;
}

#community-list.has-open-community .floor-section,
.dashboard-modal:has(#community-list.has-open-community) .summary-strip,
.dashboard-modal:has(#community-list.has-open-community) .attention-panel {
  opacity: 0.5;
  transition: opacity 180ms ease;
}

#community-list.has-open-community .community-row {
  opacity: 0.5;
}

#community-list.has-open-community .community-row.open {
  opacity: 1;
  position: relative;
  z-index: 2;
}

#community-list.has-open-community .floor-section:has(.community-row.open) {
  opacity: 1;
}

.floor-section {
  border: 1px solid var(--line-bright);
  border-radius: 0;
  overflow: visible;
  margin-bottom: 14px;
  background: #050a10;
  position: relative;
}

.floor-section::before {
  content: "";
  position: absolute;
  left: -1px;
  top: -1px;
  width: 18px;
  height: 18px;
  border-left: 2px solid var(--cyan);
  border-top: 2px solid var(--cyan);
}

.floor-section::after {
  content: "";
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 18px;
  height: 18px;
  border-right: 2px solid rgba(214, 163, 255, 0.7);
  border-bottom: 2px solid rgba(214, 163, 255, 0.7);
}

.floor-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 10px 16px;
  background: #101923;
  border-bottom: 1px solid var(--line);
}

.floor-header h2 {
  margin: 0;
  font-size: 1rem;
  color: var(--purple);
}

.floor-header h2::before {
  content: "[ ";
  color: var(--muted);
}

.floor-header h2::after {
  content: " ]";
  color: var(--muted);
}

.floor-counts {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.82rem;
}

.community-row {
  margin: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 0;
  overflow: hidden;
  background: #0d141c;
  box-shadow: none;
}

.community-row.normal {
  border-color: rgba(57, 255, 159, 0.72);
  box-shadow: inset 8px 0 0 rgba(57, 255, 159, 0.85);
}

.community-row.awaiting {
  border-color: rgba(100, 244, 255, 0.46);
  box-shadow: inset 8px 0 0 rgba(100, 244, 255, 0.54);
}

.community-row.soon {
  border-color: rgba(255, 209, 102, 0.86);
  box-shadow: inset 8px 0 0 rgba(255, 209, 102, 0.9);
}

.community-row.overdue {
  border-color: var(--red);
  box-shadow: inset 8px 0 0 var(--red), 0 0 20px rgba(255, 107, 107, 0.14);
  animation: overdue-throb 1.8s ease-in-out infinite;
}

.community-row:last-child {
  margin-bottom: 12px;
}

@keyframes overdue-throb {
  0%,
  100% {
    box-shadow: inset 8px 0 0 var(--red), 0 0 16px rgba(255, 107, 107, 0.12);
  }

  50% {
    box-shadow: inset 8px 0 0 var(--red), 0 0 30px rgba(255, 107, 107, 0.34);
  }
}

.community-row,
.community-name {
  transition: background-color 160ms ease, transform 160ms ease, border-color 160ms ease, opacity 180ms ease;
}

.community-row:hover {
  background: #121f2a;
  border-color: var(--cyan);
}

.community-row:hover .community-name {
  transform: translateX(8px);
}

.community-row.open {
  background: #142231;
  border-color: var(--cyan);
}

.community-trigger {
  width: 100%;
  min-height: 60px;
  padding: 0 16px;
  border: 0;
  background: transparent;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) 120px 150px;
  gap: 16px;
  align-items: center;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.community-trigger:hover,
.community-trigger[aria-expanded="true"] {
  background: rgba(23, 35, 49, 0.72);
}

.community-name {
  display: grid;
  gap: 4px;
  padding-left: 10px;
  border-left: 1px solid rgba(143, 163, 181, 0.28);
}

.community-name strong {
  overflow-wrap: anywhere;
  color: #f7fbff;
}

.community-name span,
.room,
.timer small {
  color: var(--muted);
  font-size: 0.84rem;
}

.survey-row-status.clear {
  color: var(--green);
}

.survey-row-status.required {
  color: var(--yellow);
}

.room {
  font-weight: 700;
}

.timer {
  justify-self: end;
  min-width: 138px;
  padding: 8px 10px;
  border-radius: 0;
  text-align: right;
  font-weight: 800;
  border: 1px solid var(--line);
  background: #081018;
  box-shadow: inset 0 0 18px rgba(255, 255, 255, 0.035);
}

.timer small {
  display: block;
  font-weight: 700;
}

.timer.normal {
  color: var(--green);
}

.timer.awaiting {
  color: var(--cyan);
}

.timer.soon {
  color: var(--yellow);
}

.timer.overdue {
  color: var(--red);
}

.community-panel {
  display: none;
  padding: 12px 12px 14px;
  background: #091017;
  border-top: 1px solid var(--line);
}

.community-row.open .community-panel {
  display: block;
}

.action-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.action-tab,
.secondary-button,
.primary-button {
  min-height: 38px;
  border-radius: 0;
  border: 1px solid var(--line);
  padding: 0 13px;
  background: #111a24;
  color: var(--ink);
  font-weight: 750;
  cursor: pointer;
}

.action-tab.active {
  background: var(--blue-bg);
  border-color: var(--blue);
  color: var(--blue);
  box-shadow: 0 0 0 1px rgba(105, 183, 255, 0.22);
}

.primary-button {
  border-color: var(--blue);
  background: #143a5a;
  color: #dff1ff;
}

.danger-button {
  border-color: var(--red);
  background: rgba(255, 107, 107, 0.18);
  color: #ffd9d9;
}

.danger-button:hover {
  border-color: #ffd1d1;
  color: #ffffff;
  box-shadow: 0 0 0 1px rgba(255, 107, 107, 0.24);
}

.secondary-button:hover,
.primary-button:hover,
.action-tab:hover {
  border-color: var(--cyan);
  color: #ffffff;
}

.primary-button:disabled,
.secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.add-community-panel {
  padding: 14px;
  border-bottom: 1px solid var(--line);
  background: #080d13;
}

.add-panel-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  margin-bottom: 14px;
}

.add-panel-header h2 {
  margin-bottom: 4px;
  color: var(--cyan);
  font-size: 1rem;
}

.add-panel-header p {
  margin-bottom: 0;
  color: var(--muted);
}

.add-panel-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 14px;
}

.csv-format {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  padding: 10px;
  border: 1px solid var(--line);
  background: #0a1118;
}

.csv-format strong {
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
}

.csv-format code {
  color: var(--green);
  white-space: normal;
  overflow-wrap: anywhere;
}

.csv-results {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.csv-result {
  padding: 9px 10px;
  border: 1px solid var(--line);
  background: #0a1118;
  font-size: 0.84rem;
}

.csv-result.error {
  border-color: var(--red);
  color: var(--red);
}

.csv-result.success {
  border-color: var(--green);
  color: var(--green);
}

.panel-card {
  border: 1px solid var(--line-bright);
  border-radius: 0;
  background: #121d29;
  padding: 16px;
  position: relative;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24), inset 0 0 0 1px rgba(100, 244, 255, 0.04);
}

.panel-card::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), transparent 34%, var(--purple));
}

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

.detail-field {
  display: grid;
  gap: 5px;
}

.detail-field label,
.detail-label {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.detail-field input,
.detail-field textarea,
.detail-field select {
  width: 100%;
  border: 1px solid var(--line-bright);
  border-radius: 0;
  padding: 10px;
  color: var(--ink);
  background: #050a10;
}

.detail-readout {
  min-height: 40px;
  padding: 10px 0;
  line-height: 1.35;
}

.full-span {
  grid-column: 1 / -1;
}

.panel-actions {
  margin-top: 16px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.audit-note {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.84rem;
}

.placeholder {
  color: var(--muted);
  line-height: 1.45;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  margin-bottom: 14px;
}

.section-heading h3 {
  margin-bottom: 4px;
  font-size: 1rem;
}

.section-heading p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.4;
}

.issue-list,
.receipt-list,
.survey-review-list {
  display: grid;
  gap: 10px;
}

.survey-review-card {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line-bright);
  background: #081018;
  box-shadow: inset 4px 0 0 rgba(100, 244, 255, 0.34);
}

.survey-review-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.survey-review-header > div {
  display: grid;
  gap: 3px;
}

.survey-review-header span:not(.status-pill) {
  color: var(--muted);
  font-size: 0.84rem;
}

.survey-review-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.survey-review-grid div,
.survey-observation-readout {
  padding: 10px;
  border: 1px solid var(--line);
  background: #0a1118;
}

.survey-review-grid dt,
.survey-observation-readout span {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.survey-review-grid dd {
  margin: 0;
  color: var(--ink);
}

.survey-observation-readout p {
  margin: 0;
  color: var(--ink);
  line-height: 1.45;
}

.issue-accordion-card,
.receipt-card {
  display: grid;
  border: 1px solid var(--line-bright);
  border-radius: 0;
  background: #121d29;
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
}

.issue-accordion-card.open,
.receipt-card.open {
  border-color: var(--cyan);
  background: #172d3d;
  box-shadow: 0 0 0 1px rgba(100, 244, 255, 0.18), 0 12px 28px rgba(0, 0, 0, 0.28);
}

.issue-accordion-trigger,
.receipt-trigger {
  width: 100%;
  min-height: 54px;
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) 130px;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.issue-accordion-trigger:hover,
.issue-accordion-trigger[aria-expanded="true"],
.receipt-trigger:hover,
.receipt-trigger[aria-expanded="true"] {
  background: rgba(23, 35, 49, 0.72);
}

.issue-accordion-trigger strong,
.receipt-trigger strong {
  overflow-wrap: anywhere;
}

.issue-accordion-panel,
.receipt-panel {
  display: none;
  padding: 12px;
  border-top: 1px solid var(--line);
  background: #081018;
}

.issue-accordion-card.open .issue-accordion-panel,
.receipt-card.open .receipt-panel {
  display: block;
}

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

.row-meta,
.receipt-meta {
  color: var(--muted);
  font-size: 0.84rem;
  text-align: right;
  white-space: nowrap;
}

.receipt-meta {
  display: grid;
  gap: 4px;
}

.receipt-meta strong {
  color: var(--ink);
}

.receipt-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

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

.receipt-detail-grid label,
.receipt-return-list {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
}

.receipt-detail-grid input,
.receipt-detail-grid textarea,
.receipt-return-row input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 10px;
  color: var(--ink);
  background: #080d13;
}

.receipt-detail-grid input[readonly],
.receipt-detail-grid textarea[readonly] {
  color: var(--muted);
}

.receipt-return-header,
.receipt-return-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 100px 150px;
  gap: 10px;
  align-items: center;
}

.receipt-return-row {
  padding: 8px;
  border: 1px solid var(--line);
  background: #0a1118;
  color: var(--ink);
  text-transform: none;
}

.status-pill {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border-radius: 0;
  padding: 0 9px;
  font-size: 0.76rem;
  font-weight: 800;
  border: 1px solid currentColor;
}

.status-pill.submitted {
  background: var(--yellow-bg);
  color: var(--yellow);
}

.status-pill.open,
.status-pill.returnable {
  background: var(--blue-bg);
  color: var(--blue);
}

.status-pill.closed,
.status-pill.nonreturnable {
  background: var(--green-bg);
  color: var(--green);
}

.status-pill.awaiting {
  background: var(--yellow-bg);
  color: var(--yellow);
}

.pickup-panel {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(245, 158, 11, 0.42);
  background: rgba(245, 158, 11, 0.08);
}

.pickup-panel strong {
  color: var(--yellow);
}

.pickup-panel p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.4;
  text-transform: none;
}

.issue-update-form {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 12px;
}

.issue-sync-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: none;
}

.issue-update-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
}

.issue-update-form select,
.issue-update-form textarea,
.issue-update-form input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 10px;
  color: var(--ink);
  background: #080d13;
}

.issue-update-form textarea[readonly] {
  color: var(--muted);
}

.quick-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.quick-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
}

.quick-form input,
.quick-form textarea,
.survey-grid select,
.survey-grid textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 10px;
  color: var(--ink);
  background: #080d13;
  text-transform: none;
}

.detail-field input:focus,
.detail-field textarea:focus,
.detail-field select:focus,
.quick-form input:focus,
.quick-form textarea:focus,
.issue-update-form select:focus,
.issue-update-form textarea:focus,
.issue-update-form input:focus,
.checkin-notes textarea:focus,
.survey-grid select:focus,
.survey-grid textarea:focus {
  outline: 2px solid rgba(100, 244, 255, 0.28);
  border-color: var(--cyan);
}

.form-error {
  min-height: 20px;
  margin: 12px 0 0;
  color: var(--red);
  font-size: 0.84rem;
}

.receipt-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.receipt-items {
  display: grid;
  gap: 8px;
}

.receipt-items-header,
.receipt-item-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  gap: 10px;
  align-items: center;
}

.receipt-items-header {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
}

.receipt-item-row input {
  min-height: 40px;
}

.check-field {
  display: flex !important;
  grid-column: 1 / -1;
  gap: 10px !important;
  align-items: center;
  text-transform: none !important;
}

.check-field input {
  width: auto;
}

.signature-box {
  min-height: 112px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--blue);
  border-radius: 0;
  background: #0a1824;
  color: var(--blue);
  font-weight: 800;
  cursor: pointer;
}

.signature-box.signed {
  border-color: var(--green);
  color: var(--green);
  background: #0d2b22;
}

.empty-state {
  margin: 0;
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 0;
  color: var(--muted);
  background: #0a1118;
}

.checkin-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.checkin-status {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.status-chip {
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 10px;
  background: #0a1118;
  box-shadow: inset 3px 0 0 var(--line-bright);
}

.status-chip span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.checkin-form {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.checkin-type-control {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.checkin-type-control label {
  cursor: pointer;
}

.checkin-type-control input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.checkin-type-control span {
  display: grid;
  min-height: 40px;
  place-items: center;
  border: 1px solid var(--line);
  background: #0a1118;
  color: var(--muted);
  font-weight: 800;
}

.checkin-type-control input:checked + span {
  border-color: var(--cyan);
  color: var(--cyan);
  background: #10232d;
}

.checkin-notes,
.survey-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
}

.checkin-notes textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 10px;
  color: var(--ink);
  background: #080d13;
  text-transform: none;
}

.survey-form {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  background: #0a1118;
}

.compact-heading {
  margin-bottom: 12px;
}

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

.survey-grid select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--cyan) 50%), linear-gradient(135deg, var(--cyan) 50%, transparent 50%);
  background-position: calc(100% - 16px) 17px, calc(100% - 10px) 17px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.checkin-message {
  min-height: 20px;
  margin: 12px 0 0;
  color: var(--green);
  font-size: 0.84rem;
}

.checkin-history {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.checkin-history h3 {
  margin-bottom: 10px;
  color: var(--purple);
  font-size: 0.9rem;
}

.checkin-history-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
  padding: 10px;
  border: 1px solid var(--line);
  background: #081018;
  margin-bottom: 8px;
}

.checkin-history-row div {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.checkin-history-row span {
  color: var(--muted);
}

.checkin-history-row p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
}

.attention-panel {
  padding: 20px;
  border-left: 1px solid var(--line);
  background: #0a1017;
  transition: width 180ms ease, padding 180ms ease, background-color 180ms ease;
}

.attention-header {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.attention-panel h2 {
  margin: 0;
  font-size: 1rem;
  color: var(--cyan);
}

.attention-toggle {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 0 9px;
  background: #111a24;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.attention-toggle:hover,
.attention-toggle:focus-visible {
  border-color: var(--cyan);
  color: var(--cyan);
}

.attention-panel.collapsed {
  padding: 10px 8px;
}

.attention-panel.collapsed .attention-header {
  min-height: 220px;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 10px;
}

.attention-panel.collapsed h2,
.attention-panel.collapsed .attention-toggle {
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

.attention-panel.collapsed #attention-list {
  display: none;
}

.attention-item {
  position: relative;
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 12px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #0f1720;
  box-shadow: inset 3px 0 0 var(--line-bright);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.attention-item.new::after {
  content: "";
  position: absolute;
  top: 9px;
  right: 9px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 12px rgba(255, 107, 107, 0.72);
}

.attention-item.new strong {
  padding-right: 16px;
}

.attention-item span {
  color: var(--muted);
  font-size: 0.84rem;
}

.attention-item:hover,
.attention-item:focus-visible {
  border-color: var(--cyan);
  background: #142231;
  outline: none;
}

.attention-item.danger {
  border-color: var(--red);
}

.attention-item.warning {
  border-color: var(--yellow);
}

.dev-panel {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 10;
  width: min(260px, calc(100vw - 36px));
  padding: 14px;
  border: 1px solid var(--line-bright);
  background: rgba(8, 13, 19, 0.96);
  box-shadow: inset 4px 0 0 var(--purple), 0 0 22px rgba(0, 0, 0, 0.35);
}

.dev-panel h2 {
  margin-bottom: 12px;
  color: var(--purple);
  font-size: 0.92rem;
}

.dev-panel label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.dev-panel select {
  min-height: 38px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 8px 10px;
  background: #080d13;
  color: var(--ink);
}

.dev-panel button {
  width: 100%;
  margin-top: 10px;
}

.signature-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(2, 6, 10, 0.9);
}

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

.signature-dialog {
  width: min(1040px, 100%);
  height: min(720px, calc(100vh - 36px));
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  border: 1px solid var(--line-bright);
  background: #080d13;
  box-shadow: inset 8px 0 0 var(--cyan), 0 0 40px rgba(0, 0, 0, 0.55);
}

.signature-header,
.signature-actions {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.signature-actions {
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.signature-header h2 {
  margin-bottom: 0;
  color: var(--cyan);
  font-size: 1.1rem;
}

.signature-disclosure {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: #0a1118;
}

.signature-disclosure strong {
  display: block;
  margin-bottom: 8px;
  color: var(--green);
}

.signature-disclosure p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

.rotate-hint {
  display: none;
  margin-top: 8px;
  color: var(--yellow) !important;
}

.signature-canvas-wrap {
  min-height: 0;
  padding: 14px;
}

#signature-canvas {
  width: 100%;
  height: 100%;
  display: block;
  border: 1px dashed var(--blue);
  background: #080d13;
  touch-action: none;
}

@media (max-width: 840px) {
  .app-shell {
    padding: 0;
  }

  .dashboard-modal {
    min-height: 100vh;
    border: 0;
    border-radius: 0;
  }

  .dashboard-header,
  .content-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-header {
    display: grid;
  }

  .header-meta {
    text-align: left;
  }

  .summary-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .context-bar,
  .add-panel-header {
    align-items: stretch;
    display: grid;
  }

  .add-panel-grid {
    grid-template-columns: 1fr;
  }

  .content-grid {
    display: block;
  }

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

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

  .map-toolbar,
  .map-tools {
    align-items: stretch;
    display: grid;
  }

  .map-tools {
    justify-content: stretch;
  }

  .map-zoom-controls {
    justify-content: space-between;
    width: 100%;
  }

  .map-zoom-button {
    width: 44px;
    height: 38px;
  }

  .map-canvas {
    max-height: 68vh;
    padding: 8px;
  }

  .community-map-svg {
    width: 900px;
    min-width: 900px;
  }

  .report-editor-layout {
    display: grid;
    grid-template-columns: 1fr;
  }

  .report-editor-main {
    margin-right: 0;
  }

  .report-survey-panel {
    position: static;
    width: auto;
    max-height: none;
    overflow: visible;
  }

  .survey-reference-list {
    overflow: visible;
  }

  .key-times-panel {
    position: static;
  }

  .attention-panel {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .community-trigger {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 12px 14px;
  }

  .timer {
    justify-self: stretch;
    text-align: left;
  }

  .details-grid,
  .checkin-status,
  .checkin-actions,
  .checkin-type-control,
  .survey-grid,
  .survey-review-grid,
  .issue-update-form,
  .issue-accordion-trigger,
  .receipt-trigger,
  .receipt-detail-grid,
  .receipt-return-header,
  .receipt-return-row,
  .receipt-form,
  .receipt-items-header,
  .receipt-item-row,
  .receipt-card {
    grid-template-columns: 1fr;
  }

  .activity-feed-item {
    grid-template-columns: 1fr;
  }

  .audit-note {
    width: 100%;
    margin-left: 0;
  }

  .section-heading {
    display: grid;
  }

  .row-meta,
  .receipt-meta {
    text-align: left;
    white-space: normal;
  }

  .dev-panel {
    right: 10px;
    bottom: 10px;
  }
}

@media (max-width: 840px) and (orientation: landscape) {
  .signature-modal {
    padding: 0;
  }

  .signature-dialog {
    width: 100vw;
    height: 100vh;
    border: 0;
  }

  .signature-header,
  .signature-actions {
    padding: 8px 10px;
  }

  .signature-disclosure {
    padding: 8px 10px;
  }

  .signature-canvas-wrap {
    padding: 8px 10px;
  }
}

@media (max-width: 840px) and (orientation: portrait) {
  .signature-modal {
    padding: 0;
  }

  .signature-dialog {
    width: 100vw;
    height: 100vh;
    border: 0;
  }

  .rotate-hint {
    display: block;
  }
}
