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

:root {
    --bg: #f8f9fb;
    --surface: #ffffff;
    --border: #e2e5ea;
    --text: #1a1d23;
    --text-muted: #6b7280;
    --primary: #0C385E;
    --primary-light: #E8EDF2;
    --accent: #F26E21;
    --accent-light: #FFF3EB;
    --danger: #EF4444;
    --success: #10B981;
    --success-light: #D1FAE5;
    --warning: #F59E0B;
    --warning-light: #FEF3C7;
    --info: #3B82F6;
    --info-light: #DBEAFE;
    --chat-bg: #ffffff;
    --msg-user-bg: #0C385E;
    --msg-user-text: #ffffff;
    --msg-assistant-bg: #f3f4f6;
    --msg-assistant-text: #1a1d23;
    --card-bg: #ffffff;
    --card-border: #e5e7eb;
    --card-hover-shadow: 0 4px 16px rgba(0,0,0,.1);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-xs: 6px;
    --shadow: 0 1px 3px rgba(0,0,0,.08);
    --shadow-lg: 0 4px 12px rgba(0,0,0,.12);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    --mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
}

html, body { height: 100%; font-family: var(--font); background: var(--bg); color: var(--text); }

/* ===== App Layout ===== */
.app { display: flex; flex-direction: column; height: 100vh; overflow: hidden; }

/* ===== Top Bar ===== */
.topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 20px; height: 56px; background: var(--surface);
    border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.topbar-left { display: flex; align-items: center; gap: 10px; }
.topbar-logo { height: 32px; width: auto; }
.topbar h1 { font-size: 18px; font-weight: 700; color: var(--text); }
.topbar-right { display: flex; align-items: center; gap: 8px; }

.btn-icon {
    width: 36px; height: 36px; border: 1px solid var(--border); border-radius: var(--radius-sm);
    background: var(--surface); cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: background .15s;
}
.btn-icon:hover { background: var(--primary-light); }
.btn-icon svg { width: 18px; height: 18px; color: var(--text-muted); }

/* ===== Main Area ===== */
.main-area {
    display: flex; flex: 1; overflow: hidden;
}

/* ===== Conversation Sidebar ===== */
.sidebar {
    width: 280px; flex-shrink: 0; background: var(--surface);
    border-right: 1px solid var(--border); display: flex;
    flex-direction: column; overflow: hidden;
    transition: margin-left .25s ease, opacity .25s ease;
}
.sidebar.hidden { margin-left: -280px; opacity: 0; pointer-events: none; }
.sidebar-header {
    padding: 16px 20px; border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.sidebar-header h2 { font-size: 14px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.sidebar-list { flex: 1; overflow-y: auto; padding: 8px 0; }
.sidebar-list::-webkit-scrollbar { width: 4px; }
.sidebar-list::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 2px; }

.sidebar-date-group {
    font-size: 11px; font-weight: 600; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.5px;
    padding: 12px 20px 4px; user-select: none;
}
.sidebar-item {
    position: relative;
    padding: 10px 20px; cursor: pointer; border-left: 3px solid transparent;
    transition: background .15s, border-color .15s;
}
.sidebar-item:hover { background: var(--bg); }
.sidebar-item.active { background: var(--primary-light); border-left-color: var(--primary); }
.sidebar-item-title {
    font-size: 13px; color: var(--text); font-weight: 500;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    padding-right: 22px; /* room for the delete button */
}
.sidebar-item-time {
    font-size: 11px; color: var(--text-muted); margin-top: 2px;
}
.sidebar-item-delete {
    position: absolute; top: 8px; right: 10px;
    width: 22px; height: 22px; border: none; border-radius: 4px;
    background: transparent; cursor: pointer; font-size: 12px;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity .15s, background .15s;
}
.sidebar-item:hover .sidebar-item-delete { opacity: 0.6; }
.sidebar-item-delete:hover { opacity: 1 !important; background: var(--bg); }
.sidebar-empty {
    padding: 40px 20px; text-align: center; color: var(--text-muted); font-size: 13px;
}

/* ===== Chat Panel ===== */
.chat-panel {
    flex: 1; max-width: 860px; display: flex; flex-direction: column;
    background: var(--chat-bg); margin: 0 auto;
}
.chat-messages {
    flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 16px;
}
.chat-messages::-webkit-scrollbar { width: 6px; }
.chat-messages::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }

/* Messages */
.msg { display: flex; max-width: 90%; }
.msg.user { align-self: flex-end; }
.msg.assistant { align-self: flex-start; }

.msg-content {
    padding: 12px 16px; border-radius: var(--radius); font-size: 14px; line-height: 1.6;
    word-break: break-word;
}
.msg.user .msg-content {
    background: var(--msg-user-bg); color: var(--msg-user-text);
    border-bottom-right-radius: 4px;
}
.msg.assistant .msg-content {
    background: var(--msg-assistant-bg); color: var(--msg-assistant-text);
    border-bottom-left-radius: 4px;
}
.msg-content p { margin-bottom: 8px; }
.msg-content p:last-child { margin-bottom: 0; }
.msg-content ul { padding-left: 18px; margin-bottom: 8px; }
.msg-content strong { font-weight: 600; }

/* How long the turn took — bottom-right of an assistant bubble.
   Deliberately quiet: it is diagnostic, not part of the answer, so it
   sits at 11px and ~55% opacity and must never compete with the reply.
   `float` keeps it on the last text line when there is room and drops it
   to its own line when there isn't, without a wrapper element. */
.msg-timing {
    float: right;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 6px 0 0 12px;
    font-size: 11px;
    font-variant-numeric: tabular-nums;  /* digits don't jiggle between turns */
    opacity: 0.55;
    user-select: none;
    white-space: nowrap;
}
.msg-timing svg { flex-shrink: 0; opacity: 0.9; }
/* The float is out of flow, so the bubble won't grow to contain it. */
.msg-content::after { content: ""; display: block; clear: both; }

