/* ============================================================
   Travelomatix AI — Design System (Light + Dark)
   ============================================================ */

/* ---------- Light theme (default) ---------- */
:root,
[data-theme="light"] {
    --color-bg-primary: #f8fafc;
    --color-bg-secondary: #ffffff;
    --color-bg-elevated: #ffffff;
    --color-bg-sidebar: #ffffff;
    --color-bg-navbar: rgba(255, 255, 255, 0.82);
    --color-bg-input: #ffffff;
    --color-bg-pattern: rgba(15, 23, 42, 0.04);

    --color-text-primary: #0f172a;
    --color-text-secondary: #475569;
    --color-text-muted: #94a3b8;
    --color-text-inverse: #ffffff;

    --color-accent: #00458b;
    --color-accent-hover: #003366;
    --color-accent-soft: rgba(0, 69, 139, 0.1);
    --color-accent-glow: rgba(0, 69, 139, 0.18);
    --color-brand-navy: #00458b;
    --color-brand-sky: #00c0ff;
    --color-brand-sky-dark: #0099cc;
    --color-brand-sky-soft: #21359b1a;
    --color-brand-sky-glow: rgba(0, 192, 255, 0.32);
    --color-gradient-start: #00458b;
    --color-gradient-mid: #0099cc;
    --color-gradient-end: #00c0ff;
    --color-brand-gradient: linear-gradient(135deg, #00458b 0%, #212e96e0 55%, #2932a005 100%);
    --color-brand-gradient-h: linear-gradient(90deg, #00458b 0%, #0099cc 50%, #00c0ff 100%);

    --color-border: #e2e8f0;
    --color-border-strong: #cbd5e1;

    --color-success: #059669;
    --color-success-soft: rgba(5, 150, 105, 0.12);
    --color-success-text: #047857;

    --color-overlay: rgba(15, 23, 42, 0.4);

    --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-sm: 0 4px 12px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 8px 30px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 20px 60px rgba(15, 23, 42, 0.1);
    --shadow-input: 0 4px 24px rgba(0, 69, 139, 0.07), 0 2px 16px rgba(0, 192, 255, 0.14);

    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-pill: 999px;

    --font-display: 'Fraunces', Georgia, serif;
    --font-script: 'Caveat', cursive;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;

    --logo-filter: none;
}

/* ---------- Dark theme ---------- */
[data-theme="dark"] {
    --color-bg-primary: #0b0f17;
    --color-bg-secondary: #111827;
    --color-bg-elevated: #161d2e;
    --color-bg-sidebar: #0e1420;
    --color-bg-navbar: rgba(11, 15, 23, 0.88);
    --color-bg-input: #161d2e;
    --color-bg-pattern: rgba(255, 255, 255, 0.03);

    --color-text-primary: #f1f5f9;
    --color-text-secondary: #94a3b8;
    --color-text-muted: #64748b;
    --color-text-inverse: #ffffff;

    --color-accent: #00c0ff;
    --color-accent-hover: #66d9ff;
    --color-accent-soft: rgba(0, 192, 255, 0.14);
    --color-accent-glow: rgba(0, 192, 255, 0.3);
    --color-brand-navy: #4da6d9;
    --color-brand-sky: #00c0ff;
    --color-brand-sky-dark: #00c0ff;
    --color-brand-sky-soft: rgba(0, 192, 255, 0.16);
    --color-brand-sky-glow: rgba(0, 192, 255, 0.35);
    --color-gradient-start: #00458b;
    --color-gradient-mid: #0099cc;
    --color-gradient-end: #00c0ff;
    --color-brand-gradient: linear-gradient(135deg, #00458b 0%, #0099cc 55%, #00c0ff 100%);
    --color-brand-gradient-h: linear-gradient(90deg, #4da6d9 0%, #00c0ff 100%);

    --color-border: #1e293b;
    --color-border-strong: #334155;

    --color-success: #34d399;
    --color-success-soft: rgba(52, 211, 153, 0.14);
    --color-success-text: #6ee7b7;

    --color-overlay: rgba(0, 0, 0, 0.65);

    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.25);
    --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.45);
    --shadow-input: 0 4px 32px rgba(0, 69, 139, 0.12), 0 2px 20px rgba(0, 192, 255, 0.18);

    --logo-filter: brightness(1.1);
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    height: 100%;
    scroll-behavior: smooth;
}

body {
    min-height: 100%;
    font-family: var(--font-body);
    background: var(--color-bg-primary);
    color: var(--color-text-primary);
    -webkit-font-smoothing: antialiased;
    transition: background 0.35s ease, color 0.35s ease;
}

/* ---------- Plugin background (Vanta + tsParticles) ---------- */
.bg-scene {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bg-scene canvas {
    pointer-events: none !important;
}

.bg-plus-pattern {
    position: absolute;
    inset: 0;
    z-index: 0;
    opacity: 0.28;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='%23a8bdd0' stroke-width='1.1' opacity='0.48'%3E%3Cpath d='M12 8v8M8 12h8'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 24px 24px;
}

.bg-accent-shape {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.65;
}

[data-theme="dark"] .bg-plus-pattern {
    opacity: 0.14;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='%23475569' stroke-width='1' opacity='0.3'%3E%3Cpath d='M12 8v8M8 12h8'/%3E%3C/g%3E%3C/svg%3E");
}

[data-theme="dark"] .bg-accent-shape {
    opacity: 0.32;
}

.bg-particles {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.bg-scene::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    background: radial-gradient(ellipse 68% 58% at 50% 42%, rgba(248, 250, 252, 0.93) 0%, rgba(248, 250, 252, 0.48) 54%, transparent 79%);
    pointer-events: none;
}

[data-theme="dark"] .bg-scene::after {
    background: radial-gradient(ellipse 68% 58% at 50% 42%, rgba(11, 15, 23, 0.94) 0%, rgba(11, 15, 23, 0.55) 55%, transparent 78%);
}

@media (prefers-reduced-motion: reduce) {
    .bg-scene::after {
        background: var(--color-bg-primary);
        opacity: 0.95;
    }
}

/* ---------- Navbar ---------- */
.navbar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 28px;
    background: var(--color-bg-navbar);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 60;
    transition: background 0.35s ease, border-color 0.35s ease;
}

.brand {
    display: flex;
    align-items: center;
    text-decoration: none;
}
.brand .logo {
    /* height: 32px; */
    width: 100%;
    /* object-fit: contain; */
    /* filter: var(--logo-filter); */
    transition: filter 0.35s ease;
    max-width: 160px;
}

.navbar-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--color-border);
    background: var(--color-bg-elevated);
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s;
}
.theme-toggle:hover {
    border-color: var(--color-brand-sky);
    color: var(--color-brand-sky-dark);
    transform: scale(1.05);
}
.theme-toggle svg {
    width: 18px;
    height: 18px;
}
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* ---------- App shell ---------- */
.app {
    display: flex;
    min-height: calc(100vh - 61px);
    position: relative;
    z-index: 1;
}

