:root {
  --bg-top: #b2efe3;
  --bg-bottom: #4cc6d9;
  --card: #f4f6f8;
  --text: #0f2a44;
  --muted: #6a7890;
  --brand: #1eaed2;
  --brand-deep: #1879d0;
  --accent: #2f8bf7;
  --shadow: 0 16px 40px rgba(14, 37, 59, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Tahoma, Arial, sans-serif;
  color: var(--text);
  background: linear-gradient(145deg, var(--bg-top), var(--bg-bottom));
  min-height: 100vh;
}

.top-contact-bar {
  background: #FFFFFF;
  color: #1f2d3f;
  border-top: 3px solid #1f2633;
}

.top-contact-inner {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
  font-size: 14px;
  font-weight: 100;
}

.site-header {
  width: min(1120px, calc(100% - 32px));
  margin: 12px auto 0;
  display: flex;
  align-items: center;
}

.site-logo-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.site-logo {
  width: 220px;
  max-width: 100%;
  height: auto;
  display: block;
}

h1,
h2,
h3,
strong,
label {
  font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
}

.hero-page,
.results-page,
.confirm-page,
.admin-page {
  width: min(1120px, calc(100% - 32px));
  margin: 22px auto 40px;
}

.admin-brand {
  margin-bottom: 10px;
}

.search-card,
.result-wrap,
.confirm-card,
.admin-card {
  background: var(--card);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 20px;
}

.search-card h1,
.result-wrap h1 {
  margin-top: 4px;
}

.trip-toggle {
  display: flex;
  gap: 20px;
  margin: 14px 0;
}

.date-tabs {
  display: flex;
  gap: 8px;
  margin: 12px 0 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.date-tab {
  text-decoration: none;
  color: #fff;
  background: linear-gradient(130deg, #2f8bf7, #1f71d6);
  padding: 8px 12px;
  border-radius: 10px;
  font-weight: 700;
  white-space: nowrap;
  font-size: 13px;
}

.date-tab.active {
  background: #eef2fb;
  color: #1f3d7a;
}

.search-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  gap: 10px;
}

.search-grid label,
.passenger-row label {
  display: block;
  margin-bottom: 5px;
  font-size: 13px;
}

input,
select,
button {
  width: 100%;
  border: 1px solid #ccd3df;
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
}

input:focus,
select:focus {
  outline: 2px solid rgba(47, 139, 247, 0.28);
  border-color: var(--accent);
}

.passenger-row {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px;
  align-items: end;
}

.btn-search,
.btn-link,
.call-btn {
  background: linear-gradient(130deg, var(--brand), var(--brand-deep));
  border: 0;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  cursor: pointer;
}

.btn-link {
  width: auto;
  padding: 8px 16px;
  border-radius: 999px;
}

.flight-card,
.segment {
  background: #fff;
  border-radius: 12px;
  margin: 12px 0;
  padding: 14px;
  border: 1px solid #d9e2ed;
}

.flight-card.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(47, 139, 247, 0.14) inset;
}

.flight-main,
.route {
  display: grid;
  grid-template-columns: 1fr 90px 1fr;
  align-items: center;
  gap: 10px;
}

.flight-line {
  text-align: center;
  color: var(--accent);
  font-size: 26px;
}

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

.flight-meta,
.meta-row {
  margin-top: 10px;
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.channel {
  display: block;
  margin: 10px 0;
  border-radius: 10px;
  padding: 12px;
  text-decoration: none;
  background: #eceffc;
  color: #17336d;
  font-weight: 700;
}

.channel.whatsapp { border-left: 6px solid #25d366; }
.channel.viber { border-left: 6px solid #7360f2; }
.channel.messenger { border-left: 6px solid #0084ff; }

.call-btn {
  margin-top: 14px;
  padding: 12px;
  border-radius: 10px;
}

.hidden {
  display: none;
}

.flash {
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 10px;
}

.flash-success {
  background: #d8f6e5;
  color: #10673a;
}

.flash-error {
  background: #fbdede;
  color: #8a1f1f;
}

.top-nav {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.top-nav a {
  color: #fff;
  text-decoration: none;
  background: rgba(9, 44, 78, 0.4);
  padding: 8px 12px;
  border-radius: 999px;
}

.admin-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin: 12px 0 14px;
}

.admin-pagination {
  margin-top: 12px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.admin-pagination a,
.admin-pagination span {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 8px;
  background: #eef2fb;
  color: #1f3d7a;
  text-decoration: none;
  font-size: 13px;
}

.admin-pagination a.active {
  background: #1f71d6;
  color: #fff;
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid #e1e7ef;
  text-align: left;
  padding: 8px;
  font-size: 14px;
}

.inline {
  display: inline;
}

.center {
  text-align: center;
  margin-top: 16px;
}

.pre-footer {
  margin-top: 30px;
  background: rgba(33, 76, 109, 0.92);
  color: #e9f2fb;
}

.pre-footer-inner {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 26px 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 22px;
}

.pre-footer-col h3 {
  margin: 0 0 10px;
  font-size: 24px;
  color: #ffffff;
}

.pre-footer-col a {
  display: block;
  margin: 7px 0;
  color: #dbeaf8;
  text-decoration: none;
  font-weight: 600;
}

.pre-footer-col a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.site-footer {
  margin-top: 0;
  background: rgba(15, 42, 68, 0.94);
  color: #dbe6f3;
}

.site-footer-inner {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 14px;
}

.site-footer a {
  color: #71d8ff;
  font-weight: 700;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

@media (max-width: 900px) {
  .top-contact-inner {
    font-size: 16px;
  }

  .pre-footer-inner {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }

  .search-grid {
    grid-template-columns: repeat(2, minmax(130px, 1fr));
  }

  .passenger-row {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }
}

@media (max-width: 600px) {
  .top-contact-inner {
    font-size: 14px;
    gap: 8px;
    min-height: 44px;
    padding: 8px 0;
  }

  .site-logo {
    width: 168px;
  }

  .pre-footer-inner {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 18px 0;
  }

  .pre-footer-col h3 {
    font-size: 21px;
  }

  .site-footer-inner {
    justify-content: center;
    text-align: center;
    padding: 10px 0;
  }

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

  .search-grid,
  .passenger-row {
    grid-template-columns: 1fr;
  }

  .flight-main,
  .route {
    grid-template-columns: 1fr;
  }

  .align-right {
    text-align: left;
  }
}
