:root {
  --gold: #c9a84f;
  --burgundy: #731c2e;
  --bg: #0f1218;
  --card: #1b222d;
  --text: #f4f7ff;
  --muted: #9ca9bf;
  --border: #313a49;
  --flight: #4a8dff;
  --layover: #00b8d9;
  --deadhead: #8f6cf5;
  --standby: #ff982e;
  --off: #4fbb65;
  --off-text: #e8f5e9;
  --pdo: var(--off);
  --pdo-text: var(--off-text);
  --training: #9c27b0;
  --meeting: #e94f8a;
  --leave: var(--off);
  --other: #666;
  --radius: 12px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --app-pad-x: max(0.75rem, var(--safe-left), var(--safe-right));
  --app-max-width: 100%;
  --nav-height: calc(44px + var(--safe-top) + 0.8rem);
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html,
body {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

body {
  padding: 0;
}

.app {
  width: 100%;
  max-width: var(--app-max-width);
  margin: 0 auto;
  padding: 0.75rem var(--app-pad-x) calc(1.5rem + var(--safe-bottom));
}

.app[data-screen="login"] {
  padding-top: 1.25rem;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

.header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.header--login {
  display: none;
  justify-content: center;
  margin-bottom: 1.15rem;
}

.app[data-screen="login"] .header--login {
  display: flex;
}

.app-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-bottom: 0.5rem;
  padding: calc(0.35rem + var(--safe-top)) max(0.55rem, var(--safe-left)) 0.4rem max(0.55rem, var(--safe-right));
  background: linear-gradient(180deg, #0c0c0c 0%, #000 100%);
  border-bottom: 1px solid rgba(201, 168, 79, 0.22);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
}

.app-nav.hidden {
  display: none !important;
}

.app-nav__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  column-gap: 0.25rem;
  min-height: 48px;
}

.app-nav__leading,
.app-nav__trailing {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 0.05rem;
}

.app-nav__leading {
  justify-content: flex-start;
  justify-self: start;
}

.app-nav__trailing {
  justify-content: flex-end;
  justify-self: end;
}

.app-nav__title {
  display: grid;
  justify-items: center;
  gap: 0.2rem;
  margin: 0;
  min-width: 0;
  max-width: min(42vw, 12.5rem);
  padding: 0.1rem 0.2rem 0.05rem;
  text-align: center;
  pointer-events: none;
}

.app-nav__title-text {
  display: block;
  max-width: 100%;
  font-family: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: clamp(0.78rem, 2.4vw, 1.05rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f6ecd0;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.45);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-nav__title::after {
  content: "";
  width: 1.75rem;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(201, 168, 79, 0.95), transparent);
  box-shadow: 0 0 10px rgba(201, 168, 79, 0.35);
}

.btn-nav-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  padding: 0;
  border: none;
  border-radius: 11px;
  background: transparent;
  color: rgba(201, 168, 79, 0.78);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.btn-nav-icon:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.btn-nav-icon:hover:not(:disabled) {
  color: #f0e0a8;
  background: rgba(201, 168, 79, 0.1);
}

.btn-nav-icon:active:not(:disabled) {
  background: rgba(201, 168, 79, 0.16);
}

.btn-nav-icon[aria-current="page"] {
  color: #f4e6b0;
  background: rgba(201, 168, 79, 0.16);
  box-shadow: inset 0 -2px 0 var(--gold);
}

.btn-nav-icon--logout {
  margin-left: 0.2rem;
  padding-left: 0.15rem;
  border-left: 1px solid rgba(255, 90, 100, 0.4);
  border-radius: 0 11px 11px 0;
  color: #ff4d57;
}

.btn-nav-icon--logout:hover:not(:disabled) {
  color: #ff7a82;
  background: rgba(180, 20, 40, 0.28);
  box-shadow: inset 0 0 0 1px rgba(255, 77, 87, 0.35);
}

.btn-nav-icon--logout:active:not(:disabled) {
  color: #ff9aa0;
  background: rgba(180, 20, 40, 0.4);
}

.btn-nav-icon--spinning .nav-icon--sync {
  animation: nav-sync-spin 0.85s linear infinite;
}

@keyframes nav-sync-spin {
  to {
    transform: rotate(360deg);
  }
}

.nav-icon {
  width: 21px;
  height: 21px;
  display: block;
}

.settings-card {
  padding: 0;
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(201, 168, 79, 0.32);
  border-top: 2px solid rgba(201, 168, 79, 0.72);
  background:
    linear-gradient(180deg, rgba(201, 168, 79, 0.07), transparent 28%),
    var(--card);
  box-shadow:
    0 14px 32px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.settings-hero {
  padding: 1.1rem 1.15rem 1.05rem;
  border-bottom: 1px solid rgba(201, 168, 79, 0.16);
  background: linear-gradient(135deg, rgba(201, 168, 79, 0.1), transparent 55%);
}

.settings-hero-kicker {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(201, 168, 79, 0.82);
}

.settings-hero-title {
  margin: 0;
  font-family: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f6ecd0;
}

.settings-hero-hint {
  margin: 0.45rem 0 0;
  font-size: 0.86rem;
  line-height: 1.45;
  color: rgba(173, 186, 209, 0.9);
}

.settings-actions {
  margin: 0;
  padding: 0.95rem 1.05rem 1.1rem;
  border-top: 1px solid rgba(201, 168, 79, 0.16);
  display: grid;
  justify-items: center;
  gap: 0.55rem;
  background: rgba(0, 0, 0, 0.16);
}

.settings-actions-label {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(201, 168, 79, 0.78);
}

.btn-logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: auto;
  min-width: 9.5rem;
  max-width: 100%;
  min-height: 2.55rem;
  padding: 0.5rem 1.15rem;
  background: linear-gradient(180deg, #9a2f42, #731c2e);
  color: #ffe8ea;
  border: 1px solid rgba(255, 170, 180, 0.45);
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  box-shadow:
    0 6px 14px rgba(115, 28, 46, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.btn-logout-icon {
  width: 1.05rem;
  height: 1.05rem;
  flex: 0 0 auto;
}

.btn-logout:hover {
  background: linear-gradient(180deg, #b0384e, #862234);
  border-color: rgba(255, 190, 198, 0.6);
  color: #fff;
}

.btn-logout:active {
  transform: translateY(1px);
  background: linear-gradient(180deg, #862234, #5f1624);
}

.confirm-dialog {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: max(1rem, var(--safe-top)) max(1rem, var(--safe-right)) max(1rem, var(--safe-bottom)) max(1rem, var(--safe-left));
}

.confirm-dialog.hidden,
.confirm-dialog[hidden] {
  display: none !important;
}

.confirm-dialog__backdrop {
  position: absolute;
  inset: 0;
  border: none;
  padding: 0;
  margin: 0;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(2px);
  cursor: pointer;
}

.confirm-dialog__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 22.5rem);
  padding: 1.2rem 1.15rem 1.15rem;
  border-radius: 14px;
  border: 1px solid rgba(201, 168, 79, 0.34);
  border-top: 2px solid rgba(201, 168, 79, 0.72);
  background:
    linear-gradient(180deg, rgba(201, 168, 79, 0.1), transparent 40%),
    #171d27;
  box-shadow:
    0 22px 48px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  text-align: center;
}

.confirm-dialog__title {
  margin: 0;
  font-family: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #f6ecd0;
}

.confirm-dialog__message {
  margin: 0.65rem 0 0;
  font-size: 0.9rem;
  line-height: 1.45;
  color: rgba(196, 208, 228, 0.92);
}

.confirm-dialog__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  margin-top: 1.15rem;
}

.confirm-dialog__cancel,
.confirm-dialog__ok {
  min-height: 2.65rem;
  border-radius: 999px;
  font-weight: 750;
  letter-spacing: 0.03em;
}

.confirm-dialog__cancel {
  background: rgba(255, 255, 255, 0.06);
  color: #e8edf7;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.confirm-dialog__ok {
  background: linear-gradient(135deg, #d8b45a, #c9a84f);
  color: #111;
  border: 1px solid rgba(201, 168, 79, 0.65);
}

.confirm-dialog__ok--danger {
  background: linear-gradient(180deg, #9a2f42, #731c2e);
  color: #ffe8ea;
  border: 1px solid rgba(255, 170, 180, 0.45);
}

.confirm-dialog--danger .confirm-dialog__panel {
  border-color: rgba(240, 128, 128, 0.4);
  border-top-color: rgba(240, 128, 128, 0.75);
  background:
    linear-gradient(180deg, rgba(154, 47, 66, 0.16), transparent 42%),
    #171d27;
}

.settings-fieldset {
  margin: 0;
  padding: 1.25rem 1.15rem 1.2rem;
  border: none;
  border-radius: 0;
  background: transparent;
  min-width: 0;
}

.settings-fieldset legend {
  display: block;
  float: left;
  width: 100%;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(201, 168, 79, 0.9);
  margin: 0 0 0.55rem;
  padding: 0;
  line-height: 1.35;
}

.settings-fieldset::after {
  content: "";
  display: table;
  clear: both;
}

.settings-hint {
  display: block;
  margin: 0 0 1.1rem;
  font-size: 0.84rem;
  line-height: 1.5;
  color: rgba(173, 186, 209, 0.9);
}

.settings-options {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.settings-option {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  padding: 0.72rem 0.78rem;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.26);
  border: 1px solid rgba(255, 255, 255, 0.09);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.settings-option:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.04);
}

.settings-option:has(input:checked) {
  border-color: rgba(201, 168, 79, 0.45);
  background: rgba(201, 168, 79, 0.11);
  box-shadow: inset 0 0 0 1px rgba(201, 168, 79, 0.12);
}

.settings-option input {
  margin-top: 0.18rem;
  accent-color: var(--gold);
}

.settings-option-body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.settings-option-body strong {
  font-size: 0.92rem;
}

.settings-option-desc {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.4;
}

.settings-preview {
  margin: 0.15rem 0 0;
  font-size: 0.82rem;
  color: var(--gold);
  font-weight: 600;
}

.settings-save-status {
  margin: 0.1rem 0 0;
  min-height: 1.1rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.creds-fieldset {
  margin-top: 0;
  padding-top: 1.25rem;
  border-top: none;
}

.settings-card > .creds-fieldset:first-of-type,
.settings-card > .settings-hero + .creds-fieldset {
  margin-top: 0;
  padding-top: 1.25rem;
  border-top: none;
}

#settings-panel .settings-fieldset label {
  display: block;
  margin: 0 0 1rem;
  color: rgba(201, 168, 79, 0.88);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.35;
}

#settings-panel .settings-fieldset label:last-of-type {
  margin-bottom: 0.35rem;
}

.creds-fieldset input {
  display: block;
  width: 100%;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  letter-spacing: 0.045em;
  margin-top: 0.45rem;
  border: 1px solid rgba(201, 168, 79, 0.35);
  background: rgba(8, 10, 16, 0.92);
  border-radius: 10px;
}

.creds-fieldset input:hover {
  border-color: rgba(201, 168, 79, 0.55);
}

.creds-fieldset input:focus-visible {
  outline: 2px solid rgba(201, 168, 79, 0.45);
  outline-offset: 1px;
  border-color: rgba(201, 168, 79, 0.75);
}

.credentials-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.55rem;
}

.credentials-actions .btn {
  flex: 1 1 10rem;
  min-height: 2.55rem;
  width: auto;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

#settings-panel .credentials-actions .btn.primary {
  width: auto;
}

#btn-save-credentials {
  background: linear-gradient(135deg, #d8b45a, #c9a84f);
  color: #111;
  border: 1px solid rgba(201, 168, 79, 0.65);
  font-weight: 750;
}

#btn-save-credentials:active {
  transform: translateY(1px);
}

.settings-btn-secondary,
#btn-clear-credentials {
  background: rgba(201, 168, 79, 0.08);
  color: #f0e0a8;
  border: 1px solid rgba(201, 168, 79, 0.35);
}

.settings-btn-secondary:hover,
#btn-clear-credentials:hover {
  background: rgba(201, 168, 79, 0.14);
  border-color: rgba(201, 168, 79, 0.55);
}

.settings-credentials-status {
  display: inline-flex;
  align-items: center;
  margin: 0.75rem 0 0;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(201, 168, 79, 0.28);
  background: rgba(201, 168, 79, 0.1);
  font-size: 0.78rem;
  font-weight: 650;
  color: #f0e0a8;
}

.settings-credentials-status:empty {
  display: none;
}

.settings-credentials-status--error {
  color: #ff8a80;
  border-color: rgba(255, 138, 128, 0.35);
  background: rgba(255, 138, 128, 0.1);
}

.brand {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  min-width: 0;
}