.sidebar {
    width: 280px;
    flex-shrink: 0;
    border-right: 1px solid var(--color-border);
    background: linear-gradient(180deg, var(--color-bg-sidebar) 0%, rgba(248, 250, 252, 0.6) 100%);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: background 0.35s ease, border-color 0.35s ease;
}
[data-theme="dark"] .sidebar {
    background: linear-gradient(180deg, var(--color-bg-sidebar) 0%, rgba(14, 20, 32, 0.95) 100%);
}

.sidebar-top {
    flex-shrink: 0;
    padding: 20px 16px 18px;
    border-bottom: 1px solid var(--color-border);
}

.sidebar-brand {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 16px;
}

.sidebar-brand-name {
    font-family: var(--font-script);
    font-size: 1.85rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.02em;
    background: #114c8d;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: #114c8d;
}

.sidebar-brand-tag {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-brand-navy);
    background: var(--color-brand-sky-soft);
    border: 1px solid rgba(0, 192, 255, 0.35);
    padding: 3px 7px;
    border-radius: var(--radius-pill);
    line-height: 1;
}

.new-chat {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    background: linear-gradient(135deg, #4754a8 0%, #f53d3e 100%);
    border: none;
    color: var(--color-text-inverse);
    padding: 13px 16px;
    border-radius: var(--radius-pill);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: 0.2s;
    font-family: inherit;
    box-shadow: 0 4px 14px rgba(0, 69, 139, 0.2), 0 2px 8px rgba(0, 192, 255, 0.25);
}
.new-chat svg { flex-shrink: 0; }
.new-chat:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 69, 139, 0.22), 0 4px 14px rgba(0, 192, 255, 0.35);
}

.recent {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 16px 12px 20px;
    overflow: hidden;
}

.recent-title {
    flex-shrink: 0;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #0f172a;
    margin: 0 0 12px;
    padding: 0 4px;
    font-weight: 700;
}
[data-theme="dark"] .recent-title {
    color: var(--color-text-primary);
}

.recent-list {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.recent-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    color: var(--color-text-secondary);
    text-align: left;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    font-size: 0.84rem;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, color 0.15s, box-shadow 0.15s;
    font-family: inherit;
}
.recent-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background-repeat: no-repeat;
    background-position: center;
    background-size: 15px;
}
.recent-icon-flight {
    background-color: var(--color-brand-sky-soft);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230099cc' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17.8 19.2 16 11l3.5-3.5C21 6 21.5 4 21 3c-1-.5-3 0-4.5 1.5L13 8 4.8 6.2c-.5-.1-.9.1-1.1.5l-.3.5c-.2.5-.1 1 .3 1.3L9 12l-2 3H4l-1 1 3 2 2 3 1-1v-3l3-2 3.5 5.3c.3.4.8.5 1.3.3l.5-.2c.4-.3.6-.7.5-1.2z'/%3E%3C/svg%3E");
}
.recent-icon-hotel {
    background-color: rgba(245, 158, 11, 0.12);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d97706' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2z'/%3E%3Cpath d='M9 22v-4h6v4'/%3E%3C/svg%3E");
}
[data-theme="dark"] .recent-icon-flight {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300c0ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17.8 19.2 16 11l3.5-3.5C21 6 21.5 4 21 3c-1-.5-3 0-4.5 1.5L13 8 4.8 6.2c-.5-.1-.9.1-1.1.5l-.3.5c-.2.5-.1 1 .3 1.3L9 12l-2 3H4l-1 1 3 2 2 3 1-1v-3l3-2 3.5 5.3c.3.4.8.5 1.3.3l.5-.2c.4-.3.6-.7.5-1.2z'/%3E%3C/svg%3E");
}
[data-theme="dark"] .recent-icon-hotel {
    background-color: rgba(251, 191, 36, 0.12);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fbbf24' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2z'/%3E%3Cpath d='M9 22v-4h6v4'/%3E%3C/svg%3E");
}
.recent-text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.35;
}
.recent-item:hover {
    background: var(--color-brand-sky-soft);
    border-color: rgba(0, 192, 255, 0.35);
    color: var(--color-text-primary);
    box-shadow: var(--shadow-xs);
}
.recent-item:active {
    transform: scale(0.99);
}

.recent-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--color-text-muted);
    font-size: 0.84rem;
    padding: 32px 18px;
    text-align: center;
    border: 1px dashed rgba(148, 163, 184, 0.45);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 250, 252, 0.5) 100%);
}
[data-theme="dark"] .recent-empty {
    background: linear-gradient(180deg, rgba(22, 29, 46, 0.9) 0%, rgba(14, 20, 32, 0.5) 100%);
    border-color: rgba(100, 116, 139, 0.35);
}
.recent-empty-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
   background-color: rgb(232 234 245);
    border: 1px solid rgb(54 104 159 / 37%);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230099cc' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 20px;
    margin-bottom: 6px;
    box-shadow: 0 4px 12px rgba(0, 69, 139, 0.08);
}
.recent-empty p {
    margin: 0;
    font-weight: 700;
    font-size: 0.9rem;
    color: #0f172a;
}
[data-theme="dark"] .recent-empty p {
    color: var(--color-text-primary);
}
.recent-empty span {
    font-size: 0.78rem;
    line-height: 1.5;
    max-width: 200px;
    color: var(--color-text-muted);
}

.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: var(--color-overlay);
    opacity: 0;
    pointer-events: none;
    transition: 0.25s;
    z-index: 49;
}
.sidebar-overlay.show { opacity: 1; pointer-events: auto; }

/* ---------- Content / chat ---------- */
.content {
    flex: 1;
    display: flex;
    justify-content: center;
    padding: 32px 24px 80px;
    overflow-x: hidden;
}
.chat {
    width: 100%;
    max-width: 760px;
}

