/* ============================================================
   FlightHunter Design System
   Palette: Navy #0D1B2A | Orange #FF6B35 | White #FFF | Grey #8B9BB4
   ============================================================ */

/* --- Reset & Base ------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:       #0D1B2A;
  --navy-mid:   #162436;
  --navy-light: #1E3248;
  --orange:     #FF6B35;
  --orange-dk:  #E05520;
  --white:      #FFFFFF;
  --grey:       #8B9BB4;
  --grey-light: #C5CDD8;
  --grey-bg:    #F4F6F9;
  --success:    #1a7a1a;
  --danger:     #be0000;
  --border:     #2A3F56;
  --font:       'Inter', 'Segoe UI', system-ui, sans-serif;
  --radius:     8px;
  --radius-lg:  14px;
  --shadow:     0 4px 24px rgba(0,0,0,0.18);
  --shadow-sm:  0 2px 8px rgba(0,0,0,0.10);
  --transition: 0.18s ease;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--grey-bg);
  color: #1a2b3c;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--orange); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; }

/* --- Typography -------------------------------------------- */
h1, h2, h3, h4 { font-weight: 700; line-height: 1.25; color: var(--navy); }
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }
h4 { font-size: 1rem; }

.text-muted   { color: var(--grey); font-size: 0.875rem; }
.text-danger  { color: var(--danger); }
.text-success { color: var(--success); }
.text-orange  { color: var(--orange); }
.text-white   { color: var(--white); }
.text-center  { text-align: center; }
.text-sm      { font-size: 0.875rem; }
.text-xs      { font-size: 0.78rem; }
.fw-bold      { font-weight: 700; }

/* --- Layout ------------------------------------------------ */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.container-sm { max-width: 520px; margin: 0 auto; padding: 0 20px; }
.container-md { max-width: 760px; margin: 0 auto; padding: 0 20px; }

.page-body { flex: 1; padding: 32px 0 60px; }

.row { display: flex; gap: 20px; flex-wrap: wrap; }
.col { flex: 1; min-width: 0; }
.col-auto { flex: 0 0 auto; }

/* --- Header ------------------------------------------------ */
.site-header {
  background: var(--navy);
  border-bottom: 2px solid var(--orange);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 24px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.site-logo img.logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

.site-logo .logo-text {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--white);
}

.site-logo .logo-text span { color: var(--orange); }

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  margin-left: 16px;
}

.nav-link {
  color: var(--grey-light);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: var(--radius);
  transition: color var(--transition), background var(--transition);
  text-decoration: none;
}

.nav-link:hover, .nav-link.active {
  color: var(--white);
  background: var(--navy-light);
  text-decoration: none;
}

.nav-link.active { color: var(--orange); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--grey-light);
  font-size: 0.875rem;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--orange);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
}

.credit-badge {
  background: var(--navy-light);
  border: 1px solid var(--border);
  color: var(--orange);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
}

/* --- Footer ------------------------------------------------ */
.site-footer {
  background: var(--navy);
  color: var(--grey);
  font-size: 0.8rem;
  padding: 20px 0;
  text-align: center;
  border-top: 1px solid var(--border);
}

.site-footer a { color: var(--grey-light); }
.site-footer a:hover { color: var(--orange); }

/* --- Buttons ----------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 22px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--orange);
  color: var(--white);
  box-shadow: 0 2px 8px rgba(255,107,53,0.35);
}
.btn-primary:hover { background: var(--orange-dk); color: var(--white); }

.btn-secondary {
  background: var(--navy-light);
  color: var(--white);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--navy-mid); color: var(--white); }

.btn-outline {
  background: transparent;
  color: var(--orange);
  border: 2px solid var(--orange);
}
.btn-outline:hover { background: var(--orange); color: var(--white); }

.btn-ghost {
  background: transparent;
  color: var(--grey-light);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--navy-light); color: var(--white); }

.btn-danger {
  background: var(--danger);
  color: var(--white);
}
.btn-danger:hover { background: #9a0000; color: var(--white); }

.btn-sm { padding: 6px 14px; font-size: 0.8rem; }
.btn-lg { padding: 14px 32px; font-size: 1rem; }
.btn-full { width: 100%; }

.btn:disabled, .btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* --- Cards ------------------------------------------------- */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card-header {
  padding: 18px 24px;
  border-bottom: 1px solid #eef0f4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-header h2, .card-header h3 { margin: 0; }

.card-body { padding: 24px; }
.card-footer {
  padding: 16px 24px;
  border-top: 1px solid #eef0f4;
  background: #fafbfc;
}

/* --- Forms ------------------------------------------------- */
.form-group { margin-bottom: 18px; }

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--navy);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid #dde2ea;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-family: var(--font);
  background: var(--white);
  color: var(--navy);
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none;
}

