.fids-page {
  max-width: 860px;
  margin: 0 auto;
  padding: 8px;
}

.fids-table-card,
.fids-info-grid {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 6px 24px rgba(15, 23, 42, 0.08);
  border: 1px solid #e5e7eb;
}

.fids-page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.fids-page-heading-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.fids-page-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  margin: 0;
  font-family: var(--font-title-alt);
  font-size: 1.5rem;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: #111827;
}

.fids-page-subtitle {
  font-size: 14px;
  font-weight: 600;
  color: #4b5563;
}

.fids-page-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.fids-hero-link,
.fids-filter-button,
.fids-refresh-button,
.fids-load-button,
.fids-hero-toggle {
  appearance: none;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background: #fff;
  color: #111827;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  padding: 10px 12px;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.fids-filter-button,
.fids-refresh-button {
  border-radius: 6px;
}

.fids-hero-link:hover,
.fids-filter-button:hover,
.fids-refresh-button:hover,
.fids-load-button:hover,
.fids-hero-toggle:hover {
  background: #f9fafb;
  border-color: #9ca3af;
}

.fids-hero-link.is-primary,
.fids-load-button,
.fids-refresh-button:not(:disabled) {
  background: #16a34a;
  border-color: #16a34a;
  color: #fff;
}

.fids-hero-link.is-primary:hover,
.fids-load-button:hover,
.fids-refresh-button:not(:disabled):hover {
  background: #15803d;
  border-color: #15803d;
}

.fids-refresh-button:disabled,
.fids-load-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.fids-page-heading-meta {
  min-width: 200px;
  text-align: right;
}

.fids-hero-clock {
  font-family: var(--font-title-alt);
  font-size: 30px;
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: 0.01em;
  color: #111827;
}

.fids-hero-date {
  margin-top: 4px;
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
}

.fids-table-card {
  overflow: hidden;
  position: relative;
}

.fids-table {
  position: relative;
}

.fids-refresh-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid #e5e7eb;
  background: linear-gradient(180deg, #fafafa 0%, #f3f4f6 100%);
}

.fids-refresh-bar[hidden] {
  display: none !important;
}

.fids-refresh-meta {
  min-width: 0;
}

.fids-refresh-elapsed {
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
}

.fids-refresh-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.fids-filter-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.fids-filter-button.is-active {
  border-color: #f59e0b;
  color: #92400e;
  background: #fff7ed;
}

.fids-live-track-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  color: #111827;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}

.fids-live-track-button:hover {
  background: #f9fafb;
  border-color: #9ca3af;
}

.fids-live-track-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #16a34a;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.16);
  flex: 0 0 auto;
}

.fids-filter-button-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: #f59e0b;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.fids-board-head,
.fids-row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1.15fr) 76px;
  gap: 10px;
  align-items: center;
}

.fids-board-head {
  padding: 10px 14px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b7280;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
}

.fids-row {
  padding: 12px 14px;
  border-bottom: 1px solid #f3f4f6;
  background: #fff;
}

.fids-row.is-clickable {
  cursor: pointer;
}

.fids-row.is-clickable:hover {
  background: #f9fafb;
}

.cell-time,
.cell-flight {
  font-family: var(--font-board);
  font-size: 16px;
  font-weight: 700;
  color: #111827;
}

.cell-city,
.cell-status,
.cell-gate {
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
  color: #111827;
}

.cell-city,
.cell-status {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cell-gate {
  text-align: right;
}

.status-success {
  color: #16a34a;
}

.status-warning {
  color: #ea580c;
}

.status-danger {
  color: #dc2626;
}

.status-info {
  color: #2563eb;
}

.status-muted {
  color: #6b7280;
}

.fids-preview.is-preview-blurred {
  filter: blur(2px);
  pointer-events: none;
  user-select: none;
}

.fids-overlay {
  position: absolute;
  inset: 54px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(3px);
  z-index: 20;
}

.fids-overlay.is-hidden {
  display: none;
}

.fids-actions {
  width: min(460px, 100%);
  padding: 18px;
  border: 1px solid #d1d5db;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.14);
}

.fids-load {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  text-align: center;
}

.fids-load-message {
  min-height: 18px;
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
}

.fids-turnstile {
  margin-top: 12px;
}

.fids-turnstile.is-hidden {
  display: none;
}

.empty-state {
  padding: 22px 14px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: #6b7280;
}

.fids-info-grid {
  margin-top: 12px;
  padding: 14px;
}

.fids-info-grid-title {
  margin-bottom: 12px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b7280;
}

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

.fids-insight-card {
  border-radius: 14px;
  border: 1px solid #e5e7eb;
  background: linear-gradient(180deg, #fff 0%, #f9fafb 100%);
  padding: 12px;
}

.fids-insight-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b7280;
}

.fids-insight-value {
  margin-top: 6px;
  font-family: var(--font-board);
  font-size: 24px;
  font-weight: 700;
  color: #111827;
}

.fids-insight-sub {
  margin-top: 6px;
  min-height: 18px;
  font-size: 12px;
  font-weight: 600;
  color: #4b5563;
}

.fids-airport-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.fids-meta-card {
  border-radius: 14px;
  border: 1px solid #e5e7eb;
  background: #fff;
  padding: 12px;
}

.fids-meta-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid #f3f4f6;
}