/* Suggestion list */
.suggestion-list { list-style: none; padding: 0; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.suggestion-list li {
    padding: 6px 12px; background: var(--primary-light); color: var(--primary);
    border-radius: 20px; font-size: 13px; cursor: pointer; font-weight: 500;
    transition: background .15s, transform .1s;
}
.suggestion-list li:hover { background: var(--accent); color: #fff; transform: translateY(-1px); }

/* Quick reply suggestions (from response) */
.suggestions-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.suggestion-pill {
    padding: 6px 14px; background: var(--surface); color: var(--primary);
    border: 1px solid var(--primary); border-radius: 20px;
    font-size: 13px; cursor: pointer; font-weight: 500;
    transition: all .15s;
}
.suggestion-pill:hover { background: var(--primary); color: #fff; }

/* Typing indicator */
.typing { display: flex; gap: 4px; padding: 8px 16px; }
.typing span {
    width: 8px; height: 8px; background: #9ca3af; border-radius: 50%;
    animation: bounce 1.4s infinite;
}
.typing span:nth-child(2) { animation-delay: .2s; }
.typing span:nth-child(3) { animation-delay: .4s; }
@keyframes bounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-8px); }
}

/* Thinking indicator (SSE streaming) */
.thinking-indicator {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 16px; color: #6b7280; font-size: 0.9rem;
}
.thinking-spinner {
    width: 16px; height: 16px; flex-shrink: 0;
    border: 2px solid #e5e7eb; border-top-color: var(--primary);
    border-radius: 50%; animation: think-spin 0.8s linear infinite;
}
.thinking-text { transition: opacity 0.2s ease; }
.thinking-text.fade-in { animation: think-fade 0.3s ease; }
@keyframes think-spin { to { transform: rotate(360deg); } }
@keyframes think-fade { from { opacity: 0.4; } to { opacity: 1; } }

/* Chat input */
.chat-input-area {
    display: flex; flex-direction: column; gap: 8px;
    padding: 12px 16px; border-top: 1px solid var(--border); background: var(--surface);
    max-width: 860px; width: 100%; margin: 0 auto;
}
.chat-input-row { display: flex; align-items: flex-end; gap: 8px; }
#chat-input {
    flex: 1; resize: none; border: 1px solid var(--border); border-radius: var(--radius-sm);
    padding: 10px 14px; font-size: 14px; font-family: var(--font); line-height: 1.5;
    max-height: 120px; outline: none; transition: border-color .15s;
}
#chat-input:focus { border-color: var(--accent); }
#btn-send, #btn-attach {
    width: 40px; height: 40px; border-radius: var(--radius-sm);
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: background .15s, transform .1s, color .15s; flex-shrink: 0;
}
#btn-send { border: none; background: var(--accent); color: #fff; }
#btn-send:hover { background: #D95E18; transform: scale(1.05); }
#btn-send:disabled { background: #F2A96E; cursor: not-allowed; transform: none; }
#btn-send svg { width: 18px; height: 18px; }
#btn-attach { border: 1px solid var(--border); background: var(--surface); color: var(--text-muted); }
#btn-attach:hover { background: var(--primary-light); color: var(--primary); }
#btn-attach.busy { color: var(--accent); border-color: var(--accent); cursor: wait; }
#btn-attach svg { width: 18px; height: 18px; }

/* Pending receipt attachments (above the input row, before send) */
.attachment-preview { display: flex; flex-wrap: wrap; gap: 8px; }
.attachment-preview:empty { display: none; }
.attachment-chip {
    display: flex; align-items: center; gap: 6px;
    padding: 5px 10px; background: var(--primary-light); color: var(--primary);
    border-radius: 20px; font-size: 12px; max-width: 220px;
}
.attachment-chip.is-uploading { opacity: .65; }
.attachment-chip.is-failed { background: #FEE2E2; color: var(--danger); }
.attachment-chip-thumb { width: 20px; height: 20px; border-radius: 4px; object-fit: cover; flex-shrink: 0; }
.attachment-chip-icon { width: 15px; height: 15px; flex-shrink: 0; }
.attachment-chip-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 120px; }
.attachment-chip-spinner {
    width: 12px; height: 12px; flex-shrink: 0; border-radius: 50%;
    border: 2px solid #d1d5db; border-top-color: var(--primary);
    animation: think-spin .8s linear infinite;
}
.attachment-chip-remove {
    border: none; background: none; cursor: pointer; color: inherit;
    font-size: 15px; line-height: 1; padding: 0 0 0 2px; flex-shrink: 0;
}
.attachment-chip-remove:hover { opacity: .7; }

/* Attachment tags rendered under a sent message in chat history */
.msg-attachments { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.msg-attachment-tag {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 9px; border-radius: 12px; font-size: 11px;
}
.msg.user .msg-attachment-tag { background: rgba(255,255,255,.18); color: #fff; }
.msg.assistant .msg-attachment-tag { background: var(--primary-light); color: var(--primary); }

/* ===== User Name ===== */
.user-name {
    font-size: 13px; font-weight: 600; color: var(--primary);
    padding: 4px 10px; background: var(--primary-light); border-radius: 16px;
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   CARDS SYSTEM
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* Cards container replaces the default assistant bubble */
.msg.assistant .cards-container {
    background: transparent;
    padding: 0;
    max-width: 100%;
}

/* Header: icon + title + subtitle */
.cards-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    background: var(--primary);
    color: #fff;
    border-radius: var(--radius) var(--radius) 0 0;
}
.cards-header-icon {
    font-size: 22px;
    flex-shrink: 0;
    line-height: 1;
    margin-top: 2px;
}
.cards-header-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.cards-header-text strong {
    font-size: 15px;
    font-weight: 700;
}
.cards-header-sub {
    font-size: 12px;
    opacity: 0.8;
    font-weight: 400;
}

/* Agent text message (between header and cards) */
.cards-agent-text {
    padding: 10px 16px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-muted);
    background: var(--msg-assistant-bg);
    border-left: 3px solid var(--accent);
}

/* Horizontal scroll for card carousel */
.cards-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 14px 16px 16px;
    background: var(--bg);
    border-radius: 0 0 var(--radius) var(--radius);
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}
.cards-scroll::-webkit-scrollbar { height: 4px; }
.cards-scroll::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 2px; }