.form-control:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255,107,53,0.15);
}

.form-control::placeholder { color: var(--grey-light); }

select.form-control { cursor: pointer; }

.form-hint { font-size: 0.78rem; color: var(--grey); margin-top: 4px; }

.form-row { display: flex; gap: 16px; flex-wrap: wrap; }
.form-row .form-group { flex: 1; min-width: 140px; }

/* Checkbox */
.form-check {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.9rem;
}

.form-check input[type=checkbox] {
  width: 16px;
  height: 16px;
  accent-color: var(--orange);
  cursor: pointer;
}

/* --- Alerts / Flash messages ------------------------------ */
.alert {
  padding: 12px 18px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  margin-bottom: 18px;
  border-left: 4px solid transparent;
}

.alert-success { background: #eaf7ea; border-color: var(--success); color: #145214; }
.alert-danger  { background: #fdeaea; border-color: var(--danger);  color: #7a0000; }
.alert-info    { background: #e8f0fe; border-color: #3b6fd4;        color: #1a3a7a; }
.alert-warning { background: #fff8e1; border-color: #f59e0b;        color: #7a4a00; }

/* --- Tables ----------------------------------------------- */
.table-wrap { overflow-x: auto; }

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.data-table th {
  background: var(--navy);
  color: var(--grey-light);
  padding: 10px 14px;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.data-table td {
  padding: 11px 14px;
  border-bottom: 1px solid #eef0f4;
  vertical-align: middle;
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #f8f9fb; }

.data-table .pts { font-weight: 700; color: var(--navy); }
.data-table .pts-drop { color: var(--success); font-weight: 700; }
.data-table .pts-rise { color: var(--danger); font-weight: 700; }
.data-table .pts-new  { color: var(--orange); font-weight: 700; }
.data-table .pts-none { color: var(--grey-light); }

/* --- Badges ----------------------------------------------- */
.badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-active  { background: #d4edda; color: #155724; }
.badge-paused  { background: #fff3cd; color: #856404; }
.badge-admin   { background: #fde8e0; color: #9a2a00; }
.badge-free    { background: #e8f0fe; color: #1a3a7a; }
.badge-paid    { background: #fff8e1; color: #7a4a00; }

/* --- Search Form Card ------------------------------------- */
.search-card {
  background: var(--navy);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  box-shadow: var(--shadow);
  color: var(--white);
  margin-bottom: 28px;
}

.search-card .form-label { color: var(--grey-light); }

.search-card .form-control {
  background: var(--navy-light);
  border-color: var(--border);
  color: var(--white);
}

.search-card .form-control:focus {
  border-color: var(--orange);
  background: var(--navy-mid);
}

.search-card .form-control::placeholder { color: var(--grey); }

.search-card select.form-control option { background: var(--navy); color: var(--white); }

.trip-type-tabs {
  display: flex;
  gap: 0;
  background: var(--navy-light);
  border-radius: var(--radius);
  padding: 3px;
  border: 1px solid var(--border);
  width: fit-content;
  margin-bottom: 24px;
}

.trip-tab {
  padding: 7px 22px;
  border-radius: calc(var(--radius) - 2px);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--grey);
  transition: all var(--transition);
  border: none;
  background: none;
}

.trip-tab.active {
  background: var(--orange);
  color: var(--white);
  box-shadow: 0 2px 6px rgba(255,107,53,0.4);
}

.trip-tab:hover:not(.active) { color: var(--white); }

/* Multi-select */
select[multiple].form-control {
  height: auto;
  min-height: 0;
  padding: 6px;
}
select[multiple].form-control:not(.airport-select) {
  overflow-y: hidden;
}

select[multiple].form-control option {
  padding: 5px 8px;
  border-radius: 4px;
}

select[multiple].form-control option:checked {
  background: var(--orange);
  color: var(--white);
}

/* --- Lock Overlay ----------------------------------------- */
.lock-wrapper {
  position: relative;
}

.lock-overlay {
  position: absolute;
  inset: 0;
  background: rgba(13, 27, 42, 0.82);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
  gap: 12px;
  padding: 24px;
  text-align: center;
}

.lock-overlay .lock-icon {
  font-size: 2.5rem;
  line-height: 1;
}

.lock-overlay h3 {
  color: var(--white);
  font-size: 1.1rem;
  margin: 0;
}

.lock-overlay p {
  color: var(--grey-light);
  font-size: 0.875rem;
  margin: 0;
  max-width: 280px;
}

.lock-overlay .lock-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 4px;
}

/* --- Auth Pages ------------------------------------------- */
.auth-page {
  min-height: 100vh;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.auth-card {
  background: var(--navy-mid);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow);
}

.auth-card .auth-logo {
  text-align: center;
  margin-bottom: 28px;
}

.auth-card .auth-logo img { height: 40px; }

.auth-card h1 {
  color: var(--white);
  font-size: 1.5rem;
  text-align: center;
  margin-bottom: 6px;
}

.auth-card .auth-subtitle {
  color: var(--grey);
  font-size: 0.875rem;
  text-align: center;
  margin-bottom: 28px;
}

.auth-card .form-label { color: var(--grey-light); }

.auth-card .form-control {
  background: var(--navy-light);
  border-color: var(--border);
  color: var(--white);
}

.auth-card .form-control:focus {
  border-color: var(--orange);
  background: var(--navy);
}

.auth-card .form-control::placeholder { color: var(--grey); }

.auth-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 0.875rem;
  color: var(--grey);
}

.auth-footer a { color: var(--orange); }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--grey);
  font-size: 0.8rem;
}

.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* --- Page Header ------------------------------------------ */
.page-header {
  background: var(--navy);
  color: var(--white);
  padding: 28px 0;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.page-header h1 { color: var(--white); font-size: 1.6rem; margin-bottom: 4px; }
.page-header p  { color: var(--grey); font-size: 0.9rem; margin: 0; }

/* --- Stats / Info boxes ----------------------------------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-box {
  background: var(--white);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--orange);
}

.stat-box .stat-value {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1;
}

.stat-box .stat-label {
  font-size: 0.78rem;
  color: var(--grey);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 4px;
}

/* --- Pagination ------------------------------------------- */
.pagination {
  display: flex;
  gap: 4px;
  justify-content: center;
  margin-top: 24px;
  flex-wrap: wrap;
}

.page-btn {
  padding: 7px 13px;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 600;
  border: 1.5px solid #dde2ea;
  background: var(--white);
  color: var(--navy);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.page-btn:hover { border-color: var(--orange); color: var(--orange); text-decoration: none; }
.page-btn.active { background: var(--orange); border-color: var(--orange); color: var(--white); }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* --- Modal ------------------------------------------------ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  max-width: 480px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  overflow: hidden;
}

.modal-header {
  background: var(--navy);
  color: var(--white);
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 { color: var(--white); margin: 0; font-size: 1rem; }

.modal-close {
  background: none;
  border: none;
  color: var(--grey);
  font-size: 1.3rem;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.modal-close:hover { color: var(--white); }

.modal-body { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid #eef0f4; display: flex; gap: 10px; justify-content: flex-end; }

/* --- Tabs ------------------------------------------------- */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid #eef0f4;
  margin-bottom: 24px;
}

.tab-btn {
  padding: 10px 20px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--grey);
  border: none;
  background: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all var(--transition);
}

.tab-btn:hover { color: var(--navy); }
.tab-btn.active { color: var(--orange); border-bottom-color: var(--orange); }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* --- Utility ---------------------------------------------- */
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.p-0  { padding: 0; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.w-full { width: 100%; }

.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* --- Responsive ------------------------------------------- */
@media (max-width: 768px) {
  .container { padding: 0 14px; }
  .search-card { padding: 20px 16px; }
  .auth-card { padding: 28px 20px; }
  .card-body { padding: 16px; }
  .card-header { padding: 14px 16px; }
  h1 { font-size: 1.5rem; }
  .site-nav { display: none; }
  .header-inner { height: 56px; }
  .page-header { padding: 20px 0; }
  .data-table th, .data-table td { padding: 9px 10px; font-size: 0.8rem; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .form-row { flex-direction: column; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .trip-type-tabs { width: 100%; }
  .trip-tab { flex: 1; text-align: center; }
}

/* --- Hero Section ----------------------------------------- */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, #1a3a5c 100%);
  color: var(--white);
  padding: 80px 0 90px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.hero-content { max-width: 640px; position: relative; z-index: 1; }
.hero-badge {
  display: inline-block;
  background: rgba(255,107,53,0.2);
  border: 1px solid rgba(255,107,53,0.4);
  color: var(--orange);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 20px;
  letter-spacing: 0.04em;
}
.hero-title {
  font-size: 3rem;
  font-weight: 800;
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 18px;
}
.hero-title span { color: var(--orange); }
.hero-subtitle {
  font-size: 1.1rem;
  color: var(--grey-light);
  margin-bottom: 32px;
  line-height: 1.7;
  max-width: 520px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* --- Features Section ------------------------------------- */
.features-section { padding: 70px 0; background: var(--grey-bg); }
.section-header { text-align: center; margin-bottom: 48px; }
.section-header h2 { font-size: 2rem; color: var(--navy); margin-bottom: 10px; }
.section-header p { color: var(--grey); font-size: 1rem; }
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}
.feature-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}
.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.feature-icon { font-size: 2.2rem; margin-bottom: 14px; }
.feature-card h3 { color: var(--navy); margin-bottom: 10px; font-size: 1.1rem; }
.feature-card p { color: var(--grey); font-size: 0.9rem; line-height: 1.6; margin-bottom: 14px; }
.feature-access {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  display: inline-block;
}
.feature-access.open   { background: #d4edda; color: #155724; }
.feature-access.locked { background: #fde8e0; color: #9a2a00; }

/* --- CTA Section ------------------------------------------ */
.cta-section { padding: 70px 0; background: var(--navy); }
.cta-card {
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
}
.cta-card h2 { color: var(--white); font-size: 2rem; margin-bottom: 12px; }
.cta-card p  { color: var(--grey-light); margin-bottom: 28px; font-size: 1rem; }

/* --- Watches Page ----------------------------------------- */
.watches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}
.watch-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  border-top: 3px solid var(--orange);
}
.watch-card.paused { border-top-color: var(--grey); opacity: 0.8; }
.watch-card-header {
  padding: 16px 20px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.watch-card-title { font-weight: 700; color: var(--navy); font-size: 1rem; margin-bottom: 4px; }
.watch-card-route { font-size: 0.82rem; color: var(--grey); }
.watch-card-body  { padding: 0 20px 16px; font-size: 0.85rem; color: var(--grey); }
.watch-card-footer {
  padding: 12px 20px;
  border-top: 1px solid #eef0f4;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  background: #fafbfc;
}

/* --- Responsive additions --------------------------------- */
@media (max-width: 768px) {
  .hero { padding: 50px 0 60px; }
  .hero-title { font-size: 2rem; }
  .hero-subtitle { font-size: 0.95rem; }
  .features-grid { grid-template-columns: 1fr; }
  .watches-grid { grid-template-columns: 1fr; }
}

/* --- Airport multi-select --------------------------------- */
.airport-select {
  min-height: 160px;
  max-height: 200px;
  overflow-y: auto;
  font-size: 0.85rem;
}
.airport-select optgroup {
  font-weight: 700;
  color: var(--navy);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.airport-select option {
  padding: 3px 8px;
  color: #1a2b3c;
  font-weight: 400;
}
.airport-select option:checked {
  background: var(--orange);
  color: var(--white);
}

/* --- Search card improvements ----------------------------- */
.search-card {
  background: var(--navy);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  box-shadow: var(--shadow);
  color: var(--white);
}
.search-card .form-label {
  color: var(--grey-light);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.search-card .form-control {
  background: var(--navy-light);
  border-color: var(--border);
  color: var(--white);
}
.search-card .form-control:focus {
  border-color: var(--orange);
  background: var(--navy-mid);
}
.search-card .form-check-label { color: var(--grey-light); }
.search-card .form-check-input { accent-color: var(--orange); }

/* --- Trip type tabs --------------------------------------- */
.trip-type-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 24px;
  background: var(--navy-light);
  border-radius: var(--radius);
  padding: 4px;
  width: fit-content;
}
.trip-tab {
  padding: 8px 22px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--grey);
  border: none;
  background: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--transition);
}
.trip-tab.active {
  background: var(--orange);
  color: var(--white);
}
.trip-tab:hover:not(.active) { color: var(--white); }

/* --- Lock overlay ----------------------------------------- */
.lock-overlay-wrapper {
  position: relative;
  display: inline-block;
  width: 100%;
}
.lock-overlay {
  position: absolute;
  inset: 0;
  background: rgba(13,27,42,0.85);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  z-index: 10;
  backdrop-filter: blur(2px);
}
.lock-overlay .lock-icon { font-size: 2rem; }
.lock-overlay p { color: var(--white); font-size: 0.9rem; text-align: center; margin: 0; }
.lock-overlay .btn { margin-top: 4px; }

/* --- Optgroup labels — readable on dark background ---------- */
.airport-select optgroup {
  color: #a0b0c8 !important;
  font-weight: 700;
  font-size: 0.73rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: #1a2d42;
}
.airport-select option {
  background: #162435;
  color: #e8edf3;
  font-weight: 400;
  padding: 3px 8px;
}
.airport-select option:checked,
.airport-select option:hover {
  background: var(--orange) !important;
  color: #fff !important;
}

/* --- Lock-free badge on Return button ---------------------- */
.lock-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--orange);
  background: rgba(255,107,53,0.12);
  border: 1px solid rgba(255,107,53,0.35);
  border-radius: 20px;
  padding: 1px 7px;
  margin-left: 6px;
  vertical-align: middle;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

/* --- Feature teasers section ------------------------------- */
.feature-teasers {
  margin-top: 36px;
}
.teasers-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 18px;
  text-align: center;
}
.teasers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}
.teaser-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 20px;
  cursor: pointer;
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.teaser-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,107,53,0.03);
  opacity: 0;
  transition: opacity var(--transition);
}
.teaser-card:hover {
  box-shadow: 0 6px 24px rgba(255,107,53,0.15);
  border-color: rgba(255,107,53,0.4);
  transform: translateY(-2px);
}
.teaser-card:hover::before { opacity: 1; }
.teaser-icon {
  font-size: 2rem;
  margin-bottom: 10px;
}
.teaser-card h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 8px;
}
.teaser-card p {
  font-size: 0.82rem;
  color: var(--grey);
  margin: 0 0 14px;
  line-height: 1.5;
}
.teaser-cta {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--orange);
  background: rgba(255,107,53,0.1);
  border: 1px solid rgba(255,107,53,0.25);
  border-radius: 20px;
  padding: 3px 10px;
}

/* --- Results table improvements ---------------------------- */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-top: 24px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.card-header h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0;
}
.card-body { padding: 0; }
.table-wrap { overflow-x: auto; }
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.data-table thead th {
  background: var(--navy);
  color: var(--white);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 12px 16px;
  text-align: left;
  white-space: nowrap;
}
.data-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
.data-table tbody tr:last-child { border-bottom: none; }
.data-table tbody tr:hover { background: #f8f9fb; }
.data-table td {
  padding: 12px 16px;
  color: var(--navy);
  vertical-align: middle;
}
.pts {
  font-weight: 700;
  color: var(--navy);
}
.pts-none {
  color: var(--grey);
}
.badge-active {
  display: inline-block;
  background: #e8f5e9;
  color: #2e7d32;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  border: 1px solid #a5d6a7;
}

/* ── Date input calendar icon – make visible on dark backgrounds ─────────── */
input[type="date"].form-control::-webkit-calendar-picker-indicator {
    filter: invert(0.7) brightness(1.4);
    cursor: pointer;
    opacity: 0.8;
}
input[type="date"].form-control::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
    filter: invert(0.85) brightness(1.6);
}

/* ============================================================
   MOBILE RESPONSIVE IMPROVEMENTS
   ============================================================ */

/* --- Header: compact mobile layout ------------------------- */
@media (max-width: 768px) {
  .header-inner {
    height: 54px;
    gap: 8px;
  }
  .site-logo .logo-text {
    font-size: 1.1rem;
  }
  .site-logo img.logo-icon {
    width: 28px;
    height: 28px;
  }
  /* Collapse nav links — already hidden, but ensure */
  .site-nav { display: none; }

  /* Header actions: shrink buttons, hide non-essential text */
  .header-actions {
    gap: 6px;
    flex-shrink: 0;
  }
  .header-actions .btn {
    padding: 7px 12px;
    font-size: 0.8rem;
    white-space: nowrap;
  }
  .credit-badge {
    font-size: 0.72rem;
    padding: 2px 7px;
  }
  .user-menu span.hidden-sm { display: none; }
  .user-avatar { width: 28px; height: 28px; font-size: 0.72rem; }
}

@media (max-width: 400px) {
  /* On very small phones, abbreviate "Get started free" */
  .header-actions a[href*="register"].btn-primary::after {
    content: 'Sign up';
  }
  .header-actions a[href*="register"].btn-primary {
    font-size: 0;
  }
  .header-actions a[href*="register"].btn-primary::after {
    font-size: 0.8rem;
  }
}

/* --- Search form: tighter spacing on mobile ---------------- */
@media (max-width: 768px) {
  .search-card {
    padding: 16px 14px;
    margin-bottom: 16px;
  }
  .form-group {
    margin-bottom: 12px;
  }
  .trip-type-tabs {
    margin-bottom: 16px;
  }
  /* Airport selects: slightly shorter on mobile */
  .airport-select {
    min-height: 90px;
    max-height: 120px;
  }
  select[multiple].form-control {
    min-height: 0;
    max-height: none;
    overflow-y: hidden;
  }
  /* Month picker: wrap tightly */
  .month-picker-grid {
    gap: 6px;
  }
  .month-btn {
    padding: 5px 9px;
    font-size: 0.75rem;
  }
  /* Form rows: handled by the dedicated gap-fix block below */
  /* Reduce padding on search button */
  .btn-search-main {
    padding: 12px 20px;
    font-size: 0.95rem;
  }
}

/* --- Results table: horizontal scroll + tighter cells ------ */
@media (max-width: 768px) {
  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  }
  .data-table {
    min-width: 520px; /* force scroll rather than wrapping */
    font-size: 0.78rem;
  }
  .data-table th {
    padding: 8px 10px;
    font-size: 0.68rem;
  }
  .data-table td {
    padding: 8px 10px;
    font-size: 0.78rem;
  }
  /* Tighten points display */
  .pts { font-size: 0.78rem; }
  .badge-active { font-size: 0.62rem; padding: 1px 4px; }
  /* Card header on mobile */
  .card-header {
    padding: 12px 14px;
  }
  .card-header h3 { font-size: 0.9rem; }
}

/* --- Return results: min-width wider for extra columns ----- */
@media (max-width: 768px) {
  .data-table.return-table {
    min-width: 680px;
  }
}

/* --- Month picker grid ------------------------------------- */
.month-picker-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

/* ---- Mobile: eliminate gaps from hidden flex children ---- */
@media (max-width: 768px) {
  /* Switch all form-rows to margin-based spacing so hidden items leave no gap */
  .search-card .form-row {
    gap: 0 !important;
    flex-direction: column;
  }
  /* Each visible form-group gets a bottom margin instead */
  .search-card .form-row > .form-group,
  .search-card .form-row > div {
    margin-bottom: 14px;
  }
  /* Hidden items must collapse completely — no margin, no height */
  .search-card .form-row > .hidden-item {
    display: none !important;
    margin: 0 !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    overflow: hidden !important;
    border: none !important;
    flex: none !important;
    width: 0 !important;
  }
  /* Last item: no trailing margin */
  .search-card .form-row > :last-child {
    margin-bottom: 0;
  }
  /* Search button: full width on mobile */
  .btn-search-main {
    width: 100%;
    justify-content: center;
  }
  /* Search card: tighter padding on mobile */
  .search-card {
    padding: 16px;
  }
}

/* ============================================================
   Mobile cabin column: hide desktop cols, show stacked cell
   ============================================================ */

/* Desktop default: show individual cabin columns, hide combined */
.col-cabin-mobile { display: none; }
.col-cabin-desktop { display: table-cell; }

/* Cabin-row layout inside the stacked mobile cell */
.cabin-row {
  display: flex;
  align-items: center;
  gap: 4px;
  line-height: 1.6;
  flex-wrap: nowrap;
}
.cabin-label {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--grey);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  min-width: 44px;
  flex-shrink: 0;
}
.cabin-sep {
  color: var(--grey-light);
  font-size: 0.7rem;
  margin: 0 1px;
}

