:root {
  --bg: #f4f7f5;
  --panel: #ffffff;
  --panel-soft: #f8fbf9;
  --line: #d8e2dc;
  --line-soft: #ebf0ed;
  --text: #17231d;
  --muted: #728177;
  --green: #18a566;
  --green-dark: #0b8450;
  --green-soft: #e8f6ef;
  --header-soft: #f1f7f3;
  --shadow: 0 4px 16px rgba(20, 40, 30, 0.06);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

button,
input,
select {
  font: inherit;
}

.app-shell {
  max-width: 1400px;
  margin: 0 auto;
  padding: 12px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
  padding: 12px 14px;
  background: linear-gradient(90deg, #123457, #163a5c);
  color: #fff;
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

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

.brand-logo-wrap {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-logo {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.brand-text h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
}

.brand-text p {
  margin: 3px 0 0;
  font-size: 11px;
  color: #d5e1ee;
  line-height: 1.1;
}

.clock-panel {
  min-width: 150px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 6px 10px;
  text-align: right;
}

.clock-label {
  font-size: 10px;
  color: #d5e1ee;
  line-height: 1.1;
}

.clock-time {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.15;
  margin-top: 2px;
}

.clock-date {
  font-size: 10px;
  color: #eef4fa;
  line-height: 1.1;
  margin-top: 2px;
}

.board-card {
  background: #ffffff;
  border: 1px solid #e3ebe7;
  border-radius: 14px;
  overflow: hidden;
  box-shadow:
    0 2px 6px rgba(20, 40, 30, 0.04),
    0 8px 24px rgba(20, 40, 30, 0.06);
}

.board-card-main {
  margin-bottom: 10px;
}

.aviation-news-ticker {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  margin: 0 0 10px;
  padding: 7px 10px;
  border: 2px solid #c91f28;
  border-radius: 12px;
  background: linear-gradient(90deg, #fff8f8, #ffffff);
  box-shadow: 0 2px 8px rgba(120, 20, 20, 0.06);
  overflow: hidden;
}

.aviation-news-viewport {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}

.aviation-news-track {
  --ticker-duration: 42s;
  display: inline-flex;
  align-items: center;
  gap: 28px;
  width: max-content;
  min-width: 100%;
  color: #1f2937;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0;
  white-space: nowrap;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  animation: aviationTicker var(--ticker-duration) linear infinite;
}

.aviation-news-ticker:hover .aviation-news-track,
.aviation-news-ticker:focus-within .aviation-news-track {
  animation-play-state: paused;
}

.aviation-news-item {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  color: inherit;
  font: inherit;
  line-height: inherit;
  text-decoration: none;
}

.aviation-news-item:hover {
  color: #c91f28;
}

.aviation-news-dot {
  display: inline-block;
  flex: 0 0 auto;
  color: #c91f28;
  font-size: 0.72em;
  font-weight: 700;
  line-height: 1;
}

.aviation-news-text {
  display: inline-block;
  font: inherit;
  line-height: inherit;
}

.aviation-news-loading {
  color: #7f1d1d;
  font: inherit;
  line-height: inherit;
}

.oa-read-all-button[hidden] {
  display: none;
}

.oa-read-all-button {
  flex: 0 0 auto;
  min-width: 76px;
  height: 30px;
  padding: 0 12px;
  border: 1px solid #c91f28;
  border-radius: 9px;
  background: #c91f28;
  color: #fff;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 2px 7px rgba(145, 20, 28, 0.18);
}

.oa-read-all-button:hover {
  background: #a9151d;
}

.oa-read-all-button:focus-visible {
  outline: 2px solid #123457;
  outline-offset: 2px;
}

.oa-library-panel {
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  flex-direction: column;
  width: min(680px, calc(100vw - 36px));
  max-height: min(78vh, 720px);
  overflow: hidden;
  transform: translate(-50%, -50%);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.28);
}

.oa-library-header {
  position: relative;
  flex: 0 0 auto;
  padding: 18px 190px 14px 20px;
  border-bottom: 1px solid #e5ece8;
  background: linear-gradient(135deg, #123457, #1e547c);
  color: #fff;
}

.oa-library-header h2 {
  margin: 0;
  font-size: 19px;
  line-height: 1.2;
}

.oa-library-header p {
  margin: 5px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 11px;
}

.oa-library-header-actions {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.oa-library-upload-button {
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 9px;
  background: #fff;
  color: #17476d;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(7, 24, 41, 0.18);
}

.oa-library-upload-button:hover {
  background: #eef8ff;
}

.oa-library-upload-button:focus-visible,
.oa-library-close:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.oa-library-upload-button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.oa-library-header-actions .oa-library-close {
  position: static;
  top: auto;
  right: auto;
  flex: 0 0 auto;
}

.oa-upload-status {
  flex: 0 0 auto;
  padding: 9px 14px;
  border-bottom: 1px solid #d8e7df;
  background: #ecf8f1;
  color: #17603d;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
}

.oa-upload-status.is-error {
  border-bottom-color: #f2c9cc;
  background: #fff0f1;
  color: #9c1f2a;
}

.oa-library-list {
  display: grid;
  gap: 9px;
  min-height: 120px;
  padding: 14px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #f5f8f7;
}

.oa-library-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 16px;
  width: 100%;
  padding: 13px 14px;
  border: 1px solid #dce7e1;
  border-radius: 12px;
  background: #fff;
  color: #17231d;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 2px 7px rgba(15, 42, 28, 0.04);
}

.oa-library-item:hover {
  border-color: #79c6a1;
  background: #f4fcf8;
}

.oa-library-item:focus-visible {
  outline: 2px solid #07894f;
  outline-offset: 2px;
}

.oa-library-item-title {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.35;
}

.oa-library-item-date {
  align-self: center;
  color: #66756d;
  font-size: 10px;
  line-height: 1.3;
  white-space: nowrap;
}

.oa-library-item-open {
  grid-column: 1 / -1;
  color: #087548;
  font-size: 10px;
  font-weight: 750;
}

.oa-library-status {
  display: grid;
  place-items: center;
  min-height: 150px;
  padding: 24px;
  color: #66756d;
  font-size: 12px;
  text-align: center;
}

@keyframes aviationTicker {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

.airport-boards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.airport-titlebar {
  padding: 8px 12px;
  border-bottom: 1px solid #10273f;
  background: linear-gradient(90deg, #163a5c, #123457);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.airport-title-main {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  flex-wrap: wrap;
}

.airport-code {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  flex-shrink: 0;
}

.airport-fullname {
  font-size: 12px;
  color: #d7e3ef;
  line-height: 1.2;
}

.airport-weather {
  flex-shrink: 0;
  font-size: 12px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 4px 10px;
  white-space: nowrap;
}

.card-header.date-header {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.date-header-with-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.date-panel {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 4px;
}

.calendar-btn,
.nav-btn,
.paper-btn,
.clear-btn {
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-soft);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.15s ease;
}

.calendar-btn:hover,
.nav-btn:hover,
.paper-btn:hover,
.clear-btn:hover {
  background: var(--green-soft);
}

.today-btn {
  height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-soft);
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
  transition: 0.15s ease;
}

.today-btn:hover {
  background: var(--green-soft);
}

.date-display {
  min-width: 170px;
  height: 28px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--green-dark);
  user-select: none;
  pointer-events: none;
  white-space: nowrap;
  font-size: 13px;
}

.date-picker-hidden {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

@media (pointer: coarse) {
  .date-picker-hidden {
    left: 4px;
    top: 4px;
    z-index: 4;
    width: 36px;
    height: 36px;
    opacity: 0;
    pointer-events: auto;
    cursor: pointer;
  }
}

@media (pointer: coarse) and (max-width: 360px) {
  .date-picker-hidden {
    width: 30px;
    height: 32px;
  }
}

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

.summary-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  box-shadow: var(--shadow);
}

.summary-card-inline,
.summary-export-card {
  min-width: 140px;
  max-width: 160px;
  min-height: 72px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.summary-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  min-height: 22px;
}

.summary-icon {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.summary-icon img {
  width: 14px;
  height: 14px;
  object-fit: contain;
  display: block;
}

.summary-value {
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
}

.parked-aircraft-count {
  margin-left: 4px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #dc2626;
  font: inherit;
  line-height: 1;
  cursor: pointer;
}

.parked-aircraft-count:hover {
  text-decoration: underline;
}

.parked-aircraft-modal[hidden] {
  display: none;
}

.parked-aircraft-modal {
  position: fixed;
  inset: 0;
  z-index: 10020;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.parked-aircraft-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.46);
  backdrop-filter: blur(2px);
}

.parked-aircraft-panel {
  position: relative;
  width: min(420px, 100%);
  max-height: calc(100vh - 32px);
  overflow: hidden;
  border: 1px solid #d8e2dc;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 20px 56px rgba(20, 40, 30, 0.30);
}

.parked-aircraft-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #ebf0ed;
}

.parked-aircraft-header h2 {
  margin: 0;
  color: #17231d;
  font-size: 17px;
}

.parked-aircraft-close {
  width: 32px;
  height: 32px;
  border: 1px solid #d8e2dc;
  border-radius: 8px;
  background: #ffffff;
  cursor: pointer;
}

.manual-flight-panel {
  width: min(560px, 100%);
}

.manual-flight-panel .parked-aircraft-header {
  align-items: flex-start;
}

.manual-flight-hint {
  margin: 5px 0 0;
  color: #718078;
  font-size: 12px;
  line-height: 1.45;
}

.manual-flight-form {
  max-height: calc(100vh - 132px);
  overflow-y: auto;
  padding: 14px 16px 16px;
}

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

.manual-flight-grid .wide {
  grid-column: 1 / -1;
}

.manual-flight-field {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: #526158;
  font-size: 12px;
  font-weight: 800;
}

.manual-flight-field small {
  color: #8a9690;
  font-size: 10px;
  font-weight: 600;
}

.manual-flight-field > input,
.manual-flight-field > select,
.manual-flight-reg {
  box-sizing: border-box;
  width: 100%;
  height: 42px;
  min-width: 0;
  border: 1px solid #d8e2dc;
  border-radius: 10px;
  background: #fbfdfc;
  color: #17231d;
  font-size: 15px;
  font-weight: 800;
  outline: none;
}

.manual-flight-field > input,
.manual-flight-field > select {
  padding: 0 11px;
}

.manual-flight-date-input {
  box-sizing: border-box !important;
  block-size: 42px !important;
  height: 42px !important;
  min-height: 42px !important;
  max-height: 42px !important;
  padding: 0 11px !important;
  line-height: 40px !important;
  text-align: left !important;
  direction: ltr;
}

.manual-flight-date-input::-webkit-date-and-time-value,
.manual-flight-date-input::-webkit-datetime-edit,
.manual-flight-date-input::-webkit-datetime-edit-fields-wrapper {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  box-sizing: border-box !important;
  height: 40px !important;
  min-height: 40px !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 40px !important;
  text-align: left !important;
}

.manual-flight-field > input:focus,
.manual-flight-field > select:focus,
.manual-flight-reg:focus-within {
  border-color: #65b68c;
  box-shadow: 0 0 0 3px rgba(7, 149, 85, 0.12);
}

.manual-flight-reg {
  display: flex;
  align-items: center;
  overflow: hidden;
}

.manual-flight-reg b {
  padding-left: 11px;
  color: #718078;
}

.manual-flight-reg input {
  flex: 1;
  width: 100%;
  height: 40px;
  min-width: 0;
  padding: 0 11px 0 2px;
  border: 0;
  background: transparent;
  color: #17231d;
  font: inherit;
  outline: none;
}

.manual-flight-check {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 11px;
  border: 1px solid #d8e2dc;
  border-radius: 10px;
  background: #f8fbf9;
  color: #28483a;
  font-size: 13px;
  font-weight: 800;
}

.manual-flight-check input {
  width: 18px;
  height: 18px;
  accent-color: #079555;
}

.manual-flight-departure[hidden] {
  display: none !important;
}

.manual-flight-departure {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 12px;
  border: 1px dashed #8fd3b2;
  border-radius: 11px;
  background: #f4fbf7;
}

.manual-flight-status {
  min-height: 18px;
  margin: 10px 0 0;
  color: #718078;
  font-size: 12px;
  font-weight: 700;
}

.manual-flight-status[data-state="error"] {
  color: #c62828;
}

.manual-flight-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
}

.manual-flight-list-title {
  margin-top: 5px;
  padding: 8px 2px 0;
  border-top: 1px solid #e4ece7;
  color: #123457;
  font-size: 12px;
  font-weight: 900;
}

.manual-flight-summary-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border: 1px solid #d9eee3;
  border-radius: 10px;
  background: #f4fbf7;
}

.manual-flight-summary-row span,
.manual-flight-summary-row small {
  display: block;
  min-width: 0;
}

.manual-flight-summary-row b {
  color: #123457;
  font-size: 14px;
}

.manual-flight-summary-row small {
  margin-top: 3px;
  overflow: hidden;
  color: #718078;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.manual-flight-summary-row em,
.manual-flight-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #e0f5e9;
  color: #087548;
  font-style: normal;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .04em;
}

.manual-flight-summary-row em {
  min-height: 22px;
  padding: 0 8px;
}

.manual-flight-badge {
  margin-left: 4px;
  padding: 2px 5px;
  vertical-align: middle;
}

.manual-flight-delete {
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid #efb5b5;
  border-radius: 8px;
  background: #fff7f7;
  color: #b42318;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.manual-flight-add {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid #079555;
  border-radius: 10px;
  background: #079555;
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.manual-flight-add span {
  font-size: 20px;
  line-height: 1;
}

@media (max-width: 520px) {
  .manual-flight-grid,
  .manual-flight-departure {
    grid-template-columns: 1fr;
  }

  .manual-flight-departure .wide {
    grid-column: auto;
  }
}

.parked-aircraft-list {
  display: grid;
  gap: 8px;
  max-height: min(60vh, 480px);
  overflow-y: auto;
  padding: 12px;
}

.parked-aircraft-item {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto auto;
  gap: 5px 10px;
  padding: 10px 12px;
  border: 1px solid #ebf0ed;
  border-radius: 11px;
  background: #f8fbf9;
  color: #526158;
  font-size: 13px;
}

.parked-aircraft-item .ground-duration {
  grid-column: 3;
  grid-row: 1 / span 2;
  align-self: center;
}

.parked-aircraft-item strong {
  grid-row: 1 / span 2;
  align-self: center;
  color: #dc2626;
  font-size: 15px;
}

.parked-aircraft-wait-status {
  grid-column: 2 / 4;
  grid-row: 3;
  color: #d97706;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .03em;
}

.parked-aircraft-add-flight {
  grid-column: 4;
  grid-row: 1 / span 2;
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 6px;
  border: 1px solid #8fd3b2;
  border-radius: 10px;
  background: #eefaf4;
  cursor: pointer;
}

.parked-aircraft-add-flight img {
  width: 27px;
  height: 27px;
  object-fit: contain;
  display: block;
}

.parked-aircraft-add-flight:hover {
  border-color: #07894f;
  background: #e0f5e9;
}

.parked-aircraft-add-flight:focus-visible {
  outline: 2px solid #07894f;
  outline-offset: 2px;
}

.parked-aircraft-bay-editor {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto minmax(96px, 1fr) auto;
  align-items: center;
  gap: 6px 8px;
  margin-top: 6px;
  padding-top: 9px;
  border-top: 1px solid #e1ebe5;
}

.parked-aircraft-bay-label {
  color: #33443a;
  font-weight: 700;
  white-space: nowrap;
}

.parked-aircraft-bay-input {
  min-width: 0;
  height: 36px;
  padding: 0 10px;
  border: 1px solid #b8c9bf;
  border-radius: 8px;
  background: #ffffff;
  color: #17231d;
  font: inherit;
  text-transform: uppercase;
}

.parked-aircraft-bay-input:focus {
  border-color: #07894f;
  outline: 2px solid rgba(7, 137, 79, 0.16);
}

.parked-aircraft-save-bay {
  height: 36px;
  padding: 0 12px;
  border: 1px solid #07894f;
  border-radius: 8px;
  background: #07894f;
  color: #ffffff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.parked-aircraft-save-bay:disabled,
.parked-aircraft-bay-input:disabled {
  cursor: wait;
  opacity: 0.65;
}

.parked-aircraft-bay-status {
  grid-column: 2 / -1;
  min-height: 16px;
  color: #07894f;
  font-size: 11px;
}

.parked-aircraft-bay-status[data-state="error"] {
  color: #dc2626;
}

.summary-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  margin-left: 26px;
  line-height: 1.1;
}

.summary-export-card {
  appearance: none;
  -webkit-appearance: none;
  background: var(--panel);
  cursor: pointer;
  text-align: left;
  transition: 0.15s ease;
}

.summary-export-card:hover {
  background: var(--panel);
  border-color: var(--line);
  transform: none;
}

.summary-export-card:active {
  transform: none;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  overflow-y: visible;
}

.flight-table {
  width: 100%;
  min-width: 980px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  font-size: 13px;
  background: #ffffff;
}

.flight-table thead th {
  background: var(--header-soft);
  padding: 9px 6px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  white-space: nowrap;
  text-align: center;
  vertical-align: middle;
}

.flight-table tbody td {
  padding: 8px 6px;
  border-top: 1px solid var(--line-soft);
  height: 50px;
  box-sizing: border-box;
  white-space: nowrap;
  text-align: center;
  vertical-align: middle;
}

.flight-table tbody tr {
  height: 50px;
}

.paper-cell {
  text-align: center;
}

.col-no { width: 48px; }
.col-flight { width: 108px; }
.col-reg { width: 110px; }
.col-from,
.col-to { width: 72px; }
.col-std { width: 98px; }
.col-actual { width: 98px; }
.col-dep-std { width: 98px; }
.col-gate { width: 88px; }
.col-release { width: 128px; }
.col-paper { width: 78px; }

.flight-table input[type="text"] {
  height: 30px;
  border: 1px solid #cfd8d3;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
  outline: none;
  box-shadow: none;
}

.flight-table input[type="text"]:focus,
.gate-picker-btn:focus,
.aircraft-picker-btn:focus,
.release-picker-btn:focus,
.gate-custom-input:focus {
  border-color: #8fc9ae;
  outline: none;
}

/* Highlight an aircraft row when either side of its flight pair is missing. */
.flight-table tbody tr.row-incomplete-flight,
.flight-table tbody tr.row-incomplete-flight td:not(.cell-release),
.flight-table tbody tr.row-incomplete-flight td:not(.cell-release)::before,
.flight-table tbody tr.row-incomplete-flight td:not(.cell-release) *,
.flight-table tbody tr.row-incomplete-flight td:not(.cell-release) input::placeholder {
  color: #dc2626 !important;
}

.flight-table tbody tr.row-awaiting-departure,
.flight-table tbody tr.row-awaiting-departure td,
.flight-table tbody tr.row-awaiting-departure .flight-arr,
.flight-table tbody tr.row-awaiting-departure .parked-board-arrival-remark,
.flight-table tbody tr.row-awaiting-departure .reg-prefix,
.flight-table tbody tr.row-awaiting-departure .reg-input,
.flight-table tbody tr.row-awaiting-departure .gate-picker-btn,
.flight-table tbody tr.row-awaiting-departure .release-picker-btn,
.flight-table tbody tr.row-awaiting-departure .mobile-cell-value,
.flight-table tbody tr.row-awaiting-departure .editable-cell::before {
  color: #dc2626 !important;
}

.flight-table tbody tr.row-awaiting-departure {
  box-shadow: inset 4px 0 0 #dc2626;
}

.parked-board-flight-cell {
  gap: 2px;
}

.parked-board-arrival-remark {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.15;
}

.flight-table tbody tr.row-parked-departure .cell-from {
  max-height: 2.4em;
  overflow: hidden;
  white-space: pre-line;
  word-break: keep-all;
  line-height: 1.2;
  font-size: 11px;
  text-align: center;
}

.flight-table tbody tr.row-parked-departure .cell-from.has-aircraft-origin {
  max-height: none;
  white-space: normal;
}

.reg-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.reg-prefix {
  font-size: 13px;
  color: #1f2a24;
}

.reg-input {
  width: 66px;
  padding: 0 8px;
  text-align: left;
}

.actual-input {
  width: 74px;
  padding: 0 8px;
  text-align: center;
}

.actual-time-delayed .actual-input,
.actual-input.actual-time-delayed,
.actual-time-delayed .mobile-cell-value,
.mobile-cell-value.actual-time-delayed {
  color: #dc2626 !important;
}

.gate-picker,
.aircraft-picker,
.release-picker {
  position: relative;
  display: inline-block;
}

.gate-picker-btn,
.aircraft-picker-btn,
.release-picker-btn {
  height: 30px;
  padding: 0 26px 0 8px;
  border: 1px solid #cfd8d3;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
  text-align: left;
  cursor: pointer;
  position: relative;
}

.gate-picker-btn {
  width: 68px;
}

.aircraft-picker-btn {
  width: 64px;
}

.release-picker-btn {
  width: 118px;
}

.gate-picker-btn::after,
.aircraft-picker-btn::after,
.release-picker-btn::after {
  content: "";
  position: absolute;
  right: 10px;
  top: 11px;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid #5e6d65;
}

.gate-picker-menu,
.aircraft-picker-menu,
.release-picker-menu {
  position: fixed;
  left: -9999px;
  top: -9999px;
  padding: 8px;
  border: 1px solid #cfd8d3;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(20, 40, 30, 0.12);
  display: none;
  z-index: 9999;
}

.gate-picker.open .gate-picker-menu,
.aircraft-picker.open .aircraft-picker-menu,
.release-picker.open .release-picker-menu {
  display: block;
}

.gate-picker-menu {
  width: 220px;
  padding-top: 42px;
}

.gate-picker-close {
  position: absolute;
  top: 7px;
  right: 7px;
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid #d8e2dc;
  border-radius: 8px;
  background: #fff;
  color: #17231d;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}

.ground-duration {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  justify-self: end;
  min-width: 46px;
  margin-left: auto;
  color: #123457;
  line-height: 1;
  text-align: right;
}

.ground-duration small {
  font-size: 9px;
  font-weight: 700;
  text-transform: lowercase;
}

.ground-duration b {
  margin-top: 3px;
  font-size: 21px;
  font-weight: 900;
}

.aircraft-picker-menu {
  width: 132px;
}

.release-picker-menu {
  width: 170px;
}

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

.aircraft-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.release-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.gate-option,
.aircraft-option,
.release-option {
  height: 28px;
  border: 1px solid #d8e2dc;
  border-radius: 7px;
  background: #fff;
  font-size: 12px;
  cursor: pointer;
}

.gate-option:hover,
.aircraft-option:hover,
.release-option:hover {
  background: #eef8f2;
  border-color: #a9d6bb;
}

.gate-option.active,
.aircraft-option.active,
.release-option.active {
  background: #e8f6ef;
  border-color: #7fc4a0;
  font-weight: 600;
}

.gate-custom-wrap {
  margin-top: 8px;
  display: flex;
  gap: 6px;
  align-items: center;
}

.gate-custom-input {
  flex: 1;
  min-width: 0;
  width: 0;
  height: 30px;
  padding: 0 8px;
  border: 1px solid #cfd8d3;
  border-radius: 8px;
  background: #fff;
  font-size: 12px;
  text-align: left;
}

.gate-picker-menu .clear-btn,
.gate-custom-wrap .clear-btn {
  flex: 0 0 48px;
  min-width: 48px;
  padding: 0 6px;
}

.release-color-1 { color: #1d4ed8; }
.release-color-2 { color: #047857; }
.release-color-3 { color: #dc2626; }
.release-color-4 { color: #7c3aed; }
.release-color-5 { color: #c2410c; }
.release-color-6 { color: #0891b2; }
.release-color-7 { color: #be123c; }
.release-color-8 { color: #a21caf; }
.release-color-9 { color: #c95b8c; }
.release-color-10 { color: #4338ca; }
.release-color-11 { color: #0f766e; }
.release-color-12 { color: #475569; }
.release-color-13 { color: #b45309; }
.release-color-14 { color: #0369a1; }
.release-color-15 { color: #9333ea; }
.release-color-16 { color: #be185d; }

.release-picker-btn.has-value {
  font-weight: 600;
}

.release-option {
  text-align: left;
  padding: 0 10px;
}

.release-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

.clear-btn {
  width: auto;
  min-width: 52px;
  padding: 0 10px;
  font-size: 12px;
  border-radius: 7px;
}

.menu-measuring {
  pointer-events: none;
}

.paper-modal[hidden] {
  display: none;
}

.paper-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
}

.paper-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(2px);
}

.paper-modal-panel {
  position: absolute;
  inset: 24px;
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.24);
}

.paper-modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 2;
  width: 34px;
  height: 34px;
  border: 1px solid #d7dee8;
  border-radius: 999px;
  background: rgba(255,255,255,0.95);
  color: #334155;
  cursor: pointer;
}

.paper-modal-close:hover {
  background: #fff;
}

.paper-modal.is-warehouse-route-open #paperModalClose {
  display: none !important;
}

.paper-modal.is-warehouse-route-open .paper-modal-backdrop {
  pointer-events: none;
}

.paper-modal-frame {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #f3f5f8;
}

.flight-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.2;
}

.flight-arr {
  font-weight: 700;
  font-size: 13px;
}

.flight-dep {
  font-size: 12px;
  color: #6b7280;
  line-height: 1.1;
  margin-top: 2px;
}

.cell-dep-actual.is-canceled-departure .actual-input,
.cell-dep-actual.is-canceled-departure .mobile-cell-value {
  color: #dc2626 !important;
  font-weight: 900;
}

.departure-aircraft-origin {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  white-space: normal;
  color: #475569;
  font-size: 9px;
  line-height: 1.2;
}

.departure-aircraft-origin strong {
  color: #17231d;
  font-size: 10px;
}

.cnl-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 4px;
  padding: 1px 3px;
  border: 1px solid #dc2626;
  border-radius: 3px;
  color: #dc2626;
  background: #fff;
  font-size: 8px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: .02em;
  vertical-align: middle;
}

.next-day-mark {
  font-size: 9px;
  margin-left: 2px;
  vertical-align: super;
}

.paper-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

select {
  width: 100%;
  height: 28px;
  padding: 2px 8px;
  font-size: 13px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #fff;
  color: #111;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12'%3E%3Cpath fill='%23999' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 6px center;
  background-size: 10px;
}

select:focus {
  outline: none;
  border-color: #3b82f6;
}

select option[value="待确认"] {
  color: #999;
}

select option[value="已确认"] {
  color: #16a34a;
}

select[value="已确认"] {
  color: #16a34a;
  font-weight: 600;
}

select[value="待确认"] {
  color: #999;
}

.row-locked {
  opacity: 0.82;
}

/* Keep guest flight data legible while permission controls remain disabled. */
.jiwu-readonly-view .flight-table .jiwu-permission-disabled {
  opacity: 1 !important;
}

.jiwu-readonly-view .flight-table input.jiwu-permission-disabled,
.jiwu-readonly-view .flight-table select.jiwu-permission-disabled,
.jiwu-readonly-view .flight-table button.jiwu-permission-disabled {
  -webkit-text-fill-color: currentColor;
}

.row-locked input:disabled,
.row-locked button:disabled,
.row-locked select:disabled {
  cursor: not-allowed;
}

.paper-btn-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.unlock-btn {
  height: 24px;
  padding: 0 8px;
  border: 1px solid #d9c7a2;
  background: #fff7e8;
  color: #8a5a00;
  border-radius: 6px;
  font-size: 11px;
  cursor: pointer;
  white-space: nowrap;
}

.unlock-btn:hover {
  background: #ffefcc;
}

.unlock-btn:active {
  transform: translateY(1px);
}

.app-version-footer {
  text-align: center;
  font-size: 12px;
  color: #94a3b8;
  margin-top: 12px;
  padding: 10px 0 16px;
  line-height: 1.5;
}

.version-trigger {
  display: inline-block;
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  line-height: inherit;
  padding: 0;
  cursor: pointer;
}

.version-trigger:hover {
  color: #64748b;
}

.time-input-wrap {
  position: relative;
  display: inline-block;
  width: 74px;
}

.time-input-wrap .actual-input {
  width: 74px;
}

.time-next-day {
  position: absolute;
  left: calc(100% + 4px);
  top: 0;
  font-size: 9px;
  line-height: 1;
  color: #6b7280;
  transform: translateY(-0.38em);
  text-align: left;
  opacity: 0;
  pointer-events: none;
}

.time-next-day.show {
  opacity: 1;
}

.mobile-cell-value {
  display: none;
}

@media (max-width: 980px) {
  .topbar {
    flex-wrap: wrap;
  }
}

@media (max-width: 1024px) and (orientation: portrait) {
  .topbar {
    align-items: flex-start;
  }

  .clock-panel {
    width: 100%;
    text-align: left;
  }

  .summary-actions {
    width: 100%;
    justify-content: space-between;
  }

  .summary-export-card,
  .summary-card-inline {
    min-width: 150px;
  }
}

@media (max-width: 932px) and (orientation: landscape) {
  .app-shell {
    padding: 6px;
  }

  .topbar {
    gap: 8px;
    margin-bottom: 6px;
    padding: 7px 8px;
    border-radius: 10px;
  }

  .brand {
    gap: 6px;
    min-width: 0;
  }

  .brand-logo-wrap {
    width: 26px;
    height: 26px;
    border-radius: 7px;
  }

  .brand-logo {
    width: 18px;
    height: 18px;
  }

  .brand-text h1 {
    font-size: 13px;
    line-height: 1.05;
  }

  .brand-text p {
    display: none;
  }

  .clock-panel {
    min-width: 112px;
    padding: 4px 6px;
    border-radius: 7px;
  }

  .clock-label,
  .clock-date {
    font-size: 8px;
  }

  .clock-time {
    font-size: 12px;
    margin-top: 1px;
  }

  .board-card-main {
    margin-bottom: 6px;
  }

  .aviation-news-ticker {
    min-height: 30px;
    margin-bottom: 6px;
    padding: 5px 6px;
    border-radius: 9px;
  }

  .aviation-news-track {
    gap: 20px;
    font-size: 12px;
  }

  .oa-read-all-button {
    min-width: 68px;
    height: 26px;
    padding: 0 9px;
    border-radius: 7px;
    font-size: 10px;
  }

  .card-header.date-header {
    padding: 5px 6px;
  }

  .date-header-with-summary {
    gap: 8px;
    flex-wrap: nowrap;
    align-items: center;
  }

  .date-panel {
    gap: 3px;
    padding: 2px;
    border-radius: 8px;
    min-width: 0;
  }

  .calendar-btn,
  .nav-btn,
  .paper-btn,
  .clear-btn {
    width: 22px;
    height: 22px;
    font-size: 11px;
    border-radius: 5px;
  }

  .today-btn {
    height: 22px;
    padding: 0 6px;
    font-size: 10px;
    border-radius: 5px;
  }

  .date-display {
    min-width: 120px;
    height: 22px;
    padding: 0 6px;
    font-size: 10px;
  }

  .summary-actions {
    gap: 4px;
    margin-left: 0;
    flex-shrink: 0;
  }

  .summary-card-inline,
  .summary-export-card {
    min-width: 90px;
    max-width: 96px;
    min-height: 44px;
    padding: 6px 7px;
    border-radius: 8px;
  }

  .summary-top {
    gap: 4px;
    margin-bottom: 1px;
    min-height: 14px;
  }

  .summary-icon {
    width: 12px;
    height: 12px;
  }

  .summary-icon img {
    width: 10px;
    height: 10px;
  }

  .summary-value {
    font-size: 10px;
  }

  .summary-label {
    margin-left: 16px;
    font-size: 8px;
    line-height: 1;
  }

  .airport-boards {
    gap: 6px;
  }

  .board-card {
    border-radius: 10px;
  }

  .airport-titlebar {
    padding: 5px 8px;
    gap: 6px;
  }

  .airport-title-main {
    gap: 5px;
    min-width: 0;
  }

  .airport-code {
    font-size: 11px;
  }

  .airport-fullname {
    font-size: 9px;
    line-height: 1.05;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .airport-weather {
    font-size: 9px;
    padding: 2px 6px;
  }

  .table-wrap {
    overflow-x: hidden;
  }

  .flight-table {
    min-width: 100%;
    width: 100%;
    table-layout: fixed;
    font-size: 10px;
  }

  .flight-table thead th {
    padding: 5px 2px;
    font-size: 9px;
    line-height: 1.05;
    letter-spacing: -0.01em;
  }

  .flight-table tbody td {
    padding: 4px 2px;
    font-size: 10px;
  }

  .col-no { width: 28px; }
  .col-flight { width: 64px; }
  .col-reg { width: 62px; }
  .col-from,
  .col-to { width: 40px; }
  .col-std { width: 56px; }
  .col-actual { width: 56px; }
  .col-dep-std { width: 56px; }
  .col-gate { width: 52px; }
  .col-release { width: 62px; }
  .col-paper { width: 44px; }

  .departure-aircraft-origin {
    font-size: 7px;
    line-height: 1.1;
  }

  .departure-aircraft-origin strong {
    font-size: 8px;
  }

  .flight-arr {
    font-size: 10px;
    line-height: 1.02;
  }

  .flight-dep {
    font-size: 9px;
    margin-top: 1px;
    line-height: 1;
  }

  .next-day-mark {
    font-size: 7px;
  }

  .reg-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 1px;
    height: 22px;
  }

  .reg-prefix {
    font-size: 10px;
    line-height: 1;
  }

  .reg-input {
    width: 40px;
    height: 22px !important;
    padding: 0 2px;
    font-size: 10px;
    line-height: 22px !important;
    border-radius: 5px;
    box-sizing: border-box;
    vertical-align: middle;
  }

  .actual-input {
    width: 52px;
    height: 22px !important;
    padding: 0 2px;
    font-size: 10px;
    line-height: 22px !important;
    border-radius: 5px;
    box-sizing: border-box;
    vertical-align: middle;
  }

  .time-input-wrap {
    width: 52px;
  }

  .time-input-wrap .actual-input {
    width: 52px;
  }

  .time-next-day {
    font-size: 7px;
    left: calc(100% + 1px);
  }

  .gate-picker-btn {
    width: 48px;
    height: 22px !important;
    padding: 0 16px 0 4px;
    font-size: 10px;
    line-height: 22px !important;
    border-radius: 5px;
    box-sizing: border-box;
  }

  .release-picker-btn {
    width: 58px;
    height: 22px !important;
    padding: 0 16px 0 4px;
    font-size: 10px;
    line-height: 22px !important;
    border-radius: 5px;
    box-sizing: border-box;
  }

  .gate-picker-btn::after,
  .release-picker-btn::after {
    right: 6px;
    top: 8px;
    border-left: 3px solid transparent;
    border-right: 3px solid transparent;
    border-top: 4px solid #5e6d65;
  }

  .gate-picker-menu {
    width: 180px;
    padding: 36px 5px 5px;
    border-radius: 8px;
  }

  .release-picker-menu {
    width: 138px;
    padding: 5px;
    border-radius: 8px;
  }

  .gate-grid,
  .release-grid {
    gap: 4px;
  }

  .gate-option,
  .release-option {
    height: 22px;
    font-size: 10px;
    border-radius: 5px;
  }

  .release-option {
    padding: 0 6px;
  }

  .gate-custom-wrap {
    margin-top: 5px;
    gap: 4px;
  }

  .gate-custom-input {
    height: 22px;
    padding: 0 5px;
    font-size: 10px;
    border-radius: 5px;
  }

  .gate-picker-menu .clear-btn,
  .gate-custom-wrap .clear-btn {
    flex: 0 0 38px;
    min-width: 38px;
    font-size: 10px;
    padding: 0 3px;
  }

  .release-actions {
    margin-top: 5px;
  }

  .clear-btn {
    min-width: 40px;
    font-size: 10px;
  }

  .paper-btn {
    width: 22px;
    height: 22px;
    font-size: 11px;
  }

  .paper-btn-wrap {
    gap: 3px;
  }

  .unlock-btn {
    height: 20px;
    padding: 0 5px;
    font-size: 9px;
    border-radius: 4px;
  }

  .paper-modal-panel {
    inset: 10px;
    border-radius: 10px;
  }

  .paper-modal-close {
    width: 28px;
    height: 28px;
    top: 6px;
    right: 6px;
  }

  .app-version-footer {
    margin-top: 6px;
    padding: 5px 0 8px;
    font-size: 9px;
    line-height: 1.3;
  }

  .version-trigger {
    line-height: inherit;
  }
}

/* ===== CHANGELOG MODAL ===== */
#changelogModal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.changelog-hidden {
  display: none !important;
}

.changelog-box {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  width: 420px;
  max-width: calc(100vw - 24px);
  max-height: min(82vh, 720px);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.changelog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  font-weight: 700;
  border-bottom: 1px solid #eee;
}

.changelog-header button {
  border: none;
  background: transparent;
  font-size: 18px;
  cursor: pointer;
}

.changelog-content {
  flex: 1 1 auto;
  min-height: 0;
  padding: 14px 18px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.changelog-item {
  margin-bottom: 12px;
}

.changelog-item b {
  display: block;
  margin-bottom: 4px;
}

@keyframes blinkRed {
  0% { background-color: rgba(255, 0, 0, 0.15); }
  50% { background-color: rgba(255, 0, 0, 0.45); }
  100% { background-color: rgba(255, 0, 0, 0.15); }
}

.row-overload {
  animation: blinkRed 0.7s infinite;
}

.js-flight-pair-trigger {
  cursor: pointer;
}

.js-flight-pair-trigger:hover {
  background: rgba(37, 137, 85, 0.06);
}

@keyframes flightPairTextBlink {
  0%, 100% {
    color: #dc2626;
  }
  50% {
    color: #ff2f2f;
  }
}

.flight-pair-edited,
.flight-pair-edited::before {
  color: #dc2626;
}

.flight-pair-blink,
.flight-pair-blink::before {
  animation: flightPairTextBlink 0.85s infinite;
}

.flight-pair-editor[hidden] {
  display: none;
}

.flight-pair-editor {
  position: fixed;
  inset: 0;
  z-index: 10002;
}

.flight-pair-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(2px);
}

.flight-pair-sheet {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(420px, calc(100vw - 28px));
  padding: 16px;
  border: 1px solid #cfd8d3;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 20px 56px rgba(20, 40, 30, 0.30);
  transform: translate(-50%, -50%);
}

.flight-pair-title {
  color: #17231d;
  font-size: 16px;
  font-weight: 900;
}

.flight-pair-original {
  margin: 6px 0 12px;
  color: #728177;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.55;
  white-space: pre-line;
}

.flight-pair-field {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  margin-top: 10px;
  color: #728177;
  font-size: 13px;
  font-weight: 800;
}

.flight-pair-input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid #cfd8d3;
  border-radius: 11px;
  background: #f8fbf9;
  color: #17231d;
  font-size: 16px;
  font-weight: 900;
  outline: none;
  text-transform: uppercase;
}

.flight-pair-input:focus {
  border-color: #8fc9ae;
  box-shadow: 0 0 0 3px rgba(46, 125, 88, 0.12);
}

.js-pair-dep-date {
  appearance: none;
  -webkit-appearance: none;
  padding-block: 0;
  line-height: 40px;
}

.js-pair-dep-date::-webkit-date-and-time-value {
  display: flex;
  align-items: center;
  width: 100%;
  height: 40px;
  min-height: 40px;
  margin: 0;
  padding: 0;
  line-height: 40px;
}

.js-pair-dep-date::-webkit-datetime-edit {
  display: flex;
  align-items: center;
  height: 40px;
  padding: 0;
  line-height: 40px;
}

.flight-pair-date-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
}

.flight-pair-date-unknown {
  min-width: 78px;
  padding: 0 10px;
  border: 1px solid #d8e2dc;
  border-radius: 11px;
  background: #ffffff;
  color: #526158;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.flight-pair-date-unknown:hover {
  border-color: #8fc9ae;
  background: #eef7f2;
}

.flight-pair-actions {
  display: grid;
  grid-template-columns: 1.25fr 0.85fr 0.85fr 0.85fr;
  gap: 8px;
  margin-top: 8px;
}

.flight-pair-cancel-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.flight-pair-cancel-actions button,
.flight-pair-actions button {
  height: 38px;
  border: 1px solid #cfd8d3;
  border-radius: 10px;
  background: #ffffff;
  color: #17231d;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.flight-pair-cancel-actions button:hover,
.flight-pair-actions button:hover {
  background: #eef7f2;
}

.flight-pair-cancel-actions button {
  border-color: #f3b8b8;
  background: #fff7f7;
  color: #dc2626;
}

.flight-pair-cancel-actions button.is-active {
  border-color: #8fc9ae;
  background: #e8f6ef;
  color: #0b8450;
}

.flight-pair-cancel-actions button:disabled {
  border-color: #dfe5e1;
  background: #f4f6f5;
  color: #98a39c;
  cursor: not-allowed;
}

.flight-pair-save {
  background: #e8f6ef !important;
  border-color: #8fc9ae !important;
  color: #0b8450 !important;
}

.flight-pair-clear {
  color: #dc2626 !important;
}

.cell-dep-actual.flight-pair-edited .actual-input {
  color: #dc2626;
}

.mobile-field-editor[hidden] {
  display: none;
}

.mobile-field-editor {
  position: fixed;
  inset: 0;
  z-index: 10001;
}

.mobile-field-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.38);
  backdrop-filter: blur(2px);
}

.mobile-field-sheet {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 12px;
  padding: 14px;
  border: 1px solid #cfd8d3;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 18px 46px rgba(20, 40, 30, 0.28);
}

.mobile-field-title {
  margin-bottom: 10px;
  color: #17231d;
  font-size: 14px;
  font-weight: 800;
}

.mobile-field-input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid #cfd8d3;
  border-radius: 12px;
  background: #f8fbf9;
  color: #17231d;
  font-size: 16px;
  font-weight: 800;
  outline: none;
}

.mobile-field-input:focus {
  border-color: #8fc9ae;
}

.mobile-field-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.mobile-field-actions button {
  height: 40px;
  border: 1px solid #cfd8d3;
  border-radius: 11px;
  background: #ffffff;
  color: #17231d;
  font-size: 13px;
  font-weight: 700;
}

.mobile-field-save {
  background: #e8f6ef !important;
  border-color: #8fc9ae !important;
  color: #0b8450 !important;
}

@media (max-width: 1024px) and (orientation: portrait) {
  .app-shell {
    padding: 8px;
  }

  .topbar {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 10px;
    border-radius: 18px;
  }

  .brand {
    display: contents;
  }

  .brand-logo-wrap {
    width: 42px;
    height: 42px;
    border-radius: 12px;
  }

  .brand-logo {
    width: 30px;
    height: 30px;
  }

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

  .brand-text h1 {
    font-size: 16px;
    line-height: 1.05;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .brand-text p {
    margin-top: 2px;
    font-size: 9px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .clock-panel {
    width: auto;
    min-width: 76px;
    padding: 4px 6px;
    border-radius: 8px;
    text-align: right;
  }

  .clock-label {
    display: none;
  }

  .clock-time {
    margin-top: 0;
    font-size: 12px;
  }

  .clock-date {
    font-size: 7px;
  }

  .card-header.date-header {
    padding: 10px;
  }

  .date-header-with-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    align-items: stretch;
  }

  .date-panel {
    grid-column: 1 / -1;
    width: 100%;
    display: grid;
    grid-template-columns: 38px 38px minmax(0, 1fr) 38px 66px;
    gap: 6px;
    padding: 6px;
    border-radius: 16px;
  }

  .date-display {
    min-width: 0;
    width: 100%;
    font-size: 14px;
  }

  .calendar-btn,
  .nav-btn {
    width: 100%;
  }

  .today-btn {
    width: 100%;
    padding: 0;
  }

  .summary-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
    margin-left: 0;
  }

  .summary-card-inline,
  .summary-export-card {
    width: 100%;
    min-width: 0;
    max-width: none;
  }

  .aviation-news-ticker {
    min-height: 34px;
    padding: 7px 8px;
    border-radius: 12px;
  }

  .oa-read-all-button {
    min-width: 66px;
    height: 28px;
    padding: 0 8px;
    font-size: 9px;
  }

  .oa-library-panel {
    width: calc(100vw - 20px);
    max-height: min(84vh, 720px);
    border-radius: 13px;
  }

  .oa-library-header {
    min-height: 70px;
    padding: 14px 150px 12px 14px;
  }

  .oa-library-header h2 {
    font-size: 16px;
  }

  .oa-library-header-actions {
    top: 10px;
    right: 10px;
    gap: 7px;
  }

  .oa-library-upload-button {
    min-height: 32px;
    padding: 0 9px;
    font-size: 10px;
  }

  .oa-library-list {
    gap: 7px;
    padding: 9px;
  }

  .oa-library-item {
    grid-template-columns: 1fr;
    gap: 5px;
    padding: 11px 12px;
  }

  .oa-library-item-date {
    white-space: normal;
  }

  .aviation-news-track {
    gap: 24px;
    font-size: 12px;
  }

  .content,
  .airport-boards {
    gap: 8px;
  }

  .airport-titlebar {
    padding: 8px 10px;
  }

  .airport-title-main {
    flex: 1;
    min-width: 0;
    gap: 7px;
  }

  .airport-code {
    font-size: 16px;
  }

  .airport-fullname {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
    color: #d7e3ef;
  }

  .airport-weather {
    font-size: 10px;
    padding: 3px 7px;
  }

  .table-wrap {
    overflow-x: hidden;
    background: #f4f7f5;
  }

  .flight-table {
    display: block;
    min-width: 0;
    width: 100%;
    table-layout: auto;
    background: transparent;
  }

  .flight-table thead {
    display: none;
  }

  .flight-table tbody {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px;
  }

  .flight-table tbody tr {
    position: relative;
    height: auto;
    min-height: 132px;
    padding: 10px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-areas:
      "flight flight paper"
      "sta actual dep"
      "gate reg release";
    gap: 8px 5px;
    align-items: stretch;
    border: 1px solid #d8e2dc;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 4px 14px rgba(20, 40, 30, 0.06);
    overflow: visible;
  }

  .flight-table tbody td {
    padding: 0;
    height: auto;
    border: 0;
    min-width: 0;
    white-space: nowrap;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    font-size: 11px;
    overflow: hidden;
  }

  .cell-no {
    display: none !important;
  }

  .cell-flight {
    grid-area: flight;
    min-height: 30px;
    padding: 0 2px !important;
    color: #17231d;
    font-weight: 900;
    overflow: visible !important;
    white-space: nowrap;
  }

  .cell-flight.js-flight-pair-trigger {
    cursor: pointer;
  }

  .cell-flight::before {
    content: none;
    display: none;
  }

  .cell-flight .flight-cell {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    flex-wrap: nowrap;
    gap: 4px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 17px;
    line-height: 1;
  }

  .cell-flight .flight-arr {
    flex: 0 0 auto;
    color: #17231d;
    font-size: 17px;
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
  }

  .cell-flight .flight-dep {
    flex: 0 1 auto;
    min-width: 0;
    margin-top: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #17231d;
    font-size: 17px;
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
  }

  .cell-flight .flight-dep.flight-pair-edited {
    color: #dc2626;
  }

  .cell-flight .flight-dep::before {
    content: "/";
    margin-right: 4px;
    color: #17231d;
  }

  .cell-flight .cnl-badge {
    flex: 0 0 auto;
    margin-left: 2px;
    padding: 1px 2px;
    font-size: 7px;
  }

  .cell-dep-actual.flight-pair-edited .mobile-cell-value,
  .cell-dep-actual.flight-pair-edited .actual-input,
  .cell-to.flight-pair-edited {
    color: #dc2626 !important;
  }

  .cell-from {
    display: none !important;
  }

  .cell-to {
    display: none !important;
  }

  .cell-sta {
    grid-area: sta;
    min-height: 40px;
    padding: 0 8px !important;
    display: grid !important;
    grid-template-columns: 28px minmax(0, 1fr);
    align-items: center !important;
    justify-content: stretch !important;
    gap: 3px;
    border: 1px solid #cfd8d3 !important;
    border-radius: 10px;
    background: #f8fbf9;
    color: #17231d;
    font-size: 16px !important;
    font-weight: 800;
  }

  .cell-sta::before {
    content: "计划";
    display: inline-block;
    width: 28px;
    color: #728177;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
  }

  .cell-sta .time-with-next-day {
    display: block;
    min-width: 0;
    overflow: visible;
    white-space: nowrap;
    line-height: 1;
  }

  .paper-cell {
    grid-area: paper;
    position: static;
    width: 100%;
    height: 30px;
    padding: 0 !important;
    align-self: start;
    justify-content: flex-end !important;
    align-items: center !important;
    overflow: hidden !important;
    z-index: 2;
  }

  .cell-actual { grid-area: actual; }
  .cell-dep-actual { grid-area: dep; }
  .cell-gate { grid-area: gate; }
  .cell-reg { grid-area: reg; }
  .cell-release { grid-area: release; }

  .editable-cell {
    position: relative;
    min-height: 40px;
    padding: 0 8px !important;
    display: grid !important;
    grid-template-columns: 28px minmax(0, 1fr);
    align-items: center !important;
    justify-content: stretch !important;
    gap: 3px;
    border: 1px solid #cfd8d3 !important;
    border-radius: 10px;
    background: #f8fbf9;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
    cursor: pointer;
  }

  .editable-cell::before {
    content: attr(data-label);
    display: inline-block;
    width: 28px;
    color: #728177;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
  }

  .editable-cell::after {
    content: none;
  }

  .editable-cell .mobile-cell-value {
    display: block;
    min-width: 0;
    overflow: visible;
    white-space: nowrap;
    color: #17231d;
    font-size: 16px;
    font-weight: 800;
    line-height: 1;
  }

  .cell-from.has-aircraft-origin .departure-aircraft-origin {
    align-items: flex-start;
    color: #475569;
    font-size: 11px;
    line-height: 1.15;
  }

  .cell-from.has-aircraft-origin .departure-aircraft-origin strong {
    font-size: 12px;
  }

  .flight-table tbody tr.row-has-aircraft-origin {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    grid-template-areas:
      "flight flight paper"
      "sta actual dep"
      "gate reg release";
  }

  .flight-table tbody tr.row-has-aircraft-origin .cell-from.has-aircraft-origin {
    position: absolute;
    top: 10px;
    left: calc(33.333% + 3px);
    width: calc(33.333% - 8px);
    display: flex !important;
    min-height: 30px;
    padding: 0 !important;
    align-items: center;
    justify-content: flex-end;
    overflow: visible;
    white-space: normal;
    box-sizing: border-box;
    text-align: right;
    pointer-events: none;
    z-index: 2;
  }

  .flight-table tbody tr.row-has-aircraft-origin .departure-aircraft-origin {
    align-items: flex-end;
    font-size: 10px;
  }

  .flight-table tbody tr.row-has-aircraft-origin .departure-aircraft-origin strong {
    font-size: 11px;
  }

  .flight-table tbody tr.row-has-aircraft-origin .cell-flight {
    padding: 0 70px 0 2px !important;
    box-sizing: border-box;
  }

  .flight-table tbody tr.row-has-aircraft-origin .paper-cell {
    position: static;
    width: 100%;
  }

  .flight-table tbody tr.row-awaiting-departure {
    min-height: 86px;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    grid-template-areas:
      "flight flight paper"
      "gate reg release";
  }

  .flight-table tbody tr.row-awaiting-departure .cell-from,
  .flight-table tbody tr.row-awaiting-departure .cell-to,
  .flight-table tbody tr.row-awaiting-departure .cell-sta,
  .flight-table tbody tr.row-awaiting-departure .cell-actual,
  .flight-table tbody tr.row-awaiting-departure .cell-dep-actual {
    display: none !important;
  }

  .flight-table tbody tr.row-awaiting-departure .parked-board-flight-cell {
    flex-direction: row;
    align-items: baseline;
    gap: 8px;
  }

  .flight-table tbody tr.row-awaiting-departure .parked-board-arrival-remark {
    font-size: 10px;
  }

  @media (max-width: 360px) {
    .flight-table tbody tr.row-has-aircraft-origin .cell-flight {
      padding-right: 60px !important;
    }

    .flight-table tbody tr.row-has-aircraft-origin .departure-aircraft-origin,
    .flight-table tbody tr.row-has-aircraft-origin .departure-aircraft-origin strong {
      font-size: 9px;
    }
  }

  .cell-release .mobile-cell-value[class*="release-color-"] {
    color: inherit;
  }

  .cell-release .mobile-cell-value.release-color-1 { color: #1d4ed8; }
  .cell-release .mobile-cell-value.release-color-2 { color: #047857; }
  .cell-release .mobile-cell-value.release-color-3 { color: #dc2626; }
  .cell-release .mobile-cell-value.release-color-4 { color: #7c3aed; }
  .cell-release .mobile-cell-value.release-color-5 { color: #c2410c; }
  .cell-release .mobile-cell-value.release-color-6 { color: #0891b2; }
  .cell-release .mobile-cell-value.release-color-7 { color: #be123c; }
  .cell-release .mobile-cell-value.release-color-8 { color: #a21caf; }
  .cell-release .mobile-cell-value.release-color-9 { color: #c95b8c; }
  .cell-release .mobile-cell-value.release-color-10 { color: #4338ca; }
  .cell-release .mobile-cell-value.release-color-11 { color: #0f766e; }
  .cell-release .mobile-cell-value.release-color-12 { color: #475569; }
  .cell-release .mobile-cell-value.release-color-13 { color: #b45309; }
  .cell-release .mobile-cell-value.release-color-14 { color: #0369a1; }
  .cell-release .mobile-cell-value.release-color-15 { color: #9333ea; }
  .cell-release .mobile-cell-value.release-color-16 { color: #be185d; }

  .next-day-mark {
    display: inline;
    margin-left: 2px;
    vertical-align: super;
    font-size: 8px;
    line-height: 0;
  }

  .flight-arr {
    font-size: 13px;
    line-height: 1.05;
    font-weight: 800;
  }

  .flight-dep {
    margin-top: 2px;
    font-size: 11px;
    line-height: 1.05;
    color: #728177;
  }

  .actual-input,
  .time-input-wrap,
  .time-input-wrap .actual-input,
  .gate-picker-btn,
  .release-picker-btn,
  .reg-wrap {
    width: 100% !important;
  }

  .actual-input,
  .reg-input,
  .gate-picker-btn,
  .release-picker-btn {
    height: 26px !important;
    min-height: 26px;
    padding: 0 4px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    font-size: 16px;
    line-height: 26px !important;
    font-weight: 700;
  }

  .flight-table .actual-input,
  .flight-table .reg-input,
  .flight-table .gate-picker-btn,
  .flight-table .release-picker-btn {
    border: 0 !important;
    box-shadow: none !important;
    outline: 0 !important;
    background: transparent !important;
    appearance: none;
    -webkit-appearance: none;
    color: #17231d;
    font-size: 16px !important;
    line-height: 26px !important;
    font-weight: 800;
  }

  .flight-table .release-picker-btn.has-value {
    font-size: 16px !important;
    font-weight: 800;
  }

  .actual-input {
    text-align: left;
  }

  .cell-actual .time-input-wrap,
  .cell-dep-actual .time-input-wrap,
  .cell-reg .reg-wrap {
    display: none !important;
  }

  .cell-actual .actual-input,
  .cell-dep-actual .actual-input,
  .cell-reg .reg-input {
    pointer-events: none;
    caret-color: transparent;
  }

  .cell-actual .actual-input::placeholder,
  .cell-dep-actual .actual-input::placeholder {
    color: transparent;
  }

  .time-input-wrap {
    height: 26px;
  }

  .time-next-day {
    top: -8px;
    right: -3px;
    left: auto;
    font-size: 8px;
  }

  .reg-wrap {
    min-width: 0;
    justify-content: flex-start;
    gap: 2px;
    height: 26px;
  }

  .reg-prefix {
    font-size: 16px;
    font-weight: 700;
  }

  .reg-input {
    width: calc(100% - 18px) !important;
    padding: 0;
  }

  .gate-picker,
  .release-picker {
    position: absolute;
    inset: 0;
    min-width: 0;
    width: 100%;
  }

  .gate-picker-btn,
  .release-picker-btn {
    position: absolute;
    inset: 0;
    height: 100% !important;
    padding: 0;
    opacity: 0;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .gate-picker-btn::after,
  .release-picker-btn::after {
    right: 2px;
    top: 11px;
    border-left-width: 3px;
    border-right-width: 3px;
    border-top-width: 4px;
  }

  .paper-btn {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    font-size: 13px;
  }

  .paper-btn-wrap {
    width: 100%;
    justify-content: flex-end;
    gap: 4px;
  }

  .unlock-btn {
    width: 30px;
    height: 30px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1;
  }

  .gate-picker-menu,
  .release-picker-menu {
    position: fixed !important;
    left: 10px !important;
    right: 10px !important;
    top: auto !important;
    bottom: 12px !important;
    width: auto !important;
    max-width: none;
    max-height: 58vh;
    overflow-y: auto;
    padding: 48px 12px 12px;
    border-radius: 16px;
    box-shadow: 0 18px 46px rgba(20, 40, 30, 0.28);
  }

  .gate-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
  }

  .release-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .gate-option,
  .release-option {
    height: 40px;
    border-radius: 11px;
    font-size: 13px;
    font-weight: 700;
  }

  .gate-custom-wrap {
    margin-top: 10px;
    gap: 8px;
  }

  .gate-custom-input {
    height: 40px;
    border-radius: 11px;
    font-size: 14px;
  }

  .gate-picker-menu .clear-btn,
  .gate-custom-wrap .clear-btn,
  .release-actions .clear-btn {
    min-width: 64px;
    height: 40px;
    border-radius: 11px;
    font-size: 13px;
  }

  .release-actions {
    margin-top: 10px;
  }

  .flight-pair-sheet {
    left: 10px;
    right: 10px;
    bottom: 12px;
    top: auto;
    width: auto;
    padding: 14px;
    transform: none;
  }

  .flight-pair-field {
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 7px;
    font-size: 12px;
  }

  .flight-pair-input {
    height: 40px;
    font-size: 16px;
  }

  .flight-pair-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .flight-pair-cancel-actions button,
  .flight-pair-actions button {
    height: 38px;
    font-size: 12px;
  }
}
.flight-table .elt-dt-registration .reg-wrap,
.flight-table .elt-dt-registration .mobile-cell-value {
  outline: 3px solid #ff4d4f;
  outline-offset: 4px;
  border-radius: 2px;
}

/* Paper print preview */
#paperPrintRoot {
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgb(16 42 73 / 64%);
  color: #1c2f4d;
}

#paperPrintRoot .paper-print-panel {
  display: flex;
  flex-direction: column;
  width: min(760px, 100%);
  height: min(720px, calc(100dvh - 32px));
  max-height: calc(100dvh - 32px);
  overflow: hidden;
  border: 2px solid #2f4c7a;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 50px rgb(16 42 73 / 30%);
}

#paperPrintRoot.paper-print-full .paper-print-panel {
  width: min(1020px, 100%);
}

#paperPrintRoot .paper-print-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 16px;
  background: #fff;
  border-bottom: 2px solid #2f4c7a;
}

#paperPrintRoot .paper-print-toolbar strong {
  flex: 0 0 100%;
  font-size: 18px;
}

#paperPrintRoot .paper-print-toolbar [role="status"]:not(:empty) {
  flex: 0 0 100%;
  font-size: 12px;
  line-height: 1.4;
}

#paperPrintRoot .paper-print-toolbar select {
  flex: 0 0 100%;
  min-width: 0;
}

#paperPrintRoot .paper-print-toolbar button,
#paperPrintRoot .paper-print-toolbar a,
#paperPrintRoot .paper-print-toolbar select {
  padding: 8px 12px;
  border: 2px solid #2f4c7a;
  border-radius: 999px;
  background: #fff;
  color: #1c2f4d;
  font: 700 14px system-ui, sans-serif;
  text-decoration: none;
  cursor: pointer;
}

#paperPrintRoot .paper-print-toolbar select {
  height: 42px;
  min-height: 42px;
  padding: 0 36px 0 14px;
  line-height: normal;
  flex-shrink: 0;
  background-position: right 14px center;
}

#paperPrintRoot .paper-print-toolbar button:first-of-type {
  background: #ff8a3d;
}

#paperPrintRoot .paper-print-panel > iframe {
  flex: 1;
  min-height: 0;
  width: 100%;
  border: 0;
  background: #fff;
}

#paperPrintRoot .paper-print-panel > .paper-print-content {
  display: none;
}

#paperPrintRoot.paper-print-work .paper-print-panel > iframe {
  display: none;
}

#paperPrintRoot.paper-print-work .paper-print-panel > .paper-print-content {
  display: block;
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 20px;
  background: #fff;
}

#paperPrintRoot.paper-print-work .print-report {
  max-width: 210mm;
  margin: 0 auto;
  color: #111;
  font: 13px Arial, "Microsoft YaHei", sans-serif;
}

#paperPrintRoot.paper-print-work .print-report h1 {
  margin: 0 0 16px;
  font-size: 20px;
  text-align: center;
}

#paperPrintRoot.paper-print-work .print-report p {
  margin: 5px 0;
  font-size: 12px;
  line-height: 1.7;
}

#paperPrintRoot.paper-print-work .print-work-section {
  margin-top: 18px;
}

#paperPrintRoot.paper-print-work .print-work-section h2 {
  margin: 0 0 8px;
  font-size: 15px;
}

#paperPrintRoot.paper-print-work .print-work-section p {
  white-space: pre-wrap;
}

#paperPrintRoot.paper-print-work .print-report table {
  width: 100%;
  margin-top: 14px;
  border-collapse: collapse;
  table-layout: fixed;
}

#paperPrintRoot.paper-print-work .print-report th,
#paperPrintRoot.paper-print-work .print-report td {
  padding: 10px;
  border: 1px solid #777;
  text-align: left;
  overflow-wrap: anywhere;
}

#paperPrintRoot.paper-print-work .print-report th {
  background: #eef1f5;
}

#paperPrintRoot.paper-print-work .print-report thead {
  display: table-header-group;
}