.brand-mark {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 11px;
  border: 1px solid rgba(201, 168, 79, 0.5);
  background: linear-gradient(160deg, #8a2438, #5c1524);
  color: #f0e0a8;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  box-shadow: 0 0 0 3px rgba(201, 168, 79, 0.1);
}

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

.brand-name {
  margin: 0;
  font-family: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #f6ecd0;
}

h1 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 600;
}

h2,
h3,
h4 {
  margin: 0;
  font-weight: 600;
}

.subtitle,
.hint {
  margin: 0.2rem 0 0;
  font-size: 0.85rem;
  color: rgba(173, 186, 209, 0.88);
  line-height: 1.4;
}

.login-panel {
  width: 100%;
  max-width: 26rem;
  margin: 0 auto;
  flex: 1 1 auto;
}

.login-card {
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(201, 168, 79, 0.32);
  border-top: 2px solid rgba(201, 168, 79, 0.72);
  background:
    linear-gradient(180deg, rgba(201, 168, 79, 0.07), transparent 28%),
    var(--card);
  box-shadow:
    0 14px 32px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.login-card-hero {
  display: grid;
  justify-items: center;
  gap: 0.35rem;
  padding: 1.25rem 1.15rem 1.1rem;
  border-bottom: 1px solid rgba(201, 168, 79, 0.18);
  background:
    radial-gradient(ellipse 70% 90% at 50% 0%, rgba(201, 168, 79, 0.16), transparent 65%),
    linear-gradient(180deg, rgba(201, 168, 79, 0.08), transparent 70%);
}

.login-card-title {
  margin: 0;
  display: grid;
  justify-items: center;
  gap: 0.35rem;
  text-align: center;
}

.login-card-title-text {
  font-family: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: clamp(1.15rem, 3.5vw, 1.35rem);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #f6ecd0;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.45);
}

.login-card-title::after {
  content: "";
  width: 2rem;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(201, 168, 79, 0.95), transparent);
  box-shadow: 0 0 12px rgba(201, 168, 79, 0.4);
}

.login-card-hint {
  margin: 0.45rem 0 0;
  font-size: 0.86rem;
  line-height: 1.45;
  color: rgba(173, 186, 209, 0.9);
}

.login-form {
  display: grid;
  gap: 0.85rem;
  padding: 1.15rem 1.15rem 1.2rem;
}

.login-field {
  display: block;
  margin: 0;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(201, 168, 79, 0.9);
}

.login-field input {
  margin-top: 0.45rem;
  border: 1px solid rgba(201, 168, 79, 0.35);
  border-radius: 10px;
  background: rgba(8, 10, 16, 0.92);
}

.login-field input::placeholder {
  color: rgba(173, 186, 209, 0.55);
  letter-spacing: 0.02em;
  font-weight: 500;
  text-transform: none;
}

.login-field input:hover {
  border-color: rgba(201, 168, 79, 0.55);
}

.login-field input:focus-visible {
  outline: 2px solid rgba(201, 168, 79, 0.45);
  outline-offset: 1px;
  border-color: rgba(201, 168, 79, 0.75);
}

#login-panel .login-field {
  margin-bottom: 0;
}

#login-panel .login-remember {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0.1rem 0 0;
  user-select: none;
  font-size: inherit;
  color: inherit;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
}

.login-remember input[type="checkbox"] {
  width: 1.05rem;
  height: 1.05rem;
  margin: 0;
  accent-color: var(--gold);
  flex: 0 0 auto;
}

.login-remember span {
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: rgba(196, 208, 228, 0.9);
}

.login-submit {
  width: 100%;
  min-height: 2.75rem;
  margin-top: 0.25rem;
  border-radius: 999px;
  border: 1px solid rgba(201, 168, 79, 0.65);
  background: linear-gradient(135deg, #d8b45a, #c9a84f);
  color: #111;
  font-weight: 750;
  letter-spacing: 0.04em;
}

.login-submit:active {
  transform: translateY(1px);
}

.login-error {
  margin: 0;
  padding: 0 1.15rem 1.05rem;
}

.app[data-screen="login"] .footer {
  margin-top: auto;
  padding-top: 1.5rem;
}

#sync-status {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 0;
  margin: 0 0 0.75rem;
  padding: 0.42rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.22);
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.35;
  color: rgba(196, 208, 228, 0.92);
  overflow-wrap: anywhere;
  word-break: break-word;
}

#sync-status:empty,
#sync-status.sync-status--empty:empty {
  display: none;
}

#sync-status.sync-status--cached {
  color: #f0e0a8;
  border-color: rgba(201, 168, 79, 0.42);
  background: rgba(201, 168, 79, 0.12);
  font-size: 0.82rem;
  line-height: 1.4;
}

#sync-status.sync-status--empty {
  font-style: normal;
  color: rgba(196, 208, 228, 0.88);
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

.sync-progress {
  margin: 0 0 0.75rem;
}

.sync-progress-track {
  height: 6px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.sync-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--burgundy), var(--gold), var(--flight));
  transition: width 0.45s ease-out;
  box-shadow: 0 0 12px rgba(201, 168, 79, 0.35);
}

.sync-progress-label {
  margin: 0.4rem 0 0;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
}

.panel label {
  display: block;
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
  color: var(--muted);
}

input {
  display: block;
  width: 100%;
  max-width: 100%;
  margin-top: 0.35rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  /* 16px prevents iOS Safari zoom-on-focus */
  font-size: max(16px, 1rem);
}

.btn {
  border: none;
  border-radius: 8px;
  padding: 0.6rem 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

.btn.primary {
  background: var(--gold);
  color: #1a1208;
}

.panel .btn.primary {
  width: 100%;
}

.btn.ghost {
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--border);
}

.btn.icon {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  line-height: 1;
}

.month-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-bottom: 0.75rem;
  padding: 0.85rem 0.6rem 0.8rem;
  border: 1px solid rgba(201, 168, 79, 0.32);
  border-top: 2px solid rgba(201, 168, 79, 0.7);
  border-radius: calc(var(--radius) + 2px);
  background:
    linear-gradient(180deg, rgba(201, 168, 79, 0.08), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(0, 0, 0, 0.12));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 12px 26px rgba(0, 0, 0, 0.28);
}

.month-toolbar-nav {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  column-gap: 0.35rem;
  min-height: 3.15rem;
}

.month-toolbar-start,
.month-toolbar-end {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 3.15rem;
  min-width: 0;
}

.month-toolbar-start {
  justify-content: flex-start;
  justify-self: start;
}

.month-toolbar-end {
  justify-content: flex-end;
  justify-self: end;
}

.month-toolbar .btn-month-nav {
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--gold);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  flex: 0 0 auto;
}

.month-toolbar .btn-month-nav:active {
  background: rgba(201, 168, 79, 0.1);
}

.month-chevron {
  width: 1.55rem;
  height: 1.55rem;
  display: block;
}

.month-label {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  font-size: clamp(1rem, 4.2vw, 1.28rem);
  font-weight: 700;
  color: var(--gold);
  line-height: 1.18;
  text-shadow: 0 1px 10px rgba(201, 168, 79, 0.16);
  min-width: 0;
  max-width: 100%;
  pointer-events: none;
}

.month-heading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.4rem 0.5rem;
  max-width: 100%;
}

.month-label .month-title {
  display: inline;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
}

.month-toolbar-sync-row {
  display: flex;
  justify-content: center;
  min-height: 0;
}

.month-toolbar-sync-row.hidden {
  display: none;
}

.btn-month-sync {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  margin: 0;
  padding: 0.35rem 0.85rem;
  border: 1px solid rgba(201, 168, 79, 0.42);
  border-radius: 999px;
  background: rgba(201, 168, 79, 0.08);
  color: var(--gold);
  font: inherit;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.btn-month-sync.hidden {
  display: none;
}

.btn-month-sync:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-month-sync:hover:not(:disabled) {
  background: rgba(201, 168, 79, 0.14);
  border-color: rgba(201, 168, 79, 0.68);
}

.btn-month-sync:active:not(:disabled) {
  transform: scale(0.97);
}

.btn-month-sync--spinning {
  opacity: 0.75;
}

.month-stats-host {
  width: 100%;
}

.month-stats-host.hidden {
  display: none;
}

.month-stats-panel {
  margin: 0;
  padding: 0.55rem 0.15rem 0.1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.month-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.4rem 0.48rem;
}

.month-stats--timing {
  flex-wrap: nowrap;
  justify-content: center;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 0.08rem;
  max-width: 100%;
}

.month-stats--timing::-webkit-scrollbar {
  display: none;
}

.month-stats--counts {
  margin-top: 0.42rem;
  padding-top: 0.42rem;
  border-top: 1px solid transparent;
  border-image: linear-gradient(
      90deg,
      transparent 0%,
      rgba(255, 255, 255, 0.1) 18%,
      rgba(255, 255, 255, 0.1) 82%,
      transparent 100%
    )
    1;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.4rem 0.46rem;
}

.month-tz-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.28rem;
  margin: 0;
  min-height: 1.5rem;
  padding: 0.2rem 0.55rem 0.2rem 0.62rem;
  border-radius: 999px;
  border: 1px solid rgba(201, 168, 79, 0.42);
  background: linear-gradient(180deg, rgba(201, 168, 79, 0.18), rgba(201, 168, 79, 0.06));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 4px 12px rgba(0, 0, 0, 0.18);
  color: var(--gold);
  font: inherit;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.month-tz-badge-text {
  display: inline-block;
}

.month-tz-badge-chevron {
  width: 0;
  height: 0;
  border-left: 3px solid transparent;
  border-right: 3px solid transparent;
  border-top: 4px solid currentColor;
  opacity: 0.72;
  transform: translateY(0.5px);
}

.month-tz-badge:hover {
  background: linear-gradient(180deg, rgba(201, 168, 79, 0.28), rgba(201, 168, 79, 0.1));
  border-color: rgba(201, 168, 79, 0.7);
}

.month-tz-badge:active {
  transform: scale(0.97);
}

.month-tz-badge[data-mode="auh"] {
  border-color: rgba(201, 168, 79, 0.55);
  background: linear-gradient(180deg, rgba(201, 168, 79, 0.24), rgba(201, 168, 79, 0.08));
}

.month-tz-badge[data-mode="station"] {
  border-color: rgba(160, 190, 220, 0.4);
  background: linear-gradient(180deg, rgba(150, 180, 210, 0.16), rgba(150, 180, 210, 0.05));
  color: #c5d6ea;
}

.month-block-hours {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.month-block-hours strong {
  color: var(--gold);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.month-stat-sep {
  width: 1px;
  height: 1.05rem;
  background: rgba(255, 255, 255, 0.14);
  flex-shrink: 0;
  margin: 0 0.08rem;
}

.month-stat-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.34rem;
  white-space: nowrap;
  font-size: 0.74rem;
  color: #d5deec;
  line-height: 1;
  padding: 0.3rem 0.64rem;
  border-radius: 999px;
  border: 1px solid rgba(201, 168, 79, 0.26);
  background: linear-gradient(180deg, rgba(201, 168, 79, 0.13), rgba(201, 168, 79, 0.04));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 2px 8px rgba(0, 0, 0, 0.16);
}

.month-stat-label {
  font-weight: 600;
  color: #d2dce9;
}

.month-stat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 0.88rem;
  height: 0.88rem;
  color: #a8bdd8;
  flex-shrink: 0;
}

.month-stat-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.month-stat-item strong,
.month-stat-item .month-stat-value {
  color: var(--gold);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.month-stat-item--block .month-stat-icon {
  color: #d4b85c;
}

.month-stat-item--duty .month-stat-icon {
  color: #b8c9e6;
}

.month-stat-item--tafb .month-stat-icon {
  color: #8ec5e8;
}

.month-stat-item--oob .month-stat-icon {
  color: #9fd4b8;
}

.month-stat-item--count {
  border-color: rgba(126, 164, 214, 0.24);
  background: linear-gradient(180deg, rgba(88, 132, 188, 0.14), rgba(88, 132, 188, 0.04));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 2px 8px rgba(0, 0, 0, 0.14);
}

.month-stat-item--count .month-stat-icon {
  color: #8eb8e8;
}

.month-stat-item--offdays .month-stat-icon {
  color: #9ec7f0;
}

.month-stat-item--flightdays .month-stat-icon {
  color: #8ec8e8;
}

.month-stat-item--trainingdays .month-stat-icon {
  color: #a8b8f0;
}

.month-stat-item--allowances {
  border-color: rgba(201, 168, 79, 0.34);
  background: linear-gradient(180deg, rgba(201, 168, 79, 0.18), rgba(201, 168, 79, 0.06));
}

.month-stat-item--allowances .month-stat-icon {
  color: #e0c25a;
}

.month-stat-item--allowances .month-stat-value {
  display: inline-flex;
  align-items: baseline;
  gap: 0.2rem;
}

.month-stat-item--allowances .month-stat-currency {
  font-size: 0.72em;
  font-weight: 600;
  color: #c9a84f;
  letter-spacing: 0.03em;
}

@media (max-width: 980px) {
  .month-stats--timing,
  .month-stats--counts {
    justify-content: flex-start;
  }
}

@media (max-width: 680px) {
  .month-label {
    font-size: 1.28rem;
  }

  .month-stat-item {
    font-size: 0.7rem;
    padding: 0.26rem 0.56rem;
  }

  .month-stats--counts {
    overflow-x: auto;
    flex-wrap: nowrap;
    justify-content: flex-start;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 0.12rem;
  }

  .month-stats--counts::-webkit-scrollbar {
    display: none;
  }
}

.month-pill {
  display: inline-block;
  margin-top: 0.35rem;
  padding: 0.15rem 0.5rem;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid rgba(201, 168, 79, 0.4);
  border-radius: 999px;
  background: rgba(201, 168, 79, 0.1);
}

.calendar-shell {
  position: relative;
  width: 100%;
  margin-bottom: 1rem;
  padding: 0.75rem 0.55rem 0.85rem;
  overflow: hidden;
  border: 1px solid rgba(201, 168, 79, 0.22);
  background:
    linear-gradient(180deg, rgba(201, 168, 79, 0.06), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(0, 0, 0, 0.16));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 14px 32px rgba(0, 0, 0, 0.3);
  /* Let the page scroll vertically; we handle horizontal month swipes. */
  touch-action: pan-y;
}

.calendar-shell--swiping .calendar {
  transform: translateX(var(--calendar-swipe-x, 0));
  transition: none;
}

.calendar-shell:not(.calendar-shell--swiping) .calendar {
  transition: transform 0.18s ease-out;
}

.weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 3px;
  margin-bottom: 0.55rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid rgba(201, 168, 79, 0.18);
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(201, 168, 79, 0.78);
  text-align: center;
}

.calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 3px;
  width: 100%;
}

