.table-wrap th:last-child,
.table-wrap td:last-child {
  width: 1%;
  padding-left: 8px;
  padding-right: 8px;
}
:root {
  --primary: #1c315a;
  --accent: #e3a916;
  --white: #ffffff;
  --black: #0d0d0d;
  --gray-50: #f8f7f4;
  --gray-100: #eeece6;
  --gray-300: #c5c2b8;
  --gray-500: #7a7870;
  --gray-700: #3d3c38;
  --trip: #e05c2a;
  --booking: #003580;
  --cit: #e3a916;
  --radius: 4px;
  --radius-lg: 10px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Inter", sans-serif;
  background: var(--gray-50);
  color: var(--black);
  font-size: 15px;
  line-height: 1.6;
}

/* NAV */
nav {
  background: var(--primary);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-logo {
  font-size: 20px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.02em;
}
.nav-logo span {
  color: var(--accent);
}
.nav-logo img {
  height: 36px;
  width: auto;
  display: block;
}
.nav-tagline {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* HERO */
.hero {
  background: var(--primary);
  padding: 4rem 2rem 3rem;
  text-align: center;
}
.hero-eyebrow {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
  font-weight: 500;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.15;
  max-width: 700px;
  margin: 0 auto 1rem;
}
.hero h1 em {
  font-style: normal;
  color: var(--accent);
}
.hero-sub {
  color: rgba(255, 255, 255, 0.6);
  font-size: 15px;
  max-width: 480px;
  margin: 0 auto 2.5rem;
  font-weight: 300;
}

/* STAT CARDS */
.stat-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  overflow: hidden;
  max-width: 750px;
  margin: 0 auto;
  align-items: stretch;
}
.stat-card {
  background: rgba(255, 255, 255, 0.05);
  padding: 1.5rem 1.75rem;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 130px;
}
.stat-card.highlight {
  background: rgba(227, 169, 22, 0.12);
}
.stat-label {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  font-weight: 500;
  min-height: 28px;
  display: block;
}
.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1;
  margin-bottom: 4px;
  white-space: nowrap;
}
.stat-card.highlight .stat-value {
  color: var(--accent);
}
.stat-sub {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
}
.stat-badge {
  display: inline-flex;
  align-self: flex-start;
  background: rgba(227, 169, 22, 0.2);
  color: var(--accent);
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 20px;
  margin-top: 6px;
}

/* MAIN CONTENT */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

section {
  padding: 3rem 0;
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.section-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary);
}
.section-note {
  font-size: 12px;
  color: var(--gray-500);
  letter-spacing: 0.04em;
}

/* LEGEND */
.legend {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--gray-700);
  font-weight: 500;
}
.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  flex-shrink: 0;
}

/* FILTER BAR */
.filter-bar {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 2rem;
}
.filter-bar label {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-500);
  font-weight: 500;
}
.filter-bar select {
  font-family: "Inter", sans-serif;
  font-size: 13px;
  color: var(--primary);
  background: var(--gray-50);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  padding: 6px 28px 6px 10px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%231c315a' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  cursor: pointer;
  font-weight: 500;
}
.filter-bar select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
}
.filter-divider {
  width: 1px;
  height: 28px;
  background: var(--gray-100);
}

/* CHART AREA */
.chart-card {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}
.chart-wrap {
  position: relative;
}