.fids-meta-row:last-child {
  border-bottom: 0;
}

.fids-meta-key {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #6b7280;
}

.fids-meta-value {
  text-align: right;
  font-size: 13px;
  font-weight: 600;
  color: #111827;
}

.fids-meta-value-stack > div + div {
  margin-top: 4px;
}

.fids-alt-names > div + div {
  margin-top: 4px;
}

.fids-day-break {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 10px 14px 6px;
  background: #fff;
}

.fids-day-break-prefix {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #111827;
}

.fids-day-break-suffix {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6b7280;
}

.fids-day-break-favorites {
  color: #16a34a;
}

.fids-day-break-heart {
  display: inline-flex;
  width: 14px;
  height: 14px;
}

.fids-modal {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.fids-modal-grid {
  display: grid;
  gap: 10px;
}

.detail-row {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid #f3f4f6;
}

.detail-row:last-child {
  border-bottom: 0;
}

.detail-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #6b7280;
}

.detail-value {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
}

.detail-list-item + .detail-list-item {
  margin-top: 4px;
}

.fids-editor-form,
.fids-filter-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.fids-editor-grid,
.fids-filter-grid {
  display: grid;
  gap: 12px;
}

.fids-editor-label {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #6b7280;
}

.fids-editor-text-input,
.fids-filter-select,
.fids-filter-input {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  background: #fff;
  padding: 10px 12px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: #111827;
}

.fids-filter-select.is-active,
.fids-filter-input:focus,
.fids-editor-text-input:focus {
  outline: none;
  border-color: #16a34a;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.12);
}

.fids-editor-mode-options,
.fids-filter-terminal-buttons,
.fids-filter-time-toggle {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.fids-editor-mode-option,
.fids-filter-terminal-button {
  appearance: none;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  background: #fff;
  padding: 10px 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  color: #111827;
  cursor: pointer;
}

.fids-editor-mode-option.is-active,
.fids-filter-terminal-button.is-active {
  background: #16a34a;
  border-color: #16a34a;
  color: #fff;
}

.fids-filter-summary {
  min-height: 18px;
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
}

.fids-filter-footer,
.fids-editor-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.fids-editor-error {
  min-height: 18px;
  font-size: 12px;
  font-weight: 600;
  color: #dc2626;
}

.fids-editor-sbar-slot .sbar-shell {
  width: 100%;
  padding-right: 0;
}

.fids-editor-sbar-slot .sbar-main {
  padding: 0;
}

.fids-filter-switch {
  position: relative;
  display: inline-flex;
  width: 42px;
  height: 24px;
}

.fids-filter-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.fids-filter-slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #d1d5db;
  transition: background-color 0.15s ease;
}

.fids-filter-slider::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.15s ease;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.18);
}

.fids-filter-switch input:checked + .fids-filter-slider {
  background: #16a34a;
}

.fids-filter-switch input:checked + .fids-filter-slider::before {
  transform: translateX(18px);
}

@media (max-width: 767px) {
  .fids-page {
    padding: 6px;
  }

  .fids-page-heading {
    align-items: flex-start;
    gap: 8px;
  }

  .fids-page-heading-main {
    flex: 1 1 auto;
    min-width: 0;
  }

  .fids-page-heading-meta {
    flex: 0 0 auto;
    min-width: 0;
    text-align: right;
  }

  .fids-page-title {
    font-size: 1.25rem;
  }

  .fids-page-subtitle {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .fids-hero-clock {
    font-size: 24px;
  }

  .fids-hero-date {
    font-size: 11px;
    white-space: nowrap;
  }

  .fids-refresh-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .fids-refresh-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .fids-board-head,
  .fids-row {
    grid-template-columns: 46px minmax(0, 1.15fr) 48px minmax(0, 1fr) 34px;
    gap: 5px;
  }

  .fids-board-head {
    padding: 8px 8px;
    font-size: 9px;
    letter-spacing: 0.06em;
  }

  .fids-row {
    padding: 10px 8px;
  }

  .cell-time,
  .cell-flight {
    font-size: 13px;
  }

  .cell-city,
  .cell-status,
  .cell-gate {
    font-size: 11px;
  }

  .cell-gate {
    white-space: nowrap;
  }

  .fids-live-track-button {
    min-height: 32px;
    padding: 0 9px;
    font-size: 10px;
  }

  .fids-insight-cards,
  .fids-airport-meta {
    grid-template-columns: 1fr;
  }

  .detail-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

@media (min-width: 768px) {
  .fids-page-title {
    font-size: 1.875rem;
  }
}