.day {
  position: relative;
  min-width: 0;
  /* day-num + 4 chips + span track */
  min-height: 5.15rem;
  padding: 2px 3px 3px;
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(8, 12, 18, 0.97), rgba(5, 9, 15, 0.97));
  border: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  flex-direction: column;
  transition: border-color 0.14s ease, box-shadow 0.14s ease;
}

.day.outside {
  opacity: 1;
  background: linear-gradient(180deg, rgba(10, 14, 22, 0.9), rgba(7, 10, 16, 0.9));
}

.day.outside .day-num,
.day.outside .day-chips {
  opacity: 0.42;
}

.day.outside.outside-linked-duty .day-chips {
  opacity: 1;
}

.day.outside .day-span-track,
.day.outside .duty-span-row,
.day.outside .duty-span-bar {
  opacity: 1;
}

.day.outside .duty-span-bar.duty-span-bar--outside {
  opacity: 0.42;
}

.day.outside .duty-span-bar.duty-span-bar--outside.duty-span-bar--boundary-link {
  opacity: 1;
}

.day.today {
  border-color: var(--gold);
  background: linear-gradient(180deg, rgba(201, 168, 79, 0.13), rgba(12, 14, 20, 0.95));
  box-shadow: 0 0 0 1px rgba(201, 168, 79, 0.22), 0 6px 14px rgba(201, 168, 79, 0.14);
}

.day.today .day-span-track .duty-span-row--active {
  animation: today-span-pulse 3s ease-in-out infinite;
}

@keyframes today-span-pulse {
  0%, 100% { background: rgba(255, 255, 255, 0.07); }
  50% { background: rgba(201, 168, 79, 0.12); }
}

.day-head {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3px;
  min-height: 1rem;
  margin-bottom: 1px;
}

.day-num {
  flex: 0 1 auto;
  min-width: 0;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 0;
  color: #9db1cf;
}

.day.today .day-num {
  color: var(--gold);
}

.day-indicators {
  position: static;
  z-index: auto;
  display: inline-flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  flex: 0 0 auto;
  max-width: 70%;
  pointer-events: none;
}