/* Vertical list for trips */
.trip-cards-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px 16px 16px;
    background: var(--bg);
    border-radius: 0 0 var(--radius) var(--radius);
}


/* ── Individual Result Card (shared) ─────────────────────────────── */

.result-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 14px;
    transition: box-shadow .2s, transform .15s;
    position: relative;
}
.result-card:hover {
    box-shadow: var(--card-hover-shadow);
    transform: translateY(-2px);
}

/* Card price */
.card-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 10px;
}
.card-price .price-per {
    font-size: 11px;
    font-weight: 400;
    color: var(--text-muted);
}
.card-total-price {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: -6px;
    margin-bottom: 8px;
}
.hotel-dates {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.hotel-dates .hotel-nights {
    color: var(--text-muted);
    font-weight: 500;
}
.flight-date {
    font-weight: 400;
    font-size: 10px;
    color: var(--primary);
    margin-left: 4px;
}

/* Card tags */
.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 8px;
}
.card-tag {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.card-tag.tag-personalized {
    background: var(--accent-light);
    color: var(--accent);
}
.card-tag.tag-cheapest {
    background: var(--success-light);
    color: #047857;
}
.card-tag.tag-fastest {
    background: var(--info-light);
    color: #1D4ED8;
}
.card-tag.tag-recommended {
    background: var(--warning-light);
    color: #B45309;
}

/* Card reason (AI explanation) */
.card-reason {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid var(--card-border);
    line-height: 1.4;
}

/* Option number badge */
.card-option-num {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    background: var(--bg);
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}


/* ── Flight Cards ────────────────────────────────────────────────── */

.flight-card {
    min-width: 280px;
    max-width: 320px;
    flex-shrink: 0;
    scroll-snap-align: start;
}
.flight-card.personalized {
    border-color: var(--accent);
    border-width: 2px;
}

.flight-leg {
    margin-bottom: 8px;
}
.flight-leg:last-of-type {
    margin-bottom: 0;
}
.flight-leg-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}
.flight-leg-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 10px;
    background: var(--bg);
    border-radius: var(--radius-xs);
}
.flight-airline {
    font-size: 13px;
    color: var(--text);
    display: flex;
    align-items: baseline;
    gap: 6px;
}
.flight-airline strong {
    font-weight: 700;
    color: var(--primary);
}
.flight-route {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
    padding-right: 6px;
    border-right: 1px solid var(--card-border);
}
.flight-times {
    display: flex;
    align-items: center;
    gap: 8px;
}
.flight-time {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}
.flight-arrow {
    color: var(--text-muted);
    font-size: 14px;
}
.flight-stops {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}
.flight-stops.nonstop {
    color: var(--success);
    font-weight: 600;
}
.flight-numbers {
    font-size: 10px;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}


/* ── Hotel Cards ─────────────────────────────────────────────────── */

.hotel-card {
    min-width: 260px;
    max-width: 300px;
    flex-shrink: 0;
    scroll-snap-align: start;
}

.hotel-stars {
    font-size: 12px;
    margin-bottom: 4px;
    letter-spacing: 1px;
}
.hotel-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
    line-height: 1.3;
}
.hotel-meta-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}
.hotel-rating {
    font-size: 13px;
    font-weight: 600;
    color: var(--warning);
}
.hotel-distance {
    font-size: 12px;
    color: var(--text-muted);
}
.hotel-amenities {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 8px;
}
.amenity-chip {
    padding: 2px 8px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 10px;
    font-size: 10px;
    font-weight: 500;
}
.hotel-address {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 6px;
    line-height: 1.3;
}


/* ── Trip Status Cards ───────────────────────────────────────────── */

.trips-overview .trips-section-label {
    font-size: 11px;
    font-weight: 700;
    color: #6B7280;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin: 12px 0 6px;
}

.trips-overview .trip-cards-list.compact {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 8px;
}

.trips-overview .trips-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 10px 0 6px;
}

.trips-overview .trips-chip {
    border: 1px solid #E5E7EB;
    background: #fff;
    color: #374151;
    padding: 5px 12px;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}
.trips-overview .trips-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
}
.trips-overview .trips-chip.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.trips-overview .trips-expansion {
    margin-top: 4px;
}

.trips-overview .trips-scroll-strip {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 2px 8px;
    scroll-snap-type: x mandatory;
}

.trips-overview .trips-scroll-strip .trip-card {
    flex: 0 0 220px;
    scroll-snap-align: start;
}

.trips-overview .trips-bookings .booking-card .trip-id {
    font-size: 12px;
}

.trip-row-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.trip-card {
    width: 100%;
}

.trip-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.trip-status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.2px;
}
.trip-status-badge.status-green {
    background: var(--success-light);
    color: #047857;
}
.trip-status-badge.status-orange {
    background: var(--warning-light);
    color: #B45309;
}
.trip-status-badge.status-red {
    background: #FEE2E2;
    color: #DC2626;
}
.trip-status-badge.status-blue {
    background: var(--info-light);
    color: #1D4ED8;
}
.trip-status-badge.status-gray {
    background: #F3F4F6;
    color: #6B7280;
}
.trip-service-icon {
    font-size: 18px;
}
.trip-id {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
    font-family: var(--mono);
    margin-bottom: 4px;
}
.trip-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}
.trip-route {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}
.trip-route-arrow {
    color: var(--accent);
    font-weight: 400;
    margin: 0 4px;
}
.trip-dates {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
}
.trip-cost {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
    margin-top: 4px;
}


/* ── Booking Confirmation Card ───────────────────────────────────── */