/* ---------- Hero — Trai AI branding ---------- */
.hero {
    text-align: center;
    margin: clamp(16px, 4vh, 48px) 0 clamp(20px, 3vh, 32px);
}

.hero-brand {
    display: flex;
    align-items: baseline;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px 10px;
    margin-bottom: 10px;
}

.hero-ai-name {
    font-family: var(--font-script);
    font-size: clamp(2.4rem, 6vw, 3.4rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.02em;
    background:#114c8d;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color:#114c8d;
}

.hero-beta {
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--color-brand-navy);
    background: var(--color-brand-sky-soft);
    border: 1px solid rgba(0, 192, 255, 0.35);
    border-radius: var(--radius-pill);
    padding: 2px 8px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    top: -0.8em;
    margin-left: -4px;
}

.hero-by {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--color-text-muted);
    letter-spacing: 0.02em;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3.5vw, 2.15rem);
    font-weight: 600;
    letter-spacing: -0.025em;
    line-height: 1.22;
    margin-bottom: 14px;
    background: linear-gradient(135deg, #4754a8 0%, #f53d3e 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: clamp(0.88rem, 1.8vw, 0.98rem);
    color: var(--color-text-secondary);
    font-weight: 400;
    line-height: 1.55;
    max-width: 520px;
    margin: 0 auto;
}

.hero-subtitle-inner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(0, 192, 255, 0.2);
    box-shadow: 0 2px 10px rgba(0, 69, 139, 0.06);
    color: #334155;
    font-weight: 500;
    backdrop-filter: blur(8px);
}
.hero-subtitle-inner::before {
    content: "";
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230099cc' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m12 3-1.9 5.8H4l4.9 3.6-1.9 5.8L12 14.6l4.9 3.6-1.9-5.8L20 8.8h-6.1z'/%3E%3C/svg%3E") center / contain no-repeat;
}

[data-theme="dark"] .hero-subtitle-inner {
    background: rgba(22, 29, 46, 0.88);
    border-color: rgba(0, 192, 255, 0.25);
    color: var(--color-text-secondary);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

/* ---------- Composer (gradient pill) ---------- */
.ai-search-wrap {
    position: relative;
    margin-top: 0;
    margin-bottom: 4px;
}

.ai-search-glow {
    position: absolute;
    inset: -1px;
    border-radius: var(--radius-pill);
    background: var(--color-brand-gradient);
    opacity: 0.45;
    z-index: 0;
    transition: opacity 0.25s;
}

.ai-search-wrap:focus-within .ai-search-glow {
    opacity: 0.85;
}

.ai-search {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: var(--radius-pill);
    padding: 6px 6px 6px 20px;
    box-shadow:
        0 4px 20px rgba(0, 69, 139, 0.07),
        0 1px 3px rgba(15, 23, 42, 0.04);
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    backdrop-filter: blur(12px);
}
[data-theme="dark"] .ai-search {
    background: rgba(22, 29, 46, 0.92);
    border-color: var(--color-border);
}

.ai-search:focus-within {
    border-color: rgba(0, 192, 255, 0.35);
    box-shadow:
        0 8px 28px rgba(0, 69, 139, 0.1),
        0 0 0 4px rgba(0, 192, 255, 0.12);
}

.ai-input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--color-text-primary);
    font-size: 0.98rem;
    font-family: inherit;
    resize: none;
    line-height: 1.5;
    max-height: 120px;
    padding: 12px 0;
    min-height: 24px;
}
.ai-input::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.ai-search-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.mic-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(248, 250, 252, 0.9);
    color: #64748b;
    cursor: pointer;
    border-radius: 50%;
    transition: color 0.2s, background 0.2s, transform 0.2s;
}
[data-theme="dark"] .mic-btn {
    background: rgba(30, 41, 59, 0.6);
    color: var(--color-text-muted);
}
.mic-btn:hover {
    color: var(--color-brand-sky-dark);
    background: var(--color-brand-sky-soft);
    transform: scale(1.04);
}
.mic-btn.listening {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.12);
    animation: pulse-mic 1.2s ease infinite;
}
@keyframes pulse-mic {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}
.mic-btn svg { width: 20px; height: 20px; }

.ai-send {
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: none;
    background: #e13f4a;
    color: var(--color-text-inverse);
    cursor: pointer;
    transition: transform 0.18s, box-shadow 0.18s;
    display: grid;
    place-items: center;
    box-shadow: 0 4px 14px rgba(0, 69, 139, 0.2), 0 2px 8px rgba(0, 192, 255, 0.3);
}
.ai-send svg { width: 20px; height: 20px; }
.ai-send:hover {
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 6px 20px rgba(0, 69, 139, 0.22), 0 4px 14px rgba(0, 192, 255, 0.4);
}
.ai-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ---------- Mode toggle ---------- */
.mode-toggle {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 24px;
    flex-wrap: wrap;
}
.mode-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    color: var(--color-text-secondary);
    padding: 10px 20px;
    border-radius: var(--radius-pill);
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s;
    font-family: inherit;
    box-shadow: var(--shadow-xs);
}
.mode-btn:hover {
    color: var(--color-text-primary);
    border-color: var(--color-border-strong);
}
.mode-btn.active {
    background: var(--color-brand-sky-soft);
    border-color: var(--color-brand-sky);
    color: var(--color-brand-navy);
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(0, 192, 255, 0.2);
}
.mode-btn svg { width: 16px; height: 16px; flex-shrink: 0; }

/* ---------- Suggestions ---------- */
.suggestions {
    margin-top: 32px;
    width: 100%;
}
.suggestions-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #0f172a;
    margin-bottom: 12px;
    font-weight: 700;
    text-align: left;
}
[data-theme="dark"] .suggestions-title {
    color: var(--color-text-primary);
}
.suggestions-title--spaced { margin-top: 28px; }
.suggestion-list {
    display: grid;
    gap: 10px;
}
.suggestion-list--top {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}
.suggestion-list--popular {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.suggestion {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    text-align: left;
    width: 100%;
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    color: var(--color-text-primary);
    padding: 14px 16px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    line-height: 1.45;
    cursor: pointer;
    transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease, background 0.22s ease;
    font-family: inherit;
    box-shadow: var(--shadow-xs);
}
.suggestion--top {
    position: relative;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 18px 8px 16px;
    min-height: 112px;
    justify-content: center;
    gap: 12px;
    border-radius: 16px;
    border-color: rgba(226, 232, 240, 0.95);
    background: #ffffff;
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.04),
        0 4px 14px rgba(15, 23, 42, 0.04);
    overflow: hidden;
}
[data-theme="dark"] .suggestion--top {
    background: var(--color-bg-elevated);
    border-color: var(--color-border);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}
