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

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f3f5fa;
  color: #111827;
}

/* Top bar */
.topbar {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background: #050b1e;
  color: #f9fafb;
  position: sticky;
  top: 0;
  z-index: 10;
}

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

.logo-icon {
  font-size: 24px;
}

.logo-text {
  font-weight: 700;
  letter-spacing: 0.03em;
}

.logo-text span {
  color: #3b82f6;
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-btn {
  border-radius: 999px;
  border: 1px solid #374151;
  background: #0f172a;
  color: #e5e7eb;
  padding: 6px 14px;
  font-size: 14px;
  cursor: pointer;
}

.nav-btn:hover {
  background: #1f2937;
}

.nav-logout {
  border-color: #ef4444;
  color: #fecaca;
}

/* Hero */
.hero {
  max-width: 1120px;
  margin: 32px auto;
  padding: 24px 32px;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 2fr);
  gap: 32px;
  background: linear-gradient(135deg, #e5f0ff, #f9fafb);
  border-radius: 24px;
  border: 1px solid #c7d2fe;
}

.hero-text h1 {
  margin: 0 0 12px;
  font-size: 32px;
  color: #111827;
}

.hero-text p {
  margin: 0 0 12px;
  color: #4b5563;
}

.hero-points {
  margin: 0;
  padding-left: 20px;
  color: #1f2937;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 20px;
}

/* Layout */
main {
  max-width: 1120px;
  margin: 0 auto 40px;
  padding: 0 16px 16px;
}

.card {
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid #1f2937;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.15);
  padding: 20px 24px;
  margin-bottom: 24px;
}

/* Auth */
.auth-card {
  max-width: 480px;
  margin: 0 auto 32px;
}

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

.auth-tab {
  flex: 1;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background: #f3f4f6;
  padding: 8px 0;
  cursor: pointer;
  font-size: 14px;
}

.auth-tab.active {
  background: #111827;
  color: #f9fafb;
  border-color: #111827;
}

.auth-panel {
  display: none;
}

.auth-panel.active {
  display: block;
}

label {
  display: block;
  margin-top: 10px;
  margin-bottom: 4px;
  font-size: 14px;
}

input,
select {
  width: 100%;
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  font-size: 14px;
}

.subtext {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 12px;
}

.error-text {
  color: #b91c1c;
  font-size: 13px;
  margin-top: 8px;
}

.info-text {
  color: #2563eb;
  font-size: 13px;
  margin-top: 8px;
}

/* Buttons */
.btn-primary {
  border: none;
  border-radius: 999px;
  background: #111827;
  color: #f9fafb;
  padding: 9px 18px;
  font-size: 14px;
  cursor: pointer;
}

.btn-primary:hover {
  background: #020617;
}

.btn-secondary {
  border-radius: 999px;
  border: 1px solid #111827;
  background: #ffffff;
  color: #111827;
  padding: 7px 14px;
  font-size: 13px;
  cursor: pointer;
}

.btn-secondary:hover {
  background: #e5e7eb;
}

.full-width {
  width: 100%;
  margin-top: 12px;
}

.link-btn {
  background: transparent;
  border: none;
  color: #2563eb;
  cursor: pointer;
  padding: 0;
  margin-bottom: 10px;
}

/* Search */
.search-card h2 {
  margin-top: 0;
}

.search-form {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.field-search-btn {
  display: flex;
  flex-direction: column;
}

.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

/* Flight cards */
.flight-card {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid #d1d5db;
  background: #f9fafb;
}

.flight-main {
  flex: 1;
}

.flight-airline {
  font-weight: 600;
  margin-bottom: 4px;
}

.flight-route {
  font-size: 14px;
  color: #1f2937;
}

.flight-time {
  font-size: 13px;
  color: #6b7280;
}

.flight-price-block {
  text-align: right;
  min-width: 120px;
}

.old-price {
  font-size: 12px;
  color: #9ca3af;
  text-decoration: line-through;
}

.new-price {
  font-size: 16px;
  font-weight: 700;
  color: #111827;
}

.tag-discount {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  background: #f97316;
  color: white;
}

/* Booking view */
.booking-summary h3 {
  margin-top: 0;
}

.seat-layout {
  margin-top: 16px;
  margin-bottom: 16px;
}

.seat-legend {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  margin-bottom: 8px;
}

.seat {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: none;
  margin: 2px;
  font-size: 11px;
  cursor: pointer;
}

.seat-standard {
  background: #e5e7eb;
}

.seat-extra {
  background: #fed7aa;
}

.seat-selected {
  outline: 2px solid #111827;
}

.seat-row {
  display: flex;
  justify-content: center;
}

.booking-form h3 {
  margin-top: 16px;
}

.booking-price-row {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.price-label {
  font-size: 13px;
  color: #6b7280;
}

.price-value {
  font-size: 20px;
  font-weight: 700;
  color: #111827;
}

/* Bookings list */
.booking-card {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  font-size: 13px;
  margin-bottom: 8px;
}

.booking-main > div {
  margin-bottom: 2px;
}

.booking-actions {
  display: flex;
  align-items: center;
}

/* Confirmation */
.booking-summary p {
  margin: 4px 0;
}

/* Footer */
.footer {
  text-align: center;
  padding: 16px;
  font-size: 12px;
  color: #6b7280;
}

/* Misc */
.muted {
  color: #9ca3af;
  font-size: 14px;
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
  }
  .search-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .two-col {
    grid-template-columns: minmax(0, 1fr);
  }
}