* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  background: #e9edf1;
  color: #111;
}

.app {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 20px;
  padding: 20px;
}

.controls {
  font-family: Arial, sans-serif;
  background: #fff;
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  height: calc(100vh - 40px);
  overflow: auto;
}

.controls h1 {
  margin: 0 0 6px;
  font-size: 22px;
}

.hint,
.subtle {
  color: #555;
  font-size: 12px;
}

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

.grid.two {
  margin-top: 10px;
}

label {
  display: block;
  font-weight: 700;
  font-size: 13px;
  margin: 10px 0;
}

input, select, textarea {
  width: 100%;
  margin-top: 4px;
  padding: 7px;
  border: 1px solid #c8c8c8;
  border-radius: 6px;
  font: 14px Arial, sans-serif;
}

textarea {
  resize: vertical;
}

.buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
}

button {
  border: 0;
  border-radius: 8px;
  padding: 10px;
  cursor: pointer;
  font-weight: 700;
}

button:first-child {
  background: #111;
  color: #fff;
}

button.danger {
  grid-column: 1 / -1;
  background: #c83545;
  color: #fff;
}

.sheet-wrap {
  overflow: auto;
}

.sheet {
  width: 11in;
  height: 8.5in;
  margin: 0 auto;
  padding: .12in;
  background: white;
  box-shadow: 0 8px 24px rgba(0,0,0,.15);
  overflow: hidden;
}

.sheet-header {
  display: grid;
  grid-template-columns: 1fr 300px;
  align-items: center;
  gap: 8px;
  height: .35in;
}

.remember {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 1px;
  white-space: nowrap;
}

.uniform {
  text-align: right;
  font-weight: 700;
  font-size: 16px;
}

.top-grid {
  display: grid;
  grid-template-columns: 7.15in 3.45in;
  gap: 8px;
  height: .72in;
  margin-bottom: 4px;
}

.top-info-box,
.hotel-box,
.image-box,
.pilot-box {
  position: relative;
  overflow: hidden;
  min-height: 0;
  max-height: 100%;
}

.top-info-box img,
.hotel-box img,
.image-box img,
.pilot-box img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: none;
  max-width: 100%;
  max-height: 100%;
}

.top-info-box img,
.hotel-box img {
  object-fit: fill;
}

.image-fit-fill {
  object-fit: fill;
}

.image-fit-contain {
  object-fit: contain;
}

.image-fit-cover {
  object-fit: cover;
}

.placeholder {
  height: 100%;
  display: grid;
  place-items: center;
  border: 2px dashed #aaa;
  color: #777;
  font-size: 18px;
  text-align: center;
}

.placeholder.compact {
  font-size: 13px;
}

.main-grid {
  display: grid;
  grid-template-columns: 4.05in 3.0in 2.65in;
  gap: 8px;
  height: 5.15in;
  overflow: hidden;
}

.left-pane,
.center-pane,
.right-pane {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.crew-box {
  width: 100%;
  height: 100%;
}

.center-pane h2 {
  text-align: center;
  font-size: 26px;
  margin: 0 0 2px;
  font-style: italic;
  line-height: .9;
}

.pilot-box {
  height: 1.35in;
}

.passenger-card {
  margin-top: 8px;
  height: 1.38in;
  display: grid;
  place-items: center;
  text-align: center;
  font-size: 15.5px;
  font-weight: 700;
}

.blue-card,
.load-card,
.notes-card {
  background: #d7edf7;
  border: 1px solid #999;
}

.blue-card {
  padding: 4px;
  margin-bottom: 4px;
}

.big-center {
  text-align: center;
  font-size: 14.5px;
  line-height: 1.06;
}

.blue-card h3 {
  margin: 0 0 2px;
  text-align: center;
  font-size: 17px;
}

.safety-card ul {
  margin: 0;
  padding-left: 16px;
  font-size: 10.5px;
  line-height: 1.02;
}

.service-card {
  min-height: .53in;
}

.kindness-card {
  font-size: 12.5px;
  min-height: .58in;
}

pre {
  margin: 0;
  white-space: pre-wrap;
  font-family: Georgia, "Times New Roman", serif;
}

.compact-load {
  margin-top: 8px;
  height: .88in;
  overflow: hidden;
}

#loadTable {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  table-layout: fixed;
}

#loadTable th,
#loadTable td {
  border: 1px solid #777;
  text-align: center;
  padding: 3px 2px;
  line-height: 1.05;
}

#loadTable th {
  font-weight: 700;
}

.bottom-grid {
  display: grid;
  grid-template-columns: 2.95in 2.95in 4.52in;
  gap: 6px;
  margin-top: 6px;
  height: 1.72in;
  overflow: hidden;
}

.notes-card {
  padding: 5px;
  font-size: 12.8px;
  line-height: 1.14;
  overflow: hidden;
}

.notes-card h3 {
  margin: 0 0 4px;
  font-size: 17px;
  border-bottom: 1px solid #777;
}

.service-info-card {
  font-size: 13.2px;
}

.service-info-card pre:empty::before {
  content: "Add gate change info, equipment notes, special instructions, etc.";
  color: #333;
}

.sheet-footer {
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  font-style: italic;
  line-height: 1;
  margin-top: 5px;
}

@page {
  size: letter landscape;
  margin: 0;
}

@media print {
  body {
    background: white;
  }

  .controls {
    display: none;
  }

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

  .sheet-wrap {
    overflow: visible;
  }

  .sheet {
    width: 11in;
    height: 8.5in;
    margin: 0;
    box-shadow: none;
    page-break-after: avoid;
  }
}

@media screen and (max-width: 1200px) {
  .app {
    grid-template-columns: 1fr;
  }

  .controls {
    height: auto;
  }
}
