:root {
  color-scheme: light;
  --bg: #f4f7f4;
  --bg-warm: #fbfaf7;
  --panel: #ffffff;
  --panel-soft: #fbfcfa;
  --ink: #18212a;
  --muted: #657381;
  --line: #d9e1e6;
  --line-soft: #edf1f3;
  --brand: #236b84;
  --brand-dark: #16495b;
  --brand-soft: #e4f2f5;
  --accent: #b9842f;
  --accent-soft: #f7eddc;
  --good: #287a59;
  --good-bg: #e6f3ed;
  --warn: #a36521;
  --warn-bg: #f9eddc;
  --bad: #b74236;
  --shadow: 0 14px 36px rgba(23, 35, 45, 0.08);
  --shadow-soft: 0 8px 22px rgba(23, 35, 45, 0.06);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(228, 242, 245, 0.72) 0, rgba(244, 247, 244, 0) 280px),
    var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.45;
}

a { color: var(--brand); }

.topbar {
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar-inner,
.page {
  margin: 0 auto;
  max-width: min(1760px, calc(100vw - 48px));
  padding: 0 24px;
}

.topbar-inner {
  align-items: center;
  display: flex;
  gap: 26px;
  min-height: 62px;
}

.brand {
  align-items: center;
  color: var(--ink);
  display: inline-flex;
  gap: 10px;
  font-size: 1.05rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  align-items: center;
  background: linear-gradient(135deg, var(--brand), #2c7d68);
  border-radius: 10px;
  box-shadow: 0 6px 16px rgba(35, 107, 132, 0.22);
  color: #fff;
  display: inline-flex;
  font-size: 0.75rem;
  font-weight: 800;
  height: 30px;
  justify-content: center;
  width: 30px;
}

.nav {
  align-items: center;
  display: flex;
  flex: 1;
  gap: 8px;
}

.nav a,
.nav button {
  background: none;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  border-radius: 999px;
  padding: 7px 11px;
  text-decoration: none;
}

.nav a:hover,
.nav button:hover {
  background: var(--panel-soft);
  color: var(--brand-dark);
}

.nav a.active {
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-weight: 700;
}

.nav .right { margin-left: auto; }
.nav-user { margin-left: auto; }
.logout-form { margin: 0; }

.nav-toggle {
  background: none;
  border: 0;
  box-shadow: none;
  color: var(--ink);
  cursor: pointer;
  display: none;
  padding: 8px;
}

.page { padding-bottom: 56px; }

.welcome-shell {
  min-height: calc(100vh - 118px);
  padding: 58px 0 36px;
}

.welcome-hero {
  align-items: center;
  display: grid;
  gap: 38px;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.65fr);
}

.welcome-copy {
  max-width: 720px;
}

.welcome-copy h1 {
  font-size: 4rem;
  line-height: 0.98;
  margin-bottom: 18px;
  max-width: 760px;
}

.welcome-lede {
  color: var(--muted);
  font-size: 1.16rem;
  line-height: 1.55;
  margin: 0;
  max-width: 590px;
}

.welcome-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.welcome-login {
  font-size: 1rem;
  padding: 11px 16px;
}

.welcome-panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(251, 252, 250, 0.94));
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 18px;
}

.welcome-panel-header {
  align-items: center;
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  font-weight: 800;
  justify-content: space-between;
  margin-bottom: 6px;
  padding-bottom: 14px;
}

.welcome-row {
  border-bottom: 1px solid var(--line-soft);
  display: grid;
  gap: 4px;
  padding: 14px 0;
}

.welcome-row:last-child {
  border-bottom: 0;
  padding-bottom: 2px;
}

.welcome-row span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.page-header {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 34px 0 20px;
}

h1 {
  font-size: 1.75rem;
  letter-spacing: 0;
  line-height: 1.15;
  margin: 0;
}
h2 { font-size: 1.15rem; margin: 0 0 14px; }
h3 { font-size: 1rem; margin: 0 0 10px; }