@media (max-width: 768px) {
  /* On mobile: hide the three desktop cabin columns */
  .col-cabin-desktop { display: none !important; }
  /* Show the single stacked cabin column */
  .col-cabin-mobile { display: table-cell !important; }

  /* Remove the forced min-width so the table fits the screen */
  .data-table { min-width: 0 !important; }
  .data-table.return-table { min-width: 0 !important; }

  /* Tighter cabin-row on mobile */
  .cabin-row { gap: 3px; }
  .cabin-label { font-size: 0.6rem; min-width: 40px; }
  .data-table .pts { font-size: 0.72rem; }
  .data-table .pts-none { font-size: 0.72rem; }
  .badge-active { font-size: 0.58rem; padding: 1px 3px; }
}

/* ============================================================
   Mobile flight column: hide desktop cols, show combined cell
   ============================================================ */

/* Desktop default: show individual flight columns, hide combined */
.col-flight-mobile { display: none; }
.col-flight-desktop { display: table-cell; }
.col-total-desktop { display: table-cell; }

/* Flight leg layout inside the combined mobile cell */
.flight-leg {
  display: flex;
  align-items: baseline;
  gap: 4px;
  line-height: 1.7;
  flex-wrap: nowrap;
}
.flight-leg-label {
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--grey);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  min-width: 22px;
  flex-shrink: 0;
}
.nights-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--grey);
  white-space: nowrap;
}
.flight-nights {
  margin-top: 3px;
  padding-left: 25px; /* align with route text, past the Out/Ret label */
}

