:root {
  color-scheme: light;
  --ink: #17211f;
  --muted: #66736f;
  --line: #d8e0dd;
  --surface: #ffffff;
  --wash: #eef4f2;
  --brand: #0a6f65;
  --brand-dark: #03636a;
  --gold: #b58a2b;
  --red: #a73d3a;
  --blue: #2b5f9e;
  --shadow: 0 18px 45px rgba(18, 38, 35, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: #f6f8f7;
}

button {
  font: inherit;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.hidden {
  display: none !important;
}

.booting .landing-screen,
.booting .privacy-screen,
.booting .auth-screen,
.booting .app-shell {
  display: none !important;
}

.boot-screen {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
  min-height: 100vh;
  padding: 24px;
  color: var(--muted);
  background: #ffffff;
  font-size: 14px;
  font-weight: 700;
}

body:not(.booting) .boot-screen {
  display: none !important;
}

.boot-logo {
  display: block;
  width: min(320px, 72vw);
  height: auto;
  border-radius: 4px;
}

.landing-screen {
  position: relative;
  display: flow-root;
  min-height: 100vh;
  background-color: #03292d;
  color: #ffffff;
}

.landing-screen::before,
.landing-screen::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 100vh;
  pointer-events: none;
}

.landing-screen::before {
  z-index: 0;
  background:
    image-set(
      url("./assets/landing-cathay-airport.webp?v=20260527-opt") type("image/webp"),
      url("./assets/landing-cathay-airport-optimized.jpg?v=20260527-opt") type("image/jpeg")
    ) right center/contain no-repeat;
}

.landing-screen::after {
  z-index: 1;
  background: linear-gradient(90deg, rgba(3, 41, 45, 0.9) 0%, rgba(3, 41, 45, 0.64) 44%, rgba(3, 41, 45, 0.08) 100%);
}

.landing-nav {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 22px clamp(20px, 5vw, 64px) 0;
  padding: 0;
}

.landing-logo {
  display: block;
  width: min(230px, 48vw);
  height: auto;
  filter:
    drop-shadow(0 1px 1px rgba(255, 255, 255, 0.32))
    drop-shadow(0 8px 18px rgba(0, 0, 0, 0.24));
}

.landing-nav-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.landing-policy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-color: rgba(255, 255, 255, 0.5);
  color: #ffffff;
  background: rgba(3, 41, 45, 0.46);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(8px);
  text-decoration: none;
}

.landing-hero {
  position: relative;
  z-index: 2;
  display: grid;
  align-items: center;
  min-height: calc(100vh - 118px);
  padding: 32px clamp(20px, 5vw, 64px) 112px;
}

.landing-copy {
  display: grid;
  gap: 18px;
  width: min(980px, 100%);
}

.landing-copy h1 {
  margin: 0;
  max-width: 980px;
  color: #ffffff;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1;
}

.landing-copy p {
  margin: 0;
  max-width: 610px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 17px;
  line-height: 1.7;
}

.landing-center {
  min-width: 128px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}

.landing-disclaimer {
  color: rgba(255, 255, 255, 0.72) !important;
  font-size: 13px !important;
}

.landing-fleet {
  position: relative;
  z-index: 1;
  padding: 82px clamp(20px, 5vw, 64px) 94px;
  background: linear-gradient(180deg, rgba(3, 34, 38, 0.94), rgba(4, 24, 27, 0.98));
}

.landing-future {
  position: relative;
  z-index: 1;
  padding: 74px clamp(20px, 5vw, 64px) 104px;
  color: #ffffff;
  background:
    linear-gradient(180deg, rgba(4, 24, 27, 0.98), rgba(2, 18, 20, 0.96)),
    image-set(
      url("./assets/landing-cathay-airport.webp?v=20260527-opt") type("image/webp"),
      url("./assets/landing-cathay-airport-optimized.jpg?v=20260527-opt") type("image/jpeg")
    ) center/cover;
}

.landing-destinations {
  position: relative;
  z-index: 1;
  padding: 74px clamp(20px, 5vw, 64px) 112px;
  color: #ffffff;
  background: #f4f8f7;
}