.day-indicator {
  flex: 0 0 auto;
  min-width: 0.92rem;
  height: 0.92rem;
  padding: 0 0.18rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #fff;
  background: linear-gradient(135deg, #e34d4d, #c53232);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
  line-height: 1;
  text-transform: uppercase;
}

.day.outside .day-indicators {
  opacity: 0.42;
}

/* Legacy alias kept for cached HTML snippets */
.day-memo-indicator {
  position: static;
  z-index: auto;
  min-width: 0.92rem;
  height: 0.92rem;
  padding: 0 0.18rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #fff;
  background: linear-gradient(135deg, #e34d4d, #c53232);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
}

.day.outside .day-memo-indicator {
  opacity: 0.42;
}

.day-chips {
  flex: 1 1 auto;
  min-height: 0;
  max-height: calc(4 * 0.88rem + 3px); /* hard cap: 4 chip rows + gaps */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  overflow: hidden;
}

.day-chips .chip {
  width: auto;
  min-width: 0;
  max-width: 100%;
  flex: 0 0 auto;
  text-align: center;
  font-size: 0.52rem;
  letter-spacing: 0;
  line-height: 1.12;
  padding: 2px 2px;
}

.day-span-track {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 2px;
  margin-top: 1px;
  width: 100%;
  min-height: 11px; /* 3 rows x 3px with gaps */
}

.day-span-track--stacked {
  gap: 2px;
}

.duty-span-row {
  position: relative;
  width: 100%;
  height: 3px;
  border-radius: 2px;
  background: transparent;
}

.duty-span-row--active {
  background: rgba(255, 255, 255, 0.08);
}

.duty-span-bar {
  position: absolute;
  top: 0;
  bottom: 0;
  min-width: 2px;
  padding: 0;
  border: none;
  border-radius: 0; /* square mid-span; caps round only at true ends */
  cursor: pointer;
  opacity: 0.92;
  z-index: 3;
}

.duty-span-bar:not(button) {
  cursor: default;
}

.day,
.duty-span-row {
  overflow: hidden;
}

.duty-span-bar.flight { background: var(--flight); }
.duty-span-bar.standby { background: var(--standby); }
.duty-span-bar.off { background: var(--off); }
.duty-span-bar.rest { background: var(--off); }
.duty-span-bar.pdo { background: var(--pdo); }
.duty-span-bar.training { background: var(--training); }
.duty-span-bar.meeting { background: var(--meeting); }
.duty-span-bar.leave { background: var(--leave); }
.duty-span-bar.other { background: var(--other); }
.duty-span-bar.deadhead { background: var(--deadhead); }
.duty-span-bar.layover {
  background: var(--layover);
  opacity: 1;
  box-shadow: none;
}

.duty-span-bar--cap-start {
  border-top-left-radius: 999px;
  border-bottom-left-radius: 999px;
}

.duty-span-bar--cap-end {
  border-top-right-radius: 999px;
  border-bottom-right-radius: 999px;
}

.duty-span-bar--continue-left::before,
.duty-span-bar--continue-right::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  /* Short bridges — long fixed px overshoots on narrow iPhone day columns. */
  width: 7px;
  background: inherit;
  pointer-events: none;
  z-index: 4;
}

.duty-span-bar--continue-left::before {
  left: -5px;
}

.duty-span-bar--continue-right::after {
  right: -5px;
}

.duty-now-marker {
  position: absolute;
  top: -2px;
  bottom: -2px;
  width: 2px;
  margin-left: -1px;
  background: var(--gold);
  border-radius: 1px;
  box-shadow: 0 0 6px rgba(201, 168, 79, 0.75);
  pointer-events: none;
  z-index: 2;
}

.chip--dh {
  /* Kept for older markup; deadhead chips use .chip.deadhead fill. */
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.chip--nonconsecutive {
  margin-top: 5px;
  position: relative;
}

.chip--nonconsecutive::before {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  top: -3px;
  border-top: 1px dashed rgba(190, 205, 231, 0.45);
}

.chip {
  display: block;
  width: 100%;
  min-width: 0;
  padding: 2px 4px;
  border: none;
  border-radius: 3px;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.25;
  text-align: left;
  color: #fff;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chip.flight { background: linear-gradient(135deg, #5a9bff, #3c7ce8); }
.chip.deadhead { background: linear-gradient(135deg, #a78bfa, #7c5ce0); }
.chip.standby { background: linear-gradient(135deg, #ffab4f, #f1881b); }
.chip.off { background: linear-gradient(135deg, #62cc7b, #47ae5f); color: var(--off-text); }
.chip.rest { background: linear-gradient(135deg, #62cc7b, #47ae5f); color: var(--off-text); }
.chip.pdo { background: linear-gradient(135deg, #62cc7b, #47ae5f); color: var(--pdo-text); }
.chip.training { background: var(--training); }
.chip.meeting { background: var(--meeting); }
.chip.leave { background: linear-gradient(135deg, #62cc7b, #47ae5f); }
.chip.other { background: var(--other); }
.chip.layover {
  background: var(--layover);
  color: #f6e9ff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.chip.more {
  background: var(--border);
  color: var(--text);
  font-weight: 500;
}

.chip.chip-static {
  cursor: default;
  opacity: 0.92;
}

.duty-detail-section {
  margin-bottom: 1rem;
  scroll-margin-top: var(--nav-height);
}

/* No max-height / inner scroll — panel grows with content; page scroll handles long duties. */
.duty-detail-panel {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: linear-gradient(165deg, rgba(51, 115, 217, 0.08) 0%, var(--card) 38%);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.28);
}

.duty-detail-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--burgundy), var(--gold), var(--flight));
  opacity: 0.9;
}

.duty-detail-panel--flight::before {
  background: linear-gradient(90deg, var(--flight), var(--gold), var(--burgundy));
}

.duty-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
  flex-shrink: 0;
  padding-top: 0.15rem;
}

.duty-detail-heading {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
}

.duty-detail-heading .badge {
  flex-shrink: 0;
  padding: 0.28rem 0.55rem;
  border-radius: 6px;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.duty-detail-panel #detail-close {
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--muted);
  transition: background 0.15s ease, color 0.15s ease;
}

.duty-detail-panel #detail-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

.duty-picker-hint {
  margin-top: 0;
  margin-bottom: 0.65rem;
}

.duty-detail-heading h3 {
  font-size: 1.2rem;
  margin: 0;
  line-height: 1.25;
  word-break: break-word;
  color: var(--text);
  font-weight: 800;
  letter-spacing: 0.01em;
}

.duty-detail-body {
  overflow: visible;
  min-width: 0;
}

.duty-detail-body > .duty-row {
  width: 100%;
  margin-bottom: 0.5rem;
}

.duty-row--static {
  cursor: default;
}

.duty-row--static:focus {
  outline: none;
}

.duty-row {
  width: 100%;
  text-align: left;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--text);
  cursor: pointer;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.65rem;
  align-items: start;
}

.duty-row .swatch {
  width: 4px;
  align-self: stretch;
  border-radius: 2px;
  min-height: 2.5rem;
}

.duty-row .swatch.flight { background: var(--flight); }
.duty-row .swatch.standby { background: var(--standby); }
.duty-row .swatch.off { background: var(--off); }
.duty-row .swatch.rest { background: var(--off); }
.duty-row .swatch.pdo { background: var(--pdo); }
.duty-row .swatch.training { background: var(--training); }
.duty-row .swatch.meeting { background: var(--meeting); }
.duty-row .swatch.leave { background: var(--leave); }
.duty-row .swatch.other { background: var(--other); }

.duty-row strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
}

.duty-row .meta {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.35;
}

.error {
  color: #ff8a80;
  font-size: 0.9rem;
  margin-top: 0.75rem;
}

.warnings {
  margin-bottom: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  background: #3a2f10;
  color: #ffd54f;
  font-size: 0.85rem;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.footer {
  margin-top: 1.75rem;
  padding-bottom: 0.25rem;
}

.footer-inner {
  display: grid;
  gap: 0.75rem;
  padding: 0.95rem 1rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(201, 168, 79, 0.26);
  border-top: 2px solid rgba(201, 168, 79, 0.62);
  background:
    linear-gradient(180deg, rgba(201, 168, 79, 0.07), transparent 45%),
    rgba(0, 0, 0, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 10px 24px rgba(0, 0, 0, 0.24);
  text-align: center;
}

.footer-top {
  display: grid;
  justify-items: center;
  gap: 0.65rem;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.footer-mark {
  display: grid;
  place-items: center;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 7px;
  background: linear-gradient(160deg, #8a2438, #5c1524);
  border: 1px solid rgba(201, 168, 79, 0.45);
  color: #f0e0a8;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.footer-brand-name {
  font-family: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #f6ecd0;
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  margin: 0;
}

.footer-chip {
  display: inline-flex;
  align-items: center;
  min-height: 1.55rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(201, 168, 79, 0.32);
  background: rgba(201, 168, 79, 0.1);
  color: #f0e0a8;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.footer-chip--muted {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(196, 208, 228, 0.88);
}

.footer-disclaimer {
  margin: 0;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(201, 168, 79, 0.16);
  font-size: 0.78rem;
  line-height: 1.45;
  color: rgba(173, 186, 209, 0.88);
}

#build-info {
  color: inherit;
  font-weight: inherit;
}

.disclaimer {
  font-size: 0.75rem;
}

.duty-times {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
  gap: 0;
  margin-bottom: 1rem;
  padding: 0.65rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.duty-time-card {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.55rem 0.5rem;
  border-radius: 10px;
  min-width: 0;
}

.duty-time-card--report {
  background: rgba(51, 115, 217, 0.12);
  border: 1px solid rgba(51, 115, 217, 0.28);
}

.duty-time-card--debrief {
  background: rgba(201, 168, 79, 0.1);
  border: 1px solid rgba(201, 168, 79, 0.28);
  flex-direction: row-reverse;
  text-align: right;
}

.duty-time-card--debrief .duty-time-body {
  align-items: flex-end;
}

.duty-time-icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.28);
}

.duty-time-card--report .duty-time-icon {
  color: #9ec5ff;
}

.duty-time-card--debrief .duty-time-icon {
  color: var(--gold);
}

.duty-time-body {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
}

.duty-time-label {
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.duty-time-clock {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.duty-time-date {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.3;
}

.duty-times-connector {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.25rem;
  min-width: 1.25rem;
}

.duty-times-line {
  display: block;
  width: 2px;
  height: 70%;
  min-height: 2.5rem;
  border-radius: 2px;
  background: linear-gradient(180deg, rgba(51, 115, 217, 0.5), rgba(201, 168, 79, 0.5));
}

.legs-title {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 0.75rem;
  font-weight: 700;
}

.leg-icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  display: block;
}

.leg-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(165deg, rgba(51, 115, 217, 0.12) 0%, rgba(255, 255, 255, 0.03) 42%, rgba(0, 0, 0, 0.08) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 0;
  margin-bottom: 0.75rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.22);
}

.leg-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--burgundy), var(--gold), var(--flight));
  opacity: 0.85;
}

.leg-card:last-child {
  margin-bottom: 0;
}

.leg-card-header {
  padding: 0.85rem 0.9rem 0.65rem;
}

.leg-flight-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.55rem 0.28rem 0.45rem;
  margin-bottom: 0.65rem;
  border-radius: 999px;
  background: rgba(51, 115, 217, 0.18);
  border: 1px solid rgba(51, 115, 217, 0.35);
}

.leg-carrier {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #fff;
  background: var(--flight);
  padding: 0.12rem 0.35rem;
  border-radius: 4px;
}

.leg-number {
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: 0.02em;
}

.leg-route-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.35rem;
}

.leg-airport {
  display: flex;
  justify-content: center;
}

.leg-airport--from {
  justify-content: flex-start;
}

.leg-airport--to {
  justify-content: flex-end;
}

.leg-airport-code {
  display: inline-block;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.1;
  padding: 0.35rem 0.55rem;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.leg-airport--from .leg-airport-code {
  color: var(--muted);
}

.leg-airport--to .leg-airport-code {
  color: var(--text);
  border-color: rgba(51, 115, 217, 0.35);
  background: rgba(51, 115, 217, 0.12);
}

.leg-route-track {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  min-width: 2.5rem;
  color: var(--flight);
  opacity: 0.9;
}

.leg-route-line {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--flight), transparent);
}

.leg-route-plane .leg-icon {
  width: 1.1rem;
  height: 1.1rem;
  transform: rotate(90deg);
}

.leg-schedule {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0;
  margin: 0 0.65rem 0.75rem;
  padding: 0.65rem 0.55rem;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.leg-schedule-divider {
  width: 1px;
  align-self: stretch;
  margin: 0.15rem 0;
  background: linear-gradient(180deg, transparent, var(--border), transparent);
}

.leg-time-cell {
  display: flex;
  gap: 0.45rem;
  align-items: flex-start;
  min-width: 0;
}

.leg-time-cell--arr {
  flex-direction: row-reverse;
  text-align: right;
}

.leg-time-cell--arr .leg-time-body {
  align-items: flex-end;
}

.leg-time-icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
}

.leg-time-cell--arr .leg-time-icon {
  color: var(--flight);
  background: rgba(51, 115, 217, 0.15);
}

.leg-time-body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.leg-time-label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.leg-time-value {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
}

.leg-ops {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin: 0 0.75rem 0.75rem;
  padding: 0.65rem 0.7rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.leg-ops-item {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
}

.leg-ops-icon {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.25);
  color: var(--gold);
  flex-shrink: 0;
}

.leg-ops-item--time .leg-ops-icon {
  color: #7eb8ff;
}

.leg-ops-item--pax .leg-ops-icon {
  color: #c9e4a0;
}

.leg-ops-text {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
  flex: 1;
}

.leg-ops-kicker {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.leg-ops-value {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
}

.leg-ac-type {
  font-variant-numeric: tabular-nums;
  margin-right: 0.35rem;
}

.leg-ac-tail {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  border-radius: 5px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--gold);
  background: rgba(201, 168, 79, 0.12);
  border: 1px solid rgba(201, 168, 79, 0.28);
}

.leg-ops-value--pax {
  font-weight: 600;
}

.leg-pax-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.leg-pax-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.45rem 0.15rem 0.35rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  border: 1px solid transparent;
}

.leg-pax-cabin {
  font-size: 0.68rem;
  opacity: 0.9;
  font-weight: 800;
}

.leg-pax-count {
  font-variant-numeric: tabular-nums;
}

.leg-pax-chip--f {
  background: rgba(201, 168, 79, 0.18);
  border-color: rgba(201, 168, 79, 0.35);
  color: #f5e6b8;
}

.leg-pax-chip--j,
.leg-pax-chip--c {
  background: rgba(115, 28, 46, 0.35);
  border-color: rgba(201, 120, 140, 0.35);
  color: #f5d0d8;
}

.leg-pax-chip--w {
  background: rgba(38, 166, 154, 0.2);
  border-color: rgba(77, 208, 196, 0.35);
  color: #b2f0ea;
}

.leg-pax-chip--y {
  background: rgba(51, 115, 217, 0.2);
  border-color: rgba(100, 160, 255, 0.35);
  color: #c8dcff;
}

.leg-pax-loadpct {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  padding-left: 0.15rem;
}

.leg-pax-raw {
  font-weight: 600;
}

.leg-section-head {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0.55rem;
}

.leg-section-head .leg-icon {
  opacity: 0.85;
}

.leg-crew-count {
  margin-left: auto;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.leg-crew {
  margin: 0 0.65rem 0.85rem;
  padding: 0.7rem 0.7rem 0.65rem;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.leg-crew-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.leg-crew-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.leg-crew-avatar {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--text);
  background: linear-gradient(145deg, rgba(51, 115, 217, 0.45), rgba(115, 28, 46, 0.5));
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.leg-crew-body {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
  flex: 1;
}

.leg-crew-name {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
  word-break: break-word;
}

.leg-crew-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.leg-crew-role {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  text-transform: uppercase;
}

.leg-crew-role--cockpit {
  color: #ffe9a8;
  background: rgba(201, 168, 79, 0.22);
  border: 1px solid rgba(201, 168, 79, 0.35);
}

.leg-crew-role--lead {
  color: #f5d0d8;
  background: rgba(115, 28, 46, 0.4);
  border: 1px solid rgba(201, 120, 140, 0.3);
}

.leg-crew-role--cabin {
  color: #c8dcff;
  background: rgba(51, 115, 217, 0.22);
  border: 1px solid rgba(100, 160, 255, 0.3);
}

.leg-crew-id {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.leg-crew-nat {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 600;
}

.leg-crew-photo {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.leg-times-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.35rem 0.35rem;
  margin: 0.5rem 0 0.65rem;
  padding: 0.5rem 0.6rem;
  padding-top: 1.35rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
}

.leg-times-utc-tag {
  position: absolute;
  top: 0.35rem;
  right: 0.45rem;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--muted);
  opacity: 0.85;
}

.leg-times-cell--span {
  grid-column: 1 / -1;
}

.leg-times-kicker {
  display: block;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.leg-times-val {
  font-size: 0.88rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.leg-times-cell--delay .leg-times-val {
  color: #f5a623;
}

.leg-dh-badge {
  margin-left: 0.35rem;
  padding: 0.1rem 0.35rem;
  font-size: 0.62rem;
  font-weight: 800;
  border-radius: 4px;
  background: rgba(245, 166, 35, 0.2);
  color: #f5c842;
  vertical-align: middle;
}

.leg-card--dh {
  border-color: rgba(245, 166, 35, 0.25);
}

.duty-ops-notes {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0.75rem 0;
}

.duty-ops-note {
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
  border-left: 3px solid var(--gold);
}

.duty-ops-note--delay {
  border-left-color: #f5a623;
}

.duty-ops-note-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.2rem;
}

.duty-ops-note-text {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.4;
}

.dashboard-kpis {
  margin-bottom: 0.75rem;
  padding: 0.75rem 1rem;
}

.dashboard-kpis-title {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.dashboard-kpis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(7rem, 1fr));
  gap: 0.5rem;
}

.dashboard-kpi {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.45rem 0.5rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
}

.dashboard-kpi-label {
  font-size: 0.65rem;
  color: var(--muted);
  font-weight: 600;
}

.dashboard-kpi-value {
  font-size: 1rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.dashboard-kpi-hint {
  font-size: 0.62rem;
  color: var(--muted);
}

.details-toggle {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: var(--gold);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
}

.details-raw {
  margin-top: 0.5rem;
  padding: 0.65rem;
  background: var(--bg);
  border-radius: 8px;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge.flight { background: var(--flight); color: #fff; }
.badge.standby { background: var(--standby); color: #fff; }
.badge.off { background: var(--off); color: var(--off-text); }
.badge.rest { background: var(--off); color: var(--off-text); }
.badge.pdo { background: var(--pdo); color: var(--pdo-text); }
.badge.training { background: var(--training); color: #fff; }
.badge.meeting { background: var(--meeting); color: #fff; }
.badge.leave { background: var(--leave); color: var(--off-text); }
.badge.other { background: var(--other); color: #fff; }

.calendar-empty {
  display: grid;
  place-items: center;
  text-align: center;
  padding: 1.35rem 0.65rem 1rem;
  min-height: 14rem;
}

.calendar-empty-panel {
  display: grid;
  justify-items: center;
  gap: 0.7rem;
  width: min(100%, 22rem);
  padding: 1.35rem 1.15rem 1.25rem;
  border-radius: 14px;
  border: 1px solid rgba(201, 168, 79, 0.34);
  border-top: 2px solid rgba(201, 168, 79, 0.72);
  background:
    linear-gradient(180deg, rgba(201, 168, 79, 0.1), transparent 48%),
    rgba(0, 0, 0, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 12px 28px rgba(0, 0, 0, 0.28);
}

.calendar-empty-title {
  margin: 0;
  font-family: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #f6ecd0;
}

.btn-calendar-empty-sync {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 2.85rem;
  margin: 0.15rem 0 0;
  padding: 0.55rem 1.15rem;
  border: 1px solid rgba(201, 168, 79, 0.55);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(201, 168, 79, 0.28), rgba(201, 168, 79, 0.12));
  color: #f4e6b0;
  font-size: 0.84rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.btn-calendar-empty-sync:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-calendar-empty-sync:hover:not(:disabled) {
  border-color: rgba(201, 168, 79, 0.85);
  background: linear-gradient(180deg, rgba(201, 168, 79, 0.36), rgba(201, 168, 79, 0.16));
}

.btn-calendar-empty-sync:active:not(:disabled) {
  background: rgba(201, 168, 79, 0.22);
}

.calendar-empty-sync-icon {
  width: 1.2rem;
  height: 1.2rem;
  display: block;
  flex: 0 0 auto;
}

.calendar-empty-sync-label {
  line-height: 1;
}

.btn-calendar-empty-sync--spinning .calendar-empty-sync-icon {
  animation: nav-sync-spin 0.85s linear infinite;
}

.calendar-empty-hint {
  margin: 0;
  max-width: 18rem;
  font-size: 0.88rem;
  line-height: 1.4;
  color: rgba(173, 186, 209, 0.92);
}

.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.9rem;
  justify-content: center;
  margin: 0.85rem 0 0;
  padding-top: 0.7rem;
  border-top: 1px solid rgba(201, 168, 79, 0.2);
  font-size: 0.74rem;
  font-weight: 600;
  color: rgba(196, 208, 228, 0.9);
}

.calendar-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.legend-swatch.flight { background: var(--flight); }
.legend-swatch.deadhead { background: var(--deadhead); }
.legend-swatch.standby { background: var(--standby); }
.legend-swatch.training { background: var(--training); }
.legend-swatch.off { background: var(--off); }
.legend-swatch.layover { background: var(--layover); }
.legend-swatch.meeting { background: var(--meeting); }
.legend-swatch.other { background: var(--other); }

.calendar-shell--loading .calendar {
  opacity: 0.45;
  pointer-events: none;
}

.calendar-shell--loading .calendar .day {
  animation: calendar-shimmer 1.2s ease-in-out infinite;
}

/* Calendar is visible as a preview, but taps/swipes stay blocked until enrich finishes. */
.calendar-shell--locked .calendar {
  pointer-events: none;
  user-select: none;
}

.calendar-shell--locked:not(.calendar-shell--loading) .calendar {
  opacity: 1;
  filter: none;
}

.calendar-shell--locked:not(.calendar-shell--loading)::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  cursor: wait;
  background: transparent;
}

@keyframes calendar-shimmer {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(1.25rem + var(--safe-bottom));
  transform: translateX(-50%);
  width: calc(100% - 2 * var(--app-pad-x));
  max-width: min(420px, calc(100vw - 2rem));
  padding: 0.65rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  background: var(--card);
  border: 1px solid rgba(201, 168, 79, 0.45);
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
  z-index: 1000;
  transition: opacity 0.2s ease;
}

.toast.hidden {
  opacity: 0;
  pointer-events: none;
}

.leg-times-cell--late .leg-times-val {
  color: #ffb74d;
  font-weight: 700;
}

.leg-card--flight { border-left: 3px solid var(--flight); }
.leg-card--standby { border-left: 3px solid var(--standby); }
.leg-card--training { border-left: 3px solid var(--training); }
.leg-card--meeting { border-left: 3px solid var(--meeting); }
.leg-card--other { border-left: 3px solid var(--other); }

.duty-times-connector .duty-times-line {
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

/* —— iPhone-first responsive —— */

/* Compact iPhones (SE, mini) */
@media (max-width: 374px) {
  .app-nav__title {
    max-width: min(40vw, 10.5rem);
    gap: 0.2rem;
    padding-inline: 0.25rem;
  }

  .app-nav__title-text {
    font-size: 0.82rem;
    letter-spacing: 0.1em;
  }

  .app-nav__title::after {
    width: 1.25rem;
  }

  .btn-nav-icon {
    width: 38px;
    height: 38px;
  }

  .nav-icon {
    width: 19px;
    height: 19px;
  }

  .month-label {
    font-size: 1.1rem;
  }

  .day {
    min-height: 4.85rem;
  }

  .day-num {
    font-size: 0.62rem;
  }

  .chip {
    font-size: 0.5rem;
    padding: 1px 2px;
  }

  .weekdays {
    font-size: 0.6rem;
  }

  .leg-airport-code {
    font-size: 1.05rem;
    padding: 0.28rem 0.4rem;
  }

  .leg-times-val {
    font-size: 0.76rem;
  }

  .leg-times-kicker {
    font-size: 0.55rem;
  }

  .duty-time-clock {
    font-size: 1.15rem;
  }

  .duty-times {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .duty-times-connector {
    padding: 0.15rem 0;
    min-width: 0;
    min-height: 1.25rem;
  }

  .duty-times-line {
    width: 70%;
    height: 2px;
    min-height: 0;
    margin: 0 auto;
    background: linear-gradient(90deg, transparent, rgba(51, 115, 217, 0.5), rgba(201, 168, 79, 0.5), transparent);
  }

  .duty-time-card--debrief {
    flex-direction: row;
    text-align: left;
  }

  .duty-time-card--debrief .duty-time-body {
    align-items: flex-start;
  }
}

/* Standard / large iPhones */
@media (min-width: 375px) {
  .day {
    min-height: 5.25rem;
  }
}

@media (min-width: 390px) {
  .day {
    min-height: 5.35rem;
  }

  .chip {
    font-size: 0.55rem;
  }
}

@media (min-width: 428px) {
  .day {
    min-height: 5.5rem;
  }

  .chip {
    font-size: 0.56rem;
  }
}

/* iPad portrait and large phones in landscape */
@media (min-width: 600px) {
  .day {
    min-height: 5.65rem;
  }

  .chip {
    font-size: 0.56rem;
  }

  .dashboard-kpis-grid {
    grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr));
  }
}

/* iPad */
@media (min-width: 768px) {
  .app[data-screen="login"] {
    padding-top: 1.5rem;
  }

  .day {
    min-height: 5.8rem;
  }

  .chip {
    font-size: 0.58rem;
  }

  .weekdays {
    font-size: 0.72rem;
  }

  .month-label {
    font-size: 1.35rem;
  }

  .dashboard-kpis-grid {
    grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  }

  .duty-detail-panel {
    padding: 0.25rem 0.15rem 0.15rem;
  }

  .leg-schedule {
    margin-left: 1rem;
    margin-right: 1rem;
  }
}

/* iPad landscape / desktop */
@media (min-width: 1024px) {
  .day {
    min-height: 5.95rem;
  }
}

/* Short viewport (landscape phone): keep calendar usable */
@media (max-height: 500px) and (orientation: landscape) {
  .day {
    min-height: 4.55rem;
  }

  .day-chips {
    max-height: calc(4 * 0.78rem + 3px);
  }

  .day-chips .chip {
    font-size: 0.48rem;
    padding: 1px 2px;
  }

  .footer {
    margin-top: 1rem;
  }
}

/* Coarse pointer = touch: ensure tap targets */
@media (pointer: coarse) {
  .btn,
  .btn-month-nav,
  .chip,
  .duty-span-bar,
  .settings-option {
    touch-action: manipulation;
  }

  /* Outside the calendar, keep a comfortable tap height. */
  .chip {
    min-height: 1.1rem;
  }

  /* Day cells must fit 4 route chips — keep them compact. */
  .day-chips .chip {
    min-height: 0;
  }
}

/* Open Flights — roster-aligned */
.open-flights-toolbar {
  margin-bottom: 0.85rem;
  padding: 0.95rem 1rem 1rem;
  border-top: 2px solid rgba(201, 168, 79, 0.55);
}

.open-flights-heading {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gold);
}

.open-flights-hint {
  margin: 0 0 0.9rem;
}

.open-flights-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem 0.7rem;
  align-items: end;
  margin-bottom: 0.85rem;
}

/* Open Flights + Flight List: denser 2-column filter (less scroll before results). */
#open-flights-panel .open-flights-filters--compact,
#flight-list-panel .open-flights-filters--compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem 0.55rem;
  margin-bottom: 0.65rem;
  align-items: start;
}

#open-flights-panel .open-flights-filters--compact > .open-flights-field,
#flight-list-panel .open-flights-filters--compact > .open-flights-field {
  min-width: 0;
  max-width: 100%;
}

#open-flights-panel .open-flights-filters--compact .open-flights-input,
#flight-list-panel .open-flights-filters--compact .open-flights-input {
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

/* iOS Safari time/date controls need explicit containment or they overflow. */
#open-flights-panel input[type="time"].open-flights-input,
#flight-list-panel input[type="time"].open-flights-input,
#open-flights-panel input[type="date"].open-flights-input,
#flight-list-panel input[type="date"].open-flights-input {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

#open-flights-panel .open-flights-toolbar,
#flight-list-panel .open-flights-toolbar {
  padding: 0.8rem 0.85rem 0.85rem;
  border: 1px solid rgba(201, 168, 79, 0.42);
  border-top: 2px solid rgba(201, 168, 79, 0.7);
}

#open-flights-panel .open-flights-field--fleet,
#flight-list-panel .open-flights-field--fleet {
  grid-column: 1 / -1;
  gap: 0;
}

#open-flights-panel .open-flights-actions,
#flight-list-panel .open-flights-actions {
  grid-column: 1 / -1;
  justify-content: center;
}

#open-flights-panel .open-flights-actions .btn.primary,
#flight-list-panel .open-flights-actions .btn.primary {
  width: auto;
  min-width: 11rem;
  max-width: 100%;
  height: 2.45rem;
  min-height: 2.45rem;
  padding: 0 1.35rem;
  border-radius: 999px;
}

#open-flights-panel label.open-flights-field,
#flight-list-panel label.open-flights-field {
  color: var(--gold);
}

#open-flights-panel .open-flights-input,
#flight-list-panel .open-flights-input {
  height: 2.45rem;
  min-height: 2.45rem;
  border-color: rgba(201, 168, 79, 0.45);
}