.suggestion--top::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #233398;
    opacity: 0;
    transition: opacity 0.22s ease;
}
.suggestion--top::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, rgba(0, 192, 255, 0.08), transparent 62%);
    opacity: 0;
    transition: opacity 0.22s ease;
    pointer-events: none;
}
.suggestion--top:hover::before,
.suggestion--top:focus-visible::before {
    opacity: 1;
}
.suggestion--top:hover::after,
.suggestion--top:focus-visible::after {
    opacity: 1;
}
.suggestion--top:has(.suggestion-icon--flight-cancel):hover {
    border-color: rgba(0, 69, 139, 0.28);
}
.suggestion--top:has(.suggestion-icon--hotel-cancel):hover {
    border-color: rgba(5, 150, 105, 0.32);
}
.suggestion--top:has(.suggestion-icon--ticket):hover {
    border-color: rgba(0, 192, 255, 0.38);
}
.suggestion--top:has(.suggestion-icon--invoice):hover {
    border-color: rgba(99, 102, 241, 0.32);
}
.suggestion--popular {
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 14px;
    border-color: rgba(226, 232, 240, 0.95);
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03), 0 3px 10px rgba(15, 23, 42, 0.03);
}
[data-theme="dark"] .suggestion--popular {
    background: var(--color-bg-elevated);
    border-color: var(--color-border);
}
.suggestion--popular::after {
    content: "";
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    margin-left: auto;
    margin-top: 2px;
    opacity: 0;
    transform: translateX(-6px);
    transition: opacity 0.22s ease, transform 0.22s ease;
    background: currentColor;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 18 15 12 9 6'/%3E%3C/svg%3E") center / contain no-repeat;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 18 15 12 9 6'/%3E%3C/svg%3E") center / contain no-repeat;
    color: var(--color-brand-sky-dark);
}
.suggestion--popular:hover::after,
.suggestion--popular:focus-visible::after {
    opacity: 1;
    transform: translateX(0);
}
.suggestion-label {
    display: block;
    flex: 1;
    min-width: 0;
    text-align: left;
}
.suggestion--top .suggestion-label {
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: -0.01em;
    color: #0f172a;
    padding: 0 4px;
    width: 100%;
    text-align: center;
}
[data-theme="dark"] .suggestion--top .suggestion-label {
    color: var(--color-text-primary);
}
.suggestion--popular .suggestion-label {
    font-size: 0.9rem;
    line-height: 1.5;
    font-weight: 500;
    color: #0f172a;
}
[data-theme="dark"] .suggestion--popular .suggestion-label {
    color: var(--color-text-primary);
}
.suggestion-icon {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: var(--color-brand-sky-soft);
    color: var(--color-brand-sky-dark);
    display: grid;
    place-items: center;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.55),
        0 2px 6px rgba(15, 23, 42, 0.06);
}
.suggestion--top .suggestion-icon {
    width: 44px;
    height: 44px;
    border-radius: 13px;
}
.suggestion-icon--flight-cancel,
.suggestion-icon--flight {
    background: linear-gradient(160deg, rgba(0, 69, 139, 0.16) 0%, rgba(0, 69, 139, 0.06) 100%);
    color: var(--color-brand-navy);
}
.suggestion-icon--hotel-cancel,
.suggestion-icon--hotel {
    background: linear-gradient(160deg, rgba(5, 150, 105, 0.18) 0%, rgba(5, 150, 105, 0.06) 100%);
    color: var(--color-success);
}
.suggestion-icon--ticket {
    background: linear-gradient(160deg, rgba(0, 192, 255, 0.2) 0%, rgba(0, 192, 255, 0.06) 100%);
    color: var(--color-brand-sky-dark);
}
.suggestion-icon--invoice {
    background: linear-gradient(160deg, rgba(99, 102, 241, 0.18) 0%, rgba(99, 102, 241, 0.06) 100%);
    color: #4f46e5;
}
.suggestion-icon--spark {
    background: linear-gradient(160deg, rgba(245, 158, 11, 0.2) 0%, rgba(245, 158, 11, 0.06) 100%);
    color: #d97706;
}
.suggestion-icon svg { width: 17px; height: 17px; }
.suggestion--top .suggestion-icon svg { width: 20px; height: 20px; }
.suggestion:hover {
    border-color: rgb(93 104 178 / 54%);
    box-shadow: 0 8px 22px rgba(0, 69, 139, 0.09), 0 2px 8px rgb(33 45 148 / 39%);
    transform: translateY(-2px);
}
.suggestion--top:hover,
.suggestion--top:focus-visible {
    background: #ffffff;
    transform: translateY(-3px);
  /*  box-shadow:
        0 10px 28px rgba(0, 69, 139, 0.1),
        0 4px 12px rgba(0, 192, 255, 0.12);*/
}
[data-theme="dark"] .suggestion--top:hover,
[data-theme="dark"] .suggestion--top:focus-visible {
    background: var(--color-bg-elevated);
}
.suggestion--top:hover .suggestion-icon,
.suggestion--top:focus-visible .suggestion-icon {
    transform: scale(1.08) translateY(-1px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.55),
        0 6px 14px rgba(0, 69, 139, 0.12);
}
.suggestion--popular:hover,
.suggestion--popular:focus-visible {
    background: #ffffff;
    border-color: rgba(0, 192, 255, 0.32);
}
[data-theme="dark"] .suggestion--popular:hover,
[data-theme="dark"] .suggestion--popular:focus-visible {
    background: var(--color-bg-elevated);
}
.suggestion:focus-visible {
    outline: none;
   /* box-shadow: 0 0 0 3px rgba(0, 192, 255, 0.22), 0 8px 22px rgba(0, 69, 139, 0.09);*/
}