.landing-destinations .landing-section-heading span {
  color: var(--brand);
}

.landing-destinations .landing-section-heading h2 {
  color: var(--ink);
}

.landing-destinations .landing-section-heading p {
  color: var(--muted);
}

.landing-section-heading {
  display: grid;
  gap: 10px;
  width: min(840px, 100%);
  margin-bottom: 28px;
}

.landing-section-heading span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.landing-section-heading h2 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.08;
}

.landing-section-heading p {
  margin: 0;
  max-width: 640px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 16px;
  line-height: 1.7;
}

.landing-fleet-grid,
.landing-future-grid {
  display: grid;
  gap: 12px;
}

.landing-fleet-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.landing-future-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.landing-fleet-card,
.landing-future-card {
  min-height: 230px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(12px);
}

.landing-future-card {
  min-height: 240px;
  background: rgba(255, 255, 255, 0.1);
}

.landing-fleet-card span,
.landing-future-card span {
  display: block;
  margin-bottom: 58px;
  color: #c9d8d4;
  font-size: 13px;
  font-weight: 800;
}

.landing-future-card span {
  color: #d8c58f;
}

.landing-fleet-card strong,
.landing-future-card strong {
  display: block;
  margin-bottom: 10px;
  color: #ffffff;
  font-size: 18px;
  line-height: 1.25;
}

.landing-fleet-card p,
.landing-future-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  line-height: 1.65;
}

.landing-destination-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(0, 1.18fr);
  gap: 14px;
}

.landing-hub-card,
.landing-destination-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(18, 38, 35, 0.08);
}

.landing-hub-card {
  display: grid;
  align-content: end;
  min-height: 360px;
  padding: 22px;
  color: #ffffff;
  background:
    linear-gradient(180deg, rgba(3, 41, 45, 0.2), rgba(3, 41, 45, 0.86)),
    image-set(
      url("./assets/landing-home-base-a350.webp?v=20260527-opt") type("image/webp"),
      url("./assets/landing-home-base-a350.png?v=20260527") type("image/png")
    ) center/cover;
}

.landing-hub-card span,
.landing-destination-card span {
  display: block;
  margin-bottom: 18px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.landing-hub-card span {
  color: rgba(255, 255, 255, 0.74);
}

.landing-hub-card strong {
  display: block;
  margin-bottom: 10px;
  font-size: 34px;
  line-height: 1;
}

.landing-hub-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 15px;
  line-height: 1.7;
}

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

.landing-destination-card {
  min-height: 172px;
  padding: 18px;
  color: var(--ink);
}

.landing-destination-card span {
  color: var(--brand);
}

.landing-destination-card strong {
  display: block;
  margin-bottom: 10px;
  font-size: 20px;
  line-height: 1.25;
}

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

.landing-legal {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: calc(100vh - 50px);
  bottom: auto;
  width: min(920px, calc(100% - 36px));
  margin: 0;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.74);
  font-size: 12px;
  line-height: 1.55;
  text-align: center;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.42);
  pointer-events: none;
}

.privacy-screen {
  min-height: 100vh;
  padding: 28px clamp(18px, 5vw, 72px);
  background:
    linear-gradient(rgba(246, 248, 247, 0.92), rgba(246, 248, 247, 0.96)),
    image-set(
      url("./assets/landing-cathay-airport.webp?v=20260527-opt") type("image/webp"),
      url("./assets/landing-cathay-airport-optimized.jpg?v=20260527-opt") type("image/jpeg")
    ) center/cover;
}

.privacy-document {
  width: min(920px, 100%);
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(20px, 4vw, 42px);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.privacy-document h1 {
  margin: 0 0 18px;
  color: var(--ink);
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.1;
}

.privacy-document h2 {
  margin: 28px 0 10px;
  color: var(--brand-dark);
  font-size: 18px;
}

.privacy-document p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
}

.auth-screen {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
  background:
    linear-gradient(rgba(246, 248, 247, 0.78), rgba(246, 248, 247, 0.88)),
    image-set(
      url("./assets/landing-cathay-airport.webp?v=20260527-opt") type("image/webp"),
      url("./assets/landing-cathay-airport-optimized.jpg?v=20260527-opt") type("image/jpeg")
    ) center/cover;
}

