:root {
  color-scheme: light;
  --bg: #eef3f5;
  --panel: #ffffff;
  --panel-soft: #eef3f5;
  --text: #202326;
  --muted: #697179;
  --line: #dce3e7;
  --brand: #092a4d;
  --brand-dark: #061c33;
  --gold: #c7972d;
  --gold-soft: #fff6db;
  --blue: #143f69;
  --teal: #17736b;
  --amber: #b7791f;
  --green: #147a48;
  --red: #b42318;
  --shadow: 0 10px 28px rgba(9, 42, 77, 0.10);
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  min-height: 100%;
  background: var(--bg);
}

body {
  overflow-x: hidden;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(238, 243, 245, 0.96)),
    var(--bg);
}

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.noscript {
  max-width: 680px;
  margin: 48px auto;
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 76px;
  padding: 12px clamp(16px, 3vw, 34px);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  box-shadow: inset 0 -2px 0 rgba(199, 151, 45, 0.28);
  backdrop-filter: blur(14px);
}

.topbar-main {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-logo-only {
  flex: 0 0 250px;
  max-width: 250px;
}

.brand-logo {
  display: block;
  flex: 0 0 auto;
  width: 100%;
  height: 58px;
  padding: 2px;
  object-fit: contain;
  object-position: center;
  background: #ffffff;
  border: 1px solid rgba(199, 151, 45, 0.45);
  border-radius: 7px;
  box-shadow: 0 6px 16px rgba(9, 42, 77, 0.1);
}

.top-site-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 6px 10px 6px 6px;
  color: var(--text);
  text-decoration: none;
  background: #f7fbff;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.top-site-summary:hover {
  border-color: #bfd0d8;
  background: #f3f9ff;
}

.top-site-photo {
  display: grid;
  place-items: center;
  width: 58px;
  height: 42px;
  overflow: hidden;
  color: var(--muted);
  background: #ffffff;
  border: 1px dashed #bfd0d8;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 850;
  line-height: 1.1;
  text-align: center;
}

