:root {
    --user-bg: #f5f6ff;
    --sidebar-bg: #ffffff;
    --content-bg: #ffffff;
    --user-primary: #4c3398;
    --user-primary-dark: #3a267a;
    --user-secondary: #2d3436;
    --user-accent: #7d5fff;
    --user-text: #2d3436;
    --user-text-semi: #636e72;
    --user-text-muted: #94a3b8;
    --user-border: rgba(76, 51, 152, 0.08);
    --user-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    --transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    --sidebar-width: 280px;
    --serif: "Marcellus", serif;
    --sans: "Outfit", sans-serif;
}

body {
    background-color: var(--user-bg);
    color: var(--user-text);
    font-family: var(--sans);
    margin: 0;
    overflow: hidden;
    height: 100vh;
}

/* Base Utility */
.serif-font {
    font-family: var(--serif);
}

.small-tag {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

/* Sidebar Redesign */
.user-sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background: var(--sidebar-bg);
    border-right: 1px solid rgba(0, 0, 0, 0.03);
    z-index: 1050;
    display: flex;
    flex-direction: column;
    padding: 2.5rem 0;
    transition: var(--transition);
}

.sidebar-brand {
    padding: 0 2.5rem;
    margin-bottom: 3.5rem;
}

.sidebar-brand h3 {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--user-primary);
    margin-bottom: 0px;
    letter-spacing: -1.5px;
}

.sidebar-brand span {
    font-size: 0.7rem;
    letter-spacing: 4px;
    color: var(--user-text-semi);
    font-weight: 700;
}

.sidebar-nav {
    flex-grow: 1;
    padding: 0 1.25rem;
}

.nav-link {
    color: var(--user-text-semi);
    font-weight: 500;
    padding: 1rem 1.5rem !important;
    border-radius: 100px !important;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: var(--transition);
}

.nav-link i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.nav-link:hover:not(.active) {
    background: #f8f9ff;
    color: var(--user-primary);
    transform: translateX(8px);
}

.nav-link.active {
    background: var(--user-primary) !important;
    color: white !important;
    box-shadow: 0 10px 25px rgba(76, 51, 152, 0.25);
}

.sidebar-footer {
    padding: 1.5rem;
    margin-top: auto;
}

/* User Widget in Sidebar */
.sidebar-user-widget {
    background: #f8f9ff;
    border-radius: 20px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Main Area Redesign */
.user-main {
    margin-left: var(--sidebar-width);
    height: 100vh;
    overflow-y: auto;
    padding: 0;
    /* Changed to 0, child elements will handle padding */
    background: var(--user-bg);
}

.content-wrapper {
    padding: 0 3rem 5rem 3rem;
}

/* Header Redesign */
.user-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 3rem;
    /* Match content wrapper horizontal padding */
    margin-bottom: 0.5rem;
}

/* Search Bar Pill - Hidden as per request */
.search-bar-pill {
    display: none !important;
}

.icon-circle {
    width: 44px;
    height: 44px;
    background: white;
    border-radius: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    cursor: pointer;
    transition: var(--transition);
}

.icon-circle:hover {
    transform: scale(1.1);
}

/* Hero Card Redesign */
.hero-card {
    background: linear-gradient(135deg, #a48cfd 0%, #7c5ef5 100%);
    border-radius: 35px;
    padding: 4rem;
    color: white;
    position: relative;
    overflow: hidden;
    margin-bottom: 2.5rem;
    box-shadow: 0 30px 60px rgba(124, 94, 245, 0.25);
}

.hero-card .illustration {
    position: absolute;
    right: 5%;
    top: 50%;
    transform: translateY(-50%);
    width: 40%;
}

/* Stat Cards Refinement */
.stat-card {
    background: white;
    border-radius: 28px;
    padding: 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
    /* Slightly darker border for definition */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    transition: var(--transition);
    height: 100%;
    position: relative;
    overflow: hidden;
}

.stat-icon {
    width: 48px;
    /* Reduced from 54px */
    height: 48px;
    border-radius: 12px;
    background: #f1f0ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--user-primary);
    margin-bottom: 1rem;
}

/* Cloud Background Effect with Real Image */
.user-sidebar {
    position: fixed !important;
    /* Force fixed back */
    background: url('https://images.unsplash.com/photo-1513002749550-c59d786b8e6c?q=80&w=1000&auto=format&fit=crop') no-repeat center center !important;
    background-size: cover !important;
    z-index: 1050;
    border: none !important;
}

.stat-card {
    position: relative;
    background: url('https://career.webindia123.com/career/options/images/travel.jpg') no-repeat;
    background-position: bottom left !important;
    background-size: 40% !important;
    /* Shows a small decorative part */
    border: none !important;
}


/* Add a semi-transparent white overlay for readability */
.stat-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    /* Slightly more opaque for the new background */
    z-index: 0;
    pointer-events: none;
    border-radius: inherit;
}

.user-sidebar::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.85);
    z-index: 0;
    pointer-events: none;
    border-radius: inherit;
}

