/* ==========================================
   TripBuilder Style Guide & Design System v2
   ========================================== */

/* 1. Core Variables & Theme */
:root {
  /* Colors */
  --bg-app: #F7F7F5;
  --bg-card: #FFFFFF;
  --bg-input: #EAEAE6;
  
  --text-main: #1C1C1E;
  --text-muted: #7E7E7C;
  --text-inverse: #FFFFFF;
  
  --primary: #1A3A34;       /* Deep Resort Palm Green */
  --primary-hover: #26524A;
  --primary-tint: #F0F4F3;
  
  --accent: #D4A373;        /* Warm Sand Terracotta */
  --accent-hover: #C59364;
  --accent-tint: #FAF2EB;
  
  --btn-sec: #EAEAE6;
  --btn-sec-hover: #DFDFD9;
  
  --border: #E8E8E4;
  --danger: #D9534F;
  --danger-hover: #C9302C;
  
  /* Shadows */
  --shadow-soft: 0 16px 48px rgba(28, 28, 26, 0.04), 0 2px 12px rgba(28, 28, 26, 0.02);
  --shadow-hover: 0 24px 56px rgba(28, 28, 26, 0.08), 0 4px 20px rgba(28, 28, 26, 0.03);
  --shadow-modal: 0 32px 80px rgba(0, 0, 0, 0.12), 0 4px 24px rgba(0, 0, 0, 0.04);
  
  /* Borders & Radius */
  --radius-card-lg: 32px;    /* rounded-4xl */
  --radius-card: 24px;       /* rounded-3xl */
  --radius-btn: 16px;        /* rounded-2xl */
  --radius-input: 12px;      /* rounded-xl */
  
  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 2. Global Resets & Basics */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-app);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-bottom: 80px;
}

h1, h2, h3, h4 {
  font-weight: 700;
  letter-spacing: -0.03em;
}

button, input, select {
  font-family: inherit;
  outline: none;
}

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

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-app);
}
::-webkit-scrollbar-thumb {
  background: #E0E0D9;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #D0D0C5;
}

/* 3. Reusable UI Components */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-btn);
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: transform var(--transition-fast), background-color var(--transition-fast), box-shadow var(--transition-fast);
}

.btn:active {
  transform: scale(0.96);
}

.btn-primary {
  background-color: var(--primary);
  color: var(--text-inverse);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  box-shadow: 0 8px 24px rgba(26, 58, 52, 0.18);
}

.btn-secondary {
  background-color: var(--btn-sec);
  color: var(--text-main);
}

.btn-secondary:hover {
  background-color: var(--btn-sec-hover);
}

.btn-sm {
  padding: 10px 20px;
  font-size: 0.85rem;
  border-radius: 12px;
}

.btn-icon-only {
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 50%;
}

.btn-edit-small {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.btn-edit-small:hover {
  background-color: var(--btn-sec);
  color: var(--text-main);
}

/* 4. App Header Layout */
.app-header {
  background-color: rgba(247, 247, 245, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.logo-icon {
  width: 26px;
  height: 26px;
  color: var(--primary);
}

.logo-text {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.04em;
}

/* 5. Main Wrapper & View Switching */
.app-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 24px;
}

.view {
  display: none;
  animation: fadeIn var(--transition-normal) forwards;
}

.view.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================
   6. Dashboard View Elements
   ========================================== */
.dashboard-header {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 48px;
}

.greeting-box h1 {
  font-size: 2.8rem;
  letter-spacing: -0.05em;
  color: var(--text-main);
  line-height: 1.1;
}

.greeting-box .subtitle {
  color: var(--text-muted);
  font-size: 1.25rem;
  margin-top: 4px;
}

.search-and-create {
  display: flex;
  gap: 20px;
  align-items: center;
  width: 100%;
}

.search-wrapper {
  position: relative;
  flex-grow: 1;
}

.search-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  width: 20px;
  height: 20px;
}

#trip-search {
  width: 100%;
  padding: 16px 20px 16px 56px;
  border-radius: var(--radius-input);
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 1rem;
  color: var(--text-main);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  box-shadow: var(--shadow-soft);
}

#trip-search:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-tint);
}

/* Trips Grid - Dashboard */
.trips-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

/* Trip Card */
.trip-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-card-lg);
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 340px;
  cursor: pointer;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
}