/* ---------- Service flows (cancel, download, booking lookup) ---------- */
.flow-card {
    max-width: 520px;
    padding: 20px 22px;
    border-radius: 16px;
    border: 1px solid rgba(226, 232, 240, 0.95);
    background: rgba(255, 255, 255, 0.96);
    box-shadow:
        0 4px 24px rgba(15, 23, 42, 0.08),
        0 1px 3px rgba(15, 23, 42, 0.04);
    backdrop-filter: blur(14px);
}
[data-theme="dark"] .flow-card {
    background: rgba(22, 29, 46, 0.94);
    border-color: var(--color-border);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
}
.flow-message .flow-text,
.flow-prompt .flow-text {
    margin: 0 0 18px;
    color: #0f172a;
    font-size: 0.95rem;
    line-height: 1.65;
    font-weight: 400;
}
.flow-prompt .flow-text:last-child {
    margin-bottom: 0;
}
.flow-prompt .flow-text strong {
    color: #0f172a;
    font-weight: 600;
}
[data-theme="dark"] .flow-message .flow-text,
[data-theme="dark"] .flow-prompt .flow-text,
[data-theme="dark"] .flow-prompt .flow-text strong {
    color: var(--color-text-primary);
}
.flow-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 4px;
}
.flow-actions--stack {
    flex-direction: column;
}
.flow-choice-btn {
    flex: 1;
    min-width: 140px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 18px;
    border-radius: 12px;
    border: 1px solid var(--color-border);
    background: #ffffff;
    color: #0f172a;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.3;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s, transform 0.2s, opacity 0.2s;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    text-decoration: none;
}
[data-theme="dark"] .flow-choice-btn {
    background: var(--color-bg-elevated);
    color: var(--color-text-primary);
}
.flow-choice-btn:hover:not(:disabled) {
    border-color: rgba(0, 192, 255, 0.45);
    background: rgba(0, 192, 255, 0.06);
    box-shadow: 0 4px 14px rgba(0, 69, 139, 0.08);
    transform: translateY(-1px);
}
.flow-choice-btn--primary {
    border: none;
    background: var(--color-brand-gradient);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(0, 69, 139, 0.22);
}
.flow-choice-btn--primary:hover:not(:disabled) {
    background: var(--color-brand-gradient);
    filter: brightness(1.05);
    border-color: transparent;
    box-shadow: 0 6px 18px rgba(0, 69, 139, 0.28);
}
.flow-choice-btn:disabled {
    opacity: 0.55;
    cursor: default;
    transform: none;
}
.flow-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 4px;
}
.flow-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.flow-form label {
    font-size: 0.72rem;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
[data-theme="dark"] .flow-form label {
    color: var(--color-text-muted);
}
.flow-form input {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: #ffffff;
    color: #0f172a;
    font-family: inherit;
    font-size: 0.94rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}
[data-theme="dark"] .flow-form input {
    background: var(--color-bg-input);
    color: var(--color-text-primary);
}
.flow-form input::placeholder {
    color: #94a3b8;
}
.flow-form input:focus {
    outline: none;
    border-color: rgb(182 189 222);
    box-shadow: 0 0 0 4px rgb(39 55 164 / 14%);

}
.flow-submit-btn {
    width: 100%;
    margin-top: 4px;
    padding: 14px 18px;
    border: none;
    border-radius: 12px;
    background: #e13f4a;
    color: #ffffff;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: filter 0.2s, transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 14px rgba(0, 69, 139, 0.2);
}
.flow-submit-btn:hover:not(:disabled) {
    filter: brightness(1.05);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 69, 139, 0.26);
}
.flow-submit-btn:disabled {
    opacity: 0.55;
    cursor: default;
    transform: none;
}
.flow-note {
    margin: 16px 0 0;
    padding-top: 14px;
    border-top: 1px solid var(--color-border);
    font-size: 0.82rem;
    color: var(--color-text-muted);
    line-height: 1.55;
}

.booking-status-card {
    padding: 4px 2px 2px;
}
.booking-status-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}
.booking-status-type {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--color-primary);
    margin-bottom: 4px;
}
.booking-status-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--color-text);
}
.booking-status-badge {
    flex-shrink: 0;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}
.booking-status-badge--confirmed {
    background: rgba(34, 197, 94, 0.12);
    color: #15803d;
}
.booking-status-badge--cancelled {
    background: rgba(239, 68, 68, 0.12);
    color: #b91c1c;
}
.booking-status-badge--pending {
    background: rgba(245, 158, 11, 0.14);
    color: #b45309;
}
.booking-status-badge--default {
    background: rgba(59, 130, 246, 0.12);
    color: #1d4ed8;
}
.booking-status-body {
    display: grid;
    gap: 10px;
}
.booking-status-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    font-size: 0.9rem;
    line-height: 1.45;
}
.booking-status-label {
    color: var(--color-text-muted);
}
.booking-status-value {
    text-align: right;
    font-weight: 600;
    color: var(--color-text);
}
.booking-status-section {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--color-border);
}
.booking-status-section-title {
    margin: 0 0 10px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}
.booking-status-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}
.booking-status-list--plain .booking-status-list-item {
    display: block;
    font-size: 0.88rem;
    line-height: 1.45;
    color: var(--color-text);
}
.booking-status-list-item {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.88rem;
    line-height: 1.45;
}
.booking-status-list-main {
    font-weight: 600;
    color: var(--color-text);
}
.booking-status-list-meta {
    text-align: right;
    color: var(--color-text-muted);
    font-size: 0.82rem;
}
[data-theme="dark"] .booking-status-badge--confirmed { color: #86efac; }
[data-theme="dark"] .booking-status-badge--cancelled { color: #fca5a5; }
[data-theme="dark"] .booking-status-badge--pending { color: #fcd34d; }
[data-theme="dark"] .booking-status-badge--default { color: #93c5fd; }

/* ---------- Chat results mode ---------- */
.chat.results-mode {
    max-width: 760px;
}
.chat.results-mode .hero,
.chat.results-mode .suggestions { display: none; }
.chat.results-mode .ai-search-wrap {
    margin-top: 0;
    margin-bottom: 4px;
}
.chat.results-mode .ai-search {
    box-shadow: var(--shadow-sm);
}
.chat.results-mode .thread {
    margin-top: 16px;
    gap: 16px;
}

.thread { display: flex; flex-direction: column; gap: 20px; margin-top: 20px; }

/* user query chip */
.msg-user {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    align-self: flex-end;
    max-width: min(100%, 420px);
    background: var(--color-brand-sky-soft);
    border: 1px solid rgb(48 59 170 / 20%);
    border-radius: 16px 16px 4px 16px;
    padding: 12px 16px 12px 14px;
    box-shadow: 0 2px 10px rgba(0, 69, 139, 0.06);
}
[data-theme="dark"] .msg-user {
    background: rgba(0, 192, 255, 0.1);
    border-color: rgba(0, 192, 255, 0.25);
}
.msg-user-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--color-brand-gradient);
    color: #ffffff;
    display: grid;
    place-items: center;
}
.msg-user-icon svg { width: 14px; height: 14px; }
.msg-user-text {
    font-size: 0.92rem;
    font-weight: 500;
    color: #0f172a;
    line-height: 1.45;
    text-align: left;
}
[data-theme="dark"] .msg-user-text {
    color: var(--color-text-primary);
}

/* assistant response */
.msg-assistant {
    animation: fade-up 0.35s ease;
}
@keyframes fade-up {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.assistant-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}
.flow-message .assistant-bar {
    margin-bottom: 10px;
}
.assistant-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background:linear-gradient(135deg, #4754a8 0%, #f53d3e 100%);
    color: var(--color-text-inverse);
    font-family: var(--font-script);
    font-size: 0.72rem;
    font-weight: 700;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 69, 139, 0.25);
}
.assistant-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #0f172a;
}
.flow-message .assistant-label {
    color: #0f172a;
}
[data-theme="dark"] .assistant-label,
[data-theme="dark"] .flow-message .assistant-label {
    color: var(--color-text-primary);
}

