:root {
  --bg: #070b18;
  --panel: #10172a;
  --panel-soft: #172033;
  --text: #f8fafc;
  --muted: #aab4c8;
  --line: rgba(255, 255, 255, 0.12);
  --accent: #6d5dfc;
  --accent-2: #22d3ee;
  --success: #2dd4bf;
  --header-bg: rgba(5, 10, 25, 0.92);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  font-family: Arial, Helvetica, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(109, 93, 252, 0.35), transparent 35%),
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.18), transparent 35%),
    var(--bg);
  color: var(--text);
}

body.nav-locked {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

/* Shared site header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1100;
  width: 100%;
  background: linear-gradient(90deg, rgba(7, 11, 24, 0.98), var(--header-bg));
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(16px);
}

.site-header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  width: 100%;
  max-width: 1320px;
  min-height: 82px;
  margin: 0 auto;
  padding: 10px 22px;
}

.logo {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-width: 0;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.logo span {
  color: var(--accent-2);
}

.logo-image img {
  display: block;
  width: auto;
  max-width: 272px;
  height: 58px;
  object-fit: contain;
}

.nav {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  min-width: 0;
  color: var(--muted);
  font-size: 14px;
}

.nav-links,
.nav-actions {
  display: flex;
  align-items: center;
  min-width: 0;
}

.nav-links {
  justify-content: flex-end;
  gap: 8px;
}

.nav-actions {
  flex: 0 0 auto;
  gap: 8px;
  padding-left: 14px;
  border-left: 1px solid rgba(255, 255, 255, 0.10);
}

.nav-link,
.nav-login,
.nav-portal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border-radius: 999px;
  white-space: nowrap;
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.nav-link {
  padding: 9px 8px;
}

.nav-link:hover,
.nav-link.is-active,
.nav-login:hover,
.nav-login.is-active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.nav-link.is-active {
  box-shadow: inset 0 -2px 0 var(--accent-2);
}

.nav-login {
  padding: 9px 10px;
}

.nav-portal {
  padding: 9px 14px;
  color: #d9fbff;
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid rgba(34, 211, 238, 0.28);
  font-weight: 800;
}

.nav-portal:hover,
.nav-portal.is-active {
  color: #fff;
  background: rgba(34, 211, 238, 0.16);
  border-color: rgba(34, 211, 238, 0.55);
}

.nav-cta {
  min-height: 42px;
  padding: 11px 17px;
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  flex: 0 0 auto;
  width: 46px;
  height: 42px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  margin: 4px 0;
  background: currentColor;
  border-radius: 999px;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.site-header.nav-open .nav-toggle span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.site-header.nav-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}

.site-header.nav-open .nav-toggle span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* Shared buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 13px 20px;
  font-weight: 700;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border: 0;
}

.btn-secondary {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.btn-secondary:hover {
  border-color: rgba(34, 211, 238, 0.45);
  background: rgba(255, 255, 255, 0.10);
}

/* Homepage hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(420px, 0.92fr);
  align-items: center;
  gap: 52px;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 64px 22px 42px;
}

.home-hero {
  min-height: 560px;
  padding-top: 54px;
}

.badge {
  display: inline-flex;
  margin-bottom: 20px;
  padding: 8px 13px;
  color: var(--success);
  background: rgba(45, 212, 191, 0.12);
  border: 1px solid rgba(45, 212, 191, 0.25);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
}

.hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(48px, 5.4vw, 72px);
  line-height: 0.98;
  letter-spacing: -0.065em;
  text-wrap: balance;
}

.hero h2 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(38px, 4.5vw, 60px);
  line-height: 1;
  letter-spacing: -0.055em;
  text-wrap: balance;
}

.hero p {
  max-width: 680px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.62;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.price-note {
  margin-top: 17px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.panel {
  min-width: 0;
  padding: 24px;
  background: rgba(16, 23, 42, 0.82);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

.hero-panel {
  width: 100%;
  max-width: 520px;
  justify-self: end;
}

.flight-card {
  padding: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
  border: 1px solid var(--line);
  border-radius: 22px;
}

.flight-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.airport {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.airport small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
}

.route-line {
  position: relative;
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.route-line::after {
  content: "";
  position: absolute;
  top: -5px;
  right: -3px;
  width: 12px;
  height: 12px;
  background: var(--accent-2);
  border-radius: 50%;
}

.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 18px;
}

.stat {
  padding: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.stat strong {
  display: block;
  font-size: 18px;
}

.stat span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.sections {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 22px 70px;
}

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

.feature {
  padding: 22px;
  background: rgba(16, 23, 42, 0.68);
  border: 1px solid var(--line);
  border-radius: 22px;
}

.feature h3 {
  margin: 0 0 10px;
  font-size: 20px;
}

.feature p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.site-footer {
  padding: 28px 22px;
  color: var(--muted);
  text-align: center;
  border-top: 1px solid var(--line);
}

/* Forms */
.form-wrap {
  max-width: 620px;
  margin: 0 auto;
  padding: 24px 22px 80px;
}

.form-card {
  padding: 28px;
  background: rgba(16, 23, 42, 0.82);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

.form-card h1 {
  margin: 0 0 12px;
  font-size: 42px;
  letter-spacing: -0.06em;
}

.form-card p {
  color: var(--muted);
  line-height: 1.6;
}

.form-group {
  margin-top: 18px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px 15px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 14px;
  font-size: 16px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-2);
}

.alert {
  margin: 18px 0;
  padding: 14px 16px;
  border-radius: 16px;
  line-height: 1.5;
}

.alert-error {
  color: #fecaca;
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.35);
}