#open-flights-panel .open-flights-input:hover,
#flight-list-panel .open-flights-input:hover {
  border-color: rgba(201, 168, 79, 0.7);
}

#open-flights-panel .open-flights-input:focus,
#flight-list-panel .open-flights-input:focus {
  border-color: rgba(201, 168, 79, 0.95);
  box-shadow: 0 0 0 2px rgba(201, 168, 79, 0.16);
}

#open-flights-panel .open-flights-fleet-panel,
#flight-list-panel .open-flights-fleet-panel {
  border-color: rgba(201, 168, 79, 0.48);
}

#open-flights-panel .open-flights-fleet-title,
#flight-list-panel .open-flights-fleet-title {
  color: var(--gold);
}

.open-flights-fleet-panel {
  display: grid;
  gap: 0.7rem;
  padding: 0.75rem 0.7rem 0.8rem;
  border-radius: 12px;
  border: 1px solid rgba(201, 168, 79, 0.22);
  background:
    linear-gradient(180deg, rgba(201, 168, 79, 0.07), rgba(0, 0, 0, 0.18)),
    rgba(0, 0, 0, 0.2);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 8px 18px rgba(0, 0, 0, 0.16);
}

.open-flights-fleet-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0 0.15rem;
}

.open-flights-fleet-title {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
}

.open-flights-fleet-hint {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(173, 186, 209, 0.72);
}

.open-flights-fleet-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 0.7rem;
  align-items: center;
  justify-content: center;
  padding: 0.15rem 0.1rem 0.1rem;
}

.open-flights-fleet-badge {
  --fleet-accent: #c9a84f;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.45rem;
  min-width: 3.7rem;
  padding: 0.4rem 0.85rem 0.4rem 0.68rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(8, 10, 14, 0.55);
  color: rgba(232, 236, 244, 0.82);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition:
    background 0.16s ease,
    border-color 0.16s ease,
    color 0.16s ease,
    transform 0.16s ease,
    box-shadow 0.16s ease;
}

.open-flights-fleet-badge-dot {
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: color-mix(in srgb, var(--fleet-accent) 55%, #6a7382);
  box-shadow: none;
  opacity: 0.75;
  flex: 0 0 auto;
  transition: background 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease;
}

.open-flights-fleet-badge-label {
  line-height: 1;
}

.open-flights-fleet-badge:hover {
  border-color: color-mix(in srgb, var(--fleet-accent) 55%, rgba(255, 255, 255, 0.18));
  background: color-mix(in srgb, var(--fleet-accent) 14%, rgba(8, 10, 14, 0.72));
  color: #fff;
}

.open-flights-fleet-badge:hover .open-flights-fleet-badge-dot {
  background: var(--fleet-accent);
  opacity: 1;
}

.open-flights-fleet-badge.is-selected {
  border-color: color-mix(in srgb, var(--fleet-accent) 75%, #c9a84f);
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--fleet-accent) 34%, rgba(20, 22, 28, 0.9)),
    color-mix(in srgb, var(--fleet-accent) 12%, rgba(8, 10, 14, 0.95))
  );
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 0 0 1px color-mix(in srgb, var(--fleet-accent) 22%, transparent),
    0 8px 16px rgba(0, 0, 0, 0.22);
}

.open-flights-fleet-badge.is-selected .open-flights-fleet-badge-dot {
  background: #fff;
  opacity: 1;
  box-shadow:
    0 0 0 2px color-mix(in srgb, var(--fleet-accent) 40%, transparent),
    0 0 8px color-mix(in srgb, var(--fleet-accent) 55%, transparent);
}

.open-flights-fleet-badge:active {
  transform: scale(0.97);
}