.booking-card {
    padding: 20px;
    text-align: center;
}
.booking-success {
    border-color: var(--success);
    border-width: 2px;
    background: linear-gradient(to bottom, #ECFDF5, var(--card-bg));
}
.booking-error {
    border-color: var(--danger);
    border-width: 2px;
    background: linear-gradient(to bottom, #FEF2F2, var(--card-bg));
}
.booking-draft {
    border-color: var(--primary);
    border-width: 2px;
    background: linear-gradient(to bottom, #EFF6FF, var(--card-bg));
}
.booking-partial {
    border-color: var(--warning, #F59E0B);
    border-width: 2px;
    background: linear-gradient(to bottom, #FFFBEB, var(--card-bg));
}
/* Multi-city: the per-leg breakdown under the overall booking status. */
.booking-legs {
    margin-top: 12px;
    text-align: left;
}
.booking-leg-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
    padding: 4px 0;
    color: var(--text-muted);
}
.booking-leg-route {
    font-weight: 600;
    color: var(--text);
}
.booking-leg-items {
    font-size: 12px;
}
.booking-leg-error {
    font-size: 12px;
    color: var(--danger);
}
.booking-status-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 12px;
}
.booking-status-icon {
    font-size: 28px;
}
.booking-status-text {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
}
.booking-trip-id {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-family: var(--mono);
}
.booking-trip-id strong {
    color: var(--primary);
}
.booking-services {
    font-size: 13px;
    color: var(--text-muted);
    text-transform: capitalize;
}
.booking-error-detail {
    font-size: 13px;
    color: var(--danger);
    margin-top: 8px;
    padding: 8px 12px;
    background: #FEF2F2;
    border-radius: var(--radius-xs);
}
.booking-error-stage {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}


/* ── Expense Filing Cards ────────────────────────────────────────── */

.expense-card {
    min-width: 260px;
    max-width: 320px;
    flex-shrink: 0;
    scroll-snap-align: start;
}
.expense-top-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--card-border);
}
.expense-vendor {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
}
.expense-amount {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
}
.expense-detail-rows {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.expense-detail-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 13px;
}
.expense-detail-label {
    color: var(--text-muted);
}
.expense-detail-value {
    color: var(--text);
    text-align: right;
}
.expense-mono {
    font-family: var(--mono);
    font-size: 12px;
}
.expense-section-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 10px 0 6px;
}
.expense-section-label:first-of-type {
    margin-top: 0;
}
.cards-footer-hint {
    font-size: 12px;
    color: var(--text-muted);
    padding: 8px 4px 0;
}
.expense-report-rows {
    padding-bottom: 10px;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--card-border);
}


/* ── Bundle Cards (Flight + Hotel Packages) ────────────────────── */

.bundle-card {
    min-width: 310px;
    max-width: 360px;
    flex-shrink: 0;
    scroll-snap-align: start;
    padding: 0;
    overflow: hidden;
}
.bundle-card.bundle-in-policy {
    border-color: var(--success);
    border-width: 2px;
}
.bundle-card.bundle-out-of-policy {
    border-color: var(--warning);
    border-width: 2px;
}

.bundle-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 14px;
    background: var(--primary);
    color: #fff;
}
.bundle-route {
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}
.bundle-badges {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}
.bundle-nights-badge {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    background: rgba(255,255,255,.2);
    color: #fff;
    white-space: nowrap;
}
.bundle-policy-badge {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    background: var(--success);
    color: #fff;
    white-space: nowrap;
}
.bundle-policy-badge.out-of-policy {
    background: var(--warning);
}

.bundle-co2e {
    margin: 10px 14px 0;
    padding: 6px 10px;
    background: var(--success-light);
    color: #047857;
    border-radius: var(--radius-xs);
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.bundle-reason {
    padding: 6px 14px;
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.4;
    margin-top: 6px;
}

.bundle-row {
    display: flex;
    gap: 10px;
    padding: 8px 14px;
    border-top: 1px solid var(--card-border);
}
.bundle-row:first-of-type {
    margin-top: 6px;
}
.bundle-row-icon {
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 2px;
    line-height: 1;
}
.bundle-row-content {
    flex: 1;
    min-width: 0;
}
.bundle-row-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 4px;
}
.bundle-row-main {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
}
.bundle-airline {
    font-size: 12px;
    color: var(--text);
}
.bundle-airline strong {
    font-weight: 700;
    color: var(--primary);
}
.bundle-times {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}
.bundle-stops {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 500;
}
.bundle-stops.nonstop {
    color: var(--success);
    font-weight: 600;
}
.bundle-numbers {
    font-size: 10px;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
    width: 100%;
}

.bundle-hotel-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
}
.bundle-hotel-stars {
    font-size: 10px;
    letter-spacing: 1px;
}
.bundle-hotel-rating {
    font-size: 12px;
    font-weight: 600;
    color: var(--warning);
}
.bundle-hotel-amenities {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    margin-top: 4px;
}

.bundle-price-section {
    padding: 10px 14px 14px;
    border-top: 1px solid var(--card-border);
    margin-top: 2px;
}
.bundle-price-breakdown {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 8px;
}
.bundle-price-line {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
}
.bundle-total-price {
    display: flex;
    justify-content: space-between;
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
    padding-top: 8px;
    border-top: 1px dashed var(--card-border);
}