/* Ensure content stays above the overlay */
.sidebar-brand,
.sidebar-nav,
.sidebar-footer,
.stat-card>div,
.stat-card>h3,
.stat-card>span,
.stat-card>p {
    position: relative;
    z-index: 1;
}

/* Remove old cloud-bg effect */
.cloud-bg {
    display: none;
}

/* Dropdown Menu Modern Styles */
.dropdown-menu-modern {
    position: absolute;
    top: calc(100% + 15px);
    right: 0;
    background: white;
    border-radius: 18px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.12);
    width: 300px;
    max-width: calc(100vw - 40px);
    /* Responsive width */
    z-index: 2100;
    /* Above sidebar overlay */
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

@media (max-width: 575.98px) {
    .dropdown-menu-modern {
        right: -10px;
        /* Offset to prevent bleed on small screens */
    }
}

.dropdown-menu-modern.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header-modern {
    padding: 1.25rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dropdown-body-modern {
    padding: 0.5rem;
}

.dropdown-item-modern {
    padding: 0.85rem 1rem;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: var(--transition);
    border-radius: 12px;
}

.dropdown-item-modern:hover {
    background: #f1f0ff;
}

.dropdown-item-modern .icon-wrap {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.dropdown-link-modern {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.75rem 1rem;
    color: var(--user-text-semi);
    text-decoration: none !important;
    font-weight: 500;
    font-size: 0.9rem;
    border-radius: 10px;
    transition: var(--transition);
}

.dropdown-link-modern:hover {
    background: #f1f0ff;
    color: var(--user-primary);
    transform: translateX(5px);
}

.dropdown-footer-modern {
    padding: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    background: #f8faff;
}

/* Visibility and Scroll Fixes */
.user-main {
    margin-left: var(--sidebar-width);
    height: 100vh;
    overflow-y: auto;
    background: var(--user-bg);
    position: relative;
    scroll-behavior: smooth;
}

.user-sidebar.collapsed {
    transform: translateX(-100%);
}

.user-main.expanded {
    margin-left: 0;
    width: 100%;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
    z-index: 1040;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* Trip Cards V2 - Compact & Professional */
.trip-card-v2 {
    height: 200px;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.trip-card-v2:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.trip-card-v2 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.trip-card-v2:hover img {
    transform: scale(1.1);
}

.trip-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1.25rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    color: white;
}

.badge-upcoming,
.badge-completed {
    font-size: 0.6rem;
    padding: 4px 10px;
}

.trip-card-overlay h5 {
    font-size: 1rem !important;
    margin-top: 5px;
}

/* Responsiveness Fixes */
@media (max-width: 991.98px) {
    :root {
        --sidebar-width: 0px;
    }

    .user-sidebar {
        transform: translateX(-100%);
        width: 280px;
        z-index: 2005;
    }

    .user-sidebar.active {
        transform: translateX(0);
    }

    .user-main {
        margin-left: 0;
        padding: 0;
    }

    .user-header {
        padding: 1.5rem;
        gap: 15px;
    }

    .search-bar-pill {
        width: 100%;
        order: 3;
        margin-top: 10px;
    }

    .content-wrapper {
        padding: 0 1.5rem 5rem 1.5rem;
    }

    .hero-card {
        padding: 2.5rem 2rem;
        border-radius: 25px;
    }

    .hero-card h1 {
        font-size: 2rem;
    }

    .hero-card .illustration {
        width: 120px;
        right: 1rem;
    }
}

@media (max-width: 767.98px) {
    .user-header .d-flex.align-items-center.gap-3 {
        gap: 10px !important;
    }

    .stat-card {
        padding: 1.25rem;
    }

    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .trip-card-v2 {
        height: 220px;
    }

    .trip-card-overlay h5 {
        font-size: 1.25rem !important;
    }
}

@media (max-width: 575.98px) {
    .user-header h4 {
        display: none;
    }

    .hero-card .illustration {
        display: none !important;
    }

    .hero-card {
        text-align: center;
    }

    .hero-card .col-lg-7 {
        width: 100%;
    }

    .search-bar-pill {
        padding: 0.4rem 1rem;
    }
}

/* --- CONTACT WIDGET (Restored) --- */
.contact-widget-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    pointer-events: none;
}

.contact-toggle-btn {
    pointer-events: auto;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--user-primary);
    border: none;
    color: white;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    box-shadow: 0 10px 30px rgba(76, 51, 152, 0.4);
}

.contact-toggle-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 15px 40px rgba(76, 51, 152, 0.5);
}

.contact-toggle-btn .close-icon {
    display: none;
    font-size: 1.2rem;
}

.contact-widget-container.active .contact-toggle-btn {
    background: #ff4757;
    transform: rotate(90deg);
}

.contact-widget-container.active .main-icon {
    display: none;
}

.contact-widget-container.active .close-icon {
    display: block;
}

.contact-options {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 15px;
    margin-bottom: 20px;
    pointer-events: none;
    opacity: 0;
    transform: translateY(20px) scale(0.8);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    padding-right: 8px;
}

.contact-widget-container.active .contact-options {
    pointer-events: auto;
    opacity: 1;
    transform: translateY(0) scale(1);
}