.auth-panel {
  width: min(560px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.auth-back-button {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 32px;
  margin-bottom: 12px;
  border: 0;
  padding: 0;
  color: var(--brand-dark);
  background: transparent;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.auth-back-button:hover {
  color: var(--brand);
}

.auth-brand {
  justify-content: center;
  color: var(--ink);
  margin-bottom: 14px;
}

.auth-brand .brand-mark {
  color: #ffffff;
  background: var(--brand-dark);
}

.auth-brand span {
  color: var(--muted);
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 16px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--wash);
}

.auth-tabs button {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.auth-tabs button.selected {
  color: var(--brand-dark);
  background: #ffffff;
}

.auth-form {
  display: grid;
  gap: 12px;
}

.auth-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.auth-form input,
.auth-form select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  color: var(--ink);
  background: #ffffff;
}

textarea {
  min-height: 88px;
  padding-top: 10px;
  resize: vertical;
}

.form-help {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.auth-error {
  margin: 0;
  border: 1px solid rgba(167, 61, 58, 0.28);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--red);
  background: rgba(167, 61, 58, 0.08);
  font-size: 13px;
  line-height: 1.5;
}

.captcha-slot {
  min-height: 68px;
}

.full-width-button {
  width: 100%;
}

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

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 28px 20px;
  background: linear-gradient(180deg, #03636a 0%, #026269 100%);
  color: #f6fffc;
}

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

.brand-logo {
  display: block;
  width: min(240px, 100%);
  height: auto;
  border-radius: 4px;
  background: transparent;
}

.auth-brand .brand-logo {
  width: min(280px, 100%);
}

.sidebar .brand {
  justify-content: center;
  min-height: auto;
}

.sidebar .brand-logo {
  width: 100%;
  max-width: 240px;
  height: auto;
  border-radius: 0;
  background: transparent;
  object-fit: contain;
  object-position: center;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  font-weight: 800;
}

.brand strong,
.brand span,
.profile strong,
.profile small {
  display: block;
}

.brand span {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
}

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

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  padding: 0 12px;
  color: rgba(255, 255, 255, 0.74);
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.nav-item span {
  width: 22px;
  text-align: center;
}

.nav-item.active,
.nav-item:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.shift-card {
  margin-top: auto;
  display: grid;
  gap: 8px;
  padding: 16px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
}

.shift-card span,
.shift-card small {
  color: rgba(255, 255, 255, 0.68);
}

.workspace {
  min-width: 0;
  padding: 26px;
}

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

.eyebrow {
  margin: 0 0 6px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 700;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 34px;
}

h2 {
  margin-bottom: 6px;
  font-size: 19px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--surface);
  cursor: pointer;
}

.profile {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 6px 12px 6px 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--surface);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.profile:hover {
  border-color: var(--brand);
  background: #eef8f5;
}

.profile > span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: #ffffff;
  background: var(--brand);
  font-size: 13px;
  font-weight: 800;
}

.profile small {
  color: var(--muted);
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.stats-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}

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

.metric {
  display: grid;
  gap: 6px;
  min-height: 118px;
  padding: 18px;
}

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

.metric strong {
  font-size: 32px;
}

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

.dispatch-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 18px;
}

.aoc-send-layout {
  display: grid;
  gap: 18px;
}

.dashboard-summary-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

.online-panel {
  margin-top: 18px;
}

.booking-form,
.simbrief-form,
.acars-form,
.admin-report-form {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
}

.simbrief-form {
  grid-template-columns: 1fr;
  align-items: stretch;
}

.acars-form {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: end;
}

.admin-report-form {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: end;
  margin-top: 14px;
}

.booking-form label,
.simbrief-form label,
.acars-form label,
.admin-report-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.booking-form input,
.booking-form select,
.simbrief-form input,
.simbrief-form select,
.simbrief-form textarea,
.acars-form input,
.acars-form select,
.admin-report-form input,
.admin-report-form select,
.admin-report-form textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  color: var(--ink);
  background: #ffffff;
}

