:root {
  --bg: #f3f7fd;
  --card: #ffffff;
  --line: #d4deea;
  --text: #112033;
  --muted: #5f738a;
  --accent: #0f62fe;
  --ok: #0d7a4e;
  --warn: #ad7b00;
  --bad: #a23535;
  --mono: "IBM Plex Mono", monospace;
  --sans: "IBM Plex Sans", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background:
    radial-gradient(circle at 10% -20%, #dce9ff 0%, transparent 45%),
    radial-gradient(circle at 85% -10%, #e8f5ff 0%, transparent 40%),
    var(--bg);
}

body.modal-open {
  overflow: hidden;
}

.app-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 20px 32px;
}

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

.header-main {
  min-width: 0;
  flex: 1;
}

.header-meta-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 11px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--accent);
  font-family: var(--mono);
}

h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.1;
}

.subline {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.subline-link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.actions {
  display: flex;
  gap: 8px;
}

.header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.feedback-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.feedback-link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.feedback-toggle-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 2px;
  padding: 0;
  cursor: pointer;
}

.feedback-toggle-btn:hover {
  color: var(--text);
}

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

.feedback-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(9, 20, 35, 0.36);
  cursor: pointer;
}

.feedback-dialog {
  position: relative;
  z-index: 1;
  width: min(520px, calc(100vw - 24px));
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(12, 32, 66, 0.18);
  padding: 14px;
}

.feedback-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.feedback-dialog-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.feedback-close-btn {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f7faff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  cursor: pointer;
}

.feedback-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.feedback-label {
  font-size: 11px;
  color: var(--muted);
  font-family: var(--mono);
}

.feedback-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--text);
  resize: vertical;
  min-height: 78px;
  background: #fff;
}

.feedback-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.feedback-status {
  font-size: 12px;
  color: var(--muted);
}

.feedback-submit-btn {
  background: #111111;
  border-color: #111111;
  color: #fff;
  min-width: 96px;
  box-shadow: 0 6px 14px rgba(17, 17, 17, 0.22);
  transition: background 120ms ease, border-color 120ms ease, transform 120ms ease, box-shadow 120ms ease;
}

.feedback-submit-btn:hover {
  background: #050505;
  border-color: #050505;
  box-shadow: 0 8px 16px rgba(17, 17, 17, 0.28);
  transform: translateY(-1px);
}

.feedback-submit-btn:active {
  background: #000;
  border-color: #000;
  box-shadow: 0 4px 10px rgba(17, 17, 17, 0.24);
  transform: translateY(0);
}

.feedback-submit-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.2);
}

.feedback-submit-btn:disabled {
  opacity: 0.6;
  box-shadow: none;
  transform: none;
  cursor: not-allowed;
}

.feedback-form.is-submitting .feedback-label,
.feedback-form.is-submitting .feedback-input,
.feedback-form.is-submitting .feedback-submit-btn {
  display: none;
}

.x-link {
  font-family: var(--mono);
  font-weight: 600;
}

.btn {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  padding: 10px 14px;
  font-weight: 600;
  cursor: pointer;
}

.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn.danger {
  border-color: #f2b2b2;
  color: #9a2c2c;
  background: #fff5f5;
}

.guide-link {
  margin: 6px 0 0;
  font-size: 15px;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.guide-link a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
}

.guide-link a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.inline-divider {
  color: var(--line);
}

.scan-status {
  margin: 4px 0 14px;
  padding: 0 10px;
}

.scan-primary {
  margin: 0 0 2px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

.scan-secondary {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.label {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-family: var(--mono);
}

.value {
  margin: 6px 0 2px;
  font-size: 15px;
  font-weight: 600;
}

.muted {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.toolbar-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.airport-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 0;
}

.airport-tab {
  border: 1px solid var(--line);
  background: #f7faff;
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  font-weight: 600;
}

.airport-tab.active {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

a.airport-tab {
  text-decoration: none;
  font-size: inherit;
  font-family: inherit;
}

.currency-toggle {
  display: inline-flex;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
  background: #f7faff;
}

.currency-btn {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  padding: 5px 10px;
  cursor: pointer;
}

.currency-btn.active {
  color: #fff;
  background: var(--accent);
}

.tab {
  border: 1px solid var(--line);
  background: #f7faff;
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  font-weight: 600;
}

.tab.active {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.panel {
  display: none;
}

.panel.active {
  display: block;
}

.table-wrap {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: auto;
}

.site-footer {
  margin-top: 12px;
  padding: 10px 2px 2px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  text-align: right;
}

.site-footer-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.site-footer-link {
  color: var(--muted);
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.site-footer-link:hover {
  color: var(--text);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th,
td {
  text-align: left;
  padding: 10px 10px;
  border-bottom: 1px solid #e6edf6;
  white-space: nowrap;
}

td:nth-child(3) {
  max-width: 210px;
  width: 210px;
}

th {
  font-size: 12px;
  color: var(--muted);
  position: sticky;
  top: 0;
  background: #f8fbff;
  z-index: 1;
}

.status-chip,
.seats-chip {
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
}

.status-yes,
.seats-high {
  background: #e8f9f0;
  color: var(--ok);
}

.status-no,
.seats-mid {
  background: #fff1d8;
  color: var(--warn);
}

.seats-low {
  background: #ffe4c7;
  color: #b35600;
}

.status-checking,
.seats-unknown {
  background: #eef2f6;
  color: #5f738a;
}

a.link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.warning-icon {
  margin-left: 6px;
  color: #b77800;
  vertical-align: baseline;
}

.truncate-airline {
  display: inline-block;
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
}

@media (max-width: 960px) {
  .topbar {
    flex-direction: column;
  }

  .header-main {
    width: 100%;
  }

  .header-meta-row {
    align-items: center;
  }

  .toolbar-row {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .currency-toggle {
    margin-top: 2px;
  }

  .header-right {
    width: 100%;
    align-items: flex-start;
  }

  .feedback-note {
    white-space: nowrap;
  }

  .feedback-modal {
    align-items: flex-end;
    padding: 0;
  }

  .feedback-dialog {
    width: 100%;
    max-width: 100%;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    border-radius: 14px 14px 0 0;
    padding: 12px 12px 18px;
  }

  .site-footer {
    text-align: left;
    align-items: flex-start;
  }

  table {
    font-size: 12px;
  }

  th,
  td {
    padding: 8px 6px;
  }

  .truncate-airline {
    max-width: 64px;
  }
}
