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

:root {
  --sky-deep:    #0d6ebd;
  --sky-mid:     #2b9fe8;
  --sky-bright:  #55baf5;
  --sky-light:   #a8daf8;
  --sky-pale:    #dff0fc;
  --sky-mist:    #eef7fe;
  --sky-white:   #f7fbff;
  --text-dark:   #0c2d4a;
  --text-mid:    #3a6b91;
  --text-soft:   #7aacc9;
  --text-muted:  #a8c9de;
  --border:      rgba(43,159,232,0.15);
  --border-soft: rgba(43,159,232,0.08);
  --radius:      16px;
  --font-head:   'Syne', sans-serif;
  --font-body:   'Nunito', sans-serif;
  --transition:  0.2s cubic-bezier(0.4,0,0.2,1);
  --shadow-msg:  0 1px 8px rgba(13,110,189,0.08);
}

html, body { height: 100%; overflow: hidden; }

body {
  font-family: var(--font-body);
  color: var(--text-dark);
  display: flex; flex-direction: column; height: 100vh;
  background: var(--sky-mist);
}

/* Sky gradient background */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0;
  background: linear-gradient(180deg, #c9e9f9 0%, #dff0fc 28%, #eef7fe 55%, #f4f9fd 100%);
  pointer-events: none;
}

/* Drifting clouds */
body::after {
  content: '';
  position: fixed; top: 0; left: 0; right: 0; height: 220px; z-index: 0;
  background:
    radial-gradient(ellipse 260px 70px at 15% 55%, rgba(255,255,255,0.72) 0%, transparent 70%),
    radial-gradient(ellipse 180px 50px at 22% 65%, rgba(255,255,255,0.55) 0%, transparent 70%),
    radial-gradient(ellipse 320px 80px at 72% 40%, rgba(255,255,255,0.65) 0%, transparent 70%),
    radial-gradient(ellipse 200px 55px at 82% 55%, rgba(255,255,255,0.50) 0%, transparent 70%),
    radial-gradient(ellipse 140px 40px at 50% 30%, rgba(255,255,255,0.40) 0%, transparent 70%);
  pointer-events: none;
  animation: driftClouds 60s linear infinite;
}

@keyframes driftClouds {
  0%   { transform: translateX(0); }
  50%  { transform: translateX(30px); }
  100% { transform: translateX(0); }
}

/* ── TOP BAR ── */
.topbar {
  position: relative; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px; height: 58px;
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

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

.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--sky-mid), var(--sky-deep));
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; color: white;
  box-shadow: 0 2px 8px rgba(43,159,232,0.35);
}

.brand-text { display: flex; flex-direction: column; gap: 1px; }

.brand-name {
  font-family: var(--font-head);
  font-size: 16px; font-weight: 700;
  color: var(--sky-deep); letter-spacing: -0.01em; line-height: 1.1;
}

.brand-tag {
  font-size: 10px; font-weight: 400;
  color: var(--text-soft); letter-spacing: 0.1em; text-transform: uppercase;
}

.reset-btn {
  font-family: var(--font-body); font-size: 12px; font-weight: 500;
  color: var(--text-mid);
  background: rgba(43,159,232,0.07);
  border: 1px solid var(--border);
  border-radius: 100px; padding: 6px 16px; cursor: pointer;
  transition: var(--transition);
}
.reset-btn:hover { background: rgba(43,159,232,0.14); color: var(--sky-deep); }

/* ── MOBILE PROGRESS STRIP ── */
.mob-progress {
  display: none;
  position: relative; z-index: 10;
  height: 28px;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  align-items: center;
  padding: 0 16px;
  flex-shrink: 0; gap: 10px;
}
.mob-progress-fill {
  flex: 1; height: 4px;
  background: var(--sky-pale);
  border-radius: 10px; overflow: hidden; position: relative;
}
.mob-progress-fill::after {
  content: '';
  position: absolute; inset: 0;
  width: var(--mob-pct, 0%);
  background: linear-gradient(90deg, var(--sky-bright), var(--sky-deep));
  border-radius: 10px;
  transition: width 0.5s cubic-bezier(0.4,0,0.2,1);
}
.mob-progress-label {
  font-size: 11px; font-weight: 700;
  color: var(--sky-deep); white-space: nowrap; flex-shrink: 0;
  font-family: var(--font-head);
}

/* ── LAYOUT ── */
.layout {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1fr 300px;
  flex: 1; overflow: hidden;
}

/* ── CHAT COL ── */
.chat-col {
  display: flex; flex-direction: column; overflow: hidden;
  border-right: 1px solid var(--border);
}

.messages-wrap {
  flex: 1; overflow-y: auto; padding: 36px 36px 20px;
  scroll-behavior: smooth;
}
.messages-wrap::-webkit-scrollbar { width: 4px; }
.messages-wrap::-webkit-scrollbar-thumb { background: var(--sky-light); border-radius: 4px; }