.simbrief-form textarea {
  min-height: 130px;
  padding: 10px;
  resize: vertical;
  line-height: 1.5;
}

.admin-report-form textarea {
  min-height: 110px;
  padding: 10px;
  resize: vertical;
  line-height: 1.5;
}

.booking-form button {
  min-width: 110px;
}

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

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

.plan-panel {
  margin-top: 24px;
}

.panel {
  min-width: 0;
  padding: 18px;
}

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

.panel-header p {
  margin-bottom: 0;
  line-height: 1.5;
}

.segmented {
  display: flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--wash);
}

.segmented button {
  min-width: 72px;
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.segmented button.selected {
  color: var(--brand-dark);
  background: #ffffff;
  box-shadow: 0 4px 14px rgba(11, 40, 36, 0.09);
}

.task-board-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.compact-button {
  min-height: 40px;
  padding: 0 14px;
  white-space: nowrap;
}

.jumpseat-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(130px, 160px) minmax(112px, auto);
  gap: 12px;
  align-items: end;
  max-width: 100%;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid #cfe3dd;
  border-radius: 8px;
  background: #f4fbf8;
}

.jumpseat-control > div,
.jumpseat-control label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.jumpseat-control span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.jumpseat-control strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.jumpseat-picker {
  position: relative;
  min-width: 0;
}

.jumpseat-control input {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: #ffffff;
}

.jumpseat-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 20;
  display: grid;
  max-height: 240px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px;
  background: #ffffff;
  box-shadow: 0 16px 30px rgba(11, 40, 36, 0.14);
}