.eyebrow {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin: 0 0 6px;
  text-transform: uppercase;
}

.page-lede {
  color: var(--muted);
  font-size: 0.98rem;
  margin: 6px 0 0;
  max-width: 680px;
}

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

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

.section-title .muted {
  margin: 4px 0 0;
}

.count-pill {
  background: #eaf1f7;
  border-radius: 999px;
  color: var(--brand-dark);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 4px 9px;
}

.button,
button,
input[type="submit"] {
  background: var(--brand);
  border: 1px solid var(--brand);
  border-radius: 8px;
  box-shadow: 0 6px 14px rgba(35, 107, 132, 0.16);
  color: #fff;
  cursor: pointer;
  display: inline-block;
  font: inherit;
  font-weight: 700;
  padding: 8px 12px;
  text-decoration: none;
}

.button:hover,
button:hover,
input[type="submit"]:hover {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
}

.button.secondary,
button.secondary {
  background: #fff;
  box-shadow: none;
  color: var(--brand);
}

.button.secondary:hover,
button.secondary:hover {
  background: var(--brand-soft);
}

.panel {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-soft);
  margin-bottom: 20px;
  padding: 18px;
}

.panel.narrow {
  max-width: 760px;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }

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

.metric {
  background: linear-gradient(180deg, #fff, var(--panel-soft));
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-soft);
  padding: 15px 16px;
}

.metric strong {
  display: block;
  font-size: 1.45rem;
  line-height: 1.1;
}

.metric span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

label {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  margin: 0 0 6px;
}

input,
select,
textarea {
  border: 1px solid #c7d2df;
  border-radius: 9px;
  font: inherit;
  padding: 8px 10px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  width: 100%;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(35, 107, 132, 0.14);
  outline: none;
}

input[type="checkbox"] {
  width: auto;
}

textarea { min-height: 130px; resize: vertical; }

.field { margin-bottom: 14px; }
.muted { color: var(--muted); }
.sr-only {
  height: 1px;
  margin: -1px;
  overflow: hidden;
  position: absolute;
  width: 1px;
}

.empty-state {
  align-items: flex-start;
  background: var(--panel-soft);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  display: flex;
  gap: 14px;
  padding: 16px;
}

.empty-state h2 {
  margin-bottom: 6px;
}

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

.status-dot {
  border-radius: 999px;
  flex: 0 0 auto;
  height: 14px;
  margin-top: 4px;
  width: 14px;
}

.status-dot.good {
  background: var(--good);
  box-shadow: 0 0 0 5px var(--good-bg);
}

.status-dot.warning {
  background: var(--warn);
  box-shadow: 0 0 0 5px var(--warn-bg);
}

.stack-list {
  margin: 18px 0;
  padding-left: 20px;
}

.inline-form,
.add-row,
.edit-row {
  align-items: center;
  display: grid;
  gap: 10px;
}

.inline-form {
  grid-template-columns: minmax(220px, 1fr) auto;
}

