:root {
  --canvas: #faf9f5;
  --surface: #ffffff;
  --surface-muted: #f4f2ed;
  --surface-strong: #ece9e2;
  --ink: #1e2925;
  --ink-soft: #3f4b47;
  --muted: #6e7773;
  --line: #e5e2da;
  --line-strong: #d2cec4;
  --petrol: #176955;
  --petrol-dark: #115141;
  --petrol-soft: #e2f0ea;
  --petrol-pale: #f0f7f4;
  --amber: #9c6425;
  --amber-soft: #f5e9d6;
  --danger: #983f3b;
  --danger-soft: #f5e2df;
  --white: #ffffff;
  --sidebar-width: 240px;
  --content-max: 1480px;
  --radius-xl: 16px;
  --radius-lg: 12px;
  --radius-md: 8px;
  --radius-sm: 6px;
  --shadow-soft: 0 1px 2px rgba(20, 24, 22, .04), 0 1px 1px rgba(20, 24, 22, .02);
  --shadow-hover: 0 4px 14px rgba(20, 24, 22, .08);
  --sans: "Avenir Next", Avenir, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: var(--sans);
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button { color: inherit; }

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(21, 87, 77, .38);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  transform: translateY(-160%);
  padding: 10px 15px;
  border-radius: var(--radius-sm);
  color: var(--white);
  background: var(--petrol-dark);
  font-weight: 700;
  text-decoration: none;
  box-shadow: var(--shadow-hover);
}

.skip-link:focus { transform: translateY(0); }

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

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 80;
  display: flex;
  width: var(--sidebar-width);
  flex-direction: column;
  overflow-y: auto;
  color: var(--ink);
  background: var(--surface-muted);
  border-right: 1px solid var(--line);
}

.sidebar-heading {
  position: relative;
  padding: 20px 20px 16px;
}

.company-name {
  max-width: 185px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: .08em;
}

.product-name {
  margin: 10px 0 0;
  font-family: var(--sans);
  font-size: 21px;
  font-weight: 650;
  line-height: 1.05;
  letter-spacing: -.025em;
}

.product-caption {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.sidebar-close {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink-soft);
  background: var(--surface);
}

.sidebar-close svg,
.menu-button svg,
.nav-icon {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.75;
}

.sidebar-close svg { width: 19px; height: 19px; }

.main-nav {
  display: grid;
  gap: 13px;
  padding: 6px 8px 18px;
}

.nav-group { display: grid; gap: 5px; }

.nav-group-label {
  margin: 0;
  padding: 0 12px 4px;
  color: #8b938f;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .055em;
}

.nav-item {
  position: relative;
  display: grid;
  grid-template-columns: 20px 1fr;
  align-items: center;
  gap: 12px;
  min-height: 40px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--radius-sm);
  color: var(--ink-soft);
  background: transparent;
  font-size: 13.5px;
  font-weight: 500;
  text-align: left;
  transition: color 180ms ease, background 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.nav-icon { width: 18px; height: 18px; color: var(--muted); }

.nav-item:hover {
  color: var(--ink);
  background: var(--surface-strong);
}

.nav-item.active {
  color: var(--ink);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  font-weight: 600;
}

.nav-item.active .nav-icon { color: var(--petrol); stroke-width: 2; }

.sidebar-note {
  display: grid;
  gap: 6px;
  margin: auto 12px 12px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--muted);
  background: var(--surface);
  font-size: 11px;
}

.demo-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
}

.demo-status i,
.demo-chip i,
.mobile-demo-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #4f9a73;
  box-shadow: 0 0 0 4px rgba(79, 154, 115, .13);
}

.sidebar-scrim { display: none; }

.content-column {
  min-height: 100vh;
  margin-left: var(--sidebar-width);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  min-height: 60px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px 28px;
  border-bottom: 1px solid rgba(217, 213, 202, .85);
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(14px);
}

.topbar-context {
  display: flex;
  align-items: center;
  gap: 9px;
}

.topbar-label,
.topbar-title { margin: 0; }

.topbar-label { color: var(--muted); font-size: 12px; }
.topbar-separator { color: var(--line-strong); }
.topbar-title { font-size: 13px; font-weight: 750; }

.topbar-meta {
  display: flex;
  align-items: center;
  gap: 15px;
  color: var(--muted);
  font-size: 11px;
}

.demo-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border: 1px solid #cddbd6;
  border-radius: 999px;
  color: var(--petrol-dark);
  background: var(--petrol-pale);
  font-size: 11px;
  font-weight: 700;
}

.demo-chip i { width: 7px; height: 7px; box-shadow: none; }

.mobile-header { display: none; }

main {
  width: min(100%, var(--content-max));
  margin: 0 auto;
  padding: 28px 28px 70px;
}

.view[hidden] { display: none; }

.view.active { animation: view-in 220ms ease-out both; }

@keyframes view-in {
  from { opacity: 0; transform: translateY(9px); }
  to { opacity: 1; transform: none; }
}

.page-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 22px;
}

.intro-header { align-items: start; }

.eyebrow,
.panel-index {
  margin: 0;
  color: var(--petrol);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .025em;
}

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