.contact-item {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    text-decoration: none;
    gap: 15px;
    transition: all 0.3s ease;
    width: auto;
    pointer-events: inherit;
}

.contact-item i {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 2;
    color: var(--user-primary);
}

.contact-label {
    background: white;
    color: var(--user-text);
    padding: 8px 18px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 700;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    pointer-events: none;
}

.contact-item:hover .contact-label {
    opacity: 1;
    transform: translateX(0);
}

.contact-item.phone i {
    color: #2ecc71;
}

.contact-item.message i {
    color: #3498db;
}

.contact-item.whatsapp i {
    color: #25d366;
}

.contact-item:hover i {
    transform: scale(1.1);
    color: white !important;
}

.contact-item.phone:hover i {
    background: #2ecc71;
}

.contact-item.message:hover i {
    background: #3498db;
}

.contact-item.whatsapp:hover i {
    background: #25d366;
}

.contact-item.chatbot:hover i {
    background: var(--user-primary);
}

/* --- MODERN AI CHATBOX --- */
.ai-chat-window {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 380px;
    height: 550px;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    pointer-events: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(30px) scale(0.95);
    transform-origin: bottom right;
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}

.ai-chat-window.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.chat-window-header {
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--user-primary) 0%, #7d5fff 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-bot-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.btn-close-chat {
    background: none;
    border: none;
    color: white;
    font-size: 1rem;
    opacity: 0.7;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-close-chat:hover {
    opacity: 1;
    transform: rotate(90deg);
}

.chat-window-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overscroll-behavior: contain;
}

.chat-message {
    max-width: 85%;
    display: flex;
    flex-direction: column;
}

.chat-message.ai {
    align-self: flex-start;
}

.chat-message.user {
    align-self: flex-end;
}

.message-content {
    padding: 0.85rem 1.15rem;
    border-radius: 18px;
    font-size: 0.9rem;
    line-height: 1.5;
    position: relative;
}

.chat-message.ai .message-content {
    background: white;
    color: var(--user-text);
    border-bottom-left-radius: 4px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
}

.chat-message.user .message-content {
    background: var(--user-primary);
    color: white;
    border-bottom-right-radius: 4px;
    box-shadow: 0 10px 20px rgba(76, 51, 152, 0.15);
}

.message-time {
    font-size: 0.7rem;
    color: var(--user-text-muted);
    margin-top: 4px;
}

.chat-window-footer {
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.5);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.chat-input-modern {
    background: white !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    border-radius: 100px !important;
    padding: 0.75rem 1.5rem !important;
    font-size: 0.9rem !important;
}

.btn-send-modern {
    width: 45px;
    height: 45px;
    border-radius: 50% !important;
    background: var(--user-primary) !important;
    color: white !important;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px !important;
}

@media (max-width: 575.98px) {
    .ai-chat-window {
        width: calc(100vw - 40px);
        height: 80vh;
        right: 20px;
        bottom: 90px;
    }
}

/* --- QUICK SUGGESTIONS (Expand/Collapse) --- */
.chat-suggestions-wrapper {
    position: relative;
    padding: 0 1.25rem 0.75rem;
}

.suggestions-toggle-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    background: rgba(76, 51, 152, 0.06);
    border: 1.5px solid rgba(76, 51, 152, 0.15);
    border-radius: 100px;
    padding: 9px 18px;
    cursor: pointer;
    font-family: var(--sans);
    font-size: 0.82rem;
    font-weight: 700;
    color: #4c3398;
    transition: all 0.3s ease;
    letter-spacing: 0.2px;
}

.suggestions-toggle-btn:hover {
    background: rgba(76, 51, 152, 0.12);
    border-color: rgba(76, 51, 152, 0.3);
}

.suggestions-toggle-btn .toggle-icon {
    color: #f39c12;
    font-size: 0.85rem;
}

.suggestions-toggle-btn .chevron-icon {
    font-size: 0.75rem;
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.chat-suggestions-wrapper.open .chevron-icon {
    transform: rotate(180deg);
}

.suggestions-panel {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.45s cubic-bezier(0.23, 1, 0.32, 1),
        opacity 0.3s ease,
        margin-bottom 0.3s ease;
    margin-bottom: 0;
}

.chat-suggestions-wrapper.open .suggestions-panel {
    max-height: 200px;
    opacity: 1;
    margin-bottom: 10px;
}

.suggestions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding-top: 8px;
}

.suggestion-pill {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1.5px solid rgba(76, 51, 152, 0.15);
    padding: 10px 12px;
    border-radius: 14px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #4c3398;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 2px 8px rgba(76, 51, 152, 0.06);
    font-family: var(--sans);
    display: flex;
    align-items: center;
    gap: 7px;
    text-align: left;
}

.suggestion-pill i {
    font-size: 0.85rem;
    opacity: 0.7;
    flex-shrink: 0;
}

.suggestion-pill:hover {
    background: #4c3398;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(76, 51, 152, 0.25);
    border-color: #4c3398;
}

.suggestion-pill:hover i {
    opacity: 1;
}