/* ===== Login Overlay ===== */
.login-overlay {
    position: fixed; inset: 0; z-index: 2000;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #0C385E 0%, #F26E21 100%);
}
.login-card {
    background: var(--surface); border-radius: 16px; padding: 40px;
    width: 420px; max-width: 90vw; box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.login-header {
    text-align: center; margin-bottom: 32px;
}
.login-logo {
    height: 48px; width: auto; margin-bottom: 12px;
}
.login-header h1 {
    font-size: 24px; font-weight: 700; color: var(--text); margin-bottom: 4px;
}
.login-subtitle {
    font-size: 14px; color: var(--text-muted);
}
.login-tabs {
    display: flex; gap: 4px; margin-bottom: 20px;
    background: var(--bg); border-radius: var(--radius-sm); padding: 4px;
}
.login-tab {
    flex: 1; border: none; background: transparent; cursor: pointer;
    padding: 8px 10px; border-radius: 6px; font-size: 13px; font-weight: 600;
    color: var(--text-muted); transition: background .15s, color .15s;
}
.login-tab.active {
    background: var(--surface); color: var(--accent);
    box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,.08));
}
.login-form {
    display: flex; flex-direction: column; gap: 12px;
}
.login-form label {
    font-size: 13px; font-weight: 600; color: var(--text-muted);
}
.login-form input {
    padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm);
    font-size: 14px; font-family: var(--mono); outline: none; transition: border-color .15s;
}
.login-form input:focus {
    border-color: var(--accent); box-shadow: 0 0 0 3px rgba(242,110,33,.1);
}
.btn-login {
    padding: 12px; border: none; border-radius: var(--radius-sm);
    background: var(--accent); color: #fff; font-size: 15px; font-weight: 600;
    cursor: pointer; transition: background .15s, transform .1s;
    display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-login:hover { background: #D95E18; transform: translateY(-1px); }
.btn-login:disabled { background: #F2A96E; cursor: not-allowed; transform: none; }
.login-spinner {
    width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.3);
    border-top-color: #fff; border-radius: 50%;
    animation: spin .6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.login-error {
    padding: 10px 14px; background: #fef2f2; color: #dc2626; border-radius: var(--radius-sm);
    font-size: 13px; border: 1px solid #fecaca;
}
.login-footer {
    margin-top: 24px; text-align: center;
}
.login-footer p {
    font-size: 12px; color: var(--text-muted); line-height: 1.5;
}

/* ===== Toast ===== */
.toast {
    position: fixed; bottom: 20px; right: 20px; padding: 10px 20px;
    background: #0C385E; color: #fff; border-radius: var(--radius-sm);
    font-size: 13px; z-index: 1000; box-shadow: var(--shadow-lg);
    animation: slideUp .3s ease;
}
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ── Card Select Button ────────────────────────────────────────── */

.card-select-row {
    padding: 10px 14px 14px;
    display: flex;
    gap: 8px;
}
.card-select-btn {
    flex: 1;
    padding: 8px 16px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, transform .1s;
}
.card-select-btn:hover {
    background: #D95E18;
    transform: translateY(-1px);
}
.card-select-btn:active {
    transform: translateY(0);
}
.view-details-btn {
    flex: 1;
    padding: 8px 16px;
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, transform .1s;
}
.view-details-btn:hover {
    background: rgba(230, 111, 24, .1);
    transform: translateY(-1px);
}
.view-details-btn:active {
    transform: translateY(0);
}


/* ── Confirmation Card ─────────────────────────────────────────── */

.confirmation-card {
    background: var(--card-bg);
    border: 2px solid var(--accent);
    border-radius: var(--radius);
    overflow: hidden;
    max-width: 420px;
}
.confirmation-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: var(--accent);
    color: #fff;
}
.confirmation-icon {
    font-size: 22px;
}
.confirmation-title {
    font-size: 16px;
    font-weight: 700;
}
.confirmation-route {
    padding: 10px 16px;
    border-bottom: 1px solid var(--card-border);
    font-size: 14px;
    color: var(--text);
}
.confirmation-row {
    display: flex;
    gap: 10px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--card-border);
    align-items: flex-start;
}
.confirmation-row-icon {
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 1px;
}
.confirmation-row-content {
    font-size: 13px;
    color: var(--text);
    line-height: 1.5;
}
.confirmation-row-content strong {
    font-weight: 700;
}
.confirmation-badges {
    display: flex;
    gap: 8px;
    padding: 10px 16px;
    flex-wrap: wrap;
}
.confirmation-badges .bundle-co2e {
    margin: 0;
}
.confirmation-badges .bundle-policy-badge {
    display: inline-flex;
    align-items: center;
}
.confirmation-total {
    display: flex;
    justify-content: space-between;
    padding: 12px 16px;
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    border-top: 2px solid var(--card-border);
    background: var(--bg);
}
.confirmation-actions {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    background: var(--bg);
}
.confirm-booking-btn {
    flex: 1;
    padding: 10px 16px;
    background: var(--success);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, transform .1s;
}
.confirm-booking-btn:hover {
    background: #059669;
    transform: translateY(-1px);
}
.save-draft-btn {
    padding: 10px 16px;
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
}
.save-draft-btn:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-1px);
}
.cancel-booking-btn {
    padding: 10px 16px;
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all .15s;
}
.cancel-booking-btn:hover {
    background: #FEF2F2;
    color: var(--danger);
    border-color: var(--danger);
}


/* ── Comparison Table ──────────────────────────────────────────── */

.comparison-table {
    padding: 14px 16px 16px;
    background: var(--bg);
    border-radius: 0 0 var(--radius) var(--radius);
    overflow-x: auto;
}
.comparison-row {
    display: flex;
    border-bottom: 1px solid var(--card-border);
}
.comparison-row:last-child {
    border-bottom: none;
}
.comparison-header-row {
    background: var(--primary);
    color: #fff;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    border-bottom: none;
}
.comparison-header-row .comparison-value {
    color: #fff;
    font-weight: 700;
}
.comparison-label {
    min-width: 120px;
    max-width: 140px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--surface);
    display: flex;
    align-items: center;
}
.comparison-value {
    flex: 1;
    padding: 8px 12px;
    font-size: 12px;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-width: 120px;
    background: var(--surface);
}
.comparison-value:nth-child(even) {
    background: var(--bg);
}
.comparison-highlight {
    color: var(--success);
    font-weight: 700;
}
.comparison-pkg-header {
    font-size: 13px;
    font-weight: 700;
}
.comparison-actions-row .comparison-value {
    padding: 10px 8px;
}
.comparison-actions-row .card-select-btn {
    width: auto;
    padding: 6px 16px;
    font-size: 12px;
}


/* ===== Date Alternative Cards ===== */

