@page {
  size: A4 landscape;
  margin: 8mm;
}

:root,
body {
  background: #fff;
  color: #111;
}

body {
  font-size: 8.5pt;
}

.app {
  display: block;
  min-height: 0;
}

.sidebar,
.topbar,
.mobile-nav,
.toast,
dialog,
.page-head .actions,
.jobbar,
.callout,
.plan-summary,
.day-head .edit {
  display: none !important;
}

main {
  display: block;
  margin: 0 !important;
  padding: 0 !important;
}

.page-head {
  display: block;
  margin: 0 0 4mm;
}

.page-head h1 {
  margin: 0;
  font-size: 16pt;
}

.page-head .eyebrow,
.page-head p.muted {
  display: none;
}

.section {
  margin-top: 4mm;
}

.section-head {
  margin-bottom: 2mm;
}

.section-head h2 {
  margin: 0;
  font-size: 12pt;
}

.section-head .eyebrow,
.section-head > small {
  display: none;
}

.schedule {
  display: block;
}

main[data-page="plan"] > .page-head,
.plan-calendar > .section-head {
  display: none;
}

.plan-calendar {
  margin: 0;
}

.print-week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-template-rows: auto 1fr;
  align-content: start;
  gap: 2mm;
  height: 190mm;
  overflow: hidden;
  break-inside: avoid;
  page-break-inside: avoid;
  break-after: page;
  page-break-after: always;
}

.print-week:last-child {
  break-after: auto;
  page-break-after: auto;
}

.print-week-title {
  display: block;
  grid-column: 1 / -1;
  margin: 0 0 1mm;
  padding-bottom: 1.5mm;
  border-bottom: 1px solid #899;
  font-size: 11pt;
}

.day {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 177mm;
  overflow: hidden;
  break-inside: avoid;
  page-break-inside: avoid;
  border-radius: 1.5mm;
  box-shadow: none;
}

.day-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 2mm;
  gap: 1mm;
}

.day-head strong {
  min-width: 0;
  width: 100%;
}

.screen-date {
  display: none;
}

.print-date {
  display: block;
  font-size: 9pt;
  line-height: 1.2;
}

.badge {
  max-width: 100%;
  padding: .7mm 1.2mm;
  font-size: 6pt;
  white-space: normal;
}

.day-body {
  display: block;
}

.location {
  padding: 2mm;
}

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

.location h3 {
  display: block;
  margin-bottom: 1.2mm;
  font-size: 7.4pt;
  line-height: 1.15;
}

.location h3 .badge {
  display: none;
}

.assignment {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 0;
  margin-top: 1mm;
  padding: 1mm;
  gap: .4mm 1mm;
  font-size: 6.6pt;
}

.assignment .name {
  overflow: hidden;
  text-overflow: ellipsis;
}

.assignment > span:nth-child(2) {
  grid-column: 1;
  color: #52666b;
  font-size: 5.7pt;
}

.assignment .shift {
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: center;
  margin-left: 0;
  padding: .6mm .9mm;
  font-size: 5.5pt;
}

.day-free {
  display: block;
  margin-top: auto;
  padding: 1.5mm 2mm;
  font-size: 6pt;
}

.free-chips {
  display: flex;
  gap: .6mm;
  margin-top: .8mm;
}

.free-chips span {
  padding: .5mm .8mm;
  font-size: 5.5pt;
  line-height: 1.1;
}

.empty {
  padding: 1mm 0;
  font-size: 6.3pt;
}

.staff-overview,
.rule-person-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3mm;
}

.staff-card,
.rule-person-card,
.overview-summary article {
  break-inside: avoid;
  page-break-inside: avoid;
  box-shadow: none;
}

.plan-calendar + .section {
  display: none;
}

body.order-printing .app,
body.order-printing > dialog,
body.order-printing > .toast {
  display: none !important;
}

body.order-printing .order-print-area {
  display: block !important;
}

.order-print-sheet {
  max-width: 270mm;
  margin: 0 auto;
  font-size: 10pt;
}

.order-print-sheet header {
  display: flex;
  justify-content: space-between;
  gap: 12mm;
  padding-bottom: 4mm;
  border-bottom: 2px solid #183d44;
}

.order-print-sheet header p,
.order-print-sheet header h1 {
  margin: 0;
}

.order-print-sheet section {
  margin-top: 5mm;
  break-inside: avoid;
}

.order-print-sheet h2 {
  margin: 0 0 2mm;
  padding: 2mm 3mm;
  background: #e9f1ef;
  font-size: 13pt;
}

.order-print-sheet table {
  min-width: 0;
}

.order-print-sheet th,
.order-print-sheet td {
  padding: 2.2mm 3mm;
  font-size: 9.5pt;
}

.order-print-sheet th:nth-child(2),
.order-print-sheet td:nth-child(2) {
  width: 25mm;
  text-align: center;
  font-weight: 800;
}

.order-print-sheet th:nth-child(3),
.order-print-sheet td:nth-child(3) {
  width: 35mm;
}

.print-note {
  margin: 4mm 0 0;
  padding: 3mm;
  border: 1px solid #899;
}

.order-print-sheet footer {
  margin-top: 7mm;
  padding-top: 3mm;
  border-top: 1px solid #899;
  color: #566;
}