h1 {
  max-width: 780px;
  margin: 7px 0 9px;
  font-family: var(--sans);
  font-size: clamp(30px, 3.2vw, 34px);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -.025em;
}

.page-lead {
  max-width: 650px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 16px;
}

.primary-button,
.secondary-button,
.ghost-button {
  min-height: 40px;
  padding: 8px 13px;
  border: 1px solid var(--petrol);
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.primary-button,
.secondary-button {
  color: var(--white);
  background: var(--petrol);
  box-shadow: none;
}

.primary-button:hover,
.secondary-button:hover {
  border-color: var(--petrol-dark);
  background: var(--petrol-dark);
  box-shadow: var(--shadow-soft);
}

.ghost-button {
  color: var(--petrol-dark);
  background: transparent;
}

.ghost-button:hover { background: var(--petrol-pale); }
.primary-button:active, .secondary-button:active, .ghost-button:active { transform: translateY(1px); }

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 254, 250, .82);
  box-shadow: none;
}

.field {
  display: grid;
  min-width: 180px;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.field input,
.field select {
  width: 100%;
  min-height: 39px;
  padding: 9px 35px 9px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  color: var(--ink);
  background-color: var(--surface);
  font-size: 13px;
  font-weight: 550;
  letter-spacing: normal;
  text-transform: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.field input:hover,
.field select:hover { border-color: #9fa9a4; }

.field input:focus,
.field select:focus {
  border-color: var(--petrol);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(21, 87, 77, .08);
}

.field-disabled { opacity: .62; }
.field-disabled input { cursor: not-allowed; background: var(--surface-muted); }

.field input { padding-right: 12px; cursor: text; }
.compact-field { min-width: 190px; }

.metric-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.metric {
  position: relative;
  min-height: 122px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: none;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.metric::after {
  content: "";
  position: absolute;
  top: 18px;
  right: 18px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--petrol-soft);
  box-shadow: none;
}

.metric:hover {
  border-color: #c8d6d0;
  box-shadow: var(--shadow-soft);
}

.metric-label {
  display: block;
  min-height: 24px;
  padding-right: 22px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.metric strong {
  display: block;
  margin-top: 12px;
  font-family: var(--sans);
  font-size: clamp(25px, 2.8vw, 34px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.035em;
}

.metric small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
}

.module-overview { margin-bottom: 24px; }

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
  padding: 0 2px;
}

.section-heading h2 {
  margin: 3px 0 0;
  font-family: var(--sans);
  font-size: 19px;
  line-height: 1.15;
  letter-spacing: -.025em;
}

.section-heading > span { color: var(--muted); font-size: 11px; }

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

.unit-row {
  position: relative;
  display: grid;
  min-height: 166px;
  align-content: space-between;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  color: var(--ink);
  background: var(--surface);
  box-shadow: none;
  text-align: left;
  transition: transform 190ms ease, box-shadow 190ms ease, border-color 190ms ease;
}

.unit-row:first-child {
  border-color: #cbded6;
  color: var(--ink);
  background: var(--petrol-pale);
}

.unit-row:hover {
  border-color: #bfd0c9;
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.unit-card-top,
.unit-card-bottom {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.unit-card-meta {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.unit-card-copy { position: relative; z-index: 1; }

.module-card-icon {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: var(--petrol);
  background: var(--petrol-soft);
}

.unit-row:first-child .module-card-icon {
  color: var(--petrol);
  background: var(--petrol-soft);
}

.module-card-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.75;
}

.unit-number {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.unit-row:first-child .unit-number { color: var(--muted); }

.unit-row .unit-card-copy strong {
  display: block;
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -.025em;
}

.unit-row .unit-card-copy small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
}

.unit-row:first-child .unit-card-copy small { color: var(--muted); }

.unit-value {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 650;
}

.unit-row:first-child .unit-value { color: var(--ink-soft); }

.module-card-arrow {
  display: inline-flex;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--petrol);
  background: var(--surface);
  transition: transform 180ms ease;
}

.module-card-arrow svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.unit-row:first-child .module-card-arrow {
  border-color: var(--line);
  color: var(--petrol);
  background: var(--surface);
}

.unit-row:hover .module-card-arrow { transform: translateX(3px); }

.summary-grid,
.two-column-detail,
.farm-workspace {
  display: grid;
  grid-template-columns: minmax(280px, .78fr) minmax(0, 1.45fr);
  gap: 18px;
  margin-bottom: 22px;
}

.two-column-detail,
.farm-workspace {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 18px;
}

.ledger-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: none;
}

.panel-header {
  display: flex;
  min-height: 73px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 19px;
  border-bottom: 1px solid var(--line);
}

.panel-header h2 {
  margin: 3px 0 0;
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -.02em;
}

.panel-header > span,
.room-legend { color: var(--muted); font-size: 11px; }

.status-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--petrol-dark);
  background: var(--petrol-soft);
  white-space: nowrap;
  font-size: 11px;
  font-weight: 750;
}

.status-label::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4f9a73;
}

.status-label.attention {
  color: #754919;
  background: var(--amber-soft);
}