.jumpseat-menu button {
  display: flex;
  align-items: center;
  min-height: 36px;
  border: 0;
  border-radius: 6px;
  padding: 0 10px;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.jumpseat-menu button:hover,
.jumpseat-menu button:focus-visible {
  background: #eef8f5;
  outline: none;
}

.jumpseat-menu button strong {
  font-size: 14px;
}

.jumpseat-menu-empty {
  padding: 10px;
  color: var(--muted);
  font-size: 13px;
}

.danger-button {
  color: var(--red);
  border-color: rgba(167, 61, 58, 0.34);
}

.danger-button:hover {
  color: #ffffff;
  background: var(--red);
  border-color: var(--red);
}

.task-search {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.task-search input,
.task-search select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: #ffffff;
}

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

.task-table-wrap {
  max-height: 420px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.task-table-wrap table {
  border-collapse: separate;
  border-spacing: 0;
}

.task-table-wrap th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #ffffff;
}

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

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

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

tbody tr {
  cursor: pointer;
}

tbody tr:hover,
tbody tr.selected {
  background: #eef8f5;
}

.flight-code {
  font-weight: 800;
}

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

.risk-high {
  color: #ffffff;
  background: var(--red);
}

.risk-medium {
  color: #322300;
  background: #f2d37c;
}

.risk-low {
  color: #073f39;
  background: #c9ebe4;
}

.status-review {
  color: var(--blue);
  background: #dce9fa;
}

.status-booked {
  color: var(--blue);
  background: #dce9fa;
}

.status-released {
  color: var(--brand-dark);
  background: #d9f0ea;
}

.status-available {
  color: var(--brand-dark);
  background: #d9f0ea;
}

.status-locked {
  color: #6b4d00;
  background: #f4df9d;
}

.status-pending {
  color: #6b4d00;
  background: #f4df9d;
}

.status-submitted {
  color: var(--blue);
  background: #dce9fa;
}

.status-approved {
  color: var(--brand-dark);
  background: #d9f0ea;
}

.status-rejected {
  color: #ffffff;
  background: var(--red);
}

.detail-hero {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 8px;
  background: linear-gradient(135deg, #e8f6f2, #ffffff);
}

.detail-hero strong {
  font-size: 28px;
}

.detail-grid,
.checklist,
.weather-list,
.placeholder-grid {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

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

.detail-grid div,
.placeholder-grid div,
.checklist label,
.weather-list li,
.handover-list li {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfdfc;
}

.detail-grid span,
.placeholder-grid span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.settings-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}

.checklist label {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checklist input {
  width: 18px;
  height: 18px;
  accent-color: var(--brand);
}

.weather-list {
  padding-left: 0;
  list-style: none;
}

.weather-list li {
  line-height: 1.45;
}

.primary-button {
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  padding: 0 14px;
  color: #ffffff;
  background: var(--brand);
  cursor: pointer;
}

.secondary-button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  color: var(--brand-dark);
  background: #ffffff;
  cursor: pointer;
}

.api-note {
  display: grid;
  gap: 7px;
  margin-top: 16px;
  border: 1px solid #d8e4df;
  border-radius: 8px;
  padding: 12px;
  background: #f3faf7;
  line-height: 1.5;
}

.api-note span {
  color: var(--muted);
  word-break: break-word;
}

.action-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.panel-header > .action-stack {
  margin-top: 0;
  justify-content: flex-end;
}

.mobile-sticky-action {
  display: none;
}

.ofp-output {
  min-height: 188px;
  margin: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  color: #eaf8f3;
  background: #102c28;
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
}

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

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

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

.summary-grid div {
  display: grid;
  gap: 6px;
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfdfc;
}

.summary-grid strong {
  font-size: 28px;
}

.summary-grid span {
  color: var(--muted);
}

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

.ofp-summary-grid div {
  display: grid;
  gap: 4px;
  min-height: 62px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px;
  background: #ffffff;
}

.ofp-summary-grid strong {
  font-size: 12px;
}

.ofp-summary-grid span {
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.flight-slip-card {
  width: min(100%, 360px);
  margin: 0 auto;
  display: grid;
  gap: 10px;
}

.flight-slip-card small {
  color: var(--muted);
  line-height: 1.5;
}

.flight-slip {
  margin: 0;
  padding: 22px 24px 28px;
  color: #111111;
  background: var(--surface);
  border: 0;
  border-radius: 0;
  box-shadow: none;
  font-family: "Courier New", Courier, monospace;
  font-size: clamp(15px, 2.7vw, 20px);
  font-weight: 700;
  letter-spacing: 1.8px;
  line-height: 1.34;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  text-transform: uppercase;
}

.aoc-report-slip {
  width: min(100%, 430px);
  padding: 18px 20px;
  font-size: clamp(14px, 2.4vw, 18px);
  line-height: 1.32;
}

.report-slip-review {
  align-items: flex-start;
}

.report-slip-review > div:first-child {
  min-width: 0;
}

.acars-inbox-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
}

.aoc-message-list:empty {
  display: none;
}

.online-list {
  display: grid;
  gap: 10px;
}

.live-pilot-list {
  max-height: 320px;
  overflow-y: auto;
  padding-right: 4px;
}

.online-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  background: #fbfdfc;
}

.online-item > div:first-child {
  display: grid;
  gap: 5px;
}

.online-item span,
.online-item small {
  color: var(--muted);
  line-height: 1.5;
}

.online-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 12px;
  text-align: right;
}

.step,
.fleet-card,
.admin-item,
.empty-state {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  background: #fbfdfc;
}

.step {
  display: grid;
  gap: 5px;
  border-left: 4px solid #bdc9c5;
}

.step.done {
  border-left-color: var(--brand);
  background: #f0faf6;
}

.step span,
.fleet-card span,
.fleet-card small,
.admin-item span,
.admin-item small {
  color: var(--muted);
  line-height: 1.5;
}

.fleet-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.fleet-card {
  display: grid;
  gap: 9px;
  min-height: 118px;
  padding: 16px;
}

.fleet-card strong {
  font-size: 17px;
}

.admin-list {
  display: grid;
  gap: 10px;
}

.report-summary-box {
  max-height: 260px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #f8fbfa;
}

.report-summary-box:has(#my-report-list:empty) {
  display: none;
}

.report-summary-box .empty-state {
  margin: 0;
  background: #ffffff;
}

.report-summary-item {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--ink);
  background: #ffffff;
  text-align: left;
  cursor: pointer;
}

.report-summary-item:hover,
.report-summary-item.selected {
  background: #eef8f5;
}

.report-summary-item > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.report-summary-item span,
.report-summary-item small {
  color: var(--muted);
  line-height: 1.45;
}