.date-alt-card {
    min-width: 260px;
    max-width: 300px;
    flex-shrink: 0;
    scroll-snap-align: start;
    padding: 0;
    overflow: hidden;
    border: 2px solid var(--success);
}

.date-alt-savings-badge {
    background: var(--success);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    padding: 8px 16px;
    text-align: center;
}

.date-alt-shift {
    font-size: 12px;
    color: var(--text-light);
    text-align: center;
    padding: 4px 0;
    background: var(--success-light, #f0fdf4);
}

.date-alt-dates {
    padding: 12px 16px;
}

.date-alt-date-row {
    display: flex;
    justify-content: space-between;
    padding: 3px 0;
    font-size: 13px;
}

.date-alt-label {
    color: var(--text-light);
    font-weight: 500;
}

.date-alt-value {
    color: var(--text);
    font-weight: 600;
}

.date-alt-price-section {
    padding: 8px 16px 12px;
    border-top: 1px solid var(--card-border);
}

.date-alt-price-line {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-light);
    padding: 2px 0;
}

.date-alt-total {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    padding: 6px 0 4px;
    border-top: 1px solid var(--card-border);
    margin-top: 4px;
}

.date-alt-you-save {
    font-size: 13px;
    color: var(--success);
    text-align: center;
    padding: 4px 0;
}