.status-label.attention::before { background: #c58236; }
.unit-row:first-child .status-label { color: var(--petrol-dark); background: var(--petrol-soft); }
.unit-row:first-child .status-label::before { background: #4f9a73; }

.attention-list { margin: 0; padding: 0; list-style: none; }

.attention-item {
  display: grid;
  grid-template-columns: 29px 1fr;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.attention-item:last-child { border-bottom: 0; }

.attention-item > span {
  display: inline-flex;
  width: 27px;
  height: 27px;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  color: var(--amber);
  background: var(--amber-soft);
  font-size: 11px;
  font-weight: 750;
}

.attention-item strong { display: block; font-size: 12px; }
.attention-item p { margin: 4px 0 0; color: var(--ink-soft); font-size: 11px; line-height: 1.5; }

.activity-panel { margin-bottom: 0; }

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

.activity-item {
  position: relative;
  min-height: 112px;
  padding: 18px 18px 18px 34px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.activity-item:nth-child(2n) { border-right: 0; }
.activity-item:nth-last-child(-n+2) { border-bottom: 0; }

.activity-item::before {
  content: "";
  position: absolute;
  top: 23px;
  left: 18px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--petrol);
  box-shadow: 0 0 0 4px var(--petrol-soft);
}

.activity-item time { color: var(--muted); font-size: 11px; }
.activity-item strong { display: block; margin-top: 13px; font-size: 12px; }
.activity-item span { display: block; margin-top: 4px; color: var(--ink-soft); font-size: 11px; }

.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

th {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-strong);
  color: var(--muted);
  background: #f6f3ec;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .025em;
}

td {
  padding: 14px;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  vertical-align: middle;
}

tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background 140ms ease; }
tbody tr:hover { background: var(--petrol-pale); }
td strong { display: block; font-size: 11px; }
td small { display: block; margin-top: 3px; color: var(--ink-soft); font-size: 11px; }
.negative { color: var(--danger); font-weight: 800; }
.empty-row td { padding: 34px; color: var(--muted); text-align: center; }

.bar-list { padding: 7px 18px 14px; }
.bar-row { padding: 14px 0; border-bottom: 1px solid var(--line); }
.bar-row:last-child { border-bottom: 0; }
.bar-meta { display: flex; justify-content: space-between; gap: 20px; font-size: 11px; }
.bar-meta strong { font-size: 11px; }
.bar-track { height: 7px; margin-top: 10px; overflow: hidden; border-radius: 999px; background: var(--surface-muted); }
.bar-track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--petrol), #4f8c7e); transition: width 440ms cubic-bezier(.2, .8, .2, 1); }

.room-legend { display: flex; flex-wrap: wrap; gap: 12px; }
.room-legend span { display: inline-flex; align-items: center; gap: 6px; }
.room-legend i { width: 9px; height: 9px; border: 1px solid var(--line-strong); border-radius: 50%; background: var(--surface); }
.room-legend i.available { border-color: #6f9d89; background: #9fcbb7; }
.room-legend i.occupied { border-color: var(--petrol-dark); background: var(--petrol); }
.room-legend i.cleaning { border-color: #d1a26b; background: #e8c794; }

.room-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(105px, 1fr));
  gap: 10px;
  padding: 16px;
}