.trip-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary);
}

.trip-card-img {
  height: 180px;
  background-size: cover;
  background-position: center;
  position: relative;
  padding: 20px;
  display: flex;
  align-items: flex-start;
}

.trip-card-badge {
  display: inline-flex;
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 20px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.trip-card-body {
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-grow: 1;
}

.trip-card h2 {
  font-size: 1.6rem;
  color: var(--text-main);
  line-height: 1.25;
  margin-bottom: 12px;
}

.trip-card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border);
  padding-top: 20px;
  margin-top: auto;
}

.trip-card-info {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.trip-card-info span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.trip-card-arrow {
  background-color: var(--bg-app);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.trip-card:hover .trip-card-arrow {
  background-color: var(--primary);
  color: var(--text-inverse);
}

/* Empty State */
.empty-state {
  grid-column: 1 / -1;
  background-color: var(--bg-card);
  border-radius: var(--radius-card-lg);
  padding: 80px 40px;
  text-align: center;
  box-shadow: var(--shadow-soft);
  border: 1px dashed var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

/* ==========================================
   7. Detail View Elements (Full-bleed Banner)
   ========================================== */

/* Full bleed Detail Header Banner */
.trip-banner-container {
  position: relative;
  border-radius: var(--radius-card-lg);
  overflow: hidden;
  height: 340px;
  margin-bottom: 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-soft);
}

.trip-banner-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  z-index: 1;
  transition: transform var(--transition-normal);
}

.trip-banner-container:hover .trip-banner-bg {
  transform: scale(1.02);
}

.trip-banner-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(28, 28, 26, 0.92) 0%, rgba(28, 28, 26, 0.4) 60%, rgba(28, 28, 26, 0.1) 100%);
  z-index: 2;
}

.trip-banner-nav {
  position: relative;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
}

.trip-banner-nav .btn-secondary {
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.trip-banner-nav .btn-primary {
  background-color: rgba(26, 58, 52, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.trip-banner-content {
  position: relative;
  z-index: 3;
  padding: 32px 40px;
  color: var(--text-inverse);
}

.trip-banner-content .trip-title-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 8px;
}

.trip-banner-content h1 {
  font-size: 2.5rem;
  letter-spacing: -0.04em;
  line-height: 1.1;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn-edit-small-light {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-inverse);
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color var(--transition-fast), transform var(--transition-fast);
}

.btn-edit-small-light:hover {
  background-color: rgba(255, 255, 255, 0.35);
  transform: scale(1.05);
}

.trip-meta-grid-banner {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 16px;
}

.meta-item-banner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 16px;
  background-color: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  color: var(--text-inverse);
}

.meta-item-banner i {
  width: 16px;
  height: 16px;
  color: var(--accent);
}

/* Detail Columns (Flights + Hotels side by side) */
.detail-columns {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: start;
}

.detail-column {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.column-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
}

.column-header h2 {
  font-size: 1.65rem;
  letter-spacing: -0.03em;
  color: var(--text-main);
}

.items-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Item Cards (Flights & Hotels generic) */
.item-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-card);
  padding: 32px;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.item-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

/* ==========================================
   7.1 HIGH-FIDELITY FLIGHT CARD DESIGN (Based on image)
   ========================================== */
.flight-viz-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 8px 0;
}

.flight-stop-block {
  display: flex;
  flex-direction: column;
  width: 32%;
}

.flight-stop-block.text-left {
  align-items: flex-start;
  text-align: left;
}

.flight-stop-block.text-right {
  align-items: flex-end;
  text-align: right;
}

.airport-code {
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.0;
  letter-spacing: -0.04em;
}

.city-name {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 4px;
  letter-spacing: -0.01em;
}