.resp-headline {
    font-family: var(--font-display);
    font-size: clamp(1.35rem, 3vw, 1.75rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.3;
    margin-bottom: 10px;
    color: var(--color-text-primary);
}
.resp-desc {
    color: var(--color-text-secondary);
    font-size: 0.92rem;
    line-height: 1.65;
    margin-bottom: 24px;
    max-width: 640px;
}
.results-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--color-accent);
    font-weight: 600;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 14px;
    padding: 6px 12px;
    border-radius: var(--radius-pill);
    background: var(--color-accent-soft);
}
.results-label svg { width: 14px; height: 14px; flex-shrink: 0; }

/* trip header */
.trip-header {
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 20px 22px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}
.trip-header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-gradient-start), var(--color-gradient-mid), var(--color-gradient-end));
}
.trip-header-top {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}
.trip-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--color-accent-soft);
    color: var(--color-accent);
    display: grid;
    place-items: center;
}
.trip-icon svg { width: 22px; height: 22px; }
.trip-summary { min-width: 0; }
.trip-route {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}
.trip-route .swap {
    color: var(--color-accent);
    margin: 0 10px;
    font-weight: 400;
    opacity: 0.85;
}
.trip-cities {
    color: var(--color-text-secondary);
    font-size: 0.88rem;
    margin-top: 4px;
}
.trip-meta {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    flex-wrap: wrap;
    padding-top: 14px;
    border-top: 1px solid var(--color-border);
}
.trip-chip {
    background: var(--color-bg-primary);
    border: 1px solid var(--color-border);
    color: var(--color-text-secondary);
    font-size: 0.78rem;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: var(--radius-pill);
}

/* flight cards */
.flight-list { display: flex; flex-direction: column; gap: 14px; }

.view-more-wrap {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--color-border);
    text-align: center;
}
.view-more-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--color-gradient-start), var(--color-gradient-mid));
    color: var(--color-text-inverse);
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    transition: 0.2s;
    box-shadow: 0 4px 14px rgba(0, 69, 139, 0.22);
}
.view-more-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 69, 139, 0.28);
}
.view-more-link svg { flex-shrink: 0; }
.flight-card {
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
    position: relative;
    cursor: pointer;
    box-shadow: var(--shadow-xs);
}
.flight-card:hover {
    border-color: rgba(0, 69, 139, 0.35);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.flight-card.is-active,
.flight-card.is-cheapest.is-active {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 1px var(--color-accent), var(--shadow-md);
}
.flight-card.is-cheapest {
    border-color: rgba(5, 150, 105, 0.35);
    background: linear-gradient(to bottom, var(--color-success-soft), var(--color-bg-elevated) 40%);
}

.fc-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--color-border);
}
.fc-airline-block {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}
.fc-logos { display: flex; align-items: center; flex-shrink: 0; }
.fc-logos img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #fff;
    object-fit: contain;
    margin-right: -8px;
    border: 1px solid var(--color-border);
    padding: 3px;
    box-shadow: var(--shadow-xs);
}
.fc-airline {
    font-size: 0.92rem;
    color: var(--color-text-primary);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.fc-badges {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.badge-cheapest {
    background: var(--color-success-soft);
    color: var(--color-success-text);
    border: 1px solid rgba(5, 150, 105, 0.2);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: var(--radius-pill);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.fc-save {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--color-bg-primary);
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
    font-size: 1rem;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: 0.15s;
}
.fc-save:hover {
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.06);
}

.fc-body {
    display: flex;
    align-items: stretch;
    gap: 20px;
}
.fc-legs {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}
.fc-leg { min-width: 0; }
.fc-timeline {
    display: flex;
    align-items: center;
    gap: 12px;
}
.fc-end { text-align: left; min-width: 52px; }
.fc-end-r { text-align: right; }
.fc-time {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}
.fc-code {
    color: var(--color-text-muted);
    font-size: 0.78rem;
    font-weight: 500;
    margin-top: 2px;
}
.fc-mid {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    min-width: 60px;
}
.fc-dur {
    color: var(--color-text-secondary);
    font-size: 0.74rem;
    font-weight: 500;
    white-space: nowrap;
}
.fc-line {
    width: 100%;
    height: 2px;
    background: var(--color-border);
    position: relative;
    border-radius: 1px;
}
.fc-line::before,
.fc-line::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--color-accent);
    transform: translateY(-50%);
    box-shadow: 0 0 0 3px var(--color-accent-soft);
}
.fc-line::before { left: 0; }
.fc-line::after { right: 0; }
.fc-stop {
    color: var(--color-text-muted);
    font-size: 0.72rem;
    white-space: nowrap;
}