/* ── WELCOME ── */
.welcome {
  max-width: 500px; margin: 10px auto 0;
  text-align: center;
  animation: riseUp 0.55s cubic-bezier(0.22,1,0.36,1) both;
}

.plane-icon {
  font-size: 48px; display: block; margin-bottom: 6px;
  animation: planeFly 3s ease-in-out infinite;
}

@keyframes planeFly {
  0%,100% { transform: translateY(0) rotate(-2deg); }
  50%      { transform: translateY(-8px) rotate(2deg); }
}

.welcome-title {
  font-family: var(--font-head);
  font-size: 38px; font-weight: 700;
  line-height: 1.1; letter-spacing: -0.02em;
  color: var(--sky-deep); margin-bottom: 12px;
}

.welcome-title em {
  font-style: italic; font-family: var(--font-body);
  font-weight: 300; color: var(--sky-mid);
}

.welcome-sub {
  font-size: 15px; line-height: 1.7; color: var(--text-mid);
  font-weight: 300; margin-bottom: 28px;
}

.horizon-line {
  width: 100%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--sky-light), transparent);
  margin: 24px 0;
}

.feature-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  margin-bottom: 30px; text-align: left;
}

.feature-item {
  background: rgba(255,255,255,0.7);
  border: 1px solid var(--border);
  border-radius: 12px; padding: 12px 14px;
  display: flex; align-items: flex-start; gap: 10px;
  backdrop-filter: blur(8px);
}

.feature-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--sky-bright);
  flex-shrink: 0; margin-top: 5px;
}

.feature-text { font-size: 13px; color: var(--text-mid); font-weight: 400; line-height: 1.4; }

.company-card {
  background: rgba(255,255,255,0.68);
  border: 1px solid var(--border);
  border-radius: 14px;
  backdrop-filter: blur(8px);
}

.company-card-welcome {
  padding: 14px 16px;
  margin-top: 4px;
  text-align: left;
}

.company-kicker {
  font-family: var(--font-head);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sky-deep);
  margin-bottom: 6px;
}

.company-name {
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 700;
  color: var(--sky-deep);
  margin-bottom: 8px;
}

.company-card p {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text-mid);
  margin-bottom: 10px;
}

.company-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
}

.company-contact a {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(43,159,232,0.08);
  border: 1px solid rgba(43,159,232,0.14);
  color: var(--sky-deep);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}

.company-contact.side {
  flex-direction: column;
  align-items: flex-start;
}

.company-contact.side a { max-width: 100%; overflow-wrap: anywhere; }

.service-card {
  margin-top: 12px;
  padding: 14px 16px;
  text-align: left;
  background: rgba(255,255,255,0.76);
  border: 1px solid rgba(43,159,232,0.18);
  border-radius: 14px;
  backdrop-filter: blur(8px);
}

.service-topline {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-bottom: 6px;
}

.service-name {
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 700;
  color: var(--sky-deep);
  margin-bottom: 6px;
}

.service-card p,
.service-note,
.policy-card p {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text-mid);
}

.service-price {
  display: inline-flex;
  align-items: center;
  margin: 10px 0 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--sky-mid), var(--sky-deep));
  color: #fff;
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 800;
}

.service-note {
  padding-top: 8px;
  border-top: 1px solid var(--border-soft);
}

.policy-card p + p { margin-top: 10px; }
.policy-card strong { color: var(--sky-deep); }

.start-btn {
  font-family: var(--font-head); font-size: 14px; font-weight: 600;
  letter-spacing: 0.04em; color: white;
  background: linear-gradient(135deg, var(--sky-mid) 0%, var(--sky-deep) 100%);
  border: none; border-radius: 100px;
  padding: 14px 40px; cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 20px rgba(43,159,232,0.35);
}
.start-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(43,159,232,0.45); }
.start-btn:active { transform: translateY(0); }

/* ── MESSAGES ── */
.messages { display: flex; flex-direction: column; gap: 18px; }

.msg {
  display: flex; gap: 10px; max-width: 82%;
  animation: riseUp 0.3s cubic-bezier(0.22,1,0.36,1) both;
}

.msg.ai   { align-self: flex-start; }
.msg.user { align-self: flex-end; flex-direction: row-reverse; }
.msg.note,
.msg.error { max-width: 100%; align-self: stretch; }

.msg-avatar {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; margin-top: 2px;
}

.msg.ai .msg-avatar {
  background: linear-gradient(135deg, var(--sky-bright), var(--sky-mid));
  color: white; font-size: 15px;
  box-shadow: 0 2px 8px rgba(43,159,232,0.25);
}

