:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-muted: #eef3f5;
  --text: #172026;
  --muted: #62717c;
  --line: #dce3e8;
  --primary: #0f766e;
  --primary-dark: #0b5f59;
  --accent: #2f6f9f;
  --warning: #a15c00;
  --warning-bg: #fff4df;
  --danger: #b3261e;
  --danger-bg: #fdeceb;
  --success: #1f7a3a;
  --success-bg: #e8f6ec;
  --shadow: 0 16px 45px rgba(28, 42, 50, 0.08);
  font-family: "Segoe UI", Tahoma, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

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

button {
  cursor: pointer;
}

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

.app-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: #122329;
  color: #f8fbfc;
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

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

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #d9f1ee;
  color: var(--primary-dark);
}

.brand h1,
.brand p,
.topbar h2,
.topbar p,
.panel h3 {
  margin: 0;
}

.brand h1 {
  font-size: 22px;
}

.brand p {
  color: #b6c4ca;
  font-size: 13px;
}

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

.nav-item {
  width: 100%;
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #d3dee2;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  text-align: left;
}

.nav-item.active,
.nav-item:hover {
  background: #20373e;
  color: #ffffff;
}

.side-note {
  margin-top: auto;
  display: flex;
  gap: 10px;
  padding: 14px;
  border-radius: 8px;
  background: #20373e;
  color: #d3dee2;
  font-size: 13px;
}

.side-note p {
  margin: 0;
}

.credit-note {
  border-top: 1px solid rgba(211, 222, 226, 0.18);
  padding-top: 14px;
  color: #d3dee2;
  display: grid;
  gap: 3px;
  font-size: 13px;
}

.credit-note span {
  color: #8fa1a8;
  font-weight: 700;
}

.credit-note strong {
  color: #ffffff;
  font-size: 14px;
}

.app-version {
  margin-top: 8px;
  color: #8fa1a8;
  font-size: 11px;
}

.sidebar-logout {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(211, 222, 226, 0.18);
  border-radius: 8px;
  background: transparent;
  color: #d3dee2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 12px;
}

.sidebar-logout:hover {
  background: #20373e;
  color: #ffffff;
}

.main {
  padding: 28px;
  min-width: 0;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 24px;
}