/* Total row inside the cabin cell on mobile */
.cabin-total-row {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 5px;
  padding-top: 5px;
  border-top: 1px solid var(--border);
}
.cabin-total-row .pts-total {
  color: var(--orange);
  font-size: 0.82rem;
  font-weight: 700;
}

@media (max-width: 768px) {
  /* On mobile: hide desktop flight columns, show combined */
  .col-flight-desktop { display: none !important; }
  .col-flight-mobile  { display: table-cell !important; }
  /* Hide the desktop total column — it's embedded in the cabin cell on mobile */
  .col-total-desktop  { display: none !important; }

  /* Tighter flight-leg on mobile */
  .flight-leg { gap: 3px; }
  .flight-leg strong { font-size: 0.72rem; }
  .flight-leg .text-muted { font-size: 0.65rem; }
}

/* ============================================================
   Cabin selection highlighting in results table
   Background is WHITE/light — use navy for selected, grey for unselected
   ============================================================ */

/* Desktop: unselected cabin column — dimmed */
.data-table td.cabin-unselected {
  opacity: 0.45;
}

/* Out/Ret direction labels */
.cabin-dir-label {
  color: #8B9BB4;
  display: block;
  margin-bottom: 1px;
  font-size: 0.68rem;
}

/* ============================================================
   Mobile stacked cabin cell — per-direction highlighting
   ============================================================ */

/* Cabin label: dark navy when selected on at least one leg */
.cabin-label-active {
  color: #0D1B2A !important;
  font-weight: 700 !important;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  min-width: 52px;
  flex-shrink: 0;
}
/* Cabin label: medium grey when not selected on either leg */
.cabin-label-dim {
  color: #9aabb8 !important;
  font-weight: 600 !important;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  min-width: 52px;
  flex-shrink: 0;
}

/* Points: selected direction — dark navy, bold, slightly larger */
.data-table .pts.pts-dir-sel,
.pts-dir-sel {
  color: #0D1B2A !important;
  font-weight: 700 !important;
  font-size: 0.82rem !important;
}
/* Points: unselected direction — medium grey, normal weight */
.data-table .pts.pts-dir-unsel,
.pts-dir-unsel {
  color: #9aabb8 !important;
  font-weight: 500 !important;
  font-size: 0.78rem !important;
}
