:root {
  --brand-navy: #092D58;
  --brand-navy-dark: #051C38;
  --brand-sky: #29B6E9;
  --brand-sky-dark: #1A9FD0;
  --brand-sky-light: #E6F7FC;
  --brand-red: #F5222D;
  --brand-white: #FFFFFF;
  --text-primary: #092D58;
  --text-secondary: #5A738E;
  --border: #E2E8F0;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: linear-gradient(155deg, var(--brand-navy-dark) 0%, var(--brand-navy) 100%);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 14px;
}

.page-shell {
  width: 100%;
  max-width: 460px;
}

.invite-card {
  background: var(--brand-white);
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 22px 48px rgba(5, 28, 56, 0.42);
}

.card-header {
  background: linear-gradient(135deg, var(--brand-navy-dark), var(--brand-navy));
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
  flex-shrink: 0;
}

.brand-name {
  color: var(--brand-white);
  font-weight: 800;
  font-size: 18px;
  line-height: 1.2;
}

.trip-badge {
  background: var(--brand-red);
  color: var(--brand-white);
  font-weight: 800;
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

.card-body {
  padding: 22px 20px 26px;
  text-align: center;
}

.eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.2px;
  color: var(--brand-sky-dark);
  margin-bottom: 6px;
}

.trip-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--brand-navy);
  line-height: 1.25;
}

.banner-subtitle {
  margin-top: 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
}

.route-box {
  margin-top: 16px;
  background: var(--brand-sky-light);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 12px;
}

.route-cities {
  font-size: 19px;
  font-weight: 800;
  color: var(--brand-navy);
}

.route-countries {
  margin-top: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.route-terminals {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--brand-sky-dark);
}

.schedule-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  text-align: left;
}

.schedule-item {
  background: #F8FBFD;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.schedule-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.schedule-value {
  font-size: 13px;
  font-weight: 800;
  color: var(--brand-navy);
  line-height: 1.35;
}

.return-box {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}

.return-heading {
  display: block;
  font-size: 12px;
  font-weight: 800;
  color: var(--brand-navy);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.meta-pill-row {
  margin-top: 14px;
  display: flex;
  justify-content: center;
}

.meta-pill {
  background: var(--brand-sky-light);
  color: var(--brand-navy);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 700;
}

.countdown-hero {
  position: relative;
  background: linear-gradient(150deg, var(--brand-sky) 0%, var(--brand-sky-dark) 100%);
  padding: 36px 20px 24px;
  text-align: center;
  border-top-left-radius: 28px;
  border-top-right-radius: 28px;
}

.heart-badge {
  position: absolute;
  top: -22px;
  left: 50%;
  transform: translateX(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--brand-white);
  color: var(--brand-red);
  font-size: 22px;
  line-height: 44px;
  text-align: center;
  box-shadow: 0 6px 14px rgba(5, 28, 56, 0.2);
}

.countdown-heading {
  color: var(--brand-white);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.4px;
  margin-bottom: 12px;
}

.countdown-tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.tile {
  background: var(--brand-navy);
  border-radius: 16px;
  padding: 14px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.tile-number {
  color: var(--brand-white);
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.tile-unit {
  color: var(--brand-sky);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.7px;
}

.departed-pill {
  display: inline-block;
  background: var(--brand-navy);
  color: var(--brand-white);
  font-weight: 800;
  font-size: 17px;
  padding: 14px 26px;
  border-radius: 999px;
}

.progress-wrap {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.progress-track {
  width: 100%;
  height: 10px;
  background: rgba(9, 45, 88, 0.25);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--brand-white);
  border-radius: 999px;
  transition: width 0.5s ease;
}

.progress-caption {
  color: var(--brand-white);
  font-size: 12px;
  font-weight: 700;
}

.stage-note {
  margin-top: 12px;
  color: var(--brand-white);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
  background: rgba(5, 28, 56, 0.22);
  border-radius: 12px;
  padding: 9px 12px;
}

.action-stack {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-primary {
  width: 100%;
  border: none;
  border-radius: 999px;
  background: var(--brand-navy);
  color: var(--brand-white);
  font-family: inherit;
  font-weight: 800;
  font-size: 15px;
  padding: 14px 20px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(5, 28, 56, 0.28);
  transition: transform 0.12s ease, opacity 0.12s ease;
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-secondary {
  width: 100%;
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: var(--brand-white);
  font-family: inherit;
  font-weight: 800;
  font-size: 14px;
  padding: 11px 18px;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.12s ease;
}

.btn-secondary:active {
  transform: scale(0.98);
  background: rgba(255, 255, 255, 0.26);
}

.copy-feedback {
  color: var(--brand-white);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
  background: rgba(9, 45, 88, 0.35);
  border-radius: 12px;
  padding: 8px 12px;
}

.app-hint {
  color: var(--brand-white);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
  background: rgba(5, 28, 56, 0.25);
  border-radius: 12px;
  padding: 8px 12px;
}

.store-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
}

.btn-store {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  background: var(--brand-white);
  color: var(--brand-navy);
  font-weight: 800;
  font-size: 13px;
  padding: 10px 16px;
  border-radius: 999px;
  flex: 1 1 170px;
}

.btn-store-secondary {
  background: rgba(255, 255, 255, 0.9);
}

.store-soon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.22);
  color: var(--brand-white);
  border: 1px solid rgba(255, 255, 255, 0.45);
  font-weight: 700;
  font-size: 12px;
  padding: 8px 14px;
  border-radius: 999px;
}

.privacy-footer {
  margin-top: 16px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.45;
}

.error-state {
  padding: 36px 24px;
  text-align: center;
}

.error-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: rgba(245, 34, 45, 0.12);
  color: var(--brand-red);
  font-size: 28px;
  font-weight: 800;
  line-height: 56px;
}

.error-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--brand-navy);
  margin-bottom: 8px;
}

.error-desc {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-secondary);
}

.saved-invite-recovery {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px dashed var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.saved-invite-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-navy);
}

@media (max-width: 380px) {
  .schedule-grid {
    grid-template-columns: 1fr;
  }
  .tile-number {
    font-size: 23px;
  }
}