.top-site-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.top-site-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.top-site-copy strong {
  overflow: hidden;
  max-width: 230px;
  font-size: 15px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-site-copy span {
  overflow: hidden;
  max-width: 230px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-text {
  min-width: 0;
}

.brand-text strong {
  display: block;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-text span,
.top-meta,
.muted {
  color: var(--muted);
}

.brand-text span {
  display: block;
  margin-top: 2px;
  font-size: 13px;
}

.top-actions {
  display: flex;
  flex: 0 1 auto;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.top-actions .btn {
  white-space: nowrap;
}

.top-meta {
  flex: 0 0 auto;
  font-size: 13px;
  text-align: right;
}

.top-meta strong,
.top-meta span {
  display: block;
}

.top-meta strong {
  color: var(--text);
  font-size: 14px;
}

.top-site-name-text {
  min-width: 0;
  max-width: 320px;
  color: var(--brand-dark);
  font-size: 15px;
  font-weight: 850;
  line-height: 1.2;
}

.app-print-header,
.app-print-footer {
  display: none;
}

.layout {
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
  gap: 22px;
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 22px clamp(14px, 3vw, 34px) 88px;
}

.layout-wide-check {
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 12px;
  width: 100%;
  padding-right: 10px;
  padding-left: 10px;
}

.layout-check-page .sidebar {
  display: block;
}

.sidebar {
  position: sticky;
  top: 98px;
  align-self: start;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  scrollbar-width: thin;
  scrollbar-color: #b8c5cc transparent;
}

.sidebar::-webkit-scrollbar {
  width: 8px;
}

.sidebar::-webkit-scrollbar-thumb {
  background: #b8c5cc;
  border-radius: 999px;
}

.sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.nav-section {
  padding: 8px;
}

.nav-section-fire,
.nav-section-health,
.nav-section-certificates,
.nav-section-maintenance {
  margin-top: 6px;
  border-radius: 8px;
  border: 1px solid transparent;
}

.nav-heading {
  margin: 4px 8px 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.nav-section-fire {
  background: #fff7f6;
  border-color: #ffd8d3;
}

.nav-section-fire .nav-heading {
  color: #ffffff;
  margin: -1px -1px 8px;
  padding: 9px 11px;
  background: linear-gradient(90deg, #7a1b16, #b42318);
  border-radius: 7px 7px 0 0;
}

.nav-section-fire .nav-link.active {
  color: #7a1b16;
  background: #ffe9e5;
  border-color: #ffc7bf;
}

.nav-section-fire .nav-link.active .count {
  color: #7a1b16;
  background: #ffd8d3;
}

.nav-section-health {
  background: #f2fbf5;
  border-color: #c9ebd5;
}

.nav-section-health .nav-heading {
  color: #ffffff;
  margin: -1px -1px 8px;
  padding: 9px 11px;
  background: linear-gradient(90deg, #0f5f44, #147a48);
  border-radius: 7px 7px 0 0;
}

.nav-section-health .nav-link.active {
  color: var(--green);
  background: #e6f8ed;
  border-color: #bce8ca;
}

.nav-section-health .nav-link.active .count {
  color: var(--green);
  background: #c9ebd5;
}

.nav-section-certificates {
  background: #f2f8fb;
  border-color: #cfe8ff;
}

.nav-section-certificates .nav-heading {
  color: #ffffff;
  margin: -1px -1px 8px;
  padding: 9px 11px;
  background: linear-gradient(90deg, #1d5f8a, #17736b);
  border-radius: 7px 7px 0 0;
}

.nav-section-maintenance {
  background: #f2f8fb;
  border-color: #cfe8ff;
}

.nav-section-maintenance .nav-heading {
  color: #ffffff;
  margin: -1px -1px 8px;
  padding: 9px 11px;
  background: linear-gradient(90deg, #263238, #1d5f8a);
  border-radius: 7px 7px 0 0;
}

.nav-section-maintenance .nav-link.active {
  color: var(--blue);
  background: #eaf6ff;
  border-color: #cfe8ff;
}

.nav-section-maintenance .nav-link.active .count {
  color: var(--blue);
  background: #cfe8ff;
}

.nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  margin: 2px 0;
  padding: 10px 11px;
  color: var(--text);
  text-decoration: none;
  border-radius: 7px;
  border: 1px solid transparent;
}

.nav-link:hover {
  background: var(--panel-soft);
}

.nav-link.active {
  color: var(--brand-dark);
  background: #fff1ef;
  border-color: #ffd4cf;
}

.nav-link .label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-link .count {
  min-width: 26px;
  padding: 2px 7px;
  color: var(--muted);
  background: #eef3f5;
  border-radius: 999px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
}

.nav-link.active .count {
  color: var(--brand-dark);
  background: #ffdeda;
}

.content {
  min-width: 0;
}

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.page-title {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.02;
  letter-spacing: 0;
}

.page-kicker {
  margin: 0 0 8px;
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.page-subtitle {
  max-width: 820px;
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}

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

.dashboard-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: stretch;
}

.span-4 {
  grid-column: span 4;
}

.span-3 {
  grid-column: span 3;
}

.span-6 {
  grid-column: span 6;
}

.span-8 {
  grid-column: span 8;
}

.span-12 {
  grid-column: span 12;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.panel.pad {
  padding: 18px;
}

.metric {
  display: grid;
  gap: 6px;
  min-height: 124px;
}

.metric-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.metric-value {
  font-size: 36px;
  line-height: 1;
  font-weight: 850;
}

.metric-detail {
  color: var(--muted);
  font-size: 13px;
}

.metric-link {
  color: inherit;
  text-decoration: none;
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.metric-link:hover {
  border-color: #c7972d;
  box-shadow: 0 14px 32px rgba(9, 42, 77, 0.14);
  transform: translateY(-1px);
}

.metric-action {
  justify-self: start;
  margin-top: 2px;
  padding: 5px 9px;
  color: var(--blue);
  background: #f3f9ff;
  border: 1px solid #d4e9ff;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
}

.dashboard-pie-card {
  display: grid;
  gap: 18px;
  min-height: 230px;
}

.dashboard-pie-card .section-head {
  align-items: flex-start;
}

.dashboard-check-section {
  overflow: hidden;
}

.dashboard-section-band {
  padding: 16px 18px;
  color: #ffffff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
}

.dashboard-section-band h2,
.dashboard-section-band span {
  color: #ffffff;
}

.dashboard-section-band span {
  display: block;
  margin-top: 3px;
  opacity: 0.88;
}

.dashboard-section-band .btn {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.13);
  border-color: rgba(255, 255, 255, 0.36);
}

.dashboard-section-band .btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.dashboard-check-section-fire .dashboard-section-band {
  background: linear-gradient(90deg, #7a1b16, #b42318);
}

.dashboard-check-section-health .dashboard-section-band {
  background: linear-gradient(90deg, #0f5f44, #147a48);
}

.dashboard-check-section-certificates .dashboard-section-band {
  background: linear-gradient(90deg, #1d5f8a, #17736b);
}

.dashboard-check-section-maintenance .dashboard-section-band {
  background: linear-gradient(90deg, #061c33, #143f69);
}

.dashboard-brand-lockup {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
}

.dashboard-section-cards {
  padding: 14px;
}

.page-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.due-overdue-metrics {
  margin-bottom: 14px;
}

.due-overdue-sheet {
  overflow: hidden;
}

.due-overdue-sheet-head {
  padding: 16px 18px;
  background: #f7fbff;
  border-bottom: 1px solid var(--line);
}

.due-overdue-sheet-head span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.due-overdue-list {
  display: grid;
}

.due-overdue-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) minmax(110px, 0.7fr) minmax(150px, 0.9fr) minmax(120px, 0.7fr) minmax(110px, 0.7fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
}

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

.due-overdue-row:nth-child(even):not(.due-overdue-row-head) {
  background: #fbfdff;
}

.due-overdue-row-head {
  color: #4b535a;
  background: #edf3f6;
  font-size: 12px;
  font-weight: 850;
}

.due-overdue-row-overdue {
  border-left: 5px solid var(--red);
}

.due-overdue-row-due {
  border-left: 5px solid var(--amber);
}

.due-overdue-row div {
  min-width: 0;
}

.due-overdue-row div > span:not(.pill),
.due-overdue-category {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.due-overdue-row strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.25;
}

.due-overdue-check {
  display: grid;
  gap: 4px;
}

.due-overdue-check strong {
  font-size: 16px;
}

.due-overdue-check em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  line-height: 1.35;
}

.due-overdue-open {
  justify-self: end;
}

.due-overdue-empty {
  display: grid;
  gap: 5px;
  padding: 28px 18px;
  color: var(--muted);
  text-align: center;
}

.due-overdue-empty strong {
  color: var(--text);
  font-size: 18px;
}

.site-logo-uploader {
  display: grid;
  gap: 8px;
  width: min(100%, 360px);
}

.site-logo-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.site-logo-preview {
  display: grid;
  place-items: center;
  width: min(100%, 340px);
  aspect-ratio: 1.72 / 1;
  min-height: 0;
  overflow: hidden;
  color: var(--muted);
  background: #f7fbff;
  border: 1px dashed #bfd0d8;
  border-radius: 7px;
  font-weight: 850;
  text-align: center;
}

.site-logo-preview img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: contain;
  background: #ffffff;
}

.site-logo-preview span {
  display: block;
  padding: 10px;
}

.photo-defect-field em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.35;
}

.photo-defect-field.photo-not-needed {
  display: none;
}

.planner-summary-card {
  display: grid;
  gap: 14px;
}

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

.planner-summary-item {
  display: grid;
  gap: 3px;
  min-height: 76px;
  padding: 12px;
  background: #f7fbff;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.planner-summary-item span,
.planner-summary-item em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.planner-summary-item strong {
  font-size: 24px;
  line-height: 1.1;
}

.planner-toolbar,
.planner-metrics {
  margin-bottom: 14px;
}

.planner-toolbar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
}

.planner-month-field {
  min-width: 180px;
}

.planner-board {
  display: grid;
  gap: 14px;
}

.planner-week {
  overflow: hidden;
}

.planner-week-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  background: #f7fbff;
  border-bottom: 1px solid var(--line);
}

.planner-week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.planner-day {
  min-width: 0;
  min-height: 132px;
  padding: 10px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.planner-day:nth-child(7n) {
  border-right: 0;
}

.planner-day.outside {
  color: var(--muted);
  background: #eef3f5;
}

.planner-day.monday {
  background: #f7fbff;
}

.planner-day-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  min-height: 38px;
}

.planner-day-head strong {
  font-size: 13px;
  line-height: 1.2;
}

.planner-day-head span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-align: right;
}

.planner-empty {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.planner-task {
  display: grid;
  gap: 9px;
  margin-top: 8px;
  padding: 9px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 7px;
  box-shadow: 0 6px 18px rgba(30, 45, 55, 0.06);
}

.planner-status-done {
  border-color: #c9ebd5;
  background: #f7fcf9;
}

.planner-status-moved {
  border-color: #f4df9d;
  background: #fffaf0;
}

.planner-status-skipped {
  border-color: #dce3e7;
  background: #eef3f5;
}

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

.planner-task-grid {
  display: grid;
  gap: 8px;
}

.planner-task .field {
  gap: 5px;
}

.planner-task label,
.planner-task .field span {
  font-size: 11px;
}

.planner-task input,
.planner-task select,
.planner-task textarea {
  min-height: 36px;
  padding: 7px 8px;
  font-size: 13px;
}

.planner-task textarea {
  min-height: 72px;
}

.planner-open-link {
  width: 100%;
}

.simple-planner-sheet {
  overflow: hidden;
  margin-top: 14px;
}

.simple-planner-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  background: #f7fbff;
  border-bottom: 1px solid var(--line);
}

.simple-planner-table {
  overflow-x: auto;
}

.simple-planner-row {
  display: grid;
  grid-template-columns: minmax(118px, 0.62fr) repeat(4, minmax(132px, 1fr));
  min-width: 720px;
  border-bottom: 1px solid var(--line);
}

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

.simple-planner-header {
  color: #4b535a;
  background: #edf3f6;
  font-size: 12px;
  font-weight: 850;
}

.simple-planner-header span,
.simple-planner-date,
.simple-planner-cell {
  padding: 9px 10px;
  border-right: 1px solid var(--line);
}

.simple-planner-header span:last-child,
.simple-planner-cell:last-child {
  border-right: 0;
}

.simple-planner-date {
  display: grid;
  gap: 3px;
  background: #f7fbff;
}

.simple-planner-date strong {
  font-size: 13px;
}

.simple-planner-date span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.simple-planner-cell {
  display: grid;
  gap: 4px;
  min-height: 58px;
  background: #ffffff;
}

.simple-planner-cell strong {
  color: var(--brand-dark);
  font-size: 13px;
  line-height: 1.25;
}

.simple-planner-cell span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.25;
}

.simple-planner-cell.empty {
  background: #f7fbff;
}

.simple-planner-footer {
  padding: 10px 16px;
  color: var(--muted);
  background: #f7fbff;
  border-top: 1px solid var(--line);
  font-size: 12px;
  font-weight: 750;
}

.dashboard-pie-layout {
  display: flex;
  align-items: center;
  gap: 20px;
}

.pie-chart {
  position: relative;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 138px;
  aspect-ratio: 1;
  background: var(--pie, conic-gradient(#dce3e7 0deg 360deg));
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(20, 30, 36, 0.08);
}

.pie-chart::after {
  content: "";
  position: absolute;
  inset: 19px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.pie-center {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  color: var(--text);
  font-size: 26px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
}

.pie-center small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.pie-chart.tone-green .pie-center {
  color: var(--green);
}

.pie-chart.tone-amber .pie-center {
  color: #8a520c;
}

.pie-chart.tone-red .pie-center {
  color: var(--red);
}

.pie-copy {
  min-width: 0;
}

.pie-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.pie-legend {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.pie-legend-item {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  color: #33393e;
  font-size: 13px;
  font-weight: 800;
}

.legend-dot {
  display: block;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--line);
}

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

.legend-dot.amber {
  background: var(--amber);
}

.legend-dot.red {
  background: var(--red);
}

.legend-dot.neutral {
  background: #b9c5cc;
}

.check-card {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 12px;
  height: 100%;
  padding: 16px;
}

.check-card::before,
.metric::before,
.dashboard-pie-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 16px;
  width: 44px;
  height: 3px;
  background: var(--gold);
  border-radius: 0 0 4px 4px;
}

.metric,
.dashboard-pie-card {
  position: relative;
  overflow: hidden;
}

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

.check-card h3,
.section-title,
.table-title {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
}

.check-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.pill.overdue,
.pill.fail {
  color: var(--red);
  background: #fff0ee;
  border-color: #ffd0cc;
}

.pill.due,
.pill.action {
  color: #8a520c;
  background: #fff7df;
  border-color: #f4df9d;
}

.pill.complete,
.pill.ok,
.pill.pass {
  color: var(--green);
  background: #edf9f2;
  border-color: #c9ebd5;
}

.pill.upcoming,
.pill.info,
.pill.na {
  color: var(--blue);
  background: #eef7ff;
  border-color: #cfe8ff;
}

.pill.neutral {
  color: var(--muted);
  background: #eef3f5;
  border-color: #dce3e7;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 14px;
  color: var(--text);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 7px;
  text-decoration: none;
  font-weight: 800;
  line-height: 1.1;
}

.btn:hover {
  border-color: #c8d2d8;
  background: #f7fbff;
}

.btn.primary {
  color: #ffffff;
  background: linear-gradient(180deg, #143f69, var(--brand));
  border-color: var(--brand);
  box-shadow: inset 0 2px 0 rgba(235, 190, 82, 0.55);
}

.btn.primary:hover {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
}

.btn.subtle {
  color: var(--blue);
  background: #f3f9ff;
  border-color: #d4e9ff;
}

.btn.danger {
  color: var(--red);
  background: #fff6f5;
  border-color: #ffd8d3;
}

.btn.small {
  min-height: 34px;
  padding: 8px 10px;
  font-size: 13px;
}

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

.fire-drill-form {
  grid-template-columns: minmax(0, 1fr);
}

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

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

.form-alert {
  padding: 12px 14px;
  color: var(--brand-dark);
  background: #fff1ef;
  border: 1px solid #ffd4cf;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.4;
}

.form-alert.info {
  color: var(--blue);
  background: #eef7ff;
  border-color: #cfe8ff;
}

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

.monthly-details-section .fields-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.check-month-panel {
  gap: 12px;
}

.check-month-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 8px;
}

.check-month-tile {
  display: grid;
  align-content: center;
  gap: 4px;
  min-height: 62px;
  padding: 10px;
  color: var(--text);
  text-align: left;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.check-month-tile strong {
  font-size: 14px;
}

.check-month-tile span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.check-month-tile.active {
  border-color: #f0c989;
  box-shadow: inset 0 0 0 1px #f0c989;
}

.check-month-tile.asset-list-tile.active {
  border-color: #2f9b60;
  box-shadow: inset 0 0 0 1px #2f9b60;
}

.check-month-tile.asset-list-tile,
.check-month-tile.completion-green {
  background: #eefaf3;
  border-color: #bde7cc;
}

.check-month-tile.completion-green span {
  color: var(--green);
}

.check-month-tile.completion-amber {
  background: #fff8e8;
  border-color: #efd38e;
}

.check-month-tile.completion-amber span {
  color: var(--amber);
}

.check-month-tile.completion-red {
  background: #fff1ef;
  border-color: #ffc7bf;
}

.check-month-tile.completion-red span {
  color: var(--red);
}

.field {
  display: grid;
  gap: 7px;
}

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

label,
.field-label {
  color: #33393e;
  font-size: 13px;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 11px;
  color: var(--text);
  background: #ffffff;
  border: 1px solid #dce3e7;
  border-radius: 7px;
  outline: none;
}

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

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(29, 95, 138, 0.16);
}

.section {
  display: grid;
  gap: 14px;
}

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

.fire-door-head {
  flex-wrap: wrap;
}

.checklist {
  display: grid;
  gap: 10px;
}

.check-item {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 220px);
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: #f7fbff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.check-item-title {
  font-weight: 780;
  line-height: 1.35;
}

.check-result-field {
  display: grid;
}

.check-result-select {
  width: 100%;
  min-height: 42px;
  font-weight: 850;
}

.choice-group {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

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

.choice span {
  display: grid;
  place-items: center;
  min-height: 40px;
  padding: 8px 7px;
  border: 1px solid #dce3e7;
  border-radius: 7px;
  background: #ffffff;
  color: #4a5259;
  font-size: 13px;
  font-weight: 850;
}

.choice input:checked + span {
  border-color: var(--blue);
  background: #eaf6ff;
  color: #174b70;
  box-shadow: inset 0 0 0 1px var(--blue);
}

.choice.pass input:checked + span {
  border-color: var(--green);
  background: #edf9f2;
  color: var(--green);
  box-shadow: inset 0 0 0 1px var(--green);
}

.choice.action input:checked + span {
  border-color: var(--amber);
  background: #fff7df;
  color: #8a520c;
  box-shadow: inset 0 0 0 1px var(--amber);
}

.choice.fail input:checked + span {
  border-color: var(--red);
  background: #fff0ee;
  color: var(--red);
  box-shadow: inset 0 0 0 1px var(--red);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.fire-door-section {
  gap: 10px;
}

.door-register {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.door-row {
  display: grid;
  grid-template-columns: 48px minmax(150px, 1.15fr) repeat(5, minmax(74px, 0.65fr)) minmax(145px, 0.9fr);
  gap: 8px;
  align-items: center;
  min-width: 0;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}

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

.door-row:nth-child(odd):not(.door-header) {
  background: #f7fbff;
}

.door-header {
  position: sticky;
  top: 0;
  z-index: 3;
  color: #4b535a;
  background: #edf3f6;
  font-size: 12px;
  font-weight: 850;
}

.door-number {
  display: grid;
  place-items: center;
  min-height: 36px;
  border-radius: 7px;
  color: var(--brand-dark);
  background: #fff1ef;
  font-weight: 850;
}

.door-row input,
.door-row select {
  min-height: 38px;
  padding: 7px 8px;
  font-size: 13px;
}

.asset-check-section {
  gap: 10px;
}

.asset-check-register {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.asset-check-cards {
  display: grid;
  gap: 10px;
  padding: 10px;
}

.asset-check-cards [data-asset-register-body] {
  display: grid;
  gap: 10px;
}

.asset-check-row {
  display: grid;
  gap: 10px;
  padding: 10px;
  background: #f7fbff;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.asset-check-row:last-child {
  border-bottom: 1px solid var(--line);
}

.asset-row-head {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.asset-row-fields,
.asset-row-checks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.asset-row-checks {
  padding-top: 10px;
  border-top: 1px dashed #cfd9df;
}

.asset-inline-field {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: #33393e;
  font-size: 12px;
  font-weight: 800;
}

.asset-check-inline span {
  line-height: 1.25;
}

.asset-check-row input,
.asset-check-row select {
  min-height: 38px;
  padding: 7px 8px;
  font-size: 13px;
}

.asset-list-table {
  overflow: hidden;
}

.asset-list-row {
  display: grid;
  gap: 6px;
  align-items: center;
  padding: 6px;
  border-bottom: 1px solid var(--line);
}

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

.asset-list-row input,
.asset-list-row select {
  min-height: 34px;
  padding: 5px 6px;
  font-size: 12px;
}

.asset-list-header {
  position: sticky;
  top: 0;
  z-index: 3;
  color: #4b535a;
  background: #edf3f6;
  font-size: 10px;
  font-weight: 850;
  line-height: 1.15;
}

.health-check-table {
  overflow-x: visible;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.health-check-table [data-asset-register-body] {
  display: grid;
}

.health-check-row {
  display: grid;
  gap: 4px;
  align-items: center;
  padding: 6px;
  border-bottom: 1px solid var(--line);
}

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

.health-check-row:nth-child(odd):not(.health-check-header) {
  background: #f7fbff;
}

.health-check-header {
  position: sticky;
  top: 0;
  z-index: 3;
  color: #4b535a;
  background: #edf3f6;
  font-size: 10px;
  font-weight: 850;
  line-height: 1.15;
}

.health-check-row input,
.health-check-row select,
.health-check-row textarea {
  min-height: 34px;
  padding: 5px 6px;
  font-size: 11px;
}

.health-check-row textarea {
  min-height: 38px;
  resize: vertical;
}

.health-check-row .asset-inline-field {
  gap: 0;
}

.health-check-row .btn.small {
  min-height: 34px;
  padding: 5px 6px;
  font-size: 11px;
  white-space: normal;
}

.health-check-row .door-number {
  min-height: 32px;
}

.qr-label-print-area {
  display: none;
}

.qr-label-sheet {
  color: #17212b;
  background: #ffffff;
}

.qr-label-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10mm;
  padding-bottom: 4mm;
  border-bottom: 1px solid #dce3e7;
}

.qr-label-title img {
  width: 48mm;
  height: 16mm;
  object-fit: contain;
}

.qr-label-title strong,
.qr-label-title span {
  display: block;
}

.qr-label-title strong {
  font-size: 15px;
}

.qr-label-title span {
  color: #56626d;
  font-size: 10px;
}

.qr-label-grid {
  display: grid;
  grid-template-columns: repeat(2, 88mm);
  gap: 6mm;
}

.qr-label-card {
  display: grid;
  grid-template-columns: 24mm minmax(0, 1fr);
  gap: 4mm;
  align-items: center;
  width: 88mm;
  min-height: 38mm;
  padding: 4mm;
  background: #ffffff;
  border: 1px solid #cfd9df;
  break-inside: avoid;
}

.qr-code-svg {
  width: 24mm;
  height: 24mm;
}

.qr-label-copy {
  display: grid;
  gap: 1.2mm;
  min-width: 0;
}

.qr-label-copy span {
  color: #7a6124;
  font-size: 7.5px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0;
}

.qr-label-copy strong {
  color: #061f38;
  font-size: 18px;
  line-height: 1;
}

.qr-label-copy em,
.qr-label-copy small {
  color: #2e3943;
  font-style: normal;
  line-height: 1.25;
}

.qr-label-copy em {
  font-size: 10px;
  font-weight: 850;
}

.qr-label-copy small {
  font-size: 8px;
}

.fire-drill-section {
  gap: 10px;
}

.drill-table {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.drill-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) minmax(0, 0.8fr) minmax(150px, 0.85fr) 82px;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border-bottom: 1px solid var(--line);
}

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

.drill-row:nth-child(odd):not(.drill-header) {
  background: #f7fbff;
}

.drill-header {
  color: #4b535a;
  background: #edf3f6;
  font-size: 12px;
  font-weight: 850;
}

.signature-box {
  min-height: 44px;
  border-bottom: 1px solid #8d9aa3;
}

.permit-sheet {
  gap: 16px;
}

.permit-warning {
  padding: 10px 12px;
  color: #17384d;
  background: #eaf6ff;
  border: 1px solid #cfe8ff;
  border-radius: var(--radius);
  text-align: center;
  font-size: 14px;
  font-weight: 850;
}

.permit-precautions {
  display: grid;
  gap: 12px;
}

.permit-precaution-group {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.permit-precaution-group h3 {
  margin: 0;
  padding: 11px 12px;
  background: #edf3f6;
  color: #303940;
  font-size: 14px;
}

.permit-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
}

.permit-check input[type="checkbox"] {
  flex: 0 0 auto;
  width: 20px;
  min-height: 20px;
  margin: 0;
  padding: 0;
}

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

.permit-signature-box {
  display: grid;
  gap: 8px;
  min-height: 78px;
  padding: 10px;
  background: #f7fbff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.permit-signature-box span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.permit-signature-box div {
  min-height: 36px;
  border-bottom: 1px solid #8d9aa3;
}

.summary-panel {
  position: static;
  display: grid;
  gap: 14px;
  padding: 16px;
}

.summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

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

.summary-row span:first-child {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 60;
  max-width: min(440px, calc(100vw - 36px));
  padding: 14px 16px;
  color: #ffffff;
  background: #233039;
  border-radius: var(--radius);
  box-shadow: 0 14px 40px rgba(20, 30, 36, 0.22);
}

.toast.error {
  background: var(--brand-dark);
}

.table-panel {
  overflow: hidden;
}

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

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

.filters input,
.filters select {
  width: auto;
  min-width: 180px;
}

.records {
  display: grid;
}

.record-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 150px minmax(170px, 0.8fr) 96px 230px;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

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

.record-main {
  display: grid;
  gap: 4px;
}

.record-main strong {
  line-height: 1.3;
}

.record-meta {
  color: var(--muted);
  font-size: 13px;
}

.record-date,
.record-person,
.record-status {
  justify-self: start;
}

.record-actions {
  min-width: 230px;
}

.row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.empty-state {
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

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

.settings-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 140px;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: #f7fbff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.bottom-nav {
  display: none;
}

.mobile-only {
  display: none;
}

@media (max-width: 1400px) {
  .topbar {
    flex-wrap: wrap;
    align-items: stretch;
    gap: 10px 14px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .topbar-main {
    flex: 1 1 100%;
    width: 100%;
  }

  .brand-logo-only {
    flex: 0 0 238px;
    max-width: 238px;
  }

  .brand-logo {
    height: 54px;
  }

  .top-site-name-text {
    flex: 1 1 auto;
    max-width: none;
    overflow-wrap: anywhere;
  }

  .top-meta {
    margin-left: auto;
  }

  .top-actions {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 3px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .top-actions .btn {
    flex: 0 0 auto;
    min-height: 44px;
  }

  .sidebar {
    top: 132px;
    max-height: calc(100vh - 154px);
  }
}

@media (max-width: 1120px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    display: none;
  }

  .layout-check-page {
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 10px;
  }

  .layout-check-page .sidebar {
    position: sticky;
    top: 88px;
    display: block;
    max-height: calc(100vh - 106px);
  }

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

  .summary-panel {
    position: static;
  }

  .bottom-nav {
    position: fixed;
    right: 12px;
    bottom: 12px;
    left: 12px;
    z-index: 50;
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
    padding: 7px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 14px 38px rgba(20, 30, 36, 0.16);
    backdrop-filter: blur(14px);
  }

  .bottom-nav a {
    display: grid;
    place-items: center;
    min-height: 42px;
    color: var(--muted);
    text-decoration: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 850;
  }

  .bottom-nav a.active {
    color: var(--brand-dark);
    background: #fff1ef;
  }
}

@media (max-width: 860px) {
  .topbar {
    align-items: flex-start;
  }

  .brand-logo-only {
    flex-basis: 220px;
    max-width: 220px;
  }

  .brand-logo {
    height: 50px;
  }

  .top-meta {
    font-size: 12px;
  }

  .page-head {
    display: grid;
  }

  .dashboard-brand-lockup {
    justify-content: space-between;
  }

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

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

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

  .planner-day:nth-child(7n) {
    border-right: 1px solid var(--line);
  }

  .planner-day:nth-child(2n) {
    border-right: 0;
  }

  .planner-day.outside {
    display: none;
  }

  .planner-toolbar-row {
    align-items: stretch;
  }

  .planner-toolbar-row .btn,
  .planner-month-field {
    width: 100%;
  }

  .planner-week-head {
    display: grid;
  }

  .simple-planner-title {
    display: grid;
  }

  .span-3,
  .span-4,
  .span-6,
  .span-8,
  .span-12 {
    grid-column: 1 / -1;
  }

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

  .monthly-details-section .fields-grid {
    grid-template-columns: 1fr;
  }

  .permit-signature-grid {
    grid-template-columns: 1fr;
  }

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

  .asset-row-fields,
  .asset-row-checks {
    grid-template-columns: 1fr;
  }

  .record-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .due-overdue-row,
  .due-overdue-row-head {
    grid-template-columns: 1fr;
  }

  .due-overdue-row-head {
    display: none;
  }

  .due-overdue-open {
    justify-self: stretch;
  }

  .due-overdue-open .btn {
    width: 100%;
  }

  .drill-row {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .drill-row > :nth-child(3),
  .drill-row > :nth-child(4),
  .drill-row > :nth-child(5) {
    grid-column: 2;
  }

  .row-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .topbar {
    gap: 8px;
    padding: 8px 10px;
  }

  .brand {
    gap: 9px;
  }

  .topbar-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
    align-items: center;
  }

  .dashboard-pie-layout {
    display: grid;
    justify-items: start;
  }

  .brand-logo {
    width: min(190px, 100%);
    height: 44px;
    padding: 2px;
  }

  .brand-logo-only {
    max-width: min(190px, 58vw);
  }

  .top-site-summary {
    max-width: calc(100vw - 220px);
    padding-right: 6px;
  }

  .top-site-photo {
    width: 48px;
    height: 38px;
  }

  .top-site-copy strong,
  .top-site-copy span {
    max-width: 120px;
  }

  .top-site-name-text {
    max-width: 100%;
    font-size: 13px;
  }

  .top-meta,
  .top-actions {
    display: none;
  }

  .layout {
    padding-top: 16px;
  }

  .layout-check-page {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .layout-check-page .sidebar {
    display: none;
  }

  .panel.pad,
  .form-panel,
  .summary-panel {
    padding: 14px;
  }

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

  .filters {
    width: 100%;
  }

  .planner-summary-grid,
  .planner-week-grid {
    grid-template-columns: 1fr;
  }

  .planner-day,
  .planner-day:nth-child(2n) {
    border-right: 0;
  }

  .filters input,
  .filters select {
    width: 100%;
  }

  .mobile-only {
    display: inline-flex;
  }
}

@media print {
  body {
    background: #ffffff;
  }

  .topbar,
  .sidebar,
  .bottom-nav,
  .table-toolbar,
  .btn,
  .toast {
    display: none !important;
  }

  .layout {
    display: block;
    padding: 0;
  }

  .app-print-header {
    display: flex;
    align-items: flex-start;
    gap: 5mm;
    margin-bottom: 5mm;
    padding-bottom: 3mm;
    border-bottom: 1px solid #cfd9df;
  }

  .app-print-logo {
    width: 34mm;
    height: 12mm;
    object-fit: contain;
  }

  .app-print-header strong,
  .app-print-header span {
    display: block;
  }

  .app-print-header strong {
    font-size: 13px;
  }

  .app-print-header span {
    color: #4b535a;
    font-size: 9px;
  }

  .app-print-footer {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    display: block;
    padding-top: 2mm;
    border-top: 1px solid #dce3e7;
    color: #4b535a;
    text-align: center;
    font-size: 9px;
  }

  .panel,
  .check-card {
    box-shadow: none;
  }

  body.print-qr-labels .app-print-header,
  body.print-qr-labels .app-print-footer,
  body.print-qr-labels .layout,
  body.print-qr-labels .bottom-nav,
  body.print-qr-labels .topbar {
    display: none !important;
  }

  body.print-qr-labels .qr-label-print-area {
    display: block !important;
  }

  body.print-qr-labels .qr-label-card {
    page-break-inside: avoid;
  }

  body.print-qr-roll .qr-label-title {
    display: none;
  }

  body.print-qr-roll .qr-label-grid {
    display: block;
  }

  body.print-qr-roll .qr-label-card {
    width: 58mm;
    min-height: 36mm;
    margin: 0 auto 3mm;
    padding: 3mm;
    grid-template-columns: 20mm minmax(0, 1fr);
    page-break-after: always;
  }

  body.print-qr-roll .qr-code-svg {
    width: 20mm;
    height: 20mm;
  }

  .fire-drill-form {
    display: block;
  }

  .permit-form {
    display: block;
  }

  .permit-form .summary-panel {
    display: none !important;
  }

  .permit-sheet {
    padding: 0;
    border: 0;
  }

  .permit-warning,
  .permit-precaution-group,
  .permit-signature-box {
    break-inside: avoid;
  }

  .permit-warning {
    padding: 2mm;
    font-size: 10px;
  }

  .permit-check {
    padding: 1.6mm 2mm;
  }

  .permit-check input[type="checkbox"] {
    width: 4mm;
    min-height: 4mm;
  }

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

  .permit-signature-box {
    min-height: 17mm;
    padding: 2mm;
  }

  .planner-toolbar,
  .planner-task .btn {
    display: none !important;
  }

  .planner-week {
    margin-bottom: 6mm;
    break-inside: avoid;
  }

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

  .planner-day {
    min-height: auto;
    break-inside: avoid;
  }

  .due-overdue-metrics {
    display: none;
  }

  .due-overdue-row {
    grid-template-columns: 1.35fr 0.72fr 0.95fr 0.72fr 0.72fr;
    gap: 3mm;
    padding: 3mm;
    break-inside: avoid;
    box-shadow: none;
  }

  .due-overdue-row-head {
    display: grid;
    font-size: 8px;
  }

  .due-overdue-open {
    display: none;
  }

  .due-overdue-check strong {
    font-size: 10px;
  }

  .due-overdue-check em,
  .due-overdue-row strong {
    font-size: 8px;
  }

  .planner-day.outside {
    display: none;
  }

  .planner-task {
    box-shadow: none;
    break-inside: avoid;
  }

  .simple-planner-summary,
  .simple-planner-controls {
    display: none !important;
  }

  .simple-planner-sheet {
    margin-top: 0;
    border: 0;
    box-shadow: none;
  }

  .simple-planner-title {
    padding: 0 0 3mm;
  }

  .simple-planner-row {
    grid-template-columns: 28mm repeat(4, minmax(0, 1fr));
    min-width: 0;
  }

  .simple-planner-header span,
  .simple-planner-date,
  .simple-planner-cell {
    padding: 1.6mm;
  }

  .simple-planner-date strong,
  .simple-planner-cell strong {
    font-size: 9px;
  }

  .simple-planner-date span,
  .simple-planner-cell span,
  .simple-planner-footer {
    font-size: 8px;
  }

  .simple-planner-cell {
    min-height: 10mm;
  }

  .drill-row {
    grid-template-columns: 9mm 1fr 42mm 48mm;
    gap: 3mm;
    padding: 2mm;
    break-inside: avoid;
  }

  .drill-actions {
    display: none !important;
  }

  .drill-row input {
    min-height: 8mm;
    padding: 1mm;
    border: 0;
    border-bottom: 1px solid #9aa8b0;
    border-radius: 0;
  }

  .signature-box {
    min-height: 8mm;
  }
}