.open-flights-fleet-badge--32x { --fleet-accent: #45c2cd; }
.open-flights-fleet-badge--33x { --fleet-accent: #6b95f0; }
.open-flights-fleet-badge--789 { --fleet-accent: #a488ff; }
.open-flights-fleet-badge--77w { --fleet-accent: #e0ae55; }
.open-flights-fleet-badge--77x { --fleet-accent: #ef8a5c; }
.open-flights-fleet-badge--351 { --fleet-accent: #d7bc6a; }
.open-flights-fleet-badge--388 { --fleet-accent: #d97bbe; }

.panel label.open-flights-field {
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
  margin: 0;
  min-width: 0;
  max-width: 100%;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(232, 236, 244, 0.72);
}

.panel label.open-flights-field > span {
  display: block;
  line-height: 1.2;
}

.open-flights-input {
  box-sizing: border-box;
  display: block;
  width: 100%;
  max-width: 100%;
  height: 2.6rem;
  min-height: 2.6rem;
  margin: 0;
  padding: 0.4rem 0.65rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.28);
  color: var(--text);
  color-scheme: dark;
  font: inherit;
  font-size: max(16px, 0.95rem);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.open-flights-input option {
  background: var(--card);
  color: var(--text);
}

.open-flights-input:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

.open-flights-input:focus {
  outline: none;
  border-color: rgba(201, 168, 79, 0.75);
  background: rgba(0, 0, 0, 0.38);
}

.open-flights-actions {
  grid-column: span 2;
  display: flex;
  align-items: end;
  justify-content: center;
  min-width: 0;
}

.open-flights-actions .btn.primary {
  box-sizing: border-box;
  width: auto;
  min-width: 11rem;
  max-width: 100%;
  height: 2.6rem;
  min-height: 2.6rem;
  padding: 0 1.35rem;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.open-flights-toolbar-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  width: 100%;
}

.open-flights-toolbar-foot:has(.open-flights-status:empty) {
  display: none;
}

.panel label.open-flights-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  font-size: 0.86rem;
  font-weight: 500;
  color: rgba(232, 236, 244, 0.78);
  cursor: pointer;
  user-select: none;
}

.panel label.open-flights-toggle:hover {
  color: var(--text);
}

.open-flights-toggle input {
  width: 1.05rem;
  height: 1.05rem;
  margin: 0;
  flex-shrink: 0;
  accent-color: var(--gold);
}

.open-flights-status {
  margin: 0;
  font-size: 0.88rem;
  min-height: 1.85rem;
}

.open-flights-status:empty {
  min-height: 0;
}

.open-flights-status--muted {
  color: var(--muted);
}

.open-flights-status--error {
  color: #f07178;
}

.open-flights-status--ok {
  color: var(--gold);
}

.open-flights-status--summary {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.55rem;
  width: 100%;
  color: inherit;
}

.open-flights-status-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  width: 100%;
}

.open-flights-status-stats:has(.open-flights-stat--window) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 420px) {
  .open-flights-status-stats:has(.open-flights-stat--window) {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.open-flights-stat {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.25rem;
  width: 100%;
  box-sizing: border-box;
  padding: 0.4rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.32);
  line-height: 1.15;
  text-align: center;
}

.open-flights-stat-value {
  font-size: 1.05rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.open-flights-stat-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.open-flights-stat--flights {
  border-color: rgba(232, 197, 71, 0.45);
  background: rgba(232, 197, 71, 0.14);
}

.open-flights-stat--flights .open-flights-stat-value {
  color: var(--gold);
}

.open-flights-stat--flights .open-flights-stat-label {
  color: rgba(232, 197, 71, 0.9);
}

.open-flights-stat--window {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 0.38rem 0.55rem;
}

.open-flights-stat--open {
  border-color: rgba(240, 113, 120, 0.55);
  background: rgba(240, 113, 120, 0.16);
}

.open-flights-stat--open .open-flights-stat-value {
  color: #f07178;
}

.open-flights-stat--open .open-flights-stat-label {
  color: rgba(240, 113, 120, 0.98);
}

.open-flights-stat--clear {
  border-color: rgba(125, 206, 160, 0.45);
  background: rgba(125, 206, 160, 0.12);
}

.open-flights-stat--clear .open-flights-stat-label {
  color: #7dcea0;
}

.open-flights-progress {
  margin: 0.85rem 0 0;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.open-flights-progress-track {
  height: 7px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.open-flights-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--burgundy), var(--gold), var(--flight));
  background-size: 200% 100%;
  transition: width 0.55s ease-out;
  box-shadow: 0 0 12px rgba(201, 168, 79, 0.35);
  animation: open-flights-progress-sheen 1.8s linear infinite;
}

@keyframes open-flights-progress-sheen {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

.open-flights-progress-label {
  margin: 0.45rem 0 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.open-flights-list {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 4rem;
  padding-block: 0.2rem;
  box-sizing: border-box;
}

/* Open Flights + Flight List: full-bleed under the app shell */
#open-flights-panel,
#flight-list-panel {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

#open-flights-panel .open-flights-toolbar,
#flight-list-panel .open-flights-toolbar,
#open-flights-panel .open-flights-list,
#flight-list-panel .open-flights-list,
#open-flights-panel .open-flights-empty-card,
#flight-list-panel .open-flights-empty-card {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

#open-flights-panel .open-flights-empty-card,
#flight-list-panel .open-flights-empty-card {
  border: 1px solid rgba(201, 168, 79, 0.42);
  border-top: 2px solid rgba(201, 168, 79, 0.7);
}

.open-flights-empty,
.open-flights-loading {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  padding: 0.35rem 0.1rem;
}

.open-flights-empty-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
  margin: 0.15rem 0 0;
  padding: 1.15rem 1.2rem 1.25rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.05), rgba(0, 0, 0, 0.22));
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.open-flights-empty-card--clear {
  border-color: rgba(125, 206, 160, 0.28);
  background: linear-gradient(165deg, rgba(125, 206, 160, 0.1), rgba(0, 0, 0, 0.2));
}

.open-flights-empty-card--warn {
  border-color: rgba(232, 197, 71, 0.28);
  background: linear-gradient(165deg, rgba(232, 197, 71, 0.1), rgba(0, 0, 0, 0.2));
}

.open-flights-empty-card--error {
  border-color: rgba(240, 113, 120, 0.32);
  background: linear-gradient(165deg, rgba(240, 113, 120, 0.1), rgba(0, 0, 0, 0.2));
}

.open-flights-empty-kicker {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.open-flights-empty-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.open-flights-empty-hint {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--muted);
  max-width: 36rem;
}

.open-flights-empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.35rem;
}

.open-flights-empty-actions .btn {
  min-height: 2.2rem;
  padding: 0.4rem 0.85rem;
  font-size: 0.82rem;
}

.open-flights-empty-badge {
  display: inline-flex;
  align-items: center;
  margin: 0.35rem 0 0;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(125, 206, 160, 0.45);
  background: rgba(125, 206, 160, 0.12);
  color: #7dcea0;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.open-flights-empty-badge--in-card {
  display: flex;
  width: 100%;
  box-sizing: border-box;
  justify-content: center;
  align-items: center;
  margin: 0;
  padding: 0.6rem 0.9rem;
  min-height: 2.25rem;
  border-radius: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.open-flights-row {
  position: relative;
  padding: 0.95rem 1.05rem 1.05rem 1.05rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-left: 3px solid rgba(201, 168, 79, 0.45);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(0, 0, 0, 0.14));
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.2);
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.open-flights-row + .open-flights-row::before {
  content: "";
  position: absolute;
  top: calc(-0.7rem - 0.5px);
  left: 6%;
  right: 6%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(201, 168, 79, 0.18) 18%,
    rgba(201, 168, 79, 0.28) 50%,
    rgba(201, 168, 79, 0.18) 82%,
    transparent 100%
  );
  pointer-events: none;
}

.open-flights-row:hover {
  border-color: rgba(255, 255, 255, 0.16);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(0, 0, 0, 0.16));
}

.open-flights-row--on-time {
  border-left-color: rgba(110, 180, 140, 0.75);
  border-color: rgba(110, 180, 140, 0.28);
  background:
    linear-gradient(90deg, rgba(110, 180, 140, 0.07), transparent 40%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(0, 0, 0, 0.14));
}

.open-flights-row--delayed {
  border-left-color: rgba(240, 160, 90, 0.9);
  border-color: rgba(240, 160, 90, 0.32);
  background:
    linear-gradient(90deg, rgba(240, 160, 90, 0.09), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(0, 0, 0, 0.14));
}

.open-flights-row--airborne {
  border-left-color: rgba(110, 168, 254, 0.9);
  border-color: rgba(110, 168, 254, 0.32);
  background:
    linear-gradient(90deg, rgba(110, 168, 254, 0.1), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(0, 0, 0, 0.14));
}

.open-flights-row--arrived {
  border-left-color: rgba(140, 210, 170, 0.85);
  border-color: rgba(120, 200, 160, 0.3);
  background:
    linear-gradient(90deg, rgba(120, 200, 160, 0.09), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(0, 0, 0, 0.14));
}

.open-flights-row--on-time:hover,
.open-flights-row--delayed:hover,
.open-flights-row--airborne:hover,
.open-flights-row--arrived:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

/* Flight List: gold chrome like Settings/toolbar (no status-colored edge) */
#flight-list-panel .open-flights-row {
  border: 1px solid rgba(201, 168, 79, 0.42);
  border-top: 2px solid rgba(201, 168, 79, 0.72);
  border-left-width: 3px;
  border-left-color: rgba(201, 168, 79, 0.85);
  box-shadow:
    0 10px 22px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(0, 0, 0, 0.14));
}

#flight-list-panel .open-flights-row + .open-flights-row::before {
  display: none;
}

#flight-list-panel .open-flights-row:hover,
#flight-list-panel .open-flights-row--on-time:hover,
#flight-list-panel .open-flights-row--delayed:hover,
#flight-list-panel .open-flights-row--airborne:hover,
#flight-list-panel .open-flights-row--arrived:hover,
#flight-list-panel .open-flights-row.open-flights-row--attention:hover {
  border-color: rgba(201, 168, 79, 0.7);
  border-top-color: rgba(201, 168, 79, 0.9);
  border-left-color: rgba(201, 168, 79, 0.95);
}

#flight-list-panel .open-flights-row--on-time,
#flight-list-panel .open-flights-row--delayed,
#flight-list-panel .open-flights-row--airborne,
#flight-list-panel .open-flights-row--arrived,
#flight-list-panel .open-flights-row.open-flights-row--attention {
  border-color: rgba(201, 168, 79, 0.42);
  border-top-color: rgba(201, 168, 79, 0.72);
  border-left-color: rgba(201, 168, 79, 0.85);
  animation: none;
  box-shadow:
    0 10px 22px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(0, 0, 0, 0.14));
}

#flight-list-panel .open-flights-seat--missing {
  border-left-color: rgba(201, 168, 79, 0.9);
  border-color: rgba(255, 255, 255, 0.07);
  background:
    linear-gradient(90deg, rgba(201, 168, 79, 0.1), transparent 48%),
    rgba(0, 0, 0, 0.28);
}

#flight-list-panel .open-flights-seat--missing strong {
  color: rgba(196, 208, 228, 0.88);
  font-weight: 650;
}

#flight-list-panel .open-flights-seat--missing .open-flights-seat-role {
  color: var(--gold);
}

#flight-list-panel .open-flights-badge--open {
  background: rgba(201, 168, 79, 0.14);
  border-color: rgba(201, 168, 79, 0.4);
  color: #f0e0a8;
}

#flight-list-panel .open-flights-row-meta,
#flight-list-panel .open-flights-row-meta--on-time,
#flight-list-panel .open-flights-row-meta--delayed,
#flight-list-panel .open-flights-row-meta--airborne,
#flight-list-panel .open-flights-row-meta--arrived {
  border-left-color: rgba(201, 168, 79, 0.85);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(0, 0, 0, 0.28));
}

/* Open CP/FO seats: red edge + contour, pulse for attention. */
.open-flights-row.open-flights-row--attention {
  border-left-color: rgba(240, 113, 120, 0.95);
  border-color: rgba(240, 113, 120, 0.55);
  background:
    linear-gradient(90deg, rgba(240, 113, 120, 0.14), transparent 44%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(0, 0, 0, 0.14));
  box-shadow:
    0 0 0 1px rgba(240, 113, 120, 0.25),
    0 10px 22px rgba(0, 0, 0, 0.22);
  animation: open-flights-attention-pulse 2.4s ease-in-out infinite;
}

.open-flights-row.open-flights-row--attention:hover {
  border-color: rgba(240, 113, 120, 0.78);
}

@keyframes open-flights-attention-pulse {
  0%,
  100% {
    border-color: rgba(240, 113, 120, 0.45);
    box-shadow:
      0 0 0 1px rgba(240, 113, 120, 0.2),
      0 10px 22px rgba(0, 0, 0, 0.22);
  }
  50% {
    border-color: rgba(240, 113, 120, 0.82);
    box-shadow:
      0 0 0 2px rgba(240, 113, 120, 0.38),
      0 0 20px rgba(240, 113, 120, 0.2),
      0 10px 22px rgba(0, 0, 0, 0.22);
  }
}

@media (prefers-reduced-motion: reduce) {
  .open-flights-row.open-flights-row--attention {
    animation: none;
  }
}