.edit-list {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.edit-row {
  border-bottom: 1px solid var(--line);
  grid-template-columns: minmax(90px, 0.8fr) minmax(150px, 1.5fr) 110px auto;
  padding: 10px;
}

.edit-row:last-child {
  border-bottom: 0;
}

.edit-row.category {
  grid-template-columns: minmax(180px, 1fr) 110px auto;
}

.edit-row.room {
  grid-template-columns: minmax(110px, 0.6fr) minmax(180px, 1fr) 110px auto;
}

.user-add-row {
  align-items: center;
  display: grid;
  gap: 10px;
}

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

.user-card {
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.user-main {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(180px, 1fr) minmax(220px, 1.2fr) 170px;
}

.user-access {
  align-items: end;
  border-top: 1px solid var(--line-soft);
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding-top: 12px;
}

.compact-field {
  margin-bottom: 0;
}

.mini-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.user-add-row {
  grid-template-columns: minmax(150px, 1fr) minmax(220px, 1.2fr) 150px 130px auto;
}

.edit-row.heading {
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  padding-bottom: 8px;
  padding-top: 8px;
}

.edit-row input,
.edit-row select,
.user-card input,
.user-card select,
.user-add-row input,
.user-add-row select,
.add-row input,
.add-row select,
.inline-form input {
  min-width: 0;
}

.check-label {
  align-items: center;
  display: flex;
  gap: 6px;
  margin: 0;
}

.flag-stack {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.site-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.site-chip {
  margin: 0;
}

.site-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.site-chip span {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  font-size: 0.85rem;
  font-weight: 800;
  padding: 6px 10px;
}

.site-chip input:checked + span {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.site-chip input:focus + span {
  box-shadow: 0 0 0 3px rgba(35, 107, 132, 0.14);
}

.user-actions {
  align-items: center;
  display: flex;
  gap: 12px;
}

.small-button {
  padding: 8px 11px;
}

.add-row {
  border-top: 1px solid var(--line);
  grid-template-columns: minmax(90px, 0.8fr) minmax(150px, 1.5fr) auto;
  margin-top: 14px;
  padding-top: 14px;
}

.add-row.category {
  grid-template-columns: minmax(180px, 1fr) auto;
}

.add-row.room {
  grid-template-columns: minmax(110px, 0.6fr) minmax(180px, 1fr) auto;
}

.list-note {
  margin: 14px;
}

.attachment-preview {
  margin: 14px 0 0;
}

.attachment-preview img {
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  display: block;
  height: auto;
  max-height: 520px;
  max-width: min(100%, 760px);
  object-fit: contain;
}

.attachment-preview figcaption {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 6px;
}

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

.config-section {
  padding: 0;
}

.config-section > summary {
  cursor: pointer;
  list-style: none;
  margin: 0;
  padding: 18px;
}

.config-section > summary::-webkit-details-marker,
.site-room-group > summary::-webkit-details-marker {
  display: none;
}

.config-section > summary::after,
.site-room-group > summary::after {
  color: var(--muted);
  content: "Open";
  font-size: 0.8rem;
  font-weight: 800;
  margin-left: auto;
}

.config-section[open] > summary::after,
.site-room-group[open] > summary::after {
  content: "Close";
}

.config-section > summary + *,
.config-section > summary ~ * {
  margin-left: 18px;
  margin-right: 18px;
}

.config-section > :last-child {
  margin-bottom: 18px;
}

.config-section .edit-row {
  gap: 8px;
  padding: 7px 10px;
}

.config-section input,
.config-section select {
  padding-bottom: 7px;
  padding-top: 7px;
}

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

.site-room-group {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.site-room-group > summary {
  align-items: center;
  background: var(--panel-soft);
  cursor: pointer;
  display: flex;
  gap: 10px;
  list-style: none;
  padding: 10px 12px;
}

.site-room-group > summary span:first-child {
  font-weight: 800;
}

.site-room-group .edit-list {
  border: 0;
  border-radius: 0;
  max-height: 420px;
  overflow-y: auto;
}

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

.upcoming-item {
  align-items: center;
  background: var(--panel-soft);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  color: var(--ink);
  display: grid;
  gap: 12px;
  grid-template-columns: 120px minmax(0, 1fr) auto;
  padding: 11px 12px;
  text-decoration: none;
}

.upcoming-item:hover {
  border-color: var(--line);
  box-shadow: var(--shadow-soft);
}

.upcoming-date {
  color: var(--accent);
  font-weight: 800;
}

.upcoming-main {
  display: grid;
  gap: 2px;
}

.upcoming-main span {
  color: var(--muted);
  font-size: 0.9rem;
}

table {
  border-collapse: collapse;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 11px 10px;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.85rem;
}

.data-table th {
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.data-table td {
  font-size: 0.95rem;
}

.data-table tr:hover td {
  background: var(--panel-soft);
}

.badge {
  background: var(--brand-soft);
  border-radius: 999px;
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  padding: 5px 8px;
}

.badge.high,
.badge.urgent { background: #fbe9e6; color: var(--bad); }
.badge.complete { background: var(--good-bg); color: var(--good); }
.badge.waiting { background: var(--warn-bg); color: var(--warn); }
.badge.in_progress { background: var(--brand-soft); color: var(--brand-dark); }

.flash {
  border: 1px solid transparent;
  border-radius: 12px;
  margin: 18px 0 0;
  padding: 12px 14px;
}

.flash.success { background: var(--good-bg); border-color: #c8e6d9; }
.flash.error { background: #fbe9e6; border-color: #f1c5bf; }
.flash.warning { background: var(--warn-bg); border-color: #efd7b6; }

.comment {
  border-top: 1px solid var(--line);
  padding: 12px 0;
}

.badge.internal { background: var(--accent-soft); color: var(--accent); }

/* Bulk action bar */
.bulk-bar {
  align-items: center;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
  padding: 12px 16px;
}

.bulk-actions {
  align-items: center;
  display: flex;
  gap: 10px;
  margin-left: auto;
}

.bulk-actions select { width: auto; }

.col-check { width: 36px; }

/* Time log form */
.time-log-form {
  border-top: 1px solid var(--line);
  margin-top: 12px;
  padding-top: 16px;
}

.time-log-fields {
  align-items: flex-end;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.time-log-submit { padding-bottom: 14px; }

/* Calendar */
.cal-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.cal-grid {
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 14px;
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(7, minmax(110px, 1fr));
  margin-bottom: 14px;
  min-width: 700px;
  overflow: hidden;
}

.cal-header {
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 8px 10px;
  text-align: center;
  text-transform: uppercase;
}

.cal-day {
  background: #fff;
  min-height: 90px;
  padding: 8px;
}

.cal-day.other-month { background: var(--bg); }

.cal-day.today { background: var(--brand-soft); }

.cal-date {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.cal-day.today .cal-date { color: var(--brand-dark); }

.cal-order {
  border-radius: 4px;
  color: #fff;
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  margin-bottom: 3px;
  overflow: hidden;
  padding: 3px 6px;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cal-order.urgent { background: var(--bad); }
.cal-order.high   { background: #c0612d; }
.cal-order.normal { background: var(--brand); }
.cal-order.low    { background: var(--muted); }

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

.cal-legend .cal-order {
  display: inline-block;
  pointer-events: none;
}

@media (max-width: 820px) {
  .bulk-actions { margin-left: 0; }
  .time-log-fields { flex-direction: column; align-items: stretch; }
  .time-log-submit { padding-bottom: 0; }
}

.admin-comment-form {
  border-top: 1px solid var(--line);
  margin-top: 4px;
  padding-top: 16px;
}

.admin-comment-footer {
  align-items: flex-end;
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr 1fr auto;
}

@media (max-width: 600px) {
  .admin-comment-footer {
    grid-template-columns: 1fr;
  }
}

.filters {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: 2fr repeat(4, 1fr) auto;
}

.form-panel {
  max-width: 980px;
}

.form-section {
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
  padding-bottom: 4px;
}

.form-section:last-of-type {
  border-bottom: 0;
  margin-bottom: 4px;
}

.field-help {
  color: var(--muted);
  font-size: 0.88rem;
  margin: -2px 0 6px;
}

.form-actions {
  align-items: center;
  display: flex;
  gap: 10px;
  padding-top: 6px;
}

input[type="file"] {
  background: #fff;
}

.print-shell {
  max-width: 900px;
}

.print-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin: 24px 0 12px;
}

.print-document {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-soft);
  padding: 28px;
}

.print-header {
  align-items: flex-start;
  border-bottom: 2px solid var(--ink);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding-bottom: 18px;
}

.print-status {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.print-summary {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 18px 0;
}

.print-summary span,
.print-comment span,
.print-footer {
  color: var(--muted);
  font-size: 0.82rem;
}

.print-summary strong,
.print-summary small {
  display: block;
}

.print-summary small {
  color: var(--muted);
  margin-top: 3px;
}

.print-section {
  border-bottom: 1px solid var(--line-soft);
  padding: 16px 0;
}

.print-section:last-of-type {
  border-bottom: 0;
}

.print-section p {
  margin: 0 0 10px;
}

.print-list {
  margin: 0;
  padding-left: 18px;
}

.print-attachment-preview img {
  max-height: 420px;
  max-width: 100%;
}

.print-comment {
  border-top: 1px solid var(--line-soft);
  padding: 10px 0;
}

.print-comment:first-of-type {
  border-top: 0;
}

.print-comment p {
  margin-top: 6px;
}

.print-footer {
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 10px;
  text-align: right;
}

@media (max-width: 820px) {
  .welcome-shell {
    min-height: auto;
    padding: 34px 0 24px;
  }

  .welcome-hero {
    align-items: start;
    grid-template-columns: 1fr;
  }

  .welcome-copy h1 {
    font-size: 2.45rem;
    line-height: 1.04;
  }

  .welcome-lede {
    font-size: 1rem;
  }

  /* Topbar: compact row — brand left, hamburger right */
  .topbar-inner {
    align-items: center;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0;
    min-height: 54px;
  }

  .nav-toggle {
    display: flex;
    margin-left: auto;
  }

  /* Nav: hidden by default, drops below brand bar when open */
  .nav {
    border-top: 1px solid var(--line);
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    gap: 0;
    margin: 0 -18px;
    order: 10;
    padding: 6px 0 10px;
  }

  .topbar.nav-open .nav {
    display: flex;
  }

  .nav a,
  .nav button {
    border-radius: 0;
    padding: 13px 18px;
    text-align: left;
    width: 100%;
  }

  .nav-user {
    display: block;
    margin-left: 0;
    padding: 13px 18px 4px;
  }

  .logout-form {
    width: 100%;
  }

  /* Page header: stack title + actions */
  .page-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding: 22px 0 16px;
  }

  .grid.two,
  .grid.five,
  .metric-grid,
  .print-summary,
  .filters,
  .upcoming-item,
  .inline-form,
  .edit-row,
  .edit-row.category,
  .edit-row.room,
  .user-main,
  .user-access,
  .user-add-row,
  .add-row,
  .add-row.category,
  .add-row.room {
    grid-template-columns: 1fr;
  }

  .edit-row.heading {
    display: none;
  }

  .config-section > summary + *,
  .config-section > summary ~ * {
    margin-left: 12px;
    margin-right: 12px;
  }

  .site-room-group .edit-list {
    max-height: none;
  }

  table {
    -webkit-overflow-scrolling: touch;
    display: block;
    overflow-x: auto;
  }
}

/* Data tables become cards at phone widths */
@media (max-width: 600px) {
  .data-table { overflow-x: visible; }

  .data-table thead { display: none; }

  .data-table tbody,
  .data-table tr,
  .data-table td { display: block; }

  .data-table tr {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    margin-bottom: 10px;
    padding: 4px 14px;
  }

  .data-table td {
    align-items: baseline;
    border-bottom: 1px solid var(--line-soft);
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding: 8px 0;
  }

  .data-table td:last-child { border-bottom: 0; }

  .data-table td::before {
    color: var(--muted);
    content: attr(data-label);
    flex-shrink: 0;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
  }

  .data-table tr:hover td { background: transparent; }
}

@media print {
  @page {
    margin: 0.55in;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
  }

  .topbar,
  .print-actions,
  .flash {
    display: none;
  }

  .page {
    max-width: none;
    padding: 0;
  }

  .print-shell {
    max-width: none;
  }

  .print-document {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
  }

  .print-header,
  .print-summary,
  .print-section,
  .print-footer {
    break-inside: avoid;
  }

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

  .badge {
    border: 1px solid #999;
    color: #000;
  }

  a {
    color: #000;
    text-decoration: none;
  }
}