.room {
  position: relative;
  min-height: 126px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  text-align: left;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.room:hover { border-color: #aebdb7; box-shadow: 0 12px 28px rgba(31, 45, 39, .08); transform: translateY(-2px); }
.room.available { background: linear-gradient(145deg, var(--surface), var(--petrol-pale)); }
.room.occupied { border-color: var(--petrol); color: var(--white); background: var(--petrol); }
.room.cleaning { border-color: #e1c59f; background: var(--amber-soft); }
.room strong { display: block; font-family: var(--serif); font-size: 25px; font-weight: 600; }
.room span { display: block; margin-top: 29px; font-size: 11px; font-weight: 750; }
.room small { display: block; margin-top: 4px; color: var(--ink-soft); font-size: 11px; }
.room.occupied small { color: rgba(255, 255, 255, .84); }

.compact-list,
.inventory-list { display: grid; }

.compact-item,
.inventory-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 68px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
  transition: background 140ms ease;
}

.compact-item:hover,
.inventory-item:hover { background: var(--petrol-pale); }
.compact-item:last-child,
.inventory-item:last-child { border-bottom: 0; }
.compact-item strong,
.inventory-item strong { display: block; font-size: 11px; }
.compact-item span,
.inventory-item span { display: block; margin-top: 4px; color: var(--ink-soft); font-size: 11px; }
.compact-item > strong,
.inventory-item > strong { color: var(--ink-soft); font-size: 11px; }
.empty-state { padding: 30px 18px; color: var(--muted); font-size: 11px; text-align: center; }

.form-panel { min-height: 100%; }

.stacked-form {
  display: grid;
  gap: 15px;
  padding: 19px;
}

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

.form-row.three-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stacked-form .field { min-width: 0; }
.stacked-form .secondary-button { justify-self: start; }

.evidence-control {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 11px;
  padding: 12px;
  border: 1px dashed #aabbb4;
  border-radius: var(--radius-md);
  background: var(--petrol-pale);
}

.evidence-control span { color: var(--ink-soft); font-size: 11px; }

.report-cover {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-bottom: 20px;
  overflow: hidden;
  padding: 36px;
  border-radius: var(--radius-xl);
  color: var(--white);
  background:
    radial-gradient(circle at 88% 20%, rgba(255, 255, 255, .13), transparent 16rem),
    linear-gradient(135deg, var(--petrol-dark), var(--petrol));
  box-shadow: 0 22px 55px rgba(21, 87, 77, .19);
}

.report-cover::after {
  content: "";
  position: absolute;
  right: -80px;
  bottom: -130px;
  width: 300px;
  height: 300px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 50%;
}

.report-code {
  grid-column: 1 / -1;
  margin-bottom: 48px;
  color: rgba(255, 255, 255, .76);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
}

.report-cover h2 {
  position: relative;
  z-index: 1;
  max-width: 700px;
  margin: 0;
  font-family: var(--sans);
  font-size: clamp(28px, 3.2vw, 36px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.035em;
}

.report-cover > p:not(.report-code) {
  grid-column: 1;
  max-width: 620px;
  margin: 13px 0 0;
  color: rgba(255, 255, 255, .82);
  font-size: 12px;
}

.report-total {
  position: relative;
  z-index: 1;
  grid-column: 2;
  grid-row: 2 / span 2;
  align-self: end;
  min-width: 150px;
  text-align: right;
}

.report-total span { display: block; color: rgba(255, 255, 255, .78); font-size: 11px; }
.report-total strong { display: block; margin-top: 7px; font-family: var(--sans); font-size: 40px; font-weight: 600; }

/* Operational workspaces */

.header-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px;
}

.search-field { flex: 1 1 270px; }

.module-tabs {
  display: flex;
  gap: 4px;
  margin: 0 0 18px;
  padding: 5px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-muted);
  scrollbar-width: none;
}

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

.module-tab {
  display: inline-flex;
  min-width: max-content;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border: 0;
  border-radius: var(--radius-md);
  color: var(--ink-soft);
  background: transparent;
  font-size: 12px;
  font-weight: 650;
  transition: color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.module-tab:hover { color: var(--ink); background: rgba(255, 255, 255, .58); }

.module-tab.active {
  color: var(--petrol-dark);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.tab-count {
  display: inline-flex;
  min-width: 22px;
  min-height: 22px;
  align-items: center;
  justify-content: center;
  padding: 2px 6px;
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface-strong);
  font-size: 11px;
  line-height: 1;
}

.module-tab.active .tab-count { color: var(--petrol-dark); background: var(--petrol-soft); }
.module-tab-panel.active { animation: view-in 210ms ease-out both; }

.data-note {
  display: flex;
  align-items: center;
  gap: 10px 16px;
  margin-bottom: 16px;
  padding: 13px 15px;
  border: 1px solid #d7dfda;
  border-radius: var(--radius-md);
  color: var(--ink-soft);
  background: var(--petrol-pale);
  font-size: 11px;
}

.data-note strong { color: var(--petrol-dark); }

/* Stations */

.station-branch-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.station-branch-card {
  position: relative;
  min-width: 0;
  padding: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.station-branch-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--petrol);
}

.station-branch-card.attention::before { background: var(--amber); }
.station-branch-card.ok::before { background: #4f9a73; }

.branch-card-top,
.tank-header,
.incident-header,
.inspector-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.branch-card-top strong,
.tank-header strong,
.incident-header strong {
  display: block;
  min-width: 0;
  font-size: 12px;
  line-height: 1.35;
}

.branch-card-top h3,
.tank-header h3,
.incident-header h3 {
  min-width: 0;
  margin: 0;
  font-size: 13px;
  line-height: 1.35;
}

.branch-status,
.inspector-state,
.booking-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  min-height: 25px;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--petrol-dark);
  background: var(--petrol-soft);
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}

.branch-status::before,
.inspector-state::before,
.booking-state::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: currentColor;
}

.station-branch-card.attention .branch-status {
  color: #754919;
  background: var(--amber-soft);
}

.branch-card-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.branch-card-metrics span,
.branch-card-metrics small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.branch-card-metrics strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 13px;
}

.station-analysis-grid { margin-top: 0; }
.trend-panel { margin-top: 18px; }
.station-branch-grid > .empty-state,
.tank-grid > .empty-state,
.incident-board > .empty-state,
.room-grid > .empty-state { grid-column: 1 / -1; }

.comparison-chart {
  display: grid;
  grid-template-columns: none;
  grid-auto-flow: column;
  grid-auto-columns: minmax(88px, 1fr);
  gap: 14px;
  min-height: 280px;
  align-items: end;
  overflow-x: auto;
  padding: 24px 20px 20px;
  background:
    linear-gradient(to top, rgba(229, 226, 218, .72) 1px, transparent 1px) 0 0 / 100% 25%,
    linear-gradient(180deg, rgba(240, 247, 244, .5), rgba(255, 255, 255, 0));
}