.open-flights-row-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.7rem;
  width: 100%;
  min-width: 0;
}

.open-flights-row-head-trail {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem 0.45rem;
  margin-left: auto;
  min-width: 0;
}

.open-flights-row-refresh {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 1.85rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(201, 168, 79, 0.4);
  background: rgba(201, 168, 79, 0.1);
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  white-space: nowrap;
  touch-action: manipulation;
  cursor: pointer;
  flex: 0 0 auto;
}

.open-flights-row-refresh:hover {
  border-color: rgba(201, 168, 79, 0.7);
  background: rgba(201, 168, 79, 0.18);
  color: #f0e0a8;
}

.open-flights-row-refresh:disabled,
.open-flights-row-refresh.is-busy {
  opacity: 0.65;
  cursor: wait;
}

.open-flights-row-refresh-icon {
  width: 0.95rem;
  height: 0.95rem;
  flex: 0 0 auto;
}

.open-flights-row-refresh.is-busy .open-flights-row-refresh-icon {
  animation: open-flights-refresh-spin 0.85s linear infinite;
}

@keyframes open-flights-refresh-spin {
  to {
    transform: rotate(360deg);
  }
}

.open-flights-row-flight {
  font-weight: 800;
  font-size: 1.12rem;
  letter-spacing: 0.01em;
  color: var(--text);
}

.open-flights-row-route {
  color: rgba(232, 236, 244, 0.78);
  font-size: 0.88rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.open-flights-meta-main .open-flights-row-route {
  margin: 0 0 0.35rem;
}

.open-flights-timing-badges {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
}

.open-flights-timing-badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.35rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.open-flights-timing-badge--early {
  color: #9ee0b8;
  border-color: rgba(110, 200, 150, 0.45);
  background: rgba(110, 200, 150, 0.12);
}

.open-flights-timing-badge--on-time {
  color: #7ddea0;
  border-color: rgba(70, 190, 120, 0.55);
  background: rgba(70, 190, 120, 0.16);
}

.open-flights-timing-badge--late,
.open-flights-timing-badge--arr-late {
  color: #ff8a8f;
  border-color: rgba(255, 77, 87, 0.55);
  background: rgba(255, 77, 87, 0.16);
}

.open-flights-timing-badge--airborne {
  color: #9ec5ff;
  border-color: rgba(110, 168, 254, 0.5);
  background: rgba(110, 168, 254, 0.14);
}

.open-flights-timing-badge--landed {
  color: #b8d4c4;
  border-color: rgba(140, 190, 160, 0.4);
  background: rgba(140, 190, 160, 0.12);
}

.open-flights-badges {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.open-flights-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(240, 113, 120, 0.45);
  background: rgba(240, 113, 120, 0.1);
  color: #f07178;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.open-flights-badge--open {
  border-color: rgba(240, 113, 120, 0.5);
  background: rgba(240, 113, 120, 0.14);
  color: #f07178;
}

.open-flights-badge--training {
  border-color: rgba(110, 168, 254, 0.55);
  background: rgba(110, 168, 254, 0.16);
  color: #9ec5fe;
}

.open-flights-badge--wet {
  border-color: rgba(201, 168, 79, 0.5);
  background: rgba(201, 168, 79, 0.12);
  color: #e6c35a;
}

.open-flights-row-meta {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.1rem;
  margin-top: 0.6rem;
  padding: 0.55rem 0.65rem 0.55rem 0.7rem;
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(0, 0, 0, 0.28));
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-left: 3px solid rgba(201, 168, 79, 0.45);
  color: var(--muted);
  font-size: 0.82rem;
}

.open-flights-meta-main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex: 1 1 auto;
  min-width: 0;
  gap: 0;
}

.open-flights-row-meta--on-time {
  border-left-color: rgba(110, 180, 140, 0.75);
}

.open-flights-row-meta--delayed {
  border-left-color: rgba(240, 160, 90, 0.9);
  background:
    linear-gradient(90deg, rgba(240, 160, 90, 0.08), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(0, 0, 0, 0.28));
}

.open-flights-row-meta--airborne {
  border-left-color: rgba(110, 168, 254, 0.9);
  background:
    linear-gradient(90deg, rgba(110, 168, 254, 0.1), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(0, 0, 0, 0.28));
}

.open-flights-row-meta--arrived {
  border-left-color: rgba(140, 210, 170, 0.85);
  background:
    linear-gradient(90deg, rgba(120, 200, 160, 0.08), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(0, 0, 0, 0.28));
}

.open-flights-timeline {
  display: inline-grid;
  grid-template-columns: minmax(4.8rem, auto) auto minmax(4.8rem, auto);
  align-items: center;
  column-gap: 0.55rem;
  row-gap: 0.15rem;
  min-width: 0;
  flex: 1 1 auto;
}

.open-flights-timeline-mid {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.28rem;
  min-width: 2.4rem;
  align-self: center;
  margin-top: 0.15rem;
}

.open-flights-timeline-arrow {
  width: 1.35rem;
  height: 1px;
  background: linear-gradient(
    90deg,
    rgba(201, 168, 79, 0.15),
    rgba(201, 168, 79, 0.75),
    rgba(201, 168, 79, 0.15)
  );
  position: relative;
}

.open-flights-timeline-arrow::after {
  content: "";
  position: absolute;
  right: -1px;
  top: 50%;
  width: 5px;
  height: 5px;
  border-right: 1.5px solid rgba(201, 168, 79, 0.8);
  border-top: 1.5px solid rgba(201, 168, 79, 0.8);
  transform: translateY(-50%) rotate(45deg);
}

.open-flights-block-time {
  color: rgba(232, 236, 244, 0.55);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  line-height: 1;
}

.open-flights-clock {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  min-width: 0;
}

.open-flights-clock--empty {
  opacity: 0.45;
}

.open-flights-clock-iata {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.92;
  line-height: 1;
}

.open-flights-clock-std-row {
  display: inline-flex;
  align-items: baseline;
  gap: 0.3rem;
  min-width: 0;
}

.open-flights-clock-std {
  color: rgba(232, 236, 244, 0.94);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 0.98rem;
  letter-spacing: 0.02em;
  line-height: 1.15;
}

.open-flights-delay {
  font-variant-numeric: tabular-nums;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1;
}

.open-flights-delay--late {
  color: #f07178;
}

.open-flights-delay--early {
  color: #7dcea0;
}

.open-flights-clock-ops {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.28rem;
  margin-top: 0.08rem;
}

.open-flights-ops-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
  padding: 0.12rem 0.38rem 0.12rem 0.28rem;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.2;
  border: 1px solid transparent;
}

.open-flights-ops-chip-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 0.95rem;
  height: 0.95rem;
  border-radius: 999px;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0;
}

.open-flights-ops-chip--est {
  color: #e6c35a;
  background: rgba(201, 168, 79, 0.12);
  border-color: rgba(201, 168, 79, 0.32);
}

.open-flights-ops-chip--est .open-flights-ops-chip-letter {
  color: #1a160c;
  background: #d4af37;
}

.open-flights-ops-chip--act {
  color: #8fd9b4;
  background: rgba(88, 180, 130, 0.12);
  border-color: rgba(88, 180, 130, 0.35);
}

.open-flights-ops-chip--act .open-flights-ops-chip-letter {
  color: #0e1a14;
  background: #6ecf9a;
}

.open-flights-ops-chip--act.open-flights-ops-chip--early {
  color: #8fd9b4;
  background: rgba(88, 180, 130, 0.14);
  border-color: rgba(88, 180, 130, 0.4);
}

.open-flights-ops-chip--act.open-flights-ops-chip--early .open-flights-ops-chip-letter {
  color: #0e1a14;
  background: #6ecf9a;
}

.open-flights-ops-chip--act.open-flights-ops-chip--late {
  color: #f07178;
  background: rgba(240, 113, 120, 0.12);
  border-color: rgba(240, 113, 120, 0.4);
}

.open-flights-ops-chip--act.open-flights-ops-chip--late .open-flights-ops-chip-letter {
  color: #1a0e10;
  background: #f07178;
}

.open-flights-time-range {
  color: rgba(232, 236, 244, 0.88);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  grid-column: 1 / 4;
}

.open-flights-timeline-tags {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.28rem;
  align-self: center;
  margin-top: 0;
}

.open-flights-status-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.14rem 0.42rem;
  border-radius: 999px;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.2;
  border: 1px solid transparent;
  white-space: nowrap;
}

.open-flights-status-chip--on-time {
  color: #8fd9b4;
  background: rgba(88, 180, 130, 0.12);
  border-color: rgba(88, 180, 130, 0.35);
}

.open-flights-status-chip--delayed {
  color: #f0b078;
  background: rgba(240, 160, 90, 0.12);
  border-color: rgba(240, 160, 90, 0.4);
}

.open-flights-status-chip--airborne {
  color: #9ec5fe;
  background: rgba(110, 168, 254, 0.14);
  border-color: rgba(110, 168, 254, 0.4);
}

.open-flights-status-chip--arrived {
  color: #b7e0c8;
  background: rgba(120, 200, 160, 0.12);
  border-color: rgba(120, 200, 160, 0.38);
}

.open-flights-times-tag {
  padding: 0.14rem 0.4rem;
  border-radius: 4px;
  border: 1px solid rgba(201, 168, 79, 0.28);
  background: rgba(201, 168, 79, 0.08);
  color: var(--gold);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.2;
}

.open-flights-ac-meta {
  display: inline-flex;
  align-items: center;
  align-self: center;
  gap: 0.5rem;
  flex: 0 0 auto;
  margin-left: auto;
  min-width: 0;
  padding: 0.32rem 0.5rem 0.35rem 0.4rem;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.open-flights-ac-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.35rem;
  min-height: 1.35rem;
  padding: 0.22rem 0.48rem;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.1;
  color: #10141c;
  white-space: nowrap;
  background: #9aa3b2;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    inset 0 -1px 0 rgba(0, 0, 0, 0.22);
}

.open-flights-ac-reg {
  color: #c5d0e0;
  font-family: ui-monospace, "Cascadia Mono", "Segoe UI Mono", Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums;
  font-size: 0.82rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  line-height: 1.35;
  white-space: nowrap;
}

/* Legacy time-ops classes kept for safety if cached HTML briefly mixes. */
.open-flights-time-block {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.55rem;
  min-width: 0;
}

.open-flights-time-ops,
.open-flights-time-ops-range,
.open-flights-time-sep,
.open-flights-time-ops-empty,
.open-flights-time-ops--est,
.open-flights-time-ops--act {
  font-variant-numeric: tabular-nums;
}

.open-flights-seats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  margin-top: 0.75rem;
  align-items: stretch;
}

.open-flights-seat {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.2rem;
  padding: 0.65rem 0.7rem 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-left: 3px solid rgba(154, 163, 178, 0.45);
  background: rgba(0, 0, 0, 0.28);
  min-width: 0;
}

.open-flights-seat--cp.open-flights-seat--filled,
.open-flights-seat--fo.open-flights-seat--filled {
  border-left-color: rgba(201, 168, 79, 0.9);
  background:
    linear-gradient(90deg, rgba(201, 168, 79, 0.1), transparent 48%),
    rgba(0, 0, 0, 0.28);
}

.open-flights-seat--missing {
  border-left-color: rgba(240, 113, 120, 0.95);
  background:
    linear-gradient(90deg, rgba(240, 113, 120, 0.12), transparent 48%),
    rgba(240, 113, 120, 0.08);
  border-color: rgba(240, 113, 120, 0.38);
}

.open-flights-seat--missing strong {
  color: #f07178;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
}

.open-flights-seat--wet-lease {
  border-left-color: rgba(201, 168, 79, 0.75);
  background:
    linear-gradient(90deg, rgba(201, 168, 79, 0.1), transparent 48%),
    rgba(0, 0, 0, 0.26);
  border-color: rgba(201, 168, 79, 0.28);
}

.open-flights-seat-wet {
  color: #e6c35a;
  font-size: 0.88rem;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.open-flights-seat--unknown {
  border-left-color: rgba(138, 147, 163, 0.55);
  background:
    linear-gradient(90deg, rgba(138, 147, 163, 0.08), transparent 48%),
    rgba(0, 0, 0, 0.22);
}

.open-flights-seat--unknown .open-flights-seat-name {
  color: #8a93a3;
  font-weight: 500;
}

.open-flights-seat-role {
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--gold);
  text-transform: uppercase;
}

.open-flights-seat-name {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.28rem;
  min-height: 1.35em;
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.35;
}

.open-flights-crew-line {
  display: grid;
  grid-template-columns: 5.4rem minmax(0, 1fr);
  align-items: baseline;
  column-gap: 0.4rem;
  min-width: 0;
}

.open-flights-crew-id-cell {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  min-width: 0;
}