.msg.user .msg-avatar {
  background: white;
  border: 1px solid var(--border);
  color: var(--sky-mid);
  font-size: 11px; font-weight: 600;
  font-family: var(--font-head);
}

.msg-bubble {
  padding: 12px 16px; font-size: 14px;
  line-height: 1.65; font-weight: 400;
  box-shadow: var(--shadow-msg);
}

.msg.ai .msg-bubble {
  background: rgba(255,255,255,0.88);
  border: 1px solid var(--border);
  border-radius: 4px 16px 16px 16px;
  color: var(--text-dark);
  backdrop-filter: blur(10px);
}

.msg.user .msg-bubble {
  background: linear-gradient(135deg, var(--sky-mid), var(--sky-deep));
  color: white;
  border-radius: 16px 4px 16px 16px;
}

.msg.note .msg-bubble {
  width: 100%;
  background: rgba(236,253,245,0.9);
  border: 1px solid rgba(52,211,153,0.35);
  border-radius: 12px; color: #065f46;
  font-size: 13.5px; text-align: center; font-weight: 500;
  backdrop-filter: blur(6px); box-shadow: none;
}

.msg.error .msg-bubble {
  width: 100%;
  background: rgba(254,242,242,0.9);
  border: 1px solid rgba(252,165,165,0.5);
  border-radius: 12px; color: #991b1b;
  font-size: 13.5px;
  backdrop-filter: blur(6px); box-shadow: none;
}

/* ── TYPING ── */
.typing-bubble { padding: 14px 18px; display: flex; align-items: center; gap: 5px; }
.typing-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--sky-light);
  animation: skyBounce 1.3s infinite ease-in-out;
}
.typing-dot:nth-child(2) { animation-delay: 0.18s; }
.typing-dot:nth-child(3) { animation-delay: 0.36s; }

@keyframes skyBounce {
  0%,80%,100% { transform: translateY(0); opacity: 0.5; }
  40%          { transform: translateY(-5px); opacity: 1; }
}

/* ── CHIPS ── */
.chips { padding: 0 36px 10px; display: flex; flex-wrap: wrap; gap: 7px; }

/* ── SUCCESS CARD ── */
.success-card {
  margin: 0 28px 20px;
  padding: 28px 28px 24px;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border: 1px solid rgba(43,159,232,0.25);
  border-top: 3px solid var(--sky-bright);
  border-radius: var(--radius-lg);
  text-align: center;
  animation: riseUp 0.4s cubic-bezier(0.34,1.56,0.64,1);
}
.success-icon {
  font-size: 28px;
  width: 60px; height: 60px;
  background: white;
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px;
  box-shadow: 0 4px 16px rgba(43,159,232,0.2);
  border: 1px solid rgba(43,159,232,0.15);
}
.success-title {
  font-family: var(--font-head);
  font-size: 18px; font-weight: 700;
  color: var(--sky-deep);
  margin-bottom: 8px;
}
.success-body {
  font-size: 14px; color: var(--text-mid);
  line-height: 1.6; margin-bottom: 20px;
}
.success-reset {
  background: var(--sky-bright); color: white;
  border: none; border-radius: 100px;
  padding: 10px 24px; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: var(--transition);
}
.success-reset:hover { background: var(--sky-deep); box-shadow: 0 4px 14px rgba(43,159,232,0.35); }
.success-ref {
  font-size: 11.5px; color: var(--text-muted);
  margin-bottom: 16px;
}
.success-ref code {
  font-family: 'SFMono-Regular', Consolas, monospace;
  background: rgba(43,159,232,0.1);
  padding: 2px 7px; border-radius: 5px;
  color: var(--sky-deep); font-size: 11px;
}

.chip {
  font-family: var(--font-body); font-size: 13px; font-weight: 500;
  color: var(--sky-deep);
  background: rgba(255,255,255,0.75);
  border: 1px solid rgba(43,159,232,0.22);
  border-radius: 100px; padding: 7px 16px; cursor: pointer;
  transition: var(--transition);
  backdrop-filter: blur(6px);
}
.chip:hover {
  background: var(--sky-mid); color: white;
  border-color: var(--sky-mid);
  box-shadow: 0 3px 12px rgba(43,159,232,0.3);
  transform: translateY(-1px);
}

/* ── COMPOSER ── */
.composer {
  padding: 10px 36px 18px;
  border-top: 1px solid var(--border);
  background: rgba(255,255,255,0.6);
  backdrop-filter: blur(12px);
  flex-shrink: 0;
}

.composer-inner {
  display: flex; align-items: flex-end; gap: 10px;
  background: rgba(255,255,255,0.9);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 10px 10px 16px;
  transition: var(--transition);
  box-shadow: 0 2px 12px rgba(43,159,232,0.07);
}
.composer-inner:focus-within {
  border-color: var(--sky-mid);
  box-shadow: 0 0 0 3px rgba(43,159,232,0.12);
}