.comparison-column {
  display: grid;
  min-width: 0;
  height: 224px;
  grid-template-rows: auto minmax(110px, 1fr) auto;
  align-items: end;
  justify-items: center;
  gap: 6px;
}

.comparison-bar,
.report-chart-bar {
  width: min(56px, 68%);
  min-height: 6px;
  align-self: end;
  border-radius: 7px 7px 3px 3px;
  background: linear-gradient(180deg, #4c8f7c, var(--petrol));
  box-shadow: 0 8px 18px rgba(23, 105, 85, .12);
  transition: filter 160ms ease, transform 160ms ease;
}

.comparison-column:hover .comparison-bar,
.report-chart-item:hover .report-chart-bar { filter: saturate(1.15); transform: translateY(-2px); }

.comparison-label,
.report-chart-label {
  max-width: 100%;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.25;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.comparison-value,
.report-chart-value { color: var(--ink); font-size: 11px; font-weight: 750; }

.comparison-bar {
  display: flex;
  height: 100%;
  align-items: flex-end;
  overflow: hidden;
  background: var(--petrol-soft);
}

.comparison-bar > span {
  display: block;
  width: 100%;
  min-height: 8px;
  border-radius: inherit;
  background: linear-gradient(180deg, #4c8f7c, var(--petrol));
}

.tank-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(225px, 1fr));
  gap: 14px;
}

.tank-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.tank-card.attention { border-color: #dfc297; background: #fffaf2; }
.tank-header span { color: var(--muted); font-size: 11px; }

.tank-level {
  height: 12px;
  margin: 20px 0 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-muted);
}

.tank-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--petrol-dark), #5b9c89);
  transition: width 440ms cubic-bezier(.2, .8, .2, 1);
}

.tank-card.attention .tank-fill { background: linear-gradient(90deg, #a96525, #d9a45f); }

.tank-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 11px;
}

.tank-meta strong { color: var(--ink); font-size: 13px; }

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

.incident-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.incident-card.high { border-color: #e1bab3; background: #fffafa; }
.incident-card.resolved { background: var(--surface-muted); opacity: .82; }
.incident-card p { margin: 0; color: var(--ink-soft); font-size: 12px; }

.incident-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 14px;
  color: var(--muted);
  font-size: 11px;
}

.incident-actions,
.inspector-actions,
.booking-actions,
.housekeeping-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.incident-actions .ghost-button,
.inspector-actions .ghost-button,
.inspector-actions .secondary-button,
.booking-actions .ghost-button,
.housekeeping-actions .ghost-button {
  min-height: 35px;
  padding: 6px 10px;
  font-size: 11px;
}

/* Hotels */

.hotel-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 330px);
  align-items: start;
  gap: 18px;
  margin-bottom: 18px;
}

.room-board-panel { min-width: 0; }
.room-board-header { align-items: flex-start; }

.room-grid .floor-group { grid-column: 1 / -1; }
.floor-group + .floor-group { padding-top: 18px; border-top: 1px solid var(--line); }

.floor-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 10px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 750;
}

.floor-heading span { color: var(--muted); font-weight: 550; }

.floor-rooms {
  display: grid;
  grid-template-columns: repeat(4, minmax(112px, 1fr));
  gap: 10px;
}

.room {
  isolation: isolate;
  overflow: hidden;
}

.room::after {
  content: "";
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: -1;
  width: 9px;
  height: 9px;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: #79ac94;
  box-shadow: 0 0 0 1px #79ac94;
}