.open-flights-pic-tag {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  padding: 0.02rem 0.22rem;
  border-radius: 3px;
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.2;
  color: rgba(201, 168, 79, 0.95);
  background: transparent;
  border: 1px solid rgba(201, 168, 79, 0.45);
  text-align: center;
  white-space: nowrap;
}

.open-flights-crew-name {
  display: block;
  min-width: 0;
  color: var(--text);
}

.open-flights-crew-name-text {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

/* Fleet family colors — 32X / 33X types share one badge color each. */
.open-flights-ac-badge--32x {
  background: #5ec8c0;
}
.open-flights-ac-badge--33x {
  background: #9db0d4;
}
.open-flights-ac-badge--789 {
  background: #6ea8fe;
}
.open-flights-ac-badge--77w {
  background: #7dcea0;
}
.open-flights-ac-badge--77x {
  background: #a3d977;
}
.open-flights-ac-badge--351 {
  background: #f0a06a;
}
.open-flights-ac-badge--388 {
  background: #e8c547;
}
.open-flights-ac-badge--unknown {
  background: #9aa3b2;
}

.open-flights-crew-id {
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  white-space: nowrap;
}

.open-flights-crew-id--empty {
  visibility: hidden;
}

@media (max-width: 720px) {
  .open-flights-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .open-flights-actions {
    grid-column: span 2;
  }

  #open-flights-panel .open-flights-filters--compact,
  #flight-list-panel .open-flights-filters--compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #open-flights-panel .open-flights-actions,
  #flight-list-panel .open-flights-actions {
    grid-column: 1 / -1;
  }

  #open-flights-panel .open-flights-toolbar,
  #flight-list-panel .open-flights-toolbar {
    padding: 0.75rem 0.75rem 0.8rem;
  }

  .open-flights-row {
    padding: 0.85rem 0.85rem 0.95rem;
  }
}

@media (max-width: 520px) {
  .open-flights-filters {
    grid-template-columns: 1fr;
  }

  .open-flights-actions {
    grid-column: auto;
  }

  /* Keep compact 2-col even on narrow phones. */
  #open-flights-panel .open-flights-filters--compact,
  #flight-list-panel .open-flights-filters--compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #open-flights-panel .open-flights-actions,
  #flight-list-panel .open-flights-actions,
  #open-flights-panel .open-flights-field--fleet,
  #flight-list-panel .open-flights-field--fleet {
    grid-column: 1 / -1;
  }

  #open-flights-panel .open-flights-actions .btn.primary,
  #flight-list-panel .open-flights-actions .btn.primary {
    min-width: 0;
    width: min(100%, 14rem);
  }

  .open-flights-fleet-badges {
    gap: 0.55rem 0.5rem;
  }

  .open-flights-fleet-badge {
    min-width: 3.2rem;
    min-height: 2.35rem;
    padding: 0.35rem 0.7rem 0.35rem 0.58rem;
    font-size: 0.74rem;
  }

  .open-flights-seats {
    grid-template-columns: 1fr;
  }

  .open-flights-row-meta {
    flex-wrap: wrap;
  }

  .open-flights-row-head {
    gap: 0.35rem 0.5rem;
  }

  .open-flights-row-head-trail {
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
  }

  .open-flights-row-head-trail .open-flights-row-refresh {
    margin-left: auto;
  }

  .open-flights-row-refresh {
    min-width: 2.35rem;
    min-height: 2.35rem;
    padding: 0.35rem;
    justify-content: center;
  }

  .open-flights-row-refresh-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .open-flights-timing-badge {
    font-size: 0.64rem;
    padding: 0.12rem 0.42rem;
  }

  .open-flights-timeline {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  }

  .open-flights-ac-meta {
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
  }
}

@media (max-width: 374px) {
  #open-flights-panel .open-flights-filters--compact,
  #flight-list-panel .open-flights-filters--compact {
    gap: 0.45rem;
  }

  .open-flights-fleet-badge {
    min-width: 2.9rem;
    padding: 0.32rem 0.55rem 0.32rem 0.48rem;
    font-size: 0.7rem;
  }

  .open-flights-row-flight {
    font-size: 1.02rem;
  }

  .open-flights-row-route {
    font-size: 0.88rem;
  }
}

/* My Profile — phone / tablet / desktop */
#my-profile-panel {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.my-profile-body {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.my-profile-status {
  margin: 0.55rem 0 0;
  padding: 0 0.25rem;
  font-size: 0.82rem;
  line-height: 1.35;
  text-align: center;
  overflow-wrap: anywhere;
}

.my-profile-status.hidden,
.my-profile-status[hidden] {
  display: none;
}

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

.my-profile-status--error {
  color: #f07178;
}

.my-profile-status--ok {
  color: var(--gold);
}

.my-profile-card {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(201, 168, 79, 0.32);
  border-top: 2px solid rgba(201, 168, 79, 0.72);
  background:
    linear-gradient(180deg, rgba(201, 168, 79, 0.07), transparent 28%),
    var(--card);
  box-shadow:
    0 14px 32px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.my-profile-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.85rem 0.9rem;
  align-items: center;
  padding: 1rem clamp(0.75rem, 3.5vw, 1.15rem) 0.95rem;
  border-bottom: 1px solid rgba(201, 168, 79, 0.16);
  background: linear-gradient(135deg, rgba(201, 168, 79, 0.1), transparent 55%);
}

.my-profile-avatar {
  display: grid;
  place-items: center;
  width: clamp(3.1rem, 12vw, 3.6rem);
  height: clamp(3.1rem, 12vw, 3.6rem);
  border-radius: 50%;
  border: 1px solid rgba(201, 168, 79, 0.55);
  background:
    linear-gradient(160deg, rgba(201, 168, 79, 0.35), rgba(115, 28, 46, 0.35)),
    rgba(0, 0, 0, 0.35);
  color: #f7efd4;
  font-size: clamp(0.8rem, 3.2vw, 0.92rem);
  font-weight: 800;
  letter-spacing: 0.06em;
  box-shadow: 0 0 0 3px rgba(201, 168, 79, 0.1);
  overflow: hidden;
  flex: 0 0 auto;
}

.my-profile-avatar--photo {
  padding: 0;
  background: rgba(0, 0, 0, 0.35);
}

.my-profile-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.my-profile-hero-text {
  min-width: 0;
  max-width: 100%;
}

.my-profile-hero-name {
  margin: 0;
  font-size: clamp(1rem, 4.2vw, 1.12rem);
  font-weight: 800;
  letter-spacing: 0.01em;
  color: var(--text);
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.my-profile-hero-meta,
.my-profile-hero-id {
  margin: 0.18rem 0 0;
  font-size: clamp(0.72rem, 3vw, 0.78rem);
  font-weight: 600;
  color: rgba(173, 186, 209, 0.88);
  overflow-wrap: anywhere;
}

.my-profile-hero-id {
  color: rgba(201, 168, 79, 0.9);
  letter-spacing: 0.04em;
}

.my-profile-refresh {
  align-self: start;
  justify-self: end;
  min-height: 2.35rem;
  min-width: 5.5rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(201, 168, 79, 0.4);
  background: rgba(201, 168, 79, 0.12);
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
  touch-action: manipulation;
}

.my-profile-refresh:hover {
  border-color: rgba(201, 168, 79, 0.7);
  background: rgba(201, 168, 79, 0.2);
  color: #f0e0a8;
}

.my-profile-refresh:disabled {
  opacity: 0.55;
  cursor: wait;
}

.my-profile-section {
  padding: 0.85rem clamp(0.75rem, 3.5vw, 1.15rem) 0.35rem;
}

.my-profile-section + .my-profile-section {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 0.95rem;
}

.my-profile-section:last-child {
  padding-bottom: 0.85rem;
}

.my-profile-section-title {
  margin: 0 0 0.45rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(201, 168, 79, 0.78);
}

.my-profile-grid {
  display: grid;
  gap: 0;
  min-width: 0;
}

.my-profile-row {
  display: grid;
  grid-template-columns: minmax(6.5rem, 8.4rem) minmax(0, 1fr);
  gap: 0.55rem 0.85rem;
  align-items: baseline;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  min-width: 0;
}

.my-profile-row:last-child {
  border-bottom: none;
}

.my-profile-label {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(201, 168, 79, 0.88);
  overflow-wrap: anywhere;
}

.my-profile-value {
  min-width: 0;
  font-size: clamp(0.88rem, 3.6vw, 0.95rem);
  font-weight: 650;
  color: var(--text);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.my-profile-loading,
.my-profile-empty-card {
  display: grid;
  gap: 0.55rem;
  justify-items: center;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 1.4rem clamp(0.85rem, 4vw, 1.25rem);
  border-radius: 14px;
  border: 1px solid rgba(201, 168, 79, 0.22);
  background: rgba(0, 0, 0, 0.22);
  color: var(--muted);
  text-align: center;
  overflow-wrap: anywhere;
}

.my-profile-empty-title {
  margin: 0;
  color: var(--text);
  font-weight: 750;
}

.my-profile-empty-hint {
  margin: 0;
  font-size: 0.88rem;
  max-width: 28rem;
}

.my-profile-retry {
  margin-top: 0.35rem;
  width: min(100%, 16rem);
  min-height: 2.5rem;
  touch-action: manipulation;
}

/* Phones / narrow tablets: stack Refresh under identity */
@media (max-width: 560px) {
  .my-profile-hero {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .my-profile-refresh {
    grid-column: 1 / -1;
    justify-self: stretch;
    width: 100%;
    min-width: 0;
  }
}

/* Compact phones: label above value so long emails/numbers wrap cleanly */
@media (max-width: 420px) {
  .my-profile-row {
    grid-template-columns: 1fr;
    gap: 0.18rem;
    padding: 0.55rem 0;
  }

  .my-profile-hero {
    gap: 0.7rem 0.75rem;
  }
}

@media (max-width: 374px) {
  .my-profile-avatar {
    width: 2.9rem;
    height: 2.9rem;
    font-size: 0.78rem;
    box-shadow: 0 0 0 2px rgba(201, 168, 79, 0.1);
  }

  .my-profile-section:last-child {
    padding-bottom: 0.7rem;
  }
}

/* Tablet+ */
@media (min-width: 600px) {
  .my-profile-hero {
    padding: 1.15rem 1.2rem 1.05rem;
    gap: 1rem 1.05rem;
  }

  .my-profile-avatar {
    width: 4rem;
    height: 4rem;
    font-size: 1rem;
  }

  .my-profile-hero-name {
    font-size: 1.22rem;
  }

  .my-profile-hero-meta,
  .my-profile-hero-id {
    font-size: 0.82rem;
  }

  .my-profile-section {
    padding: 1rem 1.2rem 0.45rem;
  }

  .my-profile-row {
    grid-template-columns: 9.5rem minmax(0, 1fr);
    gap: 0.55rem 1.1rem;
    padding: 0.62rem 0;
  }

  .my-profile-value {
    font-size: 1rem;
  }
}

@media (min-width: 768px) {
  .my-profile-hero {
    padding: 1.3rem 1.35rem 1.15rem;
  }

  .my-profile-avatar {
    width: 4.4rem;
    height: 4.4rem;
    font-size: 1.08rem;
  }

  .my-profile-hero-name {
    font-size: 1.3rem;
  }

  .my-profile-section {
    padding: 1.1rem 1.35rem 0.55rem;
  }

  .my-profile-section:last-child {
    padding-bottom: 1.05rem;
  }

  .my-profile-row {
    grid-template-columns: 10.5rem minmax(0, 1fr);
  }

  .my-profile-empty-card,
  .my-profile-loading {
    padding: 1.75rem 1.5rem;
  }
}

@media (min-width: 1024px) {
  .my-profile-card {
    box-shadow:
      0 18px 40px rgba(0, 0, 0, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.04);
  }
}

/* Landscape phones: keep hero compact so content fits */
@media (max-height: 500px) and (orientation: landscape) {
  .my-profile-hero {
    padding: 0.65rem 0.85rem 0.6rem;
    gap: 0.55rem 0.7rem;
  }

  .my-profile-avatar {
    width: 2.75rem;
    height: 2.75rem;
    font-size: 0.75rem;
  }

  .my-profile-hero-name {
    font-size: 1rem;
  }

  .my-profile-section {
    padding: 0.55rem 0.85rem 0.25rem;
  }

  .my-profile-row {
    padding: 0.4rem 0;
  }
}

@media (pointer: coarse) {
  .my-profile-refresh,
  .my-profile-retry {
    min-height: 2.75rem;
  }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  .btn-nav-icon--spinning .nav-icon--sync,
  .day.today .day-span-track .duty-span-row {
    animation: none;
  }

  .toast,
  .sync-progress-fill,
  .open-flights-progress-fill {
    transition: none;
    animation: none;
  }
}