#paperPrintRoot.paper-print-work .print-report tr {
  break-inside: avoid;
}

#paperPrintRoot.paper-print-work .print-empty {
  padding: 24px;
  color: #708098;
  text-align: center;
}

#paperPrintRoot.paper-print-work [hidden],
#paperPrintRoot .paper-print-toolbar [hidden] {
  display: none !important;
}

@media (max-width: 640px) {
  #paperPrintRoot {
    padding: 8px;
  }

  #paperPrintRoot .paper-print-panel {
    height: calc(100dvh - 16px);
    max-height: calc(100dvh - 16px);
  }

  #paperPrintRoot .paper-print-toolbar {
    padding: 12px;
  }
}

@media print {
  html.paper-printing,
  html.paper-printing body,
  html.is-ios-device.modal-scroll-locked.paper-printing body {
    position: static !important;
    top: auto !important;
    width: auto !important;
    height: auto !important;
    overflow: visible !important;
  }

  html.paper-printing body > :not(#paperPrintRoot) {
    display: none !important;
  }

  html.paper-printing body > #paperPrintRoot {
    display: block !important;
    position: static !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
  }

  #paperPrintRoot .paper-print-panel {
    display: block !important;
    width: 100% !important;
    max-height: none !important;
    overflow: visible !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  #paperPrintRoot .paper-print-toolbar,
  #paperPrintRoot .paper-print-panel > iframe {
    display: none !important;
  }

  #paperPrintRoot .paper-print-panel > .paper-print-content {
    display: block !important;
    overflow: visible !important;
    padding: 0 !important;
  }

  #paperPrintRoot.paper-print-work .print-report {
    margin: 10mm;
  }
}

/* A flight whose every movement is cancelled has nothing to fill in: empty the input cells. */
.flight-table tbody tr.row-canceled-flight :is(.time-input-wrap, .reg-wrap, .gate-picker, .release-picker, .paper-btn-wrap, .mis-tool-button, .mobile-cell-value) {
  display: none !important;
}

@media (max-width: 1024px) and (orientation: portrait) {
  .flight-table tbody tr.row-canceled-flight :is(td.cell-actual, td.cell-dep-actual, td.cell-gate, td.cell-reg, td.cell-release, td.paper-cell) {
    display: none !important;
  }
}