.time-pill {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 14px;
  background-color: var(--bg-app);
  color: var(--text-main);
  border-radius: 8px;
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

/* Flight progress path */
.flight-progress-indicator {
  display: flex;
  align-items: center;
  position: relative;
  width: 36%;
  height: 12px;
  margin: 0 12px;
}

.progress-line-solid {
  height: 4px;
  background-color: var(--text-main);
  width: 42%;
  border-radius: 2px 0 0 2px;
}

.progress-line-hashed {
  height: 6px;
  background: repeating-linear-gradient(45deg, #E2E2DF, #E2E2DF 4px, transparent 4px, transparent 8px);
  width: 58%;
  border-radius: 0 3px 3px 0;
}

.airplane-marker {
  position: absolute;
  left: 42%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  z-index: 10;
}

.airplane-marker i {
  width: 26px;
  height: 26px;
  color: var(--text-main);
  transform: rotate(90deg); /* Face airplane to the right */
}

/* Neon Wingtip Lights (red/left, green/right on wings) */
.wing-light {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
}

.wing-light-left {
  top: 4px;
  left: 12px;
  background-color: #FF3B30;
  box-shadow: 0 0 6px #FF3B30, 0 0 12px #FF3B30;
}

.wing-light-right {
  bottom: 4px;
  left: 12px;
  background-color: #34C759;
  box-shadow: 0 0 6px #34C759, 0 0 12px #34C759;
}

.flight-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  padding-top: 12px;
  margin-top: 4px;
}

.flight-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  color: var(--primary);
  background-color: var(--primary-tint);
  padding: 4px 10px;
  border-radius: 6px;
}

/* ==========================================
   7.2 HOTEL CARD WITH IMAGE DESIGN
   ========================================== */