.report-detail {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.report-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

#admin-report-list {
  max-height: clamp(340px, 48vh, 560px);
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #f8fbfa;
}

#admin-report-list:empty {
  display: none;
}

#admin-report-list .empty-state {
  margin: 0;
  background: #ffffff;
}

.admin-report-row {
  display: grid;
  grid-template-columns: minmax(170px, 1.05fr) minmax(260px, 1.35fr) minmax(150px, 0.75fr) auto;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  background: #ffffff;
}

.admin-report-main,
.admin-report-actions {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.admin-report-main span,
.admin-report-metrics,
.admin-report-log {
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.admin-report-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
}

.admin-report-metrics span {
  overflow: hidden;
  padding: 5px 7px;
  border-radius: 6px;
  background: #f4f8f7;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-report-log {
  overflow: hidden;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#admin-pirep-log {
  font-family: Consolas, "Courier New", monospace;
  letter-spacing: 0;
}

.admin-report-actions {
  justify-items: end;
}

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

.download-upload-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.download-list {
  display: grid;
  gap: 10px;
}

.download-item {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  background: #fbfdfc;
}

.download-item > div:nth-child(2) {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.download-item span,
.download-item small {
  color: var(--muted);
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.download-file-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 1px solid #c9d7d3;
  border-radius: 8px;
  color: var(--brand-dark);
  background: #eef7f4;
  font-size: 12px;
  font-weight: 800;
}

.download-link {
  display: inline-grid;
  place-items: center;
  text-decoration: none;
  text-align: center;
}

.aoc-message-list {
  display: grid;
  gap: 10px;
}

.aoc-status {
  width: fit-content;
  max-width: 100%;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #f8faf9;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.aoc-status.ok {
  border-color: #a7d6c2;
  background: #f0faf6;
  color: #176143;
}

.aoc-status.warn,
.aoc-status.checking {
  border-color: #ead49a;
  background: #fff8e8;
  color: #7a5a12;
}

.aoc-status.error {
  border-color: #efb2a8;
  background: #fff1ef;
  color: #9b2f20;
}

.aoc-message {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  background: #fbfdfc;
}

.aoc-message.outbound {
  background: #f3faf7;
}

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

.aoc-message-head > div:first-child {
  display: grid;
  gap: 5px;
}

.aoc-message-head span,
.aoc-message p {
  color: var(--muted);
  line-height: 1.5;
}

.aoc-message p {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.admin-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.admin-item > div:first-child {
  display: grid;
  gap: 5px;
}

.empty-state {
  color: var(--muted);
}

.notice-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(9, 28, 26, 0.38);
}

.notice-modal.hidden {
  display: none;
}

.notice-card {
  width: min(420px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.notice-card h2 {
  margin-bottom: 8px;
}

.notice-card p {
  margin-bottom: 18px;
  color: var(--muted);
  line-height: 1.6;
}

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

.notice-actions button {
  min-width: 88px;
}

.ops-map {
  position: relative;
  height: 440px;
  overflow: hidden;
  border-radius: 8px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.55)),
    radial-gradient(circle at 72% 28%, rgba(42, 124, 158, 0.35), transparent 18%),
    radial-gradient(circle at 24% 55%, rgba(10, 111, 101, 0.35), transparent 20%),
    #dce8e6;
}

.route {
  position: absolute;
  height: 2px;
  transform-origin: left center;
  background: var(--brand);
}

.route::after {
  content: "";
  position: absolute;
  right: -5px;
  top: -4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold);
}

.route.hkg {
  left: 30%;
  top: 54%;
  width: 260px;
  transform: rotate(-28deg);
}

.route.nrt {
  left: 30%;
  top: 54%;
  width: 330px;
  transform: rotate(-155deg);
}

.route.syd {
  left: 30%;
  top: 54%;
  width: 250px;
  transform: rotate(58deg);
}

.airport {
  position: absolute;
  display: grid;
  place-items: center;
  width: 56px;
  height: 32px;
  border-radius: 8px;
  color: #ffffff;
  background: var(--brand-dark);
  font-weight: 800;
}

.hkg-label {
  left: 27%;
  top: 50%;
}

.nrt-label {
  right: 23%;
  top: 28%;
}

.syd-label {
  right: 30%;
  bottom: 17%;
}

.lhr-label {
  left: 10%;
  top: 30%;
}

.handover-list {
  display: grid;
  gap: 10px;
  padding-left: 0;
  list-style: none;
}

.handover-list li {
  display: grid;
  gap: 6px;
}

.handover-list span {
  color: var(--muted);
}

@media (max-width: 980px) {
  .landing-screen {
    background-color: #03292d;
  }

  .landing-screen::before {
    background-position: center top;
    background-size: contain;
  }

  .landing-screen::after {
    background: linear-gradient(rgba(3, 41, 45, 0.76), rgba(3, 41, 45, 0.66));
  }

  .landing-hero {
    min-height: calc(100vh - 320px);
  }

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

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    padding: 18px;
  }

  .nav-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .shift-card {
    display: none;
  }

  .stats-grid,
  .dispatch-layout,
  .placeholder-grid,
    .booking-form,
    .acars-form,
    .admin-report-form,
    .download-upload-form,
    .summary-grid,
    .ofp-summary-grid,
    .fleet-grid {
    grid-template-columns: 1fr;
  }

  .jumpseat-control {
    grid-template-columns: 1fr;
  }

  .admin-item {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-report-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .admin-report-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-report-actions {
    justify-items: stretch;
  }

  .online-item {
    align-items: stretch;
    flex-direction: column;
  }

  .download-item {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .online-meta {
    justify-content: flex-start;
    text-align: left;
  }
}

@media (min-aspect-ratio: 3 / 2) {
  .landing-screen::before {
    background-position: center center;
    background-size: cover;
  }
}

@media (max-width: 640px) {
  .landing-nav {
    align-items: stretch;
    flex-direction: column;
    margin: 16px 18px 0;
    padding: 0;
  }

  .landing-logo {
    width: min(220px, 100%);
  }

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

  .landing-policy {
    width: 100%;
  }

  .landing-hero {
    align-items: end;
    min-height: calc(100vh - 360px);
    padding: 28px 18px 38px;
  }

  .landing-copy {
    gap: 14px;
  }

  .landing-copy h1 {
    font-size: 42px;
  }

  .landing-copy p {
    font-size: 15px;
    line-height: 1.6;
  }

  .landing-center {
    width: 100%;
    min-width: 0;
  }

  .landing-fleet {
    padding: 54px 18px 86px;
  }

  .landing-future {
    padding: 54px 18px 86px;
  }

  .landing-destinations {
    padding: 54px 18px 86px;
  }

  .landing-section-heading {
    margin-bottom: 18px;
  }

  .landing-fleet-grid,
  .landing-future-grid {
    grid-template-columns: 1fr;
  }

  .landing-destination-layout,
  .landing-destination-grid {
    grid-template-columns: 1fr;
  }

  .landing-hub-card {
    min-height: 280px;
  }

  .landing-fleet-card,
  .landing-future-card {
    min-height: 0;
  }

  .landing-fleet-card span,
  .landing-future-card span {
    margin-bottom: 24px;
  }

  .auth-screen {
    padding: 16px;
  }

  .auth-panel {
    padding: 16px;
  }

  .auth-brand {
    margin-bottom: 12px;
  }

  .auth-brand .brand-logo {
    width: min(230px, 100%);
  }

  .workspace {
    padding: 18px;
  }

  .topbar,
  .panel-header {
    align-items: stretch;
    flex-direction: column;
  }

  .top-actions {
    justify-content: space-between;
  }

  .nav-list {
    grid-template-columns: 1fr 1fr;
  }

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

  h1 {
    font-size: 28px;
  }

  .segmented {
    width: 100%;
  }

  .task-board-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .compact-button {
    width: 100%;
  }

  .segmented button {
    flex: 1;
  }

  .mobile-sticky-action {
    position: sticky;
    bottom: 10px;
    z-index: 5;
    display: block;
    margin-top: 14px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow);
  }

  .mobile-sticky-action .primary-button {
    width: 100%;
  }
}