/* TABLE */
.table-wrap {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
thead {
  background: var(--primary);
}
thead th {
  padding: 10px 14px;
  text-align: left;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
}
thead th:hover {
  color: var(--accent);
}
thead th.sorted {
  color: var(--accent);
}
thead th .sort-arrow {
  margin-left: 4px;
  opacity: 0.5;
}
thead th.sorted .sort-arrow {
  opacity: 1;
}

tbody tr {
  border-bottom: 1px solid var(--gray-100);
  transition: background 0.12s;
}
tbody tr:last-child {
  border-bottom: none;
}
tbody tr:hover {
  background: var(--gray-50);
}
td {
  padding: 10px 14px;
  color: var(--gray-700);
  vertical-align: middle;
}
td.hotel-name {
  color: var(--primary);
  font-weight: 500;
  max-width: 260px;
  white-space: normal;
  word-break: break-word;
}
.group-toggle-cell {
  text-align: right;
  white-space: nowrap;
}
.group-toggle {
  font-family: "Inter", sans-serif;
  font-size: 11px;
  padding: 4px 8px;
  border: 1px solid var(--gray-100);
  border-radius: 999px;
  background: var(--gray-50);
  color: var(--primary);
  cursor: pointer;
  font-weight: 600;
}
.group-toggle:hover {
  border-color: var(--primary);
}
.group-toggle-muted {
  font-size: 11px;
  color: var(--gray-500);
}
.group-details {
  background: #fcfbf8;
}
.variant-wrap {
  padding: 10px 6px 14px;
}
.variant-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.variant-table thead {
  background: transparent;
}
.variant-table thead th {
  color: var(--gray-500);
  font-weight: 600;
  padding: 8px 10px;
  border-bottom: 1px solid var(--gray-100);
}
.variant-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--gray-100);
}
.variant-table tbody tr:last-child td {
  border-bottom: none;
}
.city-badge {
  display: inline-block;
  background: var(--gray-100);
  color: var(--gray-700);
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 20px;
  font-weight: 500;
  letter-spacing: 0.04em;
}
.stars {
  color: var(--accent);
  font-size: 11px;
  letter-spacing: -1px;
}
.price-cit {
  font-weight: 600;
  color: var(--primary);
  font-size: 14px;
}
.price-other {
  color: var(--gray-500);
  text-decoration: line-through;
  font-size: 12px;
}
.savings-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}
.savings-high {
  background: #edf7ee;
  color: #1a7a2a;
}
.savings-mid {
  background: #fef6e4;
  color: #8a5e00;
}
.savings-low {
  background: #f2f2f2;
  color: #555;
}
.savings-neg {
  background: #fdecea;
  color: #b71c1c;
}

/* TABLE PAGINATION */
.table-footer {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--gray-100);
  font-size: 12px;
  color: var(--gray-500);
  flex-wrap: wrap;
  gap: 8px;
}
.pagination {
  display: flex;
  gap: 4px;
}
.page-btn {
  font-family: "Inter", sans-serif;
  width: 30px;
  height: 30px;
  border: 1px solid var(--gray-100);
  background: var(--white);
  color: var(--primary);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.1s;
}
.page-btn:hover {
  background: var(--gray-50);
}
.page-btn.active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}
.page-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

/* SORT BAR */
.sort-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  align-items: center;
}
.sort-label {
  font-size: 12px;
  color: var(--gray-500);
}
.sort-btn {
  font-family: "Inter", sans-serif;
  font-size: 12px;
  padding: 4px 12px;
  border: 1px solid var(--gray-100);
  border-radius: 20px;
  background: var(--white);
  color: var(--gray-700);
  cursor: pointer;
  font-weight: 500;
  transition: all 0.12s;
}
.sort-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.sort-btn.active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

/* FOOTER */
footer {
  background: var(--primary);
  color: rgba(255, 255, 255, 0.4);
  text-align: center;
  padding: 1.5rem 2rem;
  font-size: 12px;
  margin-top: 2rem;
}
footer strong {
  color: var(--accent);
}

/* RESPONSIVE */
@media (max-width: 640px) {
  .hero {
    padding: 2.5rem 1rem 2rem;
  }
  .container {
    padding: 0 1rem;
  }
  td.price-other-col {
    display: none;
  }
}

/* ANIMATIONS */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.hero-eyebrow {
  animation: fadeUp 0.5s ease both;
}
.hero h1 {
  animation: fadeUp 0.5s 0.1s ease both;
}
.hero-sub {
  animation: fadeUp 0.5s 0.2s ease both;
}
.stat-row {
  animation: fadeUp 0.5s 0.3s ease both;
}

.no-results {
  text-align: center;
  padding: 3rem;
  color: var(--gray-500);
  font-size: 14px;
}

/* TOGGLES */
.chart-toggle {
  display: inline-flex;
  gap: 6px;
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 1rem;
}
.toggle-btn {
  font-family: "Inter", sans-serif;
  font-size: 12px;
  padding: 4px 12px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--gray-700);
  cursor: pointer;
  font-weight: 500;
  transition: all 0.12s;
}
.toggle-btn.active {
  background: var(--primary);
  color: var(--white);
}
.toggle-btn:hover {
  color: var(--primary);
}