.hotel-card {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.hotel-card-img {
  height: 200px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.hotel-card-body {
  padding: 28px 32px 32px 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hotel-card-main {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.hotel-info-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hotel-title {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.25;
}

.hotel-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-hover);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Price tag layout */
.item-price-tag {
  text-align: right;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.price-value {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.1;
}

.price-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-top: 4px;
}

/* Card bottom section: voting & actions */
.item-card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border);
  padding-top: 20px;
  margin-top: 8px;
}

.vote-btn {
  background-color: var(--primary-tint);
  color: var(--primary);
  border: none;
  border-radius: 24px;
  padding: 10px 20px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.88rem;
  transition: transform var(--transition-fast), background-color var(--transition-fast), color var(--transition-fast);
}

.vote-btn:hover {
  background-color: var(--primary);
  color: var(--text-inverse);
  transform: translateY(-1px);
}

.vote-btn:active {
  transform: scale(0.96);
}

.vote-btn.has-voted {
  background-color: var(--accent);
  color: var(--text-inverse);
}

.item-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn-link-out {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.88rem;
  padding: 10px 20px;
  background-color: var(--btn-sec);
  border-radius: 12px;
  transition: background-color var(--transition-fast);
}

.btn-link-out:hover {
  background-color: var(--btn-sec-hover);
}

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

.btn-item-action {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.btn-item-action:hover {
  background-color: var(--btn-sec);
  color: var(--text-main);
}

.btn-item-action.delete:hover {
  background-color: var(--danger);
  color: var(--text-inverse);
}

/* ==========================================
   8. Modals System (Glassmorphic)
   ========================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(28, 28, 26, 0.45);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-card-lg);
  box-shadow: var(--shadow-modal);
  border: 1px solid var(--border);
  width: 90%;
  max-width: 540px;
  padding: 36px;
  transform: translateY(32px) scale(0.95);
  transition: transform var(--transition-normal);
}

/* Modal Form scrolling on smaller screens */
.modal-card-scrollable {
  max-height: 90vh;
  overflow-y: auto;
}

.modal-overlay.active .modal-card {
  transform: translateY(0) scale(1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}

.modal-header h3 {
  font-size: 1.6rem;
  letter-spacing: -0.03em;
}

.btn-close-modal {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.btn-close-modal:hover {
  background-color: var(--btn-sec);
  color: var(--text-main);
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-section-title {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 16px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="url"] {
  padding: 14px 18px;
  border-radius: var(--radius-input);
  background-color: var(--bg-app);
  border: 1px solid var(--border);
  font-size: 1rem;
  color: var(--text-main);
  transition: border-color var(--transition-fast), background-color var(--transition-fast);
}

.form-group input:focus {
  border-color: var(--primary);
  background-color: var(--bg-card);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

/* Radio toggle group */
.radio-toggle-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background-color: var(--bg-app);
  border-radius: var(--radius-input);
  padding: 4px;
  border: 1px solid var(--border);
}

.radio-toggle-group input[type="radio"] {
  display: none;
}

.radio-toggle-group label {
  text-align: center;
  padding: 12px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: background-color var(--transition-fast), color var(--transition-fast);
  text-transform: none;
  letter-spacing: normal;
}

.radio-toggle-group input[type="radio"]:checked + label {
  background-color: var(--bg-card);
  color: var(--primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  margin-top: 16px;
}

/* ==========================================
   9. Toast Notification System
   ========================================== */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(120px);
  background-color: var(--primary);
  color: var(--text-inverse);
  padding: 16px 32px;
  border-radius: 40px;
  box-shadow: 0 20px 48px rgba(26, 58, 52, 0.28);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 2000;
  opacity: 0;
  transition: transform 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
  pointer-events: none;
}

.toast.active {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast-icon {
  width: 22px;
  height: 22px;
  color: var(--accent);
}

.toast-message {
  font-size: 1rem;
  font-weight: 600;
}

/* ==========================================
   10. Media Queries & BREAKPOINTS
   ========================================== */

/* Mobile App Feeling Optimization (< 768px) */
@media (max-width: 767px) {
  body {
    padding-bottom: 80px;
  }

  .app-header {
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border);
  }

  .header-container {
    padding: 16px;
  }

  .app-content {
    padding: 0 0 60px 0; /* Clear sidebar spacing to allow full bleed banner */
  }

  /* Dashboard Adjustments */
  #dashboard-view {
    padding: 24px 16px;
  }

  .greeting-box h1 {
    font-size: 2.2rem;
  }

  .search-and-create {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }

  .search-and-create .btn {
    width: 100%;
    padding: 16px;
  }

  .trips-grid {
    gap: 24px;
    padding: 8px 0;
  }

  /* Detail View Banner - Mobile full-bleed */
  .trip-banner-container {
    border-radius: 0;
    height: 280px;
    margin-bottom: 32px;
  }

  .trip-banner-nav {
    padding: 16px;
  }

  .trip-banner-content {
    padding: 20px 16px;
  }

  .trip-banner-content h1 {
    font-size: 1.85rem;
  }

  .trip-meta-grid-banner {
    gap: 10px;
    margin-top: 12px;
  }

  .meta-item-banner {
    padding: 6px 12px;
    font-size: 0.8rem;
  }

  .detail-columns {
    padding: 0 16px;
    gap: 36px;
  }

  /* Cards Spacing */
  .item-card {
    padding: 24px 20px;
    border-radius: var(--radius-card);
  }

  .flight-viz-container {
    padding: 4px 0;
  }

  .airport-code {
    font-size: 1.7rem;
  }

  .time-pill {
    padding: 4px 10px;
    font-size: 0.72rem;
    margin-top: 8px;
  }

  .hotel-card-body {
    padding: 20px;
  }

  .hotel-title {
    font-size: 1.25rem;
  }

  .price-value {
    font-size: 1.35rem;
  }

  .vote-btn {
    padding: 8px 16px;
    font-size: 0.8rem;
  }

  .btn-link-out {
    padding: 8px 16px;
    font-size: 0.8rem;
  }

  /* Modal Form on mobile */
  .modal-card {
    padding: 24px;
    width: 95%;
  }

  .modal-actions {
    flex-direction: column-reverse;
    gap: 10px;
  }

  .modal-actions .btn {
    width: 100%;
  }
}

/* Tablet Screens (>= 768px) */
@media (min-width: 768px) {
  body {
    padding-bottom: 0;
  }
  
  .dashboard-header {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
  
  .search-and-create {
    width: auto;
    flex-shrink: 0;
    min-width: 500px;
  }
  
  .trips-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .form-row {
    grid-template-columns: 1fr 1fr;
  }
}

/* Desktop Screens (>= 1024px) */
@media (min-width: 1024px) {
  .trips-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .detail-columns {
    grid-template-columns: 1fr 1fr;
    gap: 48px;
  }
}

/* ==========================================
   11. Dynamic Selections & Budget Bar CSS
   ========================================== */

/* Selection badge circle in cards */
.select-badge {
  position: absolute;
  top: 20px;
  left: 20px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid #E2E2DF;
  background-color: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 15;
  color: transparent;
  transition: background-color var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.select-badge:hover {
  transform: scale(1.1);
}

.select-badge i {
  width: 16px;
  height: 16px;
}

.select-badge.selected {
  background-color: var(--primary);
  border-color: var(--primary);
  color: var(--text-inverse);
}

/* Selected state highlight on parent card */
.item-card.selected-card {
  border-color: var(--primary);
  box-shadow: var(--shadow-hover);
  background-color: var(--primary-tint);
}

/* Connect outbound and return inside the combo card */
.flight-combo-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.flight-segment {
  background-color: var(--bg-app);
  border-radius: var(--radius-card);
  padding: 24px 24px 24px 56px;
  position: relative;
  transition: background-color var(--transition-fast);
}

.flight-segment:hover {
  background-color: var(--bg-card);
  box-shadow: var(--shadow-soft);
}

.flight-segment-divider {
  height: 1px;
  background: dashed var(--border);
  margin: 4px 0;
  position: relative;
}

.add-return-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: transparent;
  border: 2px dashed var(--border);
  border-radius: var(--radius-card);
  padding: 24px;
  cursor: pointer;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.95rem;
  transition: background-color var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.add-return-placeholder:hover {
  background-color: var(--bg-card);
  border-color: var(--primary);
  color: var(--primary);
}

/* Sticky bottom summary bar */
.budget-summary-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: rgba(26, 58, 52, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: var(--text-inverse);
  box-shadow: 0 -16px 48px rgba(0, 0, 0, 0.15);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-card) var(--radius-card) 0 0;
  z-index: 950;
  padding: 20px 24px;
  transform: translateY(100%);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  pointer-events: none;
}

.budget-summary-bar.active {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.summary-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.summary-selections {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.summary-selection-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  opacity: 0.9;
}

.summary-selection-item i {
  width: 16px;
  height: 16px;
  color: var(--accent);
}

.summary-price-box {
  display: flex;
  align-items: center;
  gap: 24px;
}

.price-group {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.summary-price-total {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1.0;
}

.summary-price-pp {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-inverse);
  line-height: 1.0;
}

.summary-price-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.7;
  margin-top: 4px;
}

.price-separator {
  width: 1px;
  height: 36px;
  background-color: rgba(255, 255, 255, 0.15);
}

/* Dynamic body padding adjusting for budget bar */
body.budget-active {
  padding-bottom: 140px;
}

@media (max-width: 767px) {
  body.budget-active {
    padding-bottom: 220px;
  }
  
  .budget-summary-bar {
    padding: 16px;
  }
  .summary-container {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .summary-selections {
    font-size: 0.85rem;
  }
  .summary-price-box {
    justify-content: space-between;
    width: 100%;
  }
  .price-group {
    align-items: flex-start;
  }
  .price-group:last-child {
    align-items: flex-end;
  }
  .summary-price-total {
    font-size: 1.5rem;
  }
  .summary-price-pp {
    font-size: 1.25rem;
  }
}

/* ==========================================
   12. V4 Premium Custom Features CSS
   ========================================== */

/* Best Price Badge (Cheapest highlighted options) */
.best-price-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background-color: #E2F9E8;
  color: #1E7E34;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  align-self: flex-start;
  box-shadow: 0 2px 6px rgba(30, 126, 52, 0.08);
}

.best-price-badge i {
  width: 11px;
  height: 11px;
}

/* Flight Duration label floating above plane indicator */
.flight-duration-lbl {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  background-color: var(--bg-card);
  padding: 0 8px;
  white-space: nowrap;
  z-index: 5;
  border-radius: 4px;
}

/* Ticket Link inside flight segments */
.btn-ticket-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: var(--primary-tint);
  color: var(--primary);
  border: 1px solid rgba(26, 58, 52, 0.1);
  font-weight: 700;
  font-size: 0.72rem;
  padding: 5px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
}

.btn-ticket-link:hover {
  background-color: var(--primary);
  color: var(--text-inverse);
  transform: translateY(-1px);
}

.btn-ticket-link i {
  width: 10px;
  height: 10px;
}

/* Budget breakdown description text */
.summary-breakdown {
  font-size: 0.78rem;
  font-weight: 600;
  color: #BACFCB;
  margin-top: 4px;
}

/* Share button success state copy animation */
.btn-success-anim {
  background-color: var(--primary-hover) !important;
  color: white !important;
  transform: scale(1.03);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}