.composer-inner textarea {
  flex: 1; resize: none; background: transparent;
  border: none; outline: none;
  font-family: var(--font-body); font-size: 14px; font-weight: 400;
  color: var(--text-dark); line-height: 1.55;
  min-height: 22px; max-height: 110px; overflow-y: auto;
}
.composer-inner textarea::placeholder { color: var(--text-muted); }

.send-btn {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--sky-mid), var(--sky-deep));
  border: none; color: white; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
  box-shadow: 0 2px 8px rgba(43,159,232,0.3);
}
.send-btn:hover:not(:disabled) { transform: scale(1.07); box-shadow: 0 4px 14px rgba(43,159,232,0.45); }
.send-btn:disabled { opacity: 0.35; cursor: not-allowed; box-shadow: none; }

.composer-hint { font-size: 11px; color: var(--text-muted); margin-top: 6px; letter-spacing: 0.03em; }

/* ── SIDEBAR ── */
.sidebar {
  display: flex; flex-direction: column;
  overflow-y: auto; overflow-x: hidden;
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(20px);
  position: relative; z-index: 1;
}
.sidebar::-webkit-scrollbar { width: 3px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--sky-light); }

.s-card { padding: 22px 20px; border-bottom: 1px solid var(--border-soft); }

.s-label {
  font-family: var(--font-head);
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-soft); margin-bottom: 18px;
}

.prog-row {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 8px;
}
.prog-label { font-size: 13px; color: var(--text-mid); font-weight: 400; }
.prog-num { font-family: var(--font-head); font-size: 13px; font-weight: 600; color: var(--sky-deep); }

.prog-track {
  height: 5px; border-radius: 10px;
  background: var(--sky-pale);
  margin-bottom: 20px; overflow: hidden;
  border: 1px solid rgba(43,159,232,0.12);
}
.prog-fill {
  height: 100%; border-radius: 10px;
  background: linear-gradient(90deg, var(--sky-bright), var(--sky-deep));
  width: 0%; transition: width 0.5s cubic-bezier(0.4,0,0.2,1);
}

/* Section list */
.section-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }

.section-item {
  display: flex; align-items: center; gap: 9px;
  font-size: 12.5px; font-weight: 400;
  color: var(--text-muted);
  padding: 5px 8px; border-radius: 8px;
  transition: var(--transition);
}
.section-item.done { color: var(--sky-deep); }

.section-icon {
  width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0;
  background: rgba(43,159,232,0.08);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px;
  transition: var(--transition);
}
.section-item.done .section-icon { background: var(--sky-bright); }

.section-label { flex: 1; }

.section-check {
  display: none; font-size: 10px;
  color: var(--sky-deep); font-weight: 700;
}
.section-item.done .section-check { display: block; }

/* ── TRIP SNAPSHOT ── */
.snap-empty {
  font-size: 13px; color: var(--text-muted); font-weight: 300;
  line-height: 1.6; font-style: italic;
}

.snap-dest {
  font-family: var(--font-head);
  font-size: 20px; font-weight: 700;
  color: var(--sky-deep); line-height: 1.1; margin-bottom: 4px;
}

.snap-badge {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(43,159,232,0.1);
  border: 1px solid rgba(43,159,232,0.2);
  border-radius: 100px; padding: 3px 10px;
  font-size: 11px; font-weight: 500; letter-spacing: 0.05em;
  color: var(--sky-mid); margin-bottom: 14px;
}

.snap-grid { display: flex; flex-direction: column; gap: 9px; }

.snap-row { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.snap-key {
  font-size: 10.5px; letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--text-muted); font-weight: 500; flex-shrink: 0;
}
.snap-val { font-size: 12.5px; color: var(--text-dark); font-weight: 400; text-align: right; }

/* ── ANIMATIONS ── */
@keyframes riseUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── MOBILE ── */
@media (max-width: 720px) {
  body { height: 100vh; height: 100dvh; overflow: hidden; }
  .layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .mob-progress {
    display: flex;
    position: sticky; top: 0; z-index: 30;
    box-shadow: 0 1px 10px rgba(13,110,189,0.08);
  }
  .messages-wrap { padding: 24px 18px 92px; flex: 1 1 auto; min-height: 0; }
  .chips { padding: 0 18px 10px; }
  .composer { padding: 8px 18px calc(16px + env(safe-area-inset-bottom, 0px)); }
  .msg { max-width: 88%; }
  .welcome { margin: 16px auto 0; }
  .welcome-title { font-size: 28px; }
  .company-card-welcome { margin-top: 2px; }
  .company-contact a { font-size: 11.5px; }
}