.date-alt-source {
    font-size: 10px;
    color: var(--text-lighter, #9ca3af);
    text-align: center;
    padding: 2px 16px;
}

.date-alt-select-btn {
    background: var(--success) !important;
}


/* ===== Multi-City Cards ===== */

.multi-city-container { max-width: 100%; }

.mc-intl-badge {
    display: inline-block;
    font-size: 10px; font-weight: 600; text-transform: uppercase;
    background: var(--info-light); color: var(--info);
    padding: 2px 8px; border-radius: 10px; margin-left: 8px; vertical-align: middle;
}

.mc-leg-section {
    margin-top: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    background: var(--surface);
}

.mc-leg-header {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
    margin-bottom: 10px;
}

.mc-leg-badge {
    background: var(--primary); color: #fff;
    font-size: 11px; font-weight: 700; text-transform: uppercase;
    padding: 3px 10px; border-radius: 12px;
}

.mc-leg-route { font-size: 14px; color: var(--text); }
.mc-leg-date { font-size: 12px; color: var(--text-muted); margin-left: 4px; }
.mc-leg-stay { font-size: 12px; color: var(--text-muted); }

.mc-section-label {
    font-size: 12px; font-weight: 600; color: var(--text-muted);
    margin: 10px 0 4px; text-transform: uppercase; letter-spacing: 0.5px;
}

.mc-flight-card, .mc-hotel-card {
    min-width: 220px; max-width: 260px;
}

.mc-select-btn {
    width: auto; flex-shrink: 0;
    font-size: 12px; padding: 5px 12px;
    background: var(--accent); color: #fff; border: none;
    border-radius: var(--radius-sm); cursor: pointer;
    font-weight: 600; transition: background .15s;
}
.mc-select-btn:hover { background: #d45b15; }

.mc-no-hotel {
    font-size: 12px; color: var(--text-muted); font-style: italic;
    margin-top: 8px; padding: 6px 0;
}

.mc-leg-error {
    background: #FEF2F2; color: var(--danger);
    padding: 8px 12px; border-radius: var(--radius-sm);
    font-size: 13px; margin-top: 8px;
}

.mc-summary {
    margin-top: 16px; padding: 12px;
    background: var(--primary-light); border-radius: var(--radius);
}
.mc-summary-row {
    display: flex; justify-content: space-between;
    font-size: 13px; color: var(--text-muted); padding: 2px 0;
}
.mc-summary-total {
    display: flex; justify-content: space-between;
    font-size: 15px; font-weight: 700; color: var(--primary);
    border-top: 1px solid var(--border); margin-top: 6px; padding-top: 6px;
}


/* ===== Multi-City Itinerary Bundle Cards ===== */
.mc-itin-scroll { gap: 12px; }
.mc-itinerary-card {
    min-width: 320px; max-width: 380px; padding: 14px;
    border: 1px solid var(--border); border-radius: 10px;
    background: var(--card-bg);
}
.mc-itinerary-card.mc-recommended {
    border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary);
}
.mc-recommended-badge {
    display: inline-block; padding: 2px 8px; border-radius: 4px;
    background: var(--primary); color: #fff; font-size: 11px;
    font-weight: 600; margin-bottom: 8px;
}
.mc-itin-header-row {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 10px;
}
.mc-itin-price { font-size: 18px; font-weight: 700; color: var(--primary); }
.mc-itin-leg {
    padding: 8px 0; border-top: 1px solid var(--border);
}
.mc-itin-leg-route {
    display: flex; align-items: center; gap: 8px;
    font-size: 13px; margin-bottom: 4px;
}
.mc-itin-date { color: var(--text-muted); font-size: 12px; min-width: 50px; }
.mc-itin-leg-detail {
    display: flex; align-items: center; gap: 8px;
    font-size: 12px; color: var(--text-muted);
}
.mc-itin-airline { font-weight: 500; }
.mc-itin-flightnum { color: var(--text-muted); font-size: 11px; }
.mc-itin-times { white-space: nowrap; }
.mc-itin-stops { font-size: 11px; }
.mc-itin-stops.nonstop { color: #16a34a; font-weight: 500; }

/* Hotel recommendation row */
.mc-hotel-section { margin-bottom: 8px; }
.mc-hotel-rec {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px; border-radius: 8px;
    background: var(--card-bg); border: 1px solid var(--border);
}
.mc-hotel-rec-city {
    font-weight: 600; font-size: 13px; min-width: 100px; flex-shrink: 0;
}
.mc-hotel-rec-name { flex: 1; font-size: 13px; min-width: 0; }
.mc-hotel-rec-price {
    font-weight: 600; font-size: 14px; color: var(--primary);
    white-space: nowrap; flex-shrink: 0;
}
.mc-change-btn {
    width: auto !important; flex-shrink: 0;
    font-size: 11px !important; padding: 4px 10px !important;
    background: transparent !important; color: var(--primary) !important;
    border: 1px solid var(--primary) !important;
}
.mc-change-btn:hover { background: var(--primary) !important; color: #fff !important; }

/* ===== Hotel Sidebar (web hotel change) ===== */
.hotel-sidebar-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.35);
    z-index: 900; animation: fadeIn 0.2s ease;
}
.hotel-sidebar {
    position: fixed; top: 0; right: -400px; width: 380px; height: 100%;
    background: var(--bg); box-shadow: -4px 0 24px rgba(0,0,0,0.15);
    z-index: 910; display: flex; flex-direction: column;
    transition: right 0.25s ease;
}
.hotel-sidebar.open { right: 0; }
.hotel-sidebar-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 16px 18px; border-bottom: 1px solid var(--border);
    position: sticky; top: 0; background: var(--bg); z-index: 1;
}
.hotel-sidebar-nights {
    font-size: 12px; color: var(--text-muted); margin-left: 6px;
}
.hotel-sidebar-close {
    background: none; border: none; font-size: 18px; cursor: pointer;
    color: var(--text-muted); padding: 4px 8px; border-radius: 4px;
}
.hotel-sidebar-close:hover { background: var(--border); }
.hotel-sidebar-body {
    flex: 1; overflow-y: auto; padding: 12px 18px;
    display: flex; flex-direction: column; gap: 10px;
}
.hotel-sidebar-item {
    padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px;
    background: var(--card-bg);
}
.hotel-sidebar-item.current {
    border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary);
}
.hotel-sidebar-item-name { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.hotel-sidebar-item-addr { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.hotel-sidebar-item-amen { font-size: 11px; color: var(--text-muted); margin-bottom: 8px; }
.hotel-sidebar-item-bottom {
    display: flex; justify-content: space-between; align-items: center;
}
.hotel-sidebar-item-price {
    font-size: 16px; font-weight: 700; color: var(--primary);
}
.hotel-sidebar-select {
    padding: 6px 16px; border-radius: 6px; font-size: 12px; font-weight: 600;
    cursor: pointer; border: 1px solid var(--primary);
    background: var(--primary); color: #fff;
}
.hotel-sidebar-item.current .hotel-sidebar-select {
    background: transparent; color: var(--primary); cursor: default;
}
.hotel-sidebar-select:hover { opacity: 0.9; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }


/* ===== Multi-City Detail View ===== */
.mc-detail-card {
    max-width: 520px; background: var(--card-bg); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.mc-detail-header {
    font-size: 1.05rem; font-weight: 600; padding-bottom: 12px;
    border-bottom: 1px solid var(--border); margin-bottom: 4px; color: var(--primary);
}
.mc-detail-leg { margin-top: 16px; }
.mc-detail-leg-title {
    font-weight: 600; color: var(--primary); margin-bottom: 8px; font-size: 0.95rem;
}
.mc-detail-flight {
    background: #f8fafc; border-radius: 8px; padding: 12px; margin-bottom: 10px;
}
.mc-detail-flight-airline { font-weight: 600; font-size: 0.95rem; }
.mc-detail-flight-num { font-weight: 400; color: #6b7280; font-size: 0.85rem; }
.mc-detail-flight-equipment { font-size: 0.82rem; color: #6b7280; margin-top: 2px; }
.mc-detail-flight-times {
    display: flex; justify-content: space-between; align-items: center;
    margin: 10px 0 6px; padding: 0 4px;
}
.mc-detail-flight-time { text-align: center; }
.mc-detail-flight-time { font-size: 1.15rem; font-weight: 700; color: #111827; }
.mc-detail-flight-code { font-size: 0.75rem; color: #6b7280; font-weight: 400; margin-top: 2px; }
.mc-detail-flight-line {
    flex: 1; height: 2px; background: var(--border); margin: 0 16px;
    position: relative; top: -6px;
}
.mc-detail-dot {
    position: absolute; width: 8px; height: 8px; border-radius: 50%;
    background: var(--accent); top: -3px;
}
.mc-detail-dot.left { left: -4px; }
.mc-detail-dot.right { right: -4px; }
.mc-detail-flight-meta {
    font-size: 0.82rem; color: #6b7280; margin-top: 4px;
}
.mc-detail-layover {
    font-size: 0.8rem; color: #9333ea; margin-top: 6px; padding: 4px 8px;
    background: #f3e8ff; border-radius: 6px; display: inline-block;
}
.mc-detail-hotel-title {
    font-weight: 600; font-size: 0.95rem; color: var(--primary); margin-bottom: 8px;
}
.mc-detail-rating {
    background: var(--success); color: white; font-size: 0.75rem;
    padding: 1px 6px; border-radius: 4px; font-weight: 600;
}
.mc-detail-hotel {
    background: #f8fafc; border-radius: 8px; padding: 12px; margin-bottom: 10px;
}
.mc-detail-hotel-meta { font-size: 0.85rem; color: #6b7280; }
.mc-detail-hotel-desc {
    font-size: 0.85rem; margin-top: 6px; color: #374151; line-height: 1.4;
}
.mc-detail-hotel-amenities {
    display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px;
}
.mc-detail-amenity {
    font-size: 0.75rem; background: #e5e7eb; border-radius: 12px;
    padding: 2px 10px; color: #374151;
}
.mc-detail-hotel-photos {
    display: inline-block; margin-top: 8px; font-size: 0.82rem;
    color: var(--accent); text-decoration: none; cursor: pointer;
}
.mc-detail-hotel-photos:hover { text-decoration: underline; }
.mc-detail-total {
    margin-top: 16px; border-top: 2px solid var(--border); padding-top: 12px;
}
.mc-detail-total-row {
    display: flex; justify-content: space-between; font-size: 0.9rem;
    padding: 2px 0; color: #6b7280;
}
.mc-detail-total-row.grand {
    font-weight: 700; font-size: 1.05rem; color: #111827;
    margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--border);
}
.mc-detail-actions {
    display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap;
}
.mc-detail-actions button {
    padding: 8px 16px; border-radius: 8px; font-size: 0.85rem;
    cursor: pointer; transition: opacity 0.15s;
}
.mc-detail-actions button:hover { opacity: 0.85; }
.mc-detail-confirm-btn {
    background: var(--accent); color: white; border: none; font-weight: 600;
}
.mc-detail-change-btn {
    background: white; border: 1px solid var(--border); color: var(--primary);
}
.mc-detail-cancel-btn {
    background: transparent; border: 1px solid var(--border); color: #6b7280;
}


/* ===== Responsive ===== */
@media (max-width: 768px) {
    .sidebar { position: fixed; left: 0; top: 56px; bottom: 0; z-index: 100;
        margin-left: -280px; opacity: 0; pointer-events: none;
        box-shadow: 2px 0 8px rgba(0,0,0,.1);
    }
    .main-area.sidebar-open .sidebar { margin-left: 0; opacity: 1; pointer-events: auto; }
    .sidebar-overlay { display: none; position: fixed; inset: 0; top: 56px;
        background: rgba(0,0,0,.3); z-index: 99; }
    .main-area.sidebar-open .sidebar-overlay { display: block; }
}
@media (max-width: 600px) {
    .chat-panel { max-width: 100%; }
    .topbar h1 { font-size: 15px; }
    .msg { max-width: 98%; }
    .flight-card, .hotel-card { min-width: 240px; }
    .bundle-card { min-width: 280px; max-width: 320px; }
    .cards-scroll { padding: 10px 12px 12px; }
    .comparison-label { min-width: 80px; max-width: 100px; font-size: 10px; }
    .comparison-value { min-width: 90px; font-size: 11px; }
    .confirmation-card { max-width: 100%; }
    .hotel-sidebar { width: 100%; right: -100%; }
    .mc-detail-card { max-width: 100%; }
    .mc-detail-actions { flex-direction: column; }
    .mc-detail-actions button { width: 100%; }
}

/* ===== Omnibox Autocomplete (static/autocomplete.js) ===== */
/* Namespaced .ac-* so the component can be lifted into another page as-is.
   Colours come from the app's own CSS variables — this app ships a LIGHT
   palette only (:root has no dark values), so the panel must follow the app,
   never the OS. An earlier version keyed off `prefers-color-scheme: dark`
   and rendered a charcoal dropdown inside a white app on any machine set to
   dark at the OS level. Dark styling is now opt-in via [data-theme="dark"],
   which is what the app would set if it ever gains a theme switch. */

.ac-panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(100% + 10px);      /* opens UPWARD — the input is pinned to
                                       the bottom of the chat pane */
    z-index: 60;
    max-height: 320px;              /* ~8 rows, then scrolls */
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--surface, #fff);
    border: 1px solid var(--border, #e2e5ea);
    border-radius: var(--radius, 12px);
    box-shadow: 0 10px 30px rgba(12, 56, 94, .10), 0 2px 8px rgba(12, 56, 94, .06);
    padding: 6px;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity .13s ease, transform .13s ease;
}
.ac-panel.ac-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) { .ac-panel { transition: none; } }

/* Group header — small, quiet, and visually attached to the rows below it. */
.ac-group {
    padding: 10px 10px 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--text-muted, #6b7280);
    opacity: .75;
    user-select: none;
}
.ac-panel > .ac-group:first-child { padding-top: 4px; }

.ac-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 10px;
    border-radius: var(--radius-sm, 8px);
    cursor: pointer;
    transition: background .1s ease;
}
.ac-item.ac-active { background: var(--primary-light, #E8EDF2); }

.ac-ico {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    color: var(--text-muted, #6b7280);
    opacity: .8;
}
.ac-icon { width: 15px; height: 15px; }

.ac-text { min-width: 0; flex: 1 1 auto; display: flex; flex-direction: column; }
.ac-title, .ac-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-title {
    font-size: 13.5px;
    line-height: 1.45;
    color: var(--text, #1a1d23);
    font-weight: 400;
}
/* Chrome bolds only the MATCHED span; the rest stays regular weight. */
.ac-title b { font-weight: 700; }
.ac-sub {
    font-size: 11px;
    line-height: 1.35;
    color: var(--text-muted, #6b7280);
    opacity: .85;
}
.ac-sub b { font-weight: 600; }

.ac-go {
    flex: 0 0 auto;
    color: var(--text-muted, #6b7280);
    opacity: 0;
    transition: opacity .1s ease;
}
.ac-item.ac-active .ac-go { opacity: .45; }

.ac-panel::-webkit-scrollbar { width: 8px; }
.ac-panel::-webkit-scrollbar-track { background: transparent; }
.ac-panel::-webkit-scrollbar-thumb {
    background: var(--border, #e2e5ea);
    border: 2px solid var(--surface, #fff);
    border-radius: 8px;
}

@media (max-width: 640px) {
    .ac-panel { max-height: 250px; }
    .ac-title { font-size: 15px; }   /* >=15px avoids iOS zoom-on-focus */
}

/* Opt-in dark theme — applies only when the app declares it, never from the
   OS preference alone. */
:root[data-theme="dark"] .ac-panel {
    background: #1f2226;
    border-color: #34383e;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .5), 0 2px 8px rgba(0, 0, 0, .3);
}
:root[data-theme="dark"] .ac-title { color: #e8eaed; }
:root[data-theme="dark"] .ac-sub,
:root[data-theme="dark"] .ac-group,
:root[data-theme="dark"] .ac-ico,
:root[data-theme="dark"] .ac-go { color: #9aa0a6; }
:root[data-theme="dark"] .ac-item.ac-active { background: #2c3034; }
:root[data-theme="dark"] .ac-panel::-webkit-scrollbar-thumb {
    background: #3c4043; border-color: #1f2226;
}