.room.available { border-color: #cfddd7; }
.room.reserved { border-color: #adc7d5; background: #eef6f8; }
.room.reserved::after { background: #5d8da5; box-shadow: 0 0 0 1px #5d8da5; }
.room.occupied::after { background: #fff; box-shadow: 0 0 0 1px rgba(255, 255, 255, .74); }
.room.cleaning::after { background: #c58236; box-shadow: 0 0 0 1px #c58236; }
.room.blocked { border-color: #d7d3cd; color: var(--ink-soft); background: #eceae6; }
.room.blocked::after { background: #777f7b; box-shadow: 0 0 0 1px #777f7b; }
.room.selected { border-color: var(--petrol); box-shadow: 0 0 0 3px rgba(23, 105, 85, .13), var(--shadow-hover); }
.room.reserved small,
.room.cleaning small,
.room.blocked small { color: var(--ink-soft); }

.room-legend i.reserved { border-color: #5d8da5; background: #8db4c7; }
.room-legend i.blocked { border-color: #777f7b; background: #a8adaa; }

.room-inspector {
  position: sticky;
  top: 78px;
  min-height: 278px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.inspector-empty {
  display: grid;
  min-height: 278px;
  place-content: center;
  gap: 8px;
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

.inspector-empty::before {
  content: "";
  width: 42px;
  height: 42px;
  margin: 0 auto 5px;
  border: 1px solid #bed1c9;
  border-radius: 13px;
  background:
    linear-gradient(90deg, transparent 47%, var(--petrol) 48% 52%, transparent 53%),
    linear-gradient(transparent 47%, var(--petrol) 48% 52%, transparent 53%),
    var(--petrol-pale);
}

.inspector-empty strong { color: var(--ink); font-size: 13px; }
.inspector-empty span,
.inspector-empty p { margin: 0; color: var(--muted); font-size: 11px; }

.inspector-head {
  padding: 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(145deg, var(--petrol-pale), var(--surface));
}

.inspector-head h2,
.inspector-head h3 { margin: 3px 0 0; font-size: 20px; line-height: 1.15; }
.inspector-head p { margin: 0; color: var(--muted); font-size: 11px; }

.inspector-state.reserved { color: #315f75; background: #e3f0f5; }
.inspector-state.occupied { color: var(--white); background: var(--petrol); }
.inspector-state.cleaning { color: #754919; background: var(--amber-soft); }
.inspector-state.blocked { color: #4f5753; background: var(--surface-strong); }

.inspector-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 8px 18px;
}

.inspector-details > div {
  min-width: 0;
  padding: 11px 8px 11px 0;
  border-bottom: 1px solid var(--line);
}

.inspector-details > div:nth-child(even) { padding-right: 0; padding-left: 8px; }
.inspector-details dt,
.inspector-details span { display: block; color: var(--muted); font-size: 11px; }
.inspector-details dd,
.inspector-details strong { display: block; margin: 3px 0 0; color: var(--ink); font-size: 12px; overflow-wrap: anywhere; }
.room-inspector .inspector-actions { padding: 15px 18px 18px; }

.hotel-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.booking-list,
.housekeeping-list { display: grid; }

.booking-item,
.housekeeping-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 15px;
  min-height: 76px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  transition: background 140ms ease;
}

.booking-item:hover,
.housekeeping-item:hover { background: var(--petrol-pale); }
.booking-item:last-child,
.housekeeping-item:last-child { border-bottom: 0; }
.booking-item strong,
.housekeeping-item strong { display: block; font-size: 12px; }
.booking-item small,
.booking-item p,
.housekeeping-item small,
.housekeeping-item p { display: block; margin: 4px 0 0; color: var(--ink-soft); font-size: 11px; }
.booking-state { margin-top: 7px; }

/* Reports */

.report-presets {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 11px;
  margin-bottom: 18px;
}

.report-preset {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  min-height: 82px;
  align-items: center;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  color: var(--ink-soft);
  background: var(--surface);
  text-align: left;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.report-preset:hover { border-color: #b9cec5; box-shadow: var(--shadow-hover); transform: translateY(-1px); }
.report-preset.active { border-color: #bed4cb; color: var(--petrol-dark); background: var(--petrol-pale); }

.preset-icon {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  color: var(--petrol-dark);
  background: var(--petrol-soft);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 750;
}

.report-preset strong { display: block; color: var(--ink); font-size: 12px; line-height: 1.25; }
.report-preset small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.3; }

.report-visual-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(380px, .95fr);
  gap: 18px;
  margin-bottom: 18px;
}

.report-visual-grid .report-cover { height: 100%; min-height: 340px; margin-bottom: 0; }
.report-chart-panel { min-width: 0; }
.report-chart {
  display: grid;
  min-height: 266px;
  grid-template-columns: 1fr;
  grid-auto-flow: row;
  grid-auto-rows: auto;
  align-content: center;
  gap: 18px;
  overflow: visible;
  padding: 24px;
}

.report-chart-item {
  display: grid;
  min-width: 0;
  height: auto;
  grid-template-columns: minmax(82px, 118px) minmax(0, 1fr);
  grid-template-rows: auto;
  align-items: center;
  justify-items: stretch;
  gap: 14px;
}

.report-chart-label {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  flex-direction: column;
  overflow: visible;
  text-align: left;
  text-overflow: clip;
  white-space: normal;
}

.report-chart-label strong {
  margin-top: 3px;
  color: var(--ink);
  font-size: 12px;
}

.report-chart-bar {
  display: block;
  width: 100%;
  height: 12px;
  min-height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--petrol-soft);
  box-shadow: none;
}

.report-chart-bar > span {
  display: block;
  height: 100%;
  min-width: 4px;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--petrol), #4c8f7c);
}

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

.report-alert {
  position: relative;
  min-height: 90px;
  padding: 15px 16px 15px 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.report-alert::before {
  content: "";
  position: absolute;
  top: 17px;
  left: 16px;
  width: 19px;
  height: 19px;
  border: 2px solid #5d9c84;
  border-radius: 50%;
  background: radial-gradient(circle, #5d9c84 0 3px, transparent 4px);
}

.report-alert.attention { border-color: #dfc49e; background: #fffaf2; }
.report-alert.attention::before { border-color: #b87831; background: radial-gradient(circle, #b87831 0 3px, transparent 4px); }
.report-alert.ok { border-color: #cee0d8; background: var(--petrol-pale); }
.report-alert strong { display: block; font-size: 12px; }
.report-alert p,
.report-alert span { display: block; margin: 4px 0 0; color: var(--ink-soft); font-size: 11px; line-height: 1.45; }

.payment-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
  margin: 13px 0;
}

textarea {
  width: 100%;
  min-height: 92px;
  resize: vertical;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  color: var(--ink);
  background: var(--surface);
  font-size: 13px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

textarea:focus { border-color: var(--petrol); box-shadow: 0 0 0 4px rgba(21, 87, 77, .08); }

.modal {
  width: min(680px, calc(100% - 30px));
  max-height: calc(100vh - 40px);
  margin: auto;
  padding: 0;
  overflow-y: auto;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-xl);
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 30px 100px rgba(10, 31, 26, .28);
}

.modal[open] { animation: modal-in 220ms ease both; }

@keyframes modal-in {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
  to { opacity: 1; transform: none; }
}

.modal::backdrop { background: rgba(13, 32, 27, .58); backdrop-filter: blur(4px); }
.modal form { padding: 26px; }
.modal-header { display: flex; align-items: start; justify-content: space-between; gap: 20px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.modal-header h2 { margin: 4px 0 0; font-family: var(--sans); font-size: 22px; font-weight: 600; }
.modal-close { width: 41px; height: 41px; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); background: var(--surface); font-size: 24px; line-height: 1; }
.modal-close:hover { color: var(--white); border-color: var(--petrol); background: var(--petrol); }
.modal-intro { margin: 16px 0; color: var(--muted); font-size: 11px; }
.modal .form-row { margin-bottom: 13px; }
.modal > form > .field { margin-bottom: 13px; }
.calculation-line { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 18px; padding: 16px; border-radius: var(--radius-md); background: var(--canvas); font-size: 11px; }
.calculation-line strong { font-size: 13px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 19px; }

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 140;
  display: grid;
  width: min(370px, calc(100% - 44px));
  gap: 4px;
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: var(--radius-md);
  color: var(--white);
  background: var(--petrol-dark);
  box-shadow: 0 18px 48px rgba(13, 64, 57, .28);
  opacity: 0;
  transform: translateY(16px) scale(.98);
  pointer-events: none;
  transition: opacity 190ms ease, transform 190ms ease;
}

.toast.show { opacity: 1; transform: none; }
.toast strong { font-size: 12px; }
.toast span { color: rgba(255, 255, 255, .78); font-size: 11px; }

@media (max-width: 1180px) {
  .metric-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .unit-ledger { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .unit-row:first-child { grid-column: 1 / -1; min-height: 174px; }
  .summary-grid { grid-template-columns: 1fr; }
  .activity-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .activity-item { border-right: 1px solid var(--line); border-bottom: 0; }
  .activity-item:nth-child(2n) { border-right: 1px solid var(--line); }
  .activity-item:last-child { border-right: 0; }
  .room-grid { grid-template-columns: repeat(4, minmax(100px, 1fr)); }
  .station-branch-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .floor-rooms { grid-template-columns: repeat(3, minmax(105px, 1fr)); }
  .report-presets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-alerts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 880px) {
  .sidebar {
    width: min(88vw, 336px);
    transform: translateX(-105%);
    box-shadow: 25px 0 70px rgba(10, 31, 26, .22);
    transition: transform 210ms cubic-bezier(.2, .8, .2, 1);
  }

  body.sidebar-open { overflow: hidden; }
  body.sidebar-open .sidebar { transform: translateX(0); }
  .sidebar-heading { padding-right: 68px; }
  .sidebar-close { position: absolute; top: 24px; right: 18px; display: inline-flex; }
  .sidebar-scrim { position: fixed; inset: 0; z-index: 70; display: block; border: 0; background: rgba(13, 32, 27, .48); opacity: 0; pointer-events: none; transition: opacity 190ms ease; backdrop-filter: blur(2px); }
  body.sidebar-open .sidebar-scrim { opacity: 1; pointer-events: auto; }
  .content-column { margin-left: 0; }
  .topbar { display: none; }

  .mobile-header {
    position: sticky;
    top: 0;
    z-index: 50;
    display: grid;
    grid-template-columns: auto 1fr auto;
    min-height: 64px;
    align-items: center;
    gap: 14px;
    padding: 10px 16px;
    border-bottom: 1px solid rgba(217, 213, 202, .85);
    background: rgba(244, 241, 233, .92);
    backdrop-filter: blur(16px);
  }

  .menu-button {
    display: inline-flex;
    min-height: 41px;
    align-items: center;
    gap: 8px;
    padding: 8px 11px;
    border: 1px solid var(--line-strong);
    border-radius: 11px;
    background: var(--surface);
    font-size: 11px;
    font-weight: 700;
  }

  .menu-button svg { width: 18px; height: 18px; }
  .mobile-header > strong { font-family: var(--sans); font-size: 16px; font-weight: 600; text-align: center; }
  .mobile-demo-dot { display: block; margin-right: 5px; }
  main { padding: 36px 20px 65px; }
  .page-header { align-items: start; }
  .two-column-detail, .farm-workspace { grid-template-columns: 1fr; }
  .activity-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .activity-item { border-bottom: 1px solid var(--line); }
  .activity-item:nth-child(2n) { border-right: 0; }
  .activity-item:nth-last-child(-n+2) { border-bottom: 0; }
  .room-grid { grid-template-columns: repeat(3, minmax(96px, 1fr)); }
  .station-branch-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hotel-workspace { grid-template-columns: 1fr; }
  .room-inspector { position: static; min-height: 0; }
  .inspector-empty { min-height: 190px; }
  .hotel-detail-grid { grid-template-columns: 1fr; }
  .report-visual-grid { grid-template-columns: 1fr; }
  .report-visual-grid .report-cover { min-height: 310px; }
  .report-alerts { grid-template-columns: 1fr; }
  .payment-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  main { padding: 29px 14px 58px; }
  h1 { font-size: 30px; }
  .page-header, .intro-header { display: grid; gap: 18px; }
  .page-header .primary-button { width: 100%; }
  .header-actions { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .header-actions .primary-button,
  .header-actions .ghost-button { width: 100%; }
  .compact-field { width: 100%; }
  .filter-bar { display: grid; grid-template-columns: 1fr; border-radius: var(--radius-md); }
  .field { min-width: 0; }
  .metric-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .metric { min-height: 122px; padding: 17px; border-radius: var(--radius-md); }
  .metric strong { font-size: clamp(25px, 8vw, 32px); }
  .metric small { font-size: 11px; }
  .section-heading { align-items: start; }
  .section-heading > span { padding-top: 5px; text-align: right; }
  .unit-ledger { grid-template-columns: 1fr; gap: 11px; }
  .unit-row, .unit-row:first-child { grid-column: auto; min-height: 174px; border-radius: var(--radius-lg); }
  .panel-header { align-items: start; }
  .panel-header > span { padding-top: 3px; text-align: right; }
  .activity-grid { grid-template-columns: 1fr; }
  .activity-item { min-height: 94px; border-right: 0; border-bottom: 1px solid var(--line); }
  .activity-item:nth-child(2n) { border-right: 0; }
  .activity-item:nth-last-child(-n+2) { border-bottom: 1px solid var(--line); }
  .activity-item:last-child { border-bottom: 0; }
  .room-legend { display: grid; gap: 4px; }
  .room-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 12px; }
  .room-board-header { display: grid; }
  .room-board-header .room-legend { padding-top: 0; text-align: left; }
  .floor-rooms { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .room { min-height: 112px; }
  .hotel-detail-grid { gap: 12px; }
  .booking-item,
  .housekeeping-item { grid-template-columns: 1fr; align-items: start; }
  .booking-actions,
  .housekeeping-actions { justify-content: flex-start; }
  .form-row, .form-row.three-fields { grid-template-columns: 1fr; }
  .payment-form-grid { grid-template-columns: 1fr; }
  .module-tabs { margin-inline: -1px; }
  .module-tab { flex: 1 0 auto; padding-inline: 13px; }
  .station-branch-grid { gap: 10px; }
  .incident-board { grid-template-columns: 1fr; }
  .comparison-chart { padding-inline: 14px; }
  .tank-grid { grid-template-columns: 1fr; }
  .data-note { display: grid; }
  .report-presets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-preset { grid-template-columns: 34px minmax(0, 1fr); min-height: 78px; padding: 11px; }
  .preset-icon { width: 34px; height: 34px; }
  .report-cover { grid-template-columns: 1fr; padding: 27px; }
  .report-code { margin-bottom: 35px; }
  .report-total { grid-column: 1; grid-row: auto; margin-top: 30px; text-align: left; }
  .report-cover > p:not(.report-code) { grid-column: 1; }
  .modal form { padding: 19px; }
  .modal-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .modal-actions button { width: 100%; }
  .updated-at { display: none; }

  .table-wrap { overflow: visible; }
  .table-wrap table, .table-wrap thead, .table-wrap tbody, .table-wrap tr, .table-wrap td { display: block; }
  .table-wrap thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table-wrap tr { padding: 12px 15px; border-bottom: 1px solid var(--line-strong); }
  .table-wrap tr:last-child { border-bottom: 0; }
  .table-wrap td { display: grid; grid-template-columns: minmax(98px, .72fr) 1fr; gap: 12px; padding: 7px 0; border: 0; }
  .table-wrap td::before { content: attr(data-label); color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .025em; }
  .table-wrap .empty-row td { display: block; padding: 25px 0; text-align: center; }
  .table-wrap .empty-row td::before { content: none; }
}

@media (max-width: 410px) {
  .metric-strip { grid-template-columns: 1fr; }
  .metric { min-height: 108px; }
  .mobile-header { padding-inline: 11px; }
  .menu-button span { display: none; }
  .menu-button { width: 41px; justify-content: center; padding: 0; }
  .station-branch-grid { grid-template-columns: 1fr; }
  .header-actions { grid-template-columns: 1fr; }
  .floor-rooms { grid-template-columns: 1fr 1fr; gap: 8px; }
  .room { padding: 13px; }
  .room strong { font-size: 22px; }
  .inspector-details { grid-template-columns: 1fr; }
  .inspector-details > div,
  .inspector-details > div:nth-child(even) { padding-inline: 0; }
  .report-presets { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