.fc-price {
    text-align: right;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    align-self: stretch;
    padding-left: 16px;
    border-left: 1px dashed var(--color-border);
    min-width: 120px;
}
.price-main {
    font-size: 1.5rem;
    font-weight: 800;
    white-space: nowrap;
    color: var(--color-text-primary);
    letter-spacing: -0.03em;
    line-height: 1.1;
}
.price-main .cents { font-size: 0.9rem; font-weight: 700; vertical-align: top; }
.price-cabin {
    color: var(--color-text-muted);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    margin-top: 4px;
}
.hc-tax {
    font-size: 0.68rem;
    color: var(--color-text-muted);
    margin-top: 4px;
}
.fc-original-price {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
    font-size: 0.82rem;
    color: var(--color-text-muted);
}
.fc-original-price .strikethrough {
    text-decoration: line-through;
}
.fc-discount-badge {
    background: #fee2e2;
    color: #dc2626;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 4px;
}
.fc-cta {
    margin-top: 10px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-accent);
    opacity: 0;
    transform: translateY(4px);
    transition: 0.2s;
}
.flight-card:hover .fc-cta,
.flight-card.is-active .fc-cta { opacity: 1; transform: translateY(0); }

/* states */
.thinking {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    align-self: flex-start;
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    padding: 12px 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--color-border);
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
}
[data-theme="dark"] .thinking {
    background: rgba(22, 29, 46, 0.92);
}
.spinner {
    width: 16px; height: 16px;
    border: 2px solid var(--color-text-muted);
    border-top-color: var(--color-accent);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.notice {
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-left: 3px solid var(--color-accent);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    color: var(--color-text-secondary);
    font-size: 0.92rem;
    line-height: 1.5;
}

/* ---------- Detail panel ---------- */
.detail-overlay {
    position: fixed; inset: 0;
    background: var(--color-overlay);
    opacity: 0; pointer-events: none;
    transition: 0.25s; z-index: 70;
}
.detail-overlay.show { opacity: 1; pointer-events: auto; }

.detail-panel {
    position: fixed; top: 0; right: 0; bottom: 0;
    width: 420px; max-width: 92vw;
    background: var(--color-bg-secondary);
    border-left: 1px solid var(--color-border);
    box-shadow: var(--shadow-lg);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 80;
    display: flex;
    flex-direction: column;
}
.detail-panel.open { transform: translateX(0); }

body.detail-open .content {
    padding-right: 12px;
}
body.detail-open .chat {
    max-width: 720px;
}

.detail-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 20px; border-bottom: 1px solid var(--color-border);
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--color-bg-secondary);
}
.detail-head h2 { font-size: 1.15rem; font-weight: 700; }
.detail-close {
    width: 34px; height: 34px; border-radius: 50%;
    background: var(--color-bg-elevated); border: 1px solid var(--color-border);
    color: var(--color-text-muted); font-size: 1.3rem; cursor: pointer; line-height: 1;
    transition: 0.15s;
}
.detail-close:hover { color: var(--color-text-primary); border-color: var(--color-border-strong); }

.detail-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 20px;
    -webkit-overflow-scrolling: touch;
}

.detail-body:has(.dp-hotel-img) {
    padding: 0;
}

.dp-hotel-content {
    padding: 20px 20px 40px;
}

.dp-hotel-img {
    width: 100%;
    height: 200px;
    max-height: 200px;
    overflow: hidden;
    background: var(--color-bg-primary);
    flex-shrink: 0;
}
.dp-hotel-img img {
    width: 100%;
    height: 200px;
    max-height: 200px;
    object-fit: cover;
    display: block;
}

.dp-price {
    background: var(--color-brand-sky-soft);
    border: 1px solid rgba(0, 192, 255, 0.28);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    margin-bottom: 22px;
}
.dp-price.dp-price-hotel {
    margin-bottom: 24px;
}
.dp-amount { font-size: 2rem; font-weight: 800; letter-spacing: -1px; line-height: 1.1; }
.dp-amount .cents { font-size: 1rem; vertical-align: top; }
.dp-sub { color: var(--color-text-secondary); font-size: 0.82rem; margin-top: 4px; }

.dp-leg-label { color: var(--color-text-secondary); font-size: 0.82rem; margin-bottom: 8px; }
.dp-leg-card {
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 20px;
}
.dp-airline { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; font-size: 0.9rem; }
.dp-airline img {
    width: 24px; height: 24px; border-radius: 6px; background: #fff;
    object-fit: contain; padding: 2px; border: 1px solid var(--color-border); margin-right: -6px;
}
.dp-airline span { margin-left: 10px; }

.dp-timeline { display: flex; align-items: center; gap: 12px; }
.dp-end { text-align: left; }
.dp-end.r { text-align: right; }
.dp-end .t { font-size: 1.15rem; font-weight: 700; }
.dp-end .c { color: var(--color-text-secondary); font-size: 0.82rem; }
.dp-mid {
    flex: 1; display: flex; flex-direction: column; align-items: center;
    color: var(--color-text-muted); font-size: 0.74rem; gap: 4px;
}
.dp-mid .line {
    width: 100%; height: 2px; background: var(--color-border); position: relative;
}
.dp-mid .line::before, .dp-mid .line::after {
    content: ""; position: absolute; top: 50%; width: 6px; height: 6px;
    border-radius: 50%; background: var(--color-accent); transform: translateY(-50%);
}
.dp-mid .line::before { left: 0; }
.dp-mid .line::after { right: 0; }

.dp-section-title {
    color: var(--color-text-muted);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 10px;
    font-weight: 700;
}
.dp-section {
    margin-bottom: 20px;
}
.dp-section:last-child {
    margin-bottom: 0;
}
.dp-airlines { display: flex; flex-wrap: wrap; gap: 10px; }
.dp-chip {
    display: flex; align-items: center; gap: 8px;
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    font-size: 0.85rem;
}
.dp-chip img { width: 20px; height: 20px; border-radius: 4px; background: #fff; object-fit: contain; padding: 1px; }

.detail-foot {
    padding: 16px 20px 20px;
    border-top: 1px solid var(--color-border);
    flex-shrink: 0;
    background: var(--color-bg-secondary);
}
.dp-book {
    width: 100%; padding: 15px; border: none; border-radius: var(--radius-md);
    background: var(--color-brand-gradient);
    color: var(--color-text-inverse);
    font-size: 1rem; font-weight: 600;
    cursor: pointer; transition: 0.18s;
    font-family: inherit;
    box-shadow: 0 4px 14px rgba(0, 69, 139, 0.18), 0 2px 8px rgba(0, 192, 255, 0.25);
}
.dp-book:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 69, 139, 0.2), 0 4px 14px rgba(0, 192, 255, 0.35);
}
.dp-book .cents { font-size: 0.8rem; vertical-align: top; }