.eyebrow {
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

.topbar h2 {
  font-size: 30px;
}

.top-actions,
.scanner-actions,
.modal-actions,
.manual-scan,
.inline-form,
.bulk-actions,
.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cloud-status {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  font-size: 13px;
  white-space: nowrap;
}

.cloud-status.connected {
  border-color: #b8ddc1;
  background: var(--success-bg);
  color: var(--success);
}

.cloud-status.unavailable {
  border-color: #f1c4bf;
  background: var(--danger-bg);
  color: var(--danger);
}

.primary-button,
.secondary-button,
.ghost-button,
.icon-button {
  min-height: 40px;
  border-radius: 8px;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
}

.primary-button {
  color: #ffffff;
  background: var(--primary);
}

.primary-button:hover {
  background: var(--primary-dark);
}

.secondary-button,
.icon-button {
  background: var(--surface);
  border-color: var(--line);
  color: var(--text);
}

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

.icon-button {
  width: 40px;
  padding: 0;
}

.delete-button {
  min-width: 58px;
  gap: 6px;
  color: var(--danger);
}

.user-badge {
  min-height: 40px;
  min-width: 180px;
  max-width: 280px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 6px 10px;
  display: grid;
  align-content: center;
}

.user-badge strong,
.user-badge span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-badge strong {
  font-size: 13px;
}

.user-badge span {
  color: var(--muted);
  font-size: 12px;
}

.import-button input {
  display: none;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.metric,
.panel,
.scanner-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.metric {
  padding: 18px;
}

.metric span,
.metric small,
.muted {
  color: var(--muted);
}

.metric strong {
  display: block;
  margin: 8px 0;
  font-size: 34px;
}

.metric.warning strong {
  color: var(--warning);
}

.metric.danger strong {
  color: var(--danger);
}

.content-grid,
.scan-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 18px;
}

.panel,
.scanner-panel {
  padding: 18px;
}

.panel-header {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.due-list,
.asset-grid,
.bulk-qr-list,
.template-list,
.user-list {
  display: grid;
  gap: 12px;
}

.due-item,
.asset-card,
.bulk-qr-item,
.template-item,
.user-item,
.check-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.bulk-qr-list {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.bulk-qr-item {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 14px;
  cursor: pointer;
}

.bulk-qr-item input {
  width: 20px;
  height: 20px;
}

.bulk-qr-item strong,
.bulk-qr-item small {
  display: block;
}

.bulk-qr-item small {
  color: var(--muted);
  margin-top: 4px;
}

.due-item {
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.due-item strong,
.asset-card h3 {
  display: block;
  margin: 0 0 4px;
}

.workflow {
  display: grid;
  gap: 14px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.workflow li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.workflow span {
  flex: 0 0 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--surface-muted);
  color: var(--primary-dark);
  font-weight: 700;
}

.workflow p {
  margin: 3px 0 0;
}

.toolbar {
  justify-content: space-between;
  margin-bottom: 16px;
}

.search-box {
  flex: 1;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
}

.search-box input,
.manual-scan input,
.inline-form input,
label input,
label select,
textarea,
.toolbar select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 42px;
  padding: 8px 10px;
  background: #ffffff;
  color: var(--text);
}

.inline-input {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  display: grid;
  grid-template-columns: auto minmax(72px, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
}

.inline-input span {
  color: var(--muted);
  white-space: nowrap;
}

.inline-input input {
  min-height: 38px;
  border: 0;
  padding: 0;
  text-align: center;
}

.search-box input {
  border: 0;
  padding: 0;
}

.asset-toolbar-options {
  display: flex;
  align-items: end;
  gap: 10px;
}

.toolbar-field {
  display: grid;
  gap: 4px;
  min-width: 150px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.filter-menu {
  position: relative;
  min-width: 190px;
}

.filter-menu summary {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  cursor: pointer;
  list-style: none;
}

.filter-menu summary::-webkit-details-marker {
  display: none;
}

.filter-menu[open] summary {
  border-color: var(--primary);
}

#assetFilterMenu {
  position: absolute;
  z-index: 10;
  top: calc(100% + 6px);
  right: 0;
  width: 280px;
  max-height: 360px;
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.filter-group {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

.filter-group strong {
  color: var(--text);
  font-size: 13px;
}

.filter-check {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.filter-check input {
  width: 16px;
  min-height: 16px;
}

.filter-clear {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-muted);
  color: var(--text);
  cursor: pointer;
}

.toolbar-count {
  align-self: center;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

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

.asset-group {
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
}

.asset-group > summary {
  min-height: 54px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  list-style: none;
  font-weight: 800;
}

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

.asset-group > summary .lucide {
  margin-left: auto;
  transition: transform 160ms ease;
}

.asset-group[open] > summary .lucide {
  transform: rotate(180deg);
}

.asset-group-title {
  color: var(--text);
}

.asset-group-count {
  color: var(--muted);
  font-weight: 600;
}

.asset-table-wrap {
  overflow-x: auto;
  border-top: 1px solid var(--line);
}

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

.asset-table th,
.asset-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.asset-table th {
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

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

.asset-table tbody tr:hover {
  background: #f8fbfb;
}

.asset-table-order {
  width: 58px;
  color: var(--muted);
  text-align: center !important;
}

.asset-table td small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.asset-table-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.asset-table-actions button {
  min-height: 34px;
  padding: 0 8px;
}

.asset-card {
  padding: 16px;
  display: grid;
  gap: 14px;
}

.asset-card header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.asset-card h3 {
  display: flex;
  align-items: center;
  gap: 8px;
}

.asset-order {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: inline-grid;
  place-items: center;
  background: var(--surface-muted);
  color: var(--primary-dark);
  font-size: 12px;
}

.asset-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

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

.asset-actions button {
  padding: 0 8px;
}

.status-pill {
  min-width: 76px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 700;
}

.status-ready {
  background: var(--success-bg);
  color: var(--success);
}

.status-due {
  background: var(--warning-bg);
  color: var(--warning);
}

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

.import-errors {
  padding: 12px;
  border: 1px solid #efb4b4;
  border-radius: 8px;
  background: #fff4f4;
  color: var(--danger);
}

.import-errors ul {
  margin: 8px 0;
  padding-left: 22px;
}

#qrReader {
  min-height: 320px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.scanner-status {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.scanner-status[data-state="ready"] {
  color: var(--success);
}

.scanner-status[data-state="error"] {
  color: var(--danger);
}

.scanner-actions {
  margin-top: 12px;
}

.table-wrap {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.report-controls {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
  margin-bottom: 14px;
}

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

.report-filter {
  display: flex;
  gap: 10px;
  align-items: end;
}

.report-filter label {
  min-width: 160px;
}

.report-sheet {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 22px;
}

.official-report-header {
  border-bottom: 1px solid #20373e;
  padding-bottom: 14px;
  text-align: center;
}

.report-hospital,
.report-unit,
.report-title-block h3,
.report-title-block span {
  margin: 0;
}

.report-hospital,
.report-unit {
  color: #17232a;
  font-size: 20px;
  font-weight: 700;
}

.report-unit {
  margin-top: 4px;
  font-size: 15px;
  font-weight: 600;
}

.report-title-block {
  margin-top: 16px;
}

.report-title-block h3 {
  font-size: 22px;
}

.report-title-block span {
  display: block;
  color: #34444d;
  margin-top: 5px;
}

.report-asset-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 28px;
  margin: 18px 0 12px;
  border-top: 1px solid var(--line);
}

.report-asset-details div {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 8px;
  min-height: 38px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.report-asset-details span,
.report-asset-details strong {
  display: block;
}

.report-asset-details span {
  color: var(--muted);
}

.report-summary {
  display: flex;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 0;
  margin: 14px 0;
  border-top: 1px solid #20373e;
  border-bottom: 1px solid #20373e;
}

.report-summary div {
  flex: 1;
  padding: 10px 16px;
  background: transparent;
}

.report-summary div + div {
  border-left: 1px solid var(--line);
}

.report-summary span,
.report-summary strong {
  display: block;
}

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

.report-summary strong {
  margin-top: 1px;
  font-size: 21px;
}

.report-table {
  box-shadow: none;
}

.report-signatures {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 28px;
  margin-top: 76px;
}

.report-signatures div {
  display: grid;
  gap: 18px;
  text-align: center;
  color: #34444d;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
}

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

th {
  background: var(--surface-muted);
  color: #34444d;
  font-size: 13px;
}

.template-item,
.user-item,
.check-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
}

.user-item strong,
.user-item small {
  display: block;
}

.user-item small {
  color: var(--muted);
  margin-top: 4px;
}

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

.check-row {
  grid-template-columns: 1fr auto auto auto;
  min-height: 58px;
}

.check-row strong {
  font-weight: 600;
  font-size: 16px;
}

.check-row small {
  color: var(--danger);
  font-weight: 700;
}

.radio-pill input {
  position: absolute;
  opacity: 0;
}

.radio-pill span {
  min-width: 62px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  color: var(--muted);
}

.radio-pill input:checked + span {
  border-color: currentColor;
  font-weight: 700;
}

.radio-pill.pass input:checked + span {
  color: var(--success);
  background: var(--success-bg);
}

.radio-pill.fail input:checked + span {
  color: var(--danger);
  background: var(--danger-bg);
}

.modal {
  border: 0;
  border-radius: 8px;
  width: min(720px, calc(100vw - 28px));
  max-width: calc(100vw - 28px);
  max-height: calc(100vh - 28px);
  padding: 0;
  box-shadow: 0 24px 70px rgba(23, 32, 38, 0.24);
  overflow-y: auto;
  overflow-x: hidden;
}

.modal::backdrop {
  background: rgba(18, 35, 41, 0.46);
}

.modal form,
.qr-modal,
.recovery-dialog {
  padding: 20px;
  min-width: 0;
}

.recovery-warning {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border-radius: 8px;
  background: var(--warning-bg);
  color: var(--warning);
}

.recovery-warning p {
  margin: 0;
  line-height: 1.5;
}

.modal.wide {
  width: min(760px, calc(100vw - 28px));
}

.login-modal {
  width: min(440px, calc(100vw - 28px));
}

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

.modal-header h3,
.modal-header p {
  margin: 0;
}

.form-grid,
.inspection-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
}

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

.login-hint {
  display: grid;
  gap: 4px;
  margin-top: 14px;
  padding: 12px;
  border-radius: 8px;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 13px;
}

.login-hint strong {
  color: var(--text);
}

.import-guide,
.import-summary {
  display: grid;
  gap: 4px;
  margin-bottom: 14px;
  padding: 12px;
  border-radius: 8px;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 13px;
}

.import-guide strong {
  color: var(--text);
}

.import-preview {
  margin-top: 14px;
}

.import-table {
  box-shadow: none;
  max-height: 340px;
}

.import-table table {
  min-width: 860px;
}

label,
.notes-label {
  display: grid;
  gap: 6px;
  color: #34444d;
  font-size: 14px;
  min-width: 0;
}

.checklist {
  display: grid;
  gap: 10px;
  margin: 16px 0;
}

.result-strip {
  padding: 12px;
  border-radius: 8px;
  background: var(--surface-muted);
  color: #34444d;
  margin-top: 12px;
  font-weight: 700;
}

.result-strip.pass {
  background: var(--success-bg);
  color: var(--success);
}

.result-strip.fail {
  background: var(--danger-bg);
  color: var(--danger);
}

.modal-actions {
  justify-content: flex-end;
  margin-top: 18px;
}

.qr-label {
  width: 260px;
  min-height: 330px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 10px;
  margin: 0 auto;
  padding: 18px;
  text-align: center;
}

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

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  transform: translateY(120px);
  opacity: 0;
  background: #122329;
  color: #ffffff;
  padding: 12px 14px;
  border-radius: 8px;
  transition: 180ms ease;
  box-shadow: var(--shadow);
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.empty {
  padding: 24px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--surface);
}

svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 5;
    padding: 14px;
  }

  .nav-list {
    grid-template-columns: repeat(8, minmax(38px, 1fr));
    overflow-x: auto;
  }

  .nav-item {
    justify-content: center;
  }

  .nav-item span,
  .side-note,
  .credit-note,
  .sidebar-logout {
    display: none;
  }

  .metrics-grid,
  .content-grid,
  .scan-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .main {
    padding: 18px;
  }

  .topbar,
  .toolbar,
  .asset-toolbar-options,
  .report-controls,
  .report-filter,
  .report-actions,
  .top-actions,
  .manual-scan,
  .bulk-actions,
  .inline-form {
    align-items: stretch;
    flex-direction: column;
  }

  .top-actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: stretch;
  }

  .top-actions .user-badge,
  .top-actions .cloud-status,
  .top-actions .primary-button {
    grid-column: 1 / -1;
  }

  .top-actions .icon-button {
    width: 100%;
    padding: 0;
  }

  .top-actions .primary-button,
  .user-badge,
  .asset-toolbar-options,
  .toolbar select,
  .report-filter label,
  .report-controls button,
  .report-actions button,
  .bulk-actions button,
  .manual-scan button,
  .inline-form button {
    width: 100%;
  }

  .filter-menu,
  .filter-menu summary,
  .toolbar-field {
    width: 100%;
  }

  #assetFilterMenu {
    position: static;
    width: 100%;
  }

  .form-grid,
  .inspection-meta,
  .asset-meta {
    grid-template-columns: 1fr;
  }

  .check-row {
    grid-template-columns: 1fr repeat(3, minmax(68px, 1fr));
    gap: 8px;
  }

  .check-row strong {
    grid-column: 1 / -1;
  }

  .check-row small {
    display: none;
  }

  .radio-pill span {
    width: 100%;
    min-width: 0;
  }

  .asset-actions {
    grid-template-columns: 1fr;
  }

  .asset-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
  }

  .asset-table th:nth-child(4),
  .asset-table td:nth-child(4),
  .asset-table th:nth-child(5),
  .asset-table td:nth-child(5),
  .asset-table th:nth-child(6),
  .asset-table td:nth-child(6) {
    display: none;
  }

  .asset-table th:nth-child(7),
  .asset-table td:nth-child(7) {
    display: none;
  }

  .asset-table th:nth-child(1),
  .asset-table td:nth-child(1) {
    width: 30px;
  }

  .asset-table th:nth-child(2),
  .asset-table td:nth-child(2) {
    width: 72px;
  }

  .asset-table th:nth-child(3),
  .asset-table td:nth-child(3) {
    width: auto;
  }

  .asset-table th:nth-child(8),
  .asset-table td:nth-child(8) {
    width: 54px;
  }

  .asset-table th:nth-child(9),
  .asset-table td:nth-child(9) {
    width: 66px;
  }

  .asset-table td {
    padding: 10px 6px;
    overflow-wrap: anywhere;
  }

  .asset-table-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .asset-table-actions button {
    width: 100%;
    min-height: 32px;
    padding: 0 4px;
  }

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

  .report-asset-details {
    grid-template-columns: 1fr;
  }

  .report-asset-details div,
  .report-asset-details div:nth-child(odd) {
    border-right: 0;
  }

  .report-asset-details div:last-child {
    border-bottom: 0;
  }

  .report-summary {
    flex-direction: column;
  }

  .report-summary div + div {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}

@media print {
  @page {
    margin: 10mm;
  }

  body * {
    visibility: hidden;
  }

  body.print-qr #qrPrintArea,
  body.print-qr #qrPrintArea *,
  body.print-report #inspectionReport,
  body.print-report #inspectionReport * {
    visibility: visible;
  }

  body.print-qr #qrPrintArea {
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    width: 62mm;
    min-height: auto;
    border: 1px solid #000;
    box-shadow: none;
    padding: 6mm;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  body.print-qr #qrCodeBox img,
  body.print-qr #qrCodeBox canvas {
    width: 42mm !important;
    height: 42mm !important;
  }

  body.print-qr #qrAssetCode {
    font-size: 16pt;
    margin-top: 2mm;
  }

  body.print-qr #qrAssetName,
  body.print-qr #qrPrintArea small {
    font-size: 10pt;
  }

  body.print-report #inspectionReport {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    border: 0;
    box-shadow: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 277mm;
  }

  #inspectionReport .official-report-header {
    padding-bottom: 5mm;
  }

  #inspectionReport .report-hospital,
  #inspectionReport .report-unit {
    font-size: 14pt;
  }

  #inspectionReport .report-unit {
    margin-top: 4mm;
  }

  #inspectionReport .report-title-block {
    margin-top: 7mm;
  }

  #inspectionReport .report-title-block h3 {
    font-size: 17pt;
  }

  #inspectionReport .report-asset-details {
    margin: 5mm 0;
    font-size: 10pt;
  }

  #inspectionReport .report-asset-details div {
    min-height: 10mm;
    padding: 2.5mm 3mm;
  }

  #inspectionReport .report-summary {
    margin: 0 0 5mm;
  }

  #inspectionReport .report-summary div {
    padding: 3mm;
  }

  #inspectionReport .report-signatures {
    margin-top: auto;
    padding-top: 16mm;
  }

  .report-table {
    overflow: visible;
  }

  .report-table table {
    min-width: 0;
    font-size: 12px;
  }

  .report-print-hidden,
  [data-delete-inspection] {
    display: none;
  }
}