.alert-success {
  color: #ccfbf1;
  background: rgba(45, 212, 191, 0.12);
  border: 1px solid rgba(45, 212, 191, 0.35);
}

/* Admin */
.admin-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 40px 22px 80px;
}

.admin-card {
  padding: 28px;
  background: rgba(16, 23, 42, 0.82);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

.admin-card h1 {
  margin: 0 0 12px;
  font-size: 42px;
  letter-spacing: -0.06em;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.admin-table {
  width: 100%;
  margin-top: 26px;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 14px 12px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.admin-table th {
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.status-pill {
  display: inline-flex;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.status-active {
  color: #ccfbf1;
  background: rgba(45, 212, 191, 0.12);
  border-color: rgba(45, 212, 191, 0.35);
}

.status-pending {
  color: #fde68a;
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.35);
}

.status-cancelled,
.status-suspended {
  color: #fecaca;
  background: rgba(248, 113, 113, 0.12);
  border-color: rgba(248, 113, 113, 0.35);
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mini-btn {
  padding: 7px 10px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.mini-btn:hover {
  border-color: var(--accent-2);
}

/* App preview */
.app-preview {
  max-width: 1180px;
  margin: 0 auto;
  padding: 10px 22px 70px;
}

.app-preview-card {
  padding: 18px;
  background: rgba(16, 23, 42, 0.82);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

.app-preview-card img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
}

.app-preview h2 {
  margin: 0 0 16px;
  font-size: 38px;
  letter-spacing: -0.06em;
}

.app-preview p {
  max-width: 760px;
  margin: 0 0 22px;
  color: var(--muted);
  line-height: 1.6;
}

@media (max-width: 1240px) {
  .site-header-inner {
    flex-wrap: wrap;
    gap: 4px 16px;
    padding: 8px 24px 12px;
  }

  .logo-image img {
    max-width: 248px;
    height: 54px;
  }

  .nav {
    flex: 1 0 100%;
    width: 100%;
    justify-content: space-between;
    gap: 18px;
    font-size: 14px;
  }

  .nav-links {
    flex: 1 1 auto;
    justify-content: space-between;
    gap: 10px;
  }

  .nav-actions {
    gap: 10px;
    margin-left: 8px;
    padding-left: 18px;
  }

  .nav-link {
    padding-inline: 7px;
  }

  .nav-portal {
    padding-inline: 13px;
  }

  .nav-cta {
    padding-inline: 16px;
  }
}

@media (max-width: 1120px) {
  .site-header-inner {
    min-height: 74px;
  }

  .logo-image img {
    max-width: 248px;
    height: 54px;
  }

  .nav-toggle {
    display: block;
  }

  .nav {
    position: absolute;
    top: calc(100% + 1px);
    right: 14px;
    left: 14px;
    display: none;
    max-height: calc(100vh - 90px);
    padding: 16px;
    overflow-y: auto;
    background: rgba(7, 13, 31, 0.985);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0 0 20px 20px;
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.48);
  }

  .site-header.nav-open .nav {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

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

  .nav-link {
    justify-content: flex-start;
    padding: 11px 13px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
  }

  .nav-link.is-active {
    box-shadow: none;
    border-color: rgba(34, 211, 238, 0.42);
  }

  .nav-actions {
    display: grid;
    grid-template-columns: 1fr 1fr 1.2fr;
    gap: 8px;
    padding: 14px 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.10);
    border-left: 0;
  }

  .nav-login,
  .nav-portal,
  .nav-cta {
    width: 100%;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(360px, 0.92fr);
    gap: 34px;
  }
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 38px 18px 28px;
  }

  .home-hero {
    min-height: 0;
  }

  .hero-panel {
    max-width: none;
    justify-self: stretch;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

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

  .admin-table {
    display: block;
    overflow-x: auto;
  }
}

@media (max-width: 680px) {
  .site-header-inner {
    min-height: 68px;
    padding: 8px 14px;
  }

  .logo-image img {
    max-width: 220px;
    height: 48px;
  }

  .nav {
    right: 8px;
    left: 8px;
    padding: 13px;
  }

  .nav-links,
  .nav-actions {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: clamp(42px, 13vw, 56px);
    line-height: 1;
  }

  .hero h2 {
    font-size: clamp(36px, 11vw, 48px);
  }

  .hero p {
    font-size: 17px;
    line-height: 1.55;
  }

  .hero-actions {
    gap: 10px;
  }

  .panel {
    padding: 16px;
    border-radius: 22px;
  }

  .flight-card {
    padding: 16px;
  }

  .flight-row {
    gap: 10px;
  }

  .airport {
    font-size: 25px;
  }

  .stat-grid,
  .admin-stats {
    grid-template-columns: 1fr;
  }

  .sections,
  .app-preview,
  .form-wrap,
  .admin-wrap {
    padding-right: 16px;
    padding-left: 16px;
  }

  .app-preview h2 {
    font-size: 32px;
  }

  .app-preview-card {
    padding: 10px;
    border-radius: 20px;
  }

  .app-preview-card img {
    border-radius: 14px;
  }

  .form-card,
  .admin-card {
    padding: 22px;
  }

  .form-card h1,
  .admin-card h1 {
    font-size: 34px;
  }
}

@media (max-width: 480px) {
  .logo-image img {
    max-width: 190px;
    height: 43px;
  }

  .nav-toggle {
    width: 42px;
    height: 40px;
  }

  .hero {
    padding-top: 30px;
  }

  .hero p {
    font-size: 16px;
  }

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

  .hero-actions .btn,
  .hero-actions button {
    width: 100%;
  }

  .app-preview h2 {
    font-size: 28px;
  }
}
/* Admin download dashboard and history */
.admin-download-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-stat-link {
  position: relative;
  display: block;
  min-height: 116px;
  padding-right: 42px;
  color: inherit;
  cursor: pointer;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    background 0.16s ease,
    box-shadow 0.16s ease;
}

.admin-stat-link::after {
  content: "→";
  position: absolute;
  top: 18px;
  right: 17px;
  color: var(--accent-2);
  font-size: 20px;
  font-weight: 800;
}

.admin-stat-link:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(34, 211, 238, 0.48);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
}

.admin-stat-link small {
  display: block;
  margin-top: 11px;
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 800;
}

.admin-page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.admin-page-heading p {
  max-width: 760px;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.admin-filter-bar {
  display: grid;
  grid-template-columns: minmax(260px, 1.5fr) minmax(150px, 0.6fr) minmax(170px, 0.7fr) auto;
  align-items: end;
  gap: 14px;
  margin-top: 28px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.admin-filter-field label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.admin-filter-field input,
.admin-filter-field select {
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  color: var(--text);
  background: rgba(7, 11, 24, 0.82);
  border: 1px solid var(--line);
  border-radius: 13px;
}

.admin-filter-field input:focus,
.admin-filter-field select:focus {
  outline: none;
  border-color: var(--accent-2);
}

.admin-filter-actions {
  display: flex;
  gap: 9px;
}

.admin-filter-actions .btn {
  min-height: 46px;
  padding: 11px 16px;
}

.admin-filter-notice {
  margin-top: 14px;
  padding: 12px 14px;
  color: #d9fbff;
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid rgba(34, 211, 238, 0.25);
  border-radius: 14px;
  line-height: 1.5;
}

.admin-filter-notice a {
  color: var(--accent-2);
  font-weight: 800;
}

.admin-results-summary {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 22px;
  color: var(--muted);
}

.admin-results-summary strong {
  color: var(--text);
  font-size: 22px;
}

.admin-results-summary span {
  margin-left: auto;
  font-size: 13px;
}

.admin-table-scroll {
  overflow-x: auto;
}

.admin-download-table {
  min-width: 980px;
  margin-top: 12px;
}

.admin-muted {
  color: var(--muted);
}

.admin-small-muted {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.admin-referrer {
  max-width: 360px;
  word-break: break-word;
}

.admin-empty-row {
  padding: 28px !important;
  color: var(--muted);
  text-align: center !important;
}

.admin-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 24px;
}

.admin-pagination .btn {
  min-width: 112px;
  padding: 10px 16px;
}

.admin-pagination .is-disabled {
  opacity: 0.4;
  pointer-events: none;
}

.admin-download-note {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

@media (max-width: 900px) {
  .admin-download-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-filter-bar {
    grid-template-columns: 1fr 1fr;
  }

  .admin-filter-search,
  .admin-filter-actions {
    grid-column: 1 / -1;
  }
}

@media (max-width: 680px) {
  .admin-download-stats,
  .admin-filter-bar {
    grid-template-columns: 1fr;
  }

  .admin-filter-search,
  .admin-filter-actions {
    grid-column: auto;
  }

  .admin-filter-actions {
    flex-direction: column;
  }

  .admin-filter-actions .btn {
    width: 100%;
  }

  .admin-results-summary {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .admin-results-summary span {
    width: 100%;
    margin-left: 0;
  }

  .admin-pagination {
    gap: 10px;
  }

  .admin-pagination .btn {
    min-width: 0;
  }
}