/* ---------- Hotel cards ---------- */
.hotel-list { display: flex; flex-direction: column; gap: 16px; }

.hotel-card {
    display: grid;
    grid-template-columns: 168px 1fr auto;
    align-items: stretch;
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
    cursor: pointer;
    box-shadow: var(--shadow-xs);
}
.hotel-card:hover {
    border-color: rgba(0, 69, 139, 0.35);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.hotel-card.is-active,
.hotel-card.is-cheapest.is-active {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 1px var(--color-accent), var(--shadow-md);
}
.hotel-card.is-cheapest {
    border-color: rgba(5, 150, 105, 0.35);
}

.hc-media {
    position: relative;
    width: 168px;
    height: 188px;
    align-self: start;
    flex-shrink: 0;
    background: var(--color-bg-primary);
    overflow: hidden;
}
.hc-media img {
    width: 100%;
    height: 188px;
    max-width: 188px;
    max-height: 188px;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}
.hotel-card:hover .hc-media img { transform: scale(1.04); }
.hc-media.no-img,
.hc-media:has(.hc-thumb-fallback) {
    display: grid;
    place-items: center;
    background: linear-gradient(145deg, var(--color-accent-soft), var(--color-bg-primary));
}
.hc-thumb-fallback {
    color: var(--color-accent);
    opacity: 0.45;
}
.hc-thumb-fallback svg { width: 40px; height: 40px; }
.hc-media-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--color-success-text);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 5px 9px;
    border-radius: var(--radius-pill);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: var(--shadow-sm);
}

.hc-body {
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}
.hc-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}
.hc-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-text-primary);
    line-height: 1.35;
    letter-spacing: -0.01em;
    margin: 0;
}
.hc-rating-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.hc-stars {
    display: inline-flex;
    gap: 1px;
    line-height: 1;
}
.hc-star {
    color: var(--color-border-strong);
    font-size: 0.88rem;
}
.hc-star.is-full { color: #f59e0b; }
.hc-star-num {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    text-transform: capitalize;
}
.hc-location {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--color-brand-sky-dark);
}
.hc-location svg { width: 14px; height: 14px; flex-shrink: 0; }
.hc-address {
    color: var(--color-text-muted);
    font-size: 0.8rem;
    line-height: 1.45;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.hc-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: auto;
    padding-top: 6px;
}
.amenity {
    background: var(--color-bg-primary);
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border);
    font-size: 0.7rem;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
}
.badge-free {
    background: var(--color-success-soft);
    color: var(--color-success-text);
    border: 1px solid rgba(5, 150, 105, 0.2);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
}

.hc-price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    align-self: stretch;
    padding: 18px 22px;
    border-left: 1px dashed var(--color-border);
    min-width: 130px;
    text-align: right;
}
.hc-price .price-main { font-size: 1.45rem; }
.hc-cta {
    margin-top: 10px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-accent);
    opacity: 0;
    transform: translateY(4px);
    transition: 0.2s;
}
.hotel-card:hover .hc-cta,
.hotel-card.is-active .hc-cta {
    opacity: 1;
    transform: translateY(0);
}

.trip-icon-hotel { background: rgba(245, 158, 11, 0.12); color: #d97706; }
[data-theme="dark"] .trip-icon-hotel { background: rgba(251, 191, 36, 0.12); color: #fbbf24; }

/* ---------- Hotel detail panel ---------- */
.dp-hotel-name {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 10px;
    letter-spacing: -0.02em;
}
.dp-hotel-rating-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}
.dp-hotel-rating-row .hc-stars { gap: 2px; }
.dp-hotel-rating-row .hc-star { font-size: 0.9rem; }
.dp-hotel-rating-row .hc-star-num { font-size: 0.8rem; }
.dp-hotel-location {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--color-brand-sky-dark);
    font-size: 0.88rem;
    font-weight: 500;
    margin-bottom: 8px;
}
.dp-hotel-location svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}
.dp-address {
    color: var(--color-text-secondary);
    font-size: 0.86rem;
    line-height: 1.55;
    margin: 0 0 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--color-border);
}
.dp-amenities {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.dp-amenities .amenity,
.dp-amenities .badge-free {
    font-size: 0.76rem;
    padding: 5px 12px;
}
.dp-text {
    color: var(--color-text-secondary);
    font-size: 0.88rem;
    line-height: 1.55;
    margin: 0;
}
.dp-hotel-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}
.dp-hotel-meta .amenity,
.dp-hotel-meta .badge-free {
    font-size: 0.72rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
    .sidebar {
        display: none;
    }
}
@media (max-width: 900px) {
    .suggestion-list--top {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 768px) {
    .suggestion-list--popular {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 520px) {
    .navbar { padding: 12px 16px; }
    .brand .logo { height: 26px; }
    .content { padding: 20px 14px 60px; }
    .ai-search { padding-left: 18px; }
    .suggestion-list--top,
    .suggestion-list--popular { grid-template-columns: 1fr; }
    .flow-card {
        padding: 16px 18px;
        border-radius: 14px;
    }
    .flow-actions {
        flex-direction: column;
    }
    .flow-choice-btn {
        min-width: 0;
        width: 100%;
    }
    .fc-body { flex-direction: column; gap: 16px; }
    .fc-price {
        text-align: left;
        align-items: flex-start;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px 16px;
        padding-left: 0;
        padding-top: 14px;
        border-left: none;
        border-top: 1px dashed var(--color-border);
        min-width: 0;
        width: 100%;
    }
    .fc-timeline { gap: 8px; }
    .fc-time { font-size: 1rem; }
    .fc-cta { opacity: 1; transform: none; margin-top: 0; margin-left: auto; }
    .hotel-card {
        grid-template-columns: 1fr;
    }
    .hc-media {
        width: 100%;
        height: 200px;
        max-height: 200px;
    }
    .hc-media img {
        width: 100%;
        height: 200px;
        max-width: 100%;
        max-height: 200px;
    }
    .hc-price {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: baseline;
        justify-content: space-between;
        border-left: none;
        border-top: 1px dashed var(--color-border);
        min-width: 0;
        width: 100%;
        padding: 14px 20px 18px;
    }
    .hc-cta { opacity: 1; transform: none; margin-top: 0; }
}
