/* ==========================================
   ROOT VARIABLES
   ========================================== */
:root[data-theme='light'] {
    --composer-radius: 24px;
    --input-radius: 20px;
    --icon-size: 28px;
    --send-size: 36px;
    --primary-blue: #6996BA;
    --futuristic-cyan: #5dd9e8;
    --border-color: rgba(93, 217, 232, 0.4);
    --border-hover: rgba(93, 217, 232, 0.7);
    --bg-input: #FBFFFF;
    --bg-input-focus: #FBFFFF;
    --text-primary: #2B333A;
    --text-placeholder: #8a8a8a;
    --shadow-sm: 0 2px 4px 0 rgba(93, 217, 232, 0.15);
    --shadow-md: 0 4px 12px -1px rgba(93, 217, 232, 0.3), 0 2px 8px -1px rgba(93, 217, 232, 0.2);
    --shadow-focus: 0 0 0 3px rgba(93, 217, 232, 0.3), 0 0 20px rgba(93, 217, 232, 0.2);
    --min-height: 120px;
    --max-height: 300px;
    --bgColor: #fff; /* New */
    --bgColor2: #F1F5F7; /* New */
    --bgColor3: #FBFFFF; /* New */
    --bgCard: #f8f8f8; /* New */
    --dd_bgCard: #f8f8f8; /* New */
    --bgCard2: #fff; /* New */
    --dash: #A6A6A3;
    --cardOutline: #A6A6A3;
    --topHover: #2B333A;
    --dotColor: #fff;
    --menu: #F5F5F5;
    --update_menu_hover: rgba(0, 0, 0, 0.08);
    --info_text: #454545;
    --info_text2: #454545;
    --info_value: black;
    --hover-color: white;
    --light_shadow: 0px 2px 4px rgba(38, 38, 38, 0.2);
    --theme_switch_icon_border: rgb(33, 37, 49);
    --theme_switch_icon_color: rgb(33, 37, 49);

    /* SCROLL BARS STYLING */
    --scroll_color1: #eee;
    --scroll_color2: #bbb;
    --scroll_color3: #999;
    --scroll_color4: #ccc;

    --action_card_bg: #f8f8f8; /* New */
    --action_card_hover_bg: #5F8CB01A; /* New */
    --action_card_border: 1px solid #7eb1b50a; /* New */
    --action_card_hover_border: 1px solid #7eb1b50a; /* New */
    --action_card_desc: #454545;
    --action_card_shadow: 0px 4px 8px rgba(38, 38, 38, 0.2);

    --hr_color: #444444;
    --select_border: 1px solid rgb(206, 212, 218);

    --tutorial_animated_color1: white;
    --tutorial_animated_color2: #EBFFFF;
    --tutorial_animated_color3: white;

    --progress-div-bgcolor: rgba(256, 256, 256, 0.7);

    --switch_track_color: #EBECF0;

    --default_yellow: #CD8F00;
    --default_action: #6996BA; /* New */
    --grid_badge_highlighter1: #EEEEEE;
    --grid_badge_highlighter2: #F2F2F2;

    --badge_bg1: #F3F3F3;
    --badge_color1: #454545;

    --hover_brightness: brightness(0.9);

    --border1: #52718A33; /* New */
    --light_border: rgba(0, 0, 0, 0.1); /* New */
    --greyed_out_text: #B3B3B3;
    --light_title: #629194; /* New */
    --light_title2: #559CB9; /* New */
    --light_btn_bg: #BBE5FF80; /* New */

    --accent_font: #75aeb2; /* New */
    --accent_font2: #629194; /* New */
    --accent_border: #03030333; /* New */
    --accent_bg: #6996BA; /* New */
    --accent_bg2: #4B789C; /* New */
    --bg_accent_highlight: #7eb1b50a; /* New */
    /*--gradient_header: linear-gradient(90deg, #F1F5F7 0%, #F5F5F5 100%);  New */
    --gradient_header: linear-gradient(90deg, #F1F5F7 0%, #F5F5F5 100%); /* New */
    --accent_gradient: linear-gradient(90deg, #6996BA 0%, #d3ebf7 100%); /* New */
    --active_bg: #2942561A; /* New */
    --semi_transparent: rgba(0, 0, 0, 0.02);
    --semi_transparent_hover: rgba(0, 0, 0, 0.05);
    --chat_footer_border: #03030333;
    --user_chat_bubble_bg: #d3ebf7;
    --chart_grid_color: rgba(0,0,0,0.05);

    /* Avatar filter - lighten dark shadows in light mode */
    --avatar_filter: brightness(1.1) drop-shadow(0 0 1px #F5F5F5);
    
    --danger_red: #d9534f; /* New - relieving red for light mode */
    --danger_red_hover: #c9302c;
}

:root[data-theme='dark'] {
    --composer-radius: 24px;
    --input-radius: 20px;
    --icon-size: 28px;
    --send-size: 36px;
    --primary-blue: #739EC1;
    --futuristic-cyan: #5dd9e8;
    --border-color: rgba(93, 217, 232, 0.4);
    --border-hover: rgba(1, 2, 2, 0.7);
    --bg-input: #1C2934;
    --bg-input-focus: #1C2934;
    --text-primary: #f0f0f0;
    --text-placeholder: #8a8a8a;
    --shadow-sm: 0 2px 4px 0 rgba(93, 217, 232, 0.15);
    --shadow-md: 0 4px 12px -1px rgba(93, 217, 232, 0.3), 0 2px 8px -1px rgba(93, 217, 232, 0.2);
    --shadow-focus: 0 0 0 3px rgba(93, 217, 232, 0.3), 0 0 20px rgba(93, 217, 232, 0.2);
    --min-height: 120px;
    --max-height: 300px;

    --bgColor: #0C0D0F; /* New 0C0D0F*/
    --bgColor2: #0F1C25; /* New */
    --bgColor3: #1C2934; /* New */
    --bgCard: #0A151D; /* New */
    --dd_bgCard: #0A151D; /* New */
    --bgCard2: #0A0F14; /* New */
    --dash: #3E464E;
    --cardOutline: #000000;
    --topHover: #EBECE8;
    --dotColor: #000;
    --menu: #0B1117; /* New */
    --update_menu_hover: rgba(0, 0, 0, 0.25);
    --info_text: #CDCDCD;
    --info_text2: #E1E1E1;
    --info_value: white;
    --hover_color: #212531;
    --light_shadow: 0px 2px 4px rgba(255, 255, 255, 0.1);
    --theme_switch_icon_border: rgb(252, 196, 25);
    --theme_switch_icon_color: rgb(252, 196, 25);

    /* SCROLL BARS STYLING */
    --scroll_color1: #222;
    --scroll_color2: #3c4043;
    --scroll_color3: #5f6368;
    --scroll_color4: #333;

    --action_card_bg: #121F2A; /* New */
    --action_card_hover_bg: #5F8CB080; /* New */
    --action_card_border: 1px solid #121F2A; /* New */
    --action_card_hover_border: 1px solid #121F2A; /* New */
    --action_card_desc: #CDCDCD;
    --action_card_shadow: 0px 4px 8px rgba(255, 255, 255, 0.1);

    --hr_color: #DDDDDD;
    --select_border: 1px solid rgb(55, 58, 64);

    --tutorial_animated_color1: #213;
    --tutorial_animated_color2: #112 50%;
    --tutorial_animated_color3: #213;

    --progress-div-bgcolor: rgba(0, 0, 0, 0.7);

    --switch_track_color: #1A1B1E;

    --default_yellow: #F5B700;
    --default_action: #739EC1; /* New */
    --grid_badge_highlighter1: #121F2A;
    --grid_badge_highlighter2: #121F2A;


    --badge_bg1: #121F2A;
    --badge_color1: #E1E1E1;

    --hover_brightness: brightness(1.2);

    --border1: #87B4D833; /* New */
    --light_border: #2A323A; /* New */
    --greyed_out_text: #9F9F9F;
    --light_title: #94C3C6; /* New */
    --light_title2: #91BEE2; /* New */
    --light_btn_bg: #A7D1F3; /* New */

    --accent_font: #94C3C6; /* New */
    --accent_font2: #B2EAEE; /* New */
    --accent_border: #87B4D833; /* New */
    --accent_bg: #6288A6; /* New */
    --accent_bg2: #d3ebf7; /* New */

    --bg_accent_highlight: #111514; /* New */
    /*--gradient_header: linear-gradient(90deg, #0A0F14 0%, #0B1117 60%, #0C2B44 100%);  New */
    --gradient_header: linear-gradient(90deg, #0A0F14 0%, #0B1117 60%, #52718A80 100%); /* New */

    --accent_gradient: linear-gradient(90deg, #0F1C25 0%, #52718A 100%); /* New */
    --active_bg: #29425680; /* New #253432*/
    --semi_transparent: rgba(255, 255, 255, 0.05);
    --semi_transparent_hover: rgba(255, 255, 255, 0.1);
    --chat_footer_border: #3c4043;
    --user_chat_bubble_bg: #1C2934;
    --chart_grid_color: #202830;

    /* Avatar filter - no adjustment needed in dark mode */
    --avatar_filter: none;

    --danger_red: #ff6b6b; /* New - relieving red for dark mode */
    --danger_red_hover: #fa5252;
}
/* ==========================================
   BASE STYLES (from base.html)
   ========================================== */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: var(--menu);
    color: var(--info_value);
}

/* Sidebar base variable */
:root {
    --sidebar-width: 280px;
}

/* Page-specific body backgrounds */
body.gemini-dark-theme {
    background-color: var(--menu);
}

body.white-futuristic-theme {
    background-color: var(--menu);
}

/* Default body styles - can be overridden by specific pages */
body.default-theme {
    font-family: 'PT Serif', 'Georgia', 'Times New Roman', serif;
    font-size: 16px;
    letter-spacing: 0.01em;
    font-smooth: always;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: var(--menu);
    color: var(--info_value);
    display: flex;
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: 'Marcellus', 'Georgia', serif;
    font-weight: 400; /* Marcellus is typically regular weight */
    color: var(--info_value);
}

p, span, div, label, a {
    color: inherit;
}

.btn, button {
    font-family: 'Google Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.navbar-brand, .nav-link {
    font-family: 'Marcellus', 'Georgia', serif;
}

/* Ensure links are styled appropriately */
a {
    color: var(--info_value);
    text-decoration: none;
}

a:hover {
    opacity: 0.8;
}

/* Header Styling - Matching Squarespace computed styles */
.header {
    z-index: 11;
    position: fixed;
    top: 0;
    right: 0;
    left: var(--sidebar-width);
    line-height: 1;
    pointer-events: none;
    transition: left 0.25s ease;
}

body:not(.sidebar-open) .header {
    left: 60px;
}


.header-announcement-bar-wrapper {
    /*border-bottom: 1.5px solid var(--accent_border);*/
    position: relative;
    z-index: 2;
    width: 100%;
    box-sizing: border-box;
    padding-top: 10px;
    padding-bottom: 10px;
    padding-left: 24px;
    padding-right: 16px;
    pointer-events: auto;
    /*background: var(--gradient_header);*/
}

.header-skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 999;
    padding: 8px 16px;
    background: transparent;
    color: var(--info_value);
    text-decoration: none;
}

.header-skip-link:focus {
    left: 0;
}

.header-border {
    display: none;
}

.header-dropshadow {
    display: none;
}

.header-inner {
    position: relative;
    display: flex;
    align-items: center;
}

.header-background {
    display: none;
}

.header-display-desktop {
    width: 100%;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 1;
}

.header-display-mobile {
    width: 100%;
    display: none;
    align-items: center;
    position: relative;
    z-index: 1;
}

.header-title-nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-start;
}

.header-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

/* Desktop: qask.ai on left, nav on right */
@media (min-width: 769px) {
    .header-title-nav-wrapper {
        display: flex;
        justify-content: space-between;
    }
    
    .header-left {
        order: 1;
    }
    
    .header-center {
        order: 1;
        justify-content: flex-start;
        margin-left: 0;
    }
    
    .header-right {
        order: 2;
        margin-left: auto;
    }
}

/* Mobile: keep center layout */
@media (max-width: 768px) {
    .header-brand-wrapper {
        gap: 0;
    }
    
    .header-logo {
        height: 30px;
    }
    
    .header-brand-version {
        font-size: 0.7rem;
        padding: 3px 8px;
    }
    
    .header-title-nav-wrapper {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
    }
    
    .header-left {
        order: 1;
        justify-content: flex-start;  /* Push button to far left */
    }
    
    .header-center {
        order: 2;
    }
    
    .header-right {
        order: 3;
        justify-content: flex-end;  /* Push buttons to far right */
    }
    
    /* Remove margins on mobile for true edge alignment */
    .sidebar-toggle-btn {
        margin-left: 0;
        margin-right: 8px;  /* Small gap from logo */
    }
}

.header-title {
    margin-right: 2vw;
}

.header-title-text a {
    font-family: 'Marcellus', 'Georgia', serif;
    font-size: 1.5rem;
    text-decoration: none;
    color: var(--info_value);
    font-weight: 400;
}

.header-nav {
    flex-grow: 1;
    display: flex;
    justify-content: flex-end;
}

.header-nav-wrapper {
    display: flex;
}

.header-nav-list {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.header-nav-item {
    margin: 0 2vw;
}

.header-nav-item a {
    font-family: 'Marcellus', 'Georgia', serif;
    text-decoration: none;
    color: var(--info_value);
    font-size: 1rem;
    transition: opacity 0.3s ease;
}

.header-nav-item a:hover {
    opacity: 0.7;
}

.header-actions {
    margin-left: 2vw;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Theme Toggle Button */
.theme-toggle-btn {
    background-color: var(--semi_transparent);
    border: none;
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: filter 0.3s ease;
    color: var(--text-primary);
}

.theme-toggle-btn:hover {
    background-color: var(--semi_transparent_hover);
}

.theme-toggle-btn .theme-icon {
    font-size: 20px;
    line-height: 1;
}

/* Sidebar toggle button (in header) */
.sidebar-toggle-btn {
    background-color: var(--semi_transparent);
    border: none;
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: filter 0.3s ease, background-color 0.2s ease;
    color: var(--info_value);
    margin-right: 12px;
    pointer-events: auto;
}

.sidebar-toggle-btn:hover {
    background-color: var(--semi_transparent_hover);
}

/* Header Brand Wrapper with Logo and Version */
.header-brand-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.header-logo-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.header-logo-link:hover {
    opacity: 0.85;
    transform: scale(1.02);
}

.header-logo {
    height: 50px;
    width: auto;
    display: none;
    object-fit: contain;
}

.header-logo-dark {
    display: block;
}

.header-logo-light {
    display: none;
}

[data-theme='light'] .header-logo-dark {
    display: none;
}

[data-theme='light'] .header-logo-light {
    display: block;
}

.header-brand-version {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 6px;
    background: var(--semi_transparent);
    color: var(--info_value);
    font-family: 'Google Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 500;
    letter-spacing: 0.02em;
    line-height: 1.2;
    white-space: nowrap;
}

/* Header User Section */
.header-user-section {
    display: flex;
    align-items: center;
    margin-right: 12px;
}

.header-user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    color: var(--topHover);
    font-family: 'Google Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.9rem;
    transition: opacity 0.2s ease;
}

.header-user-info:hover {
    opacity: 0.8;
}

.header-user-info .user-name {
    font-family: 'Google Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 500;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.header-user-info iconify-icon {
    flex-shrink: 0;
}

/* Login Button in Header */
.header-user-section .light_btn {
    padding: 8px 20px;
    font-size: 0.9rem;
}

/* User Dropdown Menu */
.header-user-section .dropdown-toggle {
    font-family: 'Google Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 500;
    padding: 8px 12px;
    transition: background-color 0.2s ease, opacity 0.2s ease;
}

.header-user-section .dropdown-toggle:hover {
    background-color: var(--semi_transparent) !important;
    opacity: 0.9;
}

.header-user-section .dropdown-menu {
    background-color: var(--bgCard);
    border: 1px solid var(--light_border);
    border-radius: 12px;
    box-shadow: var(--light_shadow);
    padding: 8px;
    min-width: 220px;
    margin-top: 8px;
    font-family: 'Google Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.header-user-section .dropdown-header {
    padding: 12px 16px;
    color: var(--info_value);
    font-family: 'Google Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.header-user-section .dropdown-header .fw-semibold {
    color: var(--info_value);
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.header-user-section .dropdown-header .text-muted {
    color: var(--info_text) !important;
    font-size: 0.85rem;
    opacity: 0.8;
}

.header-user-section .dropdown-divider {
    border-color: var(--light_border);
    opacity: 1;
    margin: 8px 0;
}

.header-user-section .dropdown-item {
    color: var(--info_text);
    padding: 10px 16px;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-family: 'Google Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
}

.header-user-section .dropdown-item:hover {
    background-color: var(--semi_transparent_hover);
    color: var(--info_value);
}

.header-user-section .dropdown-item:active {
    background-color: var(--active_bg);
    color: var(--info_value);
}

.header-user-section .dropdown-item i {
    color: var(--info_text);
    transition: color 0.2s ease;
}

.header-user-section .dropdown-item:hover i {
    color: var(--info_value);
}

/* Offcanvas User Section */
.offcanvas-user-section {
    padding: 16px 0;
    border-bottom: 1px solid var(--border_color);
    margin-bottom: 16px;
}

.offcanvas-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 10px;
    background-color: var(--semi_transparent);
}

.offcanvas-user-info iconify-icon {
    color: var(--info_value);
    flex-shrink: 0;
}

.offcanvas-user-info .user-details {
    flex: 1;
    min-width: 0;
}

.offcanvas-user-info .user-name {
    font-family: 'Google Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 600;
    font-size: 1rem;
    color: var(--info_value);
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.offcanvas-user-info .user-email {
    font-family: 'Google Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.85rem;
    color: var(--header_nav_link_text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.offcanvas-user-section .light_btn {
    width: 100%;
    justify-content: center;
}

.offcanvas-theme-toggle {
    margin-top: 4px;
}

.offcanvas-theme-toggle .theme-toggle-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding: 12px 16px;
    background: transparent;
    border: 1px solid var(--border_color);
    border-radius: 8px;
    color: var(--info_text);
    font-size: 14px;
    transition: all 0.2s ease;
}

.offcanvas-theme-toggle .theme-toggle-btn:hover {
    background: var(--bgCard);
    border-color: var(--accent_bg);
}

.offcanvas-theme-toggle .theme-icon {
    font-size: 18px;
}

.offcanvas-theme-toggle span {
    font-weight: 500;
}


.header-burger {
    display: none;
    margin-left: 0;
}

.header-burger-btn {
    background: none;
    border: none;
    padding: 8px;
    padding-left: 16px;
    cursor: pointer;
    color: var(--info_value);
}

.burger-box {
    width: 24px;
    height: 16px;
    position: relative;
}

.burger-inner {
    position: relative;
    width: 100%;
    height: 100%;
}

.top-bun, .patty, .bottom-bun {
    position: absolute;
    width: 100%;
    height: 1px; /* Thin lines as in Squarespace */
    background: var(--info_value);
    transition: all 0.3s ease;
}

.top-bun {
    top: 0;
}

.patty {
    top: 50%;
    transform: translateY(-50%);
}

.bottom-bun {
    bottom: 0;
}

/* Adjust main content to account for header with padding and sidebar */
main {
    /*margin-top: calc(var(--header-height, 72px));*/
    margin-left: var(--sidebar-width);
    flex-grow: 1;
    background-color: var(--menu);
    position: relative;
    transition: margin-left 0.25s ease;
}

body:not(.sidebar-open) main {
    margin-left: 60px;
}

main::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #c0c0c0, transparent);
    box-shadow: var(--light_shadow);
}

/* Left Sidebar */
.app-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--bgCard);
    border-right: 1px solid var(--accent_border);
    transform: translateX(0);
    transition: width 0.25s ease, transform 0.25s ease;
    z-index: 12;
    overflow: hidden;
    font-family: 'Google Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body:not(.sidebar-open) .app-sidebar {
    width: 60px;
}

.app-sidebar .sidebar-inner {
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Sidebar Top Header */
.sidebar-top-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 12px;
    border-bottom: 1px solid var(--light_border);
    min-height: 60px;
    flex-shrink: 0;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    opacity: 1;
    transition: opacity 0.2s ease;
}

.sidebar-logo img {
    height: 36px;
    width: auto;
}

body:not(.sidebar-open) .sidebar-logo {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.sidebar-toggle-btn-inside {
    background: transparent;
    border: none;
    color: var(--info_value);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
    flex-shrink: 0;
}

.sidebar-toggle-btn-inside:hover {
    background: var(--semi_transparent);
}

.sidebar-toggle-btn-inside i {
    font-size: 20px;
}

/* New Chat Section */
.sidebar-new-chat-section {
    padding: 12px;
    flex-shrink: 0;
    padding-bottom: 0px !important;
}

.sidebar-new-chat-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-radius: 12px;
    /*background-color: var(--active_bg);*/
    color: var(--info_value);
    text-decoration: none;
    transition: background-color 0.2s ease;
    white-space: nowrap;
}

.sidebar-new-chat-btn:hover {
    background-color: var(--semi_transparent_hover);
    color: var(--info_value);
}

.sidebar-new-chat-btn i {
    font-size: 18px;
    flex-shrink: 0;
}

body:not(.sidebar-open) .sidebar-new-chat-btn {
    justify-content: center;
    padding: 12px;
}

body:not(.sidebar-open) .sidebar-new-chat-btn .sidebar-text {
    display: none;
}

/* Sidebar Navigation */
.sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: hidden;
    overflow-x: hidden;
    padding: 0 12px;
}

.sidebar-nav:hover {
    overflow-y: auto;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--info_value);
    background: transparent;
    cursor: pointer;
    transition: background-color 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar-link:hover {
    background: var(--semi_transparent);
    color: var(--info_value);
}

.sidebar-link i {
    font-size: 18px;
    flex-shrink: 0;
}

body:not(.sidebar-open) .sidebar-link {
    justify-content: center;
}

body:not(.sidebar-open) .sidebar-link span {
    display: none;
}

/* Hide conversations section when sidebar is collapsed */
body:not(.sidebar-open) .sidebar-conversations {
    display: none !important;
}

/* Recent Chats Section */
.sidebar-chats-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0 12px;
    overflow-y: hidden;
    overflow-x: hidden;
}

.sidebar-chats-section:hover {
    overflow-y: auto;
}

/* Hide Recent Chats section on home page (white-futuristic-theme) */
body.white-futuristic-theme .sidebar-chats-section {
    display: none;
}

/* Show Recent Chats section only on chat page (gemini-dark-theme) */
body.gemini-dark-theme .sidebar-chats-section {
    display: flex;
}

.sidebar-section-title {
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--info_text);
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.sidebar-chat-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--info_value);
    background: transparent;
    cursor: pointer;
    transition: background-color 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar-chat-item:hover {
    background: var(--semi_transparent);
}

/* Conversation History Styles */
.sidebar-conversations {
    margin-top: 16px;
    display: none;
}

.sidebar-section-header {
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--info_text);
    letter-spacing: 0.5px;
    opacity: 0.7;
}

.sidebar-conversations-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-conversation-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--info_text);
    background: transparent;
    text-decoration: none;
    transition: background 0.2s ease;
    position: relative;
}

.sidebar-conversation-item:hover {
    background: var(--semi_transparent);
}

.sidebar-conversation-item:hover .conversation-delete-btn {
    opacity: 1;
}

/* Active session styling */
.sidebar-conversation-item.active {
    background: var(--active_bg);
    font-weight: 500;
}

.sidebar-conversation-item.active .conversation-title {
    color: var(--info_value);
    font-weight: 500;
}

.conversation-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.conversation-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--info_text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conversation-date {
    font-size: 11px;
    color: var(--info_text);
    opacity: 0.7;
}

.conversation-delete-btn {
    background: transparent;
    border: none;
    color: var(--info_text);
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease, background 0.2s ease;
    flex-shrink: 0;
}

.conversation-delete-btn:hover {
    background: var(--semi_transparent_hover);
    color: var(--info_value);
}

.conversation-delete-btn i {
    font-size: 14px;
}

.sidebar-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: var(--info_text);
}

.sidebar-empty-state,
.sidebar-error-state {
    padding: 16px 12px;
    text-align: center;
    font-size: 13px;
    color: var(--info_text);
    opacity: 0.7;
}

.sidebar-error-state {
    color: var(--default_yellow);
}

/* Sidebar Footer */
.sidebar-footer {
    margin-top: auto;
    padding: 16px 12px;
    border-top: 1px solid var(--light_border);
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex-shrink: 0;
}

.sidebar-footer-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.2s ease;
}

.sidebar-footer-logo img {
    height: 26px;
    width: auto;
    max-width: 100%;
}

.sidebar-logo-dark {
    display: block;
}

.sidebar-logo-light {
    display: none;
}

[data-theme='light'] .sidebar-logo-dark {
    display: none;
}

[data-theme='light'] .sidebar-logo-light {
    display: block;
}

.sidebar-footer-email {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--info_text);
    font-size: 13px;
    text-decoration: none;
    transition: color 0.2s ease;
    white-space: nowrap;
}

.sidebar-footer-email:hover {
    color: var(--info_value);
}

body:not(.sidebar-open) .sidebar-footer {
    padding: 16px 4px;
}

body:not(.sidebar-open) .sidebar-footer-logo,
body:not(.sidebar-open) .sidebar-footer-email {
    display: none;
}

/* Sidebar backdrop (mobile only) */
.sidebar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    z-index: 10;
}

body.sidebar-open .sidebar-backdrop {
    opacity: 1;
    visibility: visible;
}

/* Hide backdrop on desktop */
@media (min-width: 769px) {
    .sidebar-backdrop {
        display: none;
    }
}

/* Desktop: Sidebar always visible, content adjusts */
@media (min-width: 769px) {
    body.sidebar-open #chat-form-container {
        left: var(--sidebar-width);
        transition: left 0.25s ease;
    }
    
    body:not(.sidebar-open) #chat-form-container {
        left: 60px;
        transition: left 0.25s ease;
    }
}

/* Offcanvas Mobile Menu Styling */
.offcanvas {
    background-color: var(--bgCard) !important;
    color: var(--info_value) !important;
}

.offcanvas-header {
    border-bottom: 1px solid var(--accent_border);
}

.offcanvas-title {
    color: var(--info_value) !important;
}

.btn-close {
    filter: invert(1);
}

.offcanvas .nav-link {
    color: var(--info_value) !important;
    transition: opacity 0.3s ease;
}

.offcanvas .nav-link:hover {
    opacity: 0.7;
}

/* Theme adjustments */
body.futuristic-theme .header {
    background: var(--menu);
}

body.white-futuristic-theme .header {
    background: var(--menu);
}

body.default-theme .header {
    background: var(--menu);
}

/* Styles for the futuristic themes */
body.futuristic-theme {
    font-family: 'PT Serif', 'Georgia', 'Times New Roman', serif;
    font-size: 16px;
    letter-spacing: 0.01em;
    font-smooth: always;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: var(--menu);
    color: var(--info_value);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

body.futuristic-theme h1,
body.futuristic-theme h2,
body.futuristic-theme h3,
body.futuristic-theme h4,
body.futuristic-theme h5,
body.futuristic-theme h6,
body.futuristic-theme .h1,
body.futuristic-theme .h2,
body.futuristic-theme .h3,
body.futuristic-theme .h4,
body.futuristic-theme .h5,
body.futuristic-theme .h6 {
    font-family: 'Marcellus', 'Georgia', serif;
}

main.futuristic-main {
    flex-grow: 1;
    display: flex;
    align-items: center;
    flex-direction: column;
    padding: 0;
    min-height: 0;
    justify-content: center;
}

main.futuristic-main .hero-container {
    margin: 0 auto;
}

body.white-futuristic-theme {
    background: var(--menu);
    color: var(--info_value);
    font-family: 'PT Serif', 'Georgia', 'Times New Roman', serif;
    font-size: 16px;
    min-height: 100vh;
    letter-spacing: 0.01em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.white-futuristic-theme h1,
body.white-futuristic-theme h2,
body.white-futuristic-theme h3,
body.white-futuristic-theme h4,
body.white-futuristic-theme h5,
body.white-futuristic-theme h6,
body.white-futuristic-theme .h1,
body.white-futuristic-theme .h2,
body.white-futuristic-theme .h3,
body.white-futuristic-theme .h4,
body.white-futuristic-theme .h5,
body.white-futuristic-theme .h6 {
    font-family: 'Marcellus', 'Georgia', serif;
}

/* Modern Footer Styling - Matching Header Width */
.footer-section {
    background-color: var(--menu);
    color: var(--info_value);
    width: 100%;
    box-sizing: border-box;
    position: relative;
    padding: 1.5vw 4vw;
    margin-left: var(--sidebar-width);
    transition: margin-left 0.25s ease;
}

body:not(.sidebar-open) .footer-section {
    margin-left: 60px;
}

/* Hide footer on chat pages (since footer is now in sidebar) */
body.gemini-dark-theme .footer-section,
body.white-futuristic-theme .footer-section {
    display: none;
}

.footer-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #c0c0c0, transparent);
    box-shadow: var(--light_shadow);
}

.footer-content-wrapper {
    width: 100%;
}

.footer-content {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 4vw;
    width: 100%;
}

.footer-logo {
    display: flex;
    align-items: center;
}

.footer-logo img {
    max-width: 120px;
    height: auto;
}

.footer-left-section {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.footer-contact-email {
    font-family: 'Google Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.9rem;
    color: var(--info_value);
    text-decoration: none;
    transition: opacity 0.3s ease;
    opacity: 0.85;
}

.footer-contact-email:hover {
    opacity: 1;
}

.footer-center-section {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-grow: 1;
}

.footer-text-office {
    font-family: 'Google Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.85rem;
    line-height: 1.6;
    opacity: 0.8;
    text-align: center;
}

.footer-right-section {
    font-family: 'Google Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.75rem;
    opacity: 0.6;
    text-align: right;
    line-height: 1.6;
}

/* Theme adjustments for footer */
body.futuristic-theme .footer-section {
    background: var(--menu);
    color: var(--info_value);
}

body.white-futuristic-theme .footer-section {
    background: var(--menu);
    color: var(--info_value);
}

body.default-theme .footer-section {
    background: var(--menu);
    color: var(--info_value);
}

/* ==========================================
   INDEX PAGE STYLES (from index.html)
   ========================================== */

.hero-container {
    width: 100%;
    max-width: 720px;
    text-align: center;
    padding: 32px 16px;
    animation: slideUp 0.3s ease-out;
    margin: 0 auto;
}

.greeting {
    font-size: 38px;
    font-weight: 500;
    color: var(--light_title2);
    margin-bottom: 32px;
    letter-spacing: -0.5px;
    font-family: 'Google Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.greeting-subtitle {
    font-size: 20px;
    font-weight: 400;
    color: var(--light_title2);
    margin-top: -24px;
    margin-bottom: 32px;
    letter-spacing: -0.3px;
    opacity: 0.85;
    font-family: 'Google Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body.white-futuristic-theme .q-composer {
    background: var(--bgColor2);
    border: 1px solid var(--light_border);
    border-radius: var(--composer-radius);
    padding: 6px;
    /* box-shadow: var(--light_shadow); */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

body.white-futuristic-theme .q-composer:hover {
    border-color: var(--accent_border);
    /* box-shadow: var(--light_shadow); */
}

body.white-futuristic-theme .q-composer:focus-within {
    border-color: var(--accent_border);
    box-shadow: var(--light_shadow);
}

/* Animated placeholder */
.animated-placeholder {
    position: absolute;
    top: 18px;
    left: 22px;
    right: 52px;
    font-size: 16px;
    line-height: 1.5;
    color: var(--text-placeholder);
    font-family: 'PT Serif', Georgia, serif;
    font-weight: 400;
    pointer-events: none;
    white-space: normal;
    overflow: hidden;
    z-index: 2;
    opacity: 1;
    transition: opacity 0.2s ease;
    word-wrap: break-word;
    text-align: left;
}

.animated-placeholder.hidden {
    opacity: 0;
}

.animated-placeholder::after {
    content: '|';
    animation: blink 1s step-end infinite;
    margin-left: 2px;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

body.white-futuristic-theme .q-input {
    width: 100%;
    border: none;
    outline: none;
    font-size: 16px;
    line-height: 1.5;
    padding: 12px 56px 12px 16px;
    min-height: var(--min-height);
    max-height: var(--max-height);
    border-radius: var(--input-radius);
    background: transparent;
    color: var(--text-primary);
    font-weight: 400;
    resize: none;
    overflow-y: auto;
    overflow-x: hidden;
    transition: all 0.2s ease;
    font-family: 'PT Serif', Georgia, serif;
    scrollbar-width: thin;
    scrollbar-color: rgba(93, 217, 232, 0.4) transparent;
    position: relative;
    z-index: 1;
    text-align: left;
}

body.white-futuristic-theme .q-input::-webkit-scrollbar {
    width: 6px;
}

body.white-futuristic-theme .q-input::-webkit-scrollbar-track {
    background: transparent;
}

body.white-futuristic-theme .q-input::-webkit-scrollbar-thumb {
    background: rgba(93, 217, 232, 0.4);
    border-radius: 3px;
}

body.white-futuristic-theme .q-input::-webkit-scrollbar-thumb:hover {
    filter: var(--hover_brightness);
}

body.white-futuristic-theme .q-input:focus {
    background: transparent;
}

body.white-futuristic-theme .send-btn {
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 40px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 8px;
    background: transparent;
    background-image: var(--accent_gradient);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0, 0, 0.2, 1);
    flex-shrink: 0;
    overflow: hidden;
    z-index: 3;
}

body.white-futuristic-theme .send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

body.white-futuristic-theme .send-btn:not(:disabled):hover {
    filter: var(--hover_brightness);
    box-shadow: var(--light_shadow);
    transform: translateY(-1px);
}

body.white-futuristic-theme .send-btn:not(:disabled):active {
    transform: scale(0.97) translateY(0);
    transition-duration: 150ms;
    box-shadow: var(--light_shadow);
}

body.white-futuristic-theme .send-btn svg {
    width: 16px;
    height: 16px;
    display: block;
    color: white;
}

body.white-futuristic-theme .send-btn.loading {
    pointer-events: none;
}

body.white-futuristic-theme .send-btn.loading::after {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

body.white-futuristic-theme .send-btn.loading svg {
    opacity: 0;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

body.white-futuristic-theme .send-btn:focus-visible {
    outline: 2px solid var(--futuristic-cyan);
    outline-offset: 2px;
    box-shadow: var(--action_card_shadow);
}

/* ==========================================
   CHAT PAGE STYLES (from chat.html)
   ========================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    height: 100dvh;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: #131314;
    color: #e3e3e3;
}

body.gemini-dark-theme {
    display: flex;
    flex-direction: column;
    font-family: 'Google Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body.gemini-dark-theme .footer-section {
    display: none;
}

main.gemini-chat-main {
    margin-top: calc(var(--header-height, 72px));
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    background: var(--menu);
    padding: 0;
}

.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    overflow: hidden;
}

.chat-log {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    padding: 50px 16px 150px 16px;
    gap: 8px;
}

.chat-message {
    display: flex;
    flex-direction: column;
    width: 100%;
    animation: fadeInUp 0.3s ease-out;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.assistant-message {
    align-items: flex-start;
}

.user-message {
    align-items: flex-end;
}

.message-content-wrapper {
    display: flex;
    flex-direction: column;
    max-width: 80%;
}

.assistant-message .message-content-wrapper {
    width: 100% !important; /* ensure assistant blocks use consistent horizontal width */
}

.user-message .message-content-wrapper {
    align-items: flex-end;
}

.message-bubble {
    padding: 16px 20px;
    line-height: 1.6;
    font-size: 15px;
    word-wrap: break-word;
    white-space: pre-wrap;
    overflow-wrap: break-word;
}

.assistant-message .message-bubble {
    background: transparent;
    color: var(--topHover);
    border-radius: 0;
    text-align: left;
    padding: 0;
}

.assistant-message .message-bubble p {
    margin: 0;
}

.assistant-message .message-bubble p:last-child {
    margin-bottom: 0;
}

.assistant-message .message-bubble > *:last-child {
    margin-bottom: 0 !important;
}

.assistant-message .message-bubble ul,
.assistant-message .message-bubble ol {
    margin: 0;
    padding-left: 1.5em;
}

.assistant-message .message-bubble ul:last-child,
.assistant-message .message-bubble ol:last-child {
    margin-bottom: 0;
}

.assistant-message .message-bubble:empty {
    display: none;
}

.user-message .message-bubble {
    background: var(--user_chat_bubble_bg);
    color: var(--topHover);
    border-radius: 18px;
    text-align: left;
}

.message-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.chat-message:hover .message-actions {
    opacity: 1;
}

.assistant-message .message-actions {
    margin-top: 4px;
}

.user-message .message-actions {
    flex-direction: row-reverse;
}

.action-btn {
    background: transparent;
    border: none;
    color: #9aa0a6;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.action-btn:hover {
    background: #3c4043;
    color: #e8eaed;
}

.action-btn i {
    font-size: 16px;
}

.action-btn.copied {
    color: #8ab4f8;
}

#chat-form-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--menu);
    border-top: 1px solid var(--light_border);
    padding: 16px;
    z-index: 100;
}

#chat-form {
    max-width: 900px;
    margin: 0 auto;
}

body.gemini-dark-theme .q-composer {
    background: var(--bgColor3);
    border: 1px solid var(--light_border);
    border-radius: 26px;
    padding: 4px 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    flex-wrap: wrap;
}

body.gemini-dark-theme .q-composer:focus-within {
    background: var(--bgColor3);
    border-color: var(--accent_border);
}

body.gemini-dark-theme .q-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    color: var(--topHover);
    font-size: 15px;
    line-height: 1.5;
    padding: 12px 16px;
    resize: none;
    max-height: 200px;
    overflow-y: auto;
    font-family: 'Google Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body.gemini-dark-theme .q-input::placeholder {
    color: #9aa0a6;
}

body.gemini-dark-theme .q-input::-webkit-scrollbar {
    width: 6px;
}

body.gemini-dark-theme .q-input::-webkit-scrollbar-track {
    background: transparent;
}

body.gemini-dark-theme .q-input::-webkit-scrollbar-thumb {
    background: #5f6368;
    border-radius: 3px;
}

body.gemini-dark-theme .send-btn {
    background-color: var(--light_btn_bg);
    border: none;
    color: #2B333A;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

body.gemini-dark-theme .send-btn:hover:not(:disabled) {
    filter: var(--hover_brightness);
}
body.gemini-dark-theme .send-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

body.gemini-dark-theme .send-btn i {
    font-size: 20px;
    color: #2B333A;
    fill: #2B333A;
}

body.gemini-dark-theme .send-btn svg {
    color: #2B333A;
    fill: #2B333A;
}

.typing-indicator {
    display: flex;
    gap: 6px;
    padding: 16px 20px;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: #5f6368;
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(1) { animation-delay: -0.32s; }
.typing-indicator span:nth-child(2) { animation-delay: -0.16s; }
.typing-indicator span:nth-child(3) { animation-delay: 0s; }

@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-8px); opacity: 1; }
}

.chat-disclaimer {
    text-align: center;
    color: #9aa0a6;
    font-size: 12px;
    margin-top: 12px;
    padding: 0 16px;
}

.chat-log::-webkit-scrollbar {
    width: 8px;
}

.chat-log::-webkit-scrollbar-track {
    background: transparent;
}

.chat-log::-webkit-scrollbar-thumb {
    background: var(--scroll_color2);
    border-radius: 4px;
}

.chat-log::-webkit-scrollbar-thumb:hover {
    background: var(--scroll_color3);
}

.progress-container {
    display: none;
    text-align: center;
    padding: 32px 16px;
}

.progress-container.active {
    display: block;
}

.progress-status {
    color: #9aa0a6;
    font-size: 14px;
    margin-bottom: 16px;
}

.progress-dots {
    display: inline-flex;
    gap: 8px;
}

.progress-dot {
    width: 8px;
    height: 8px;
    background: #5f6368;
    border-radius: 50%;
    animation: dotBounce 1.4s ease-in-out infinite;
}

.progress-dot:nth-child(1) { animation-delay: 0s; }
.progress-dot:nth-child(2) { animation-delay: 0.2s; }
.progress-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotBounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-12px); }
}

/* AG Grid Dark theme tuning to match app dark mode */
.ag-theme-alpine-dark {
    /* tighter density */
    --ag-grid-size: 3;
    --ag-row-height: 26px;
    --ag-header-height: 34px;
}

/* Compact Select button to fit grid row height */
.q-select-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 20px;
    padding: 0 6px;
    font-size: 11px;
    line-height: 18px;
    color: var(--light_title2);
    background: transparent;
    border: 1px solid #5f6368;
    border-radius: 6px;
    cursor: pointer;
    box-sizing: border-box;
}

.q-select-btn:hover {
    filter: var(--hover_brightness);
}

@supports not (height: 100dvh) {
    html, body {
        height: 100vh;
    }
}

/* ==========================================
   MOBILE RESPONSIVE
   ========================================== */
@media (max-width: 768px) {
    /* Mobile: Header at top, no sidebar offset */
    .header {
        left: 0 !important;
    }
    
    /* Mobile: Show sidebar toggle in header */
    .sidebar-toggle-btn {
        display: inline-flex;
    }
    
    /* Mobile: Sidebar overlays content */
    .app-sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width) !important;
    }
    
    body.sidebar-open .app-sidebar {
        transform: translateX(0);
    }
    
    /* Mobile: Main content no sidebar offset */
    main {
        margin-left: 0 !important;
        padding-left: 8px !important;
        padding-right: 8px !important;
    }
    
    /* Mobile: Footer no sidebar offset */
    .footer-section {
        margin-left: 0 !important;
    }
    
    /* Mobile: Chat form no sidebar offset */
    #chat-form-container {
        left: 0 !important;
    }
    
    .header-announcement-bar-wrapper {
        padding-left: 16px;
        padding-right: 16px;
    }

    .header-display-desktop {
        display: none;
    }

    .header-display-mobile {
        display: flex;
    }
    
    /* Hide theme toggle in mobile header since it's in burger menu */
    .header-display-mobile #theme-toggle-mobile {
        display: none;
    }

    .header-nav {
        display: none;
    }

    .header-actions {
        display: flex;
        margin-left: auto;
    }

    .header-burger {
        display: flex;
        margin-left: 0;
    }

    .header-nav-item {
        margin: 0 1vw;
    }

    .footer-section {
        padding-left: 6vw;
        padding-right: 6vw;
        padding-top: 2.5vw;
        padding-bottom: 2.5vw;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        text-align: center;
    }

    .footer-left-section {
        align-items: center;
    }

    .footer-center-section {
        order: 2;
    }

    .footer-email-section {
        order: 3;
        margin-top: -12px;
    }

    .footer-right-section {
        text-align: center;
        order: 4;
    }

    .footer-logo img {
        max-width: 100px;
    }

    .footer-text-office {
        text-align: center;
    }

    :root {
        --min-height: 100px;
        --max-height: 200px;
    }

    .hero-container {
        margin: 20px auto;
        padding: 0 12px;
    }

    .greeting {
        font-size: 48px;
        margin-bottom: 32px;
    }

    .q-composer {
        padding: 4px;
    }
    
    /* Mobile: wrap badge and button to bottom row */
    body.gemini-dark-theme .q-composer {
        padding: 8px;
        gap: 8px;
    }
    
    body.gemini-dark-theme .q-input {
        width: 100%;
        flex: 1 1 100%;
        order: 1;
    }
    
    body.gemini-dark-theme .active-agent-badge {
        order: 2;
        flex: 0 0 auto;
        margin-right: 0;
    }
    
    body.gemini-dark-theme .send-btn {
        order: 3;
        flex: 0 0 auto;
        margin-left: auto;
        width: 36px;
        height: 36px;
        position: static;
    }

    .q-input {
        font-size: 16px;
        padding: 10px 48px 10px 14px;
    }

    .send-btn {
        bottom: 10px;
        right: 10px;
        width: 32px;
        height: 28px;
    }

    .animated-placeholder {
        top: 14px;
        left: 18px;
        right: 46px;
        font-size: 16px;
    }

    .chat-log {
        padding: 24px 12px 180px 12px;
        gap: 24px;
    }

    .message-content-wrapper {
        max-width: 90%;
    }

    .message-bubble {
        padding: 12px 16px;
        font-size: 14px;
    }

    .q-input {
        font-size: 16px;
    }
}

.qml_ag_grid {
    --ag-header-background-color: var(--bgColor2) !important;
    --ag-odd-row-background-color: var(--bgCard2) !important;
    --ag-background-color: var(--bgCard2) !important;
    --ag-alpine-active-color: var(--default_action) !important;
    --ag-row-hover-color: var(--active_bg) !important;
    --ag-checkbox-checked-color: var(--default_action) !important;
    --ag-range-selection-border-color: var(--accent_bg) !important;
    /*--ag-borders: 1px solid !important;*/
    --ag-header-column-separator-color: var(--accent_border) !important;
    --ag-border-color: var(--accent_border) !important;
    --ag-selected-row-background-color: var(--active_bg) !important;
}

.qml_ag_grid .ag-input-field-input,
.qml_ag_grid .ag-text-field-input {
    background-color: var(--bgCard2);
}

.qml_ag_grid .ag-menu,
.qml_ag_grid .ag-popup-child {
    background-color: var(--menu);
}

.qml_ag_grid .ag-checkbox-input:checked {
    background-color: var(--default_action) !important;
}


.thinking-box {
    background: transparent !important;
    border: 1px solid var(--accent_border) !important;
    border-radius: 12px !important;
    margin-bottom: 12px !important;
    overflow: hidden !important;
    width: 100% !important;
}

.thinking-header {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 10px 14px !important;
    cursor: pointer !important;
    user-select: none !important;
    transition: background 0.2s ease !important;
}

.thinking-header:hover {
    filter: var(--hover_brightness) !important;
}

/* Q Avatar in thinking box */
.thinking-avatar {
    width: 40px !important;
    height: 40px !important;
    max-width: 40px !important;
    max-height: 40px !important;
    object-fit: contain !important;
    flex-shrink: 0 !important;
    transition: opacity 0.3s ease !important;
    
    /* Apply theme-specific filter (lightens shadows in light mode) */
    filter: var(--avatar_filter);
}

/* Animated state (GIF playing) */
.thinking-avatar.thinking-animated {
    /* GIF handles its own animation */
    opacity: 1;
}

/* Completed state (static PNG) */
.thinking-avatar.thinking-complete {
    opacity: 1;
    /* Optional: Add subtle fade-in when swapping */
    animation: avatarFadeIn 0.3s ease-in !important;
}

@keyframes avatarFadeIn {
    from { opacity: 0.6; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* Optimize image rendering for avatars */
.thinking-avatar {
    /* Improve rendering performance */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    
    /* Prevent layout shift */
    display: block;
    
    /* Hardware acceleration for smooth animations */
    will-change: opacity, transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.thinking-title {
    flex: 1 !important;
    font-size: 13px !important;
    color: var(--info_text) !important;
    font-weight: 500 !important;
}

.thinking-time {
    font-size: 12px !important;
    font-weight: 500 !important;
    color: var(--action_card_desc) !important;
    margin-right: 8px !important;
}

/* Loading overlay for table streaming */
.table-loading-overlay {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    margin-top: 8px !important;
    transform: translate(0%, 0%) !important;
    z-index: 99 !important;
    /*
    background: var(--surface) !important;
    padding: 20px 30px !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    color: var(--accent_bg2) !important;
    */
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 12px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
}

.table-loading-overlay .iconify {
    font-size: 24px !important;
    /* Animation is built into Iconify's eos-icons:bubble-loading */
}

.table-loading-overlay span:not(.iconify) {
    color: var(--info_text) !important;
}

/* Container for table with loading state */
.table-loading-container {
    position: relative !important;
    min-height: 200px !important;
}

/* Low opacity table while loading */
.table-streaming-preview {
    opacity: 0.3 !important;
    pointer-events: none !important;
}

.thinking-toggle {
    color: var(--topHover) !important;
    font-size: 12px !important;
    transition: transform 0.2s ease !important;
}

.thinking-toggle.rotated {
    transform: rotate(180deg) !important;
}

.thinking-content {
    max-height: 0 !important;
    min-height: 0 !important;
    overflow: hidden !important;
    transition: max-height 0.3s ease !important;
}

.thinking-content.expanded {
    max-height: 400px !important;
    overflow-y: auto !important;
}

.thinking-steps {
    padding: 0 14px 12px 14px !important;
}

.thinking-step {
    display: flex !important;
    align-items: flex-start !important;
    gap: 10px !important;
    padding: 6px 0 !important;
    font-size: 13px !important;
    color: var(--info_text) !important;
    opacity: 0;
    animation: fadeIn 0.3s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateX(-5px); }
    to { opacity: 1; transform: translateX(0); }
}

.thinking-step-icon {
    color: var(--action_card_desc) !important;
    font-size: 12px !important;
    margin-top: 2px !important;
}

.thinking-step-text {
    flex: 1 !important;
    line-height: 1.4 !important;
}

.ai-loading {
    display: inline-block;
    animation: fadeText 1.5s ease-in-out infinite;
  }

@keyframes fadeText {
    0%, 100% { opacity: 0.5; }
    50%      { opacity: 1;   }
  }
  

/* common buttons styles */

.light_btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 20px;
    background-color: var(--light_btn_bg) !important;
    color: #2B333A !important;
    border: none;
    border-radius: 8px;
    font-family: 'Google Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.light_btn:hover {
    filter: var(--hover_brightness) !important;
    transform: translateY(-1px);
}

.light_btn:disabled {
    opacity: 0.5 !important;
    pointer-events: none !important;
    cursor: not-allowed !important;
}

.subtle_btn {
    color: var(--accent_bg2) !important;
    background-color: transparent !important;
}

.subtle_btn:hover {
    filter: var(--hover_brightness) !important;;
}

.gradient_btn {
    background-image: var(--accent_gradient) !important;
    background-color: transparent !important;
    border: none;
    color: var(--info_value) !important;
}

.gradient_btn:hover {
    filter: var(--hover_brightness) !important;
}

.gradient_btn:disabled {
    opacity: 0.5 !important;
    pointer-events: none !important;
    cursor: not-allowed !important;
}

.outline_btn {
    color: var(--accent_bg2) !important;
    border: 1px solid var(--accent_border) !important;
    background-color: transparent !important;
}

.outline_btn:disabled{
    opacity: 0.3 !important;
    pointer-events: none !important;
    cursor: not-allowed !important;
}

.outline_btn:hover {
    filter: var(--hover_brightness) !important;;
}


/* scrollbar styles */
/* Scrollbar track */
::-webkit-scrollbar {
    width: 7px; /* width of the scrollbar */
    height: 8px !important; /* height of the scrollbar */
    background-color: transparent !important; /* background color of the track */
}

/* Scrollbar thumb */
::-webkit-scrollbar-thumb {
    background-color: var(--scroll_color2) !important;; /* color of the thumb */
    border-radius: 3px; /* rounded corners of the thumb */
}

/* Scrollbar thumb on hover */
::-webkit-scrollbar-thumb:hover {
    background-color: var(--scroll_color3) !important; /* color of the thumb on hover */
}

/* Scrollbar track on hover */
::-webkit-scrollbar-track:hover {
    background-color: transparent !important; /* background color of the track on hover */
}

::-webkit-scrollbar-track {
    border-radius: 4px !important;
}

/* Markdown code blocks styling */
pre {
    background-color: var(--bgCard) !important;
    border-radius: 8px !important;
    padding: 12px 16px !important;
    overflow-x: auto !important;
}

pre code {
    background-color: var(--bgCard) !important;
    color: var(--topHover) !important;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
}

code {
    background-color: var(--bgCard) !important;
    color: var(--topHover) !important;
    padding: 2px 6px !important;
    border-radius: 4px !important;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace !important;
    font-size: 13px !important;
}

/* Text block styles - Markdown formatting */
.content-block-text {
    margin: 0.5rem 0;
}

.content-block-text h1 {
    font-size: 1.8em;
    font-weight: 600;
    margin: 1.2em 0 0.6em 0;
    line-height: 1.3;
    color: var(--info_value);
}

.content-block-text h2 {
    font-size: 1.5em;
    font-weight: 600;
    margin: 1em 0 0.5em 0;
    line-height: 1.3;
    color: var(--info_value);
}

.content-block-text h3 {
    font-size: 1.25em;
    font-weight: 600;
    margin: 0.9em 0 0.4em 0;
    line-height: 1.3;
    color: var(--info_value);
}

.content-block-text h4 {
    font-size: 1.1em;
    font-weight: 600;
    margin: 0.8em 0 0.3em 0;
    line-height: 1.3;
    color: var(--info_value);
}

.content-block-text h5, .content-block-text h6 {
    font-size: 1em;
    font-weight: 600;
    margin: 0.7em 0 0.3em 0;
    line-height: 1.3;
    color: var(--info_value);
}

.content-block-text p {
    margin: 0.8em 0;
    line-height: 1.6;
}

.content-block-text ul, .content-block-text ol {
    margin: 0.8em 0;
    padding-left: 2em;
    line-height: 1.6;
}

.content-block-text li {
    margin: 0.3em 0;
}

.content-block-text strong {
    font-weight: 600;
    color: var(--info_value);
}

.content-block-text em {
    font-style: italic;
}

.content-block-text code {
    background: var(--bgCard2);
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9em;
    color: var(--info_value);
}

.content-block-text pre {
    background: var(--bgCard2);
    padding: 1em;
    border-radius: 6px;
    overflow-x: auto;
    margin: 1em 0;
    border: 1px solid var(--light_border);
}

.content-block-text pre code {
    background: transparent;
    padding: 0;
    border-radius: 0;
}

.content-block-text blockquote {
    border-left: 3px solid var(--info_value);
    padding-left: 1em;
    margin: 1em 0;
    color: var(--topHover);
    font-style: italic;
}

.content-block-text a {
    color: var(--info_value);
    text-decoration: underline;
}

.content-block-text a:hover {
    opacity: 0.8;
}

.content-block-text hr {
    border: none;
    border-top: 1px solid var(--light_border);
    margin: 1.5em 0;
}

/* Chart block styles */
.content-block-chart {
    margin: 0.75rem 0;
}

.chart-loading-container {
    position: relative !important;
    min-height: 250px !important;
    background: var(--bgCard2);
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid var(--light_border);
}

.chart-loading-overlay {
    position: absolute !important;
    top: 50% !important;
    left: 45% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 99 !important;
    pointer-events: none;
    text-align: center;
}

.chart-loading-overlay .iconify {
    font-size: 24px !important;
    /* Animation is built into Iconify's eos-icons:bubble-loading */
}

.chart-loading-overlay span:not(.iconify) {
    color: var(--info_text) !important;
}

.ai-chart-wrapper {
    background: var(--bgCard2);
    padding: 1rem;
    border-radius: 8px;
    margin: 0.5rem 0;
    border: 1px solid var(--light_border);
}

.ai-chart-wrapper canvas {
    max-width: 100%;
    height: auto !important;
    max-height: 450px;
}

.chart-error {
    padding: 1rem;
    background: var(--bgCard2);
    border-radius: 8px;
    border: 1px solid var(--light_border);
    color: var(--text_error);
    display: flex;
    align-items: center;
}

/* ==========================================
   MATH/KATEX STYLES
   ========================================== */
.math-block {
    overflow-x: auto;
    overflow-y: hidden;
    margin: 4px 0;
    text-align: center;
    padding: 4px 0;
}

/* KaTeX font size and color adjustments for theme consistency */
.katex {
    font-size: 16px !important;
    color: var(--topHover);
}

/* Ensure KaTeX display mode doesn't overflow */
.katex-display {
    overflow-x: auto;
    overflow-y: hidden;
    padding: 4px 0;
    margin: 4px 0;
}

/* KaTeX inline should flow with text */
.katex-inline {
    display: inline;
    white-space: nowrap;
}

/* ==========================================
   MODAL STYLES
   ========================================== */

/* Generic Modal Styling (Login & Delete) */
.modal-content {
    background-color: var(--bgCard) !important;
    color: var(--topHover) !important;
    border: 1px solid var(--accent_border) !important;
    border-radius: 24px !important;
    box-shadow: var(--shadow-sm) !important;
    font-family: 'Google Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.modal-header {
    padding: 20px 32px;
}

.modal-body {
    padding: 32px;
    color: var(--text-placeholder);
}

.modal-title {
    color: var(--topHover) !important;
    font-family: 'Marcellus', serif !important;
    font-weight: 400;
}

[data-theme="dark"] .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* Login Modal Specifics */
#loginModal .form-control {
    background-color: var(--bgColor3);
    color: var(--topHover);
    border: 1px solid var(--light_border);
    border-radius: 12px;
    font-family: 'Google Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1rem;
    padding: 1rem 0.75rem;
}

#loginModal .form-control:focus {
    background-color: var(--bgColor3);
    color: var(--topHover);
    border-color: var(--accent_border);
    box-shadow: 0 0 0 2px var(--accent_border);
    outline: none;
}

#loginModal .form-control::placeholder {
    color: transparent;
}

#loginModal .form-floating > label {
    color: var(--text-placeholder);
    font-family: 'Google Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    padding: 1rem 0.75rem;
}

#loginModal .form-floating > .form-control:focus ~ label,
#loginModal .form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: var(--accent_font);
    transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
}

#loginModal .btn-primary-custom {
    background-color: var(--light_btn_bg);
    color: #2B333A;
    border: none;
    font-family: 'Google Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 600;
    border-radius: 12px;
    padding: 12px;
    width: 100%;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

#loginModal .btn-primary-custom:hover {
    filter: brightness(0.95);
    transform: translateY(-1px);
}

#loginModal .btn-primary-custom:disabled {
    opacity: 0.6;
    transform: none;
    cursor: not-allowed;
}

#loginModal .btn-google-custom {
    background-color: var(--bgColor2);
    color: var(--topHover);
    border: 1px solid var(--light_border);
    border-radius: 12px;
    padding: 12px;
    width: 100%;
    font-family: 'Google Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s ease;
    text-decoration: none;
    cursor: pointer;
}

#loginModal .btn-google-custom:hover {
    background-color: var(--active_bg);
    border-color: var(--accent_border);
    color: var(--topHover);
    transform: translateY(-1px);
}

#loginModal small {
    color: var(--action_card_desc) !important;
    font-family: 'Google Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

#loginModal hr {
    border-color: var(--light_border);
    opacity: 1;
    margin: 1.5rem 0;
}

#loginModal .alert-danger {
    background-color: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    color: #ea868f;
    border-radius: 12px;
    font-family: 'Google Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Delete Modal Specifics */
#deleteModal .modal-header {
    padding-bottom: 0;
}

#deleteModal .modal-footer {
    border-top: 0;
    padding-top: 0;
}

#deleteModal .btn-danger-custom {
    background-color: var(--danger_red);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 8px 20px;
    transition: background-color 0.2s;
}

#deleteModal .btn-danger-custom:hover {
    background-color: var(--danger_red_hover);
}

#deleteModal .btn-cancel-custom {
    border-radius: 12px;
    padding: 8px 20px;
}

/* ==========================================
   AGENT SELECTOR PILLS (Perplexity Style)
   ========================================== */

.agent-selector-pills {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
    position: relative;
    z-index: 10;
}

.agent-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--light_border);
    border-radius: 20px;
    color: var(--info_text);
    font-family: 'Google Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    position: relative;
}

.agent-pill i {
    font-size: 14px;
    transition: transform 0.2s ease;
}

.agent-pill:hover {
    background: var(--semi_transparent);
    border-color: var(--accent_border);
    color: var(--info_value);
    transform: translateY(-1px);
}

.agent-pill.active {
    background: var(--active_bg);
    border-color: var(--accent_bg);
    color: var(--info_value);
    font-weight: 600;
}

.agent-pill.active i {
    color: var(--accent_bg);
}

/* Agent Pill Tooltip */
.agent-pill .agent-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--bgColor);
    padding: 8px 12px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    pointer-events: none;
    z-index: 9999;
    min-width: 200px;
    max-width: 280px;
    white-space: normal;
    border: 1px solid var(--light_border);
}



.agent-pill:hover .agent-tooltip {
    opacity: 1;
    visibility: visible;
}

.agent-pill.tooltip-hidden .agent-tooltip {
    opacity: 0 !important;
    visibility: hidden !important;
}

.agent-pill .agent-tooltip-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--info_value);
    margin-bottom: 4px;
    text-align: left;
}

.agent-pill .agent-tooltip-desc {
    font-size: 12px;
    font-weight: 450;
    color: var(--topHover);
    line-height: 1.4;
    text-align: left;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .agent-selector-pills {
        gap: 6px;
    }

    .agent-pill {
        padding: 6px 12px;
        font-size: 13px;
    }

    .agent-pill i {
        font-size: 13px;
    }

    /* Tooltip on mobile: position at bottom instead of top */
    .agent-pill .agent-tooltip {
        bottom: auto;
        top: calc(100% + 8px);
    }

    /* Center-align text on mobile for better balance */
    .agent-pill .agent-tooltip-title,
    .agent-pill .agent-tooltip-desc {
        text-align: center;
    }
}

/* ==========================================
   ACTIVE AGENT BADGE (Chat Page)
   ========================================== */

.active-agent-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: var(--semi_transparent);
    border: 1px solid transparent;
    border-radius: 20px;
    font-size: 12px;
    color: var(--info_text);
    transition: all 0.2s ease;
    margin-right: 8px;
}


.active-agent-badge .iconify {
    color: var(--info_text);
}

.active-agent-badge .agent-name-small {
    font-weight: 500;
    color: var(--info_text);
}

@media (max-width: 768px) {
    .active-agent-badge {
        font-size: 11px;
        padding: 6px 10px;
        gap: 4px;
        margin-right: 0;
    }
    
    .active-agent-badge .iconify {
        width: 14px;
        height: 14px;
    }
}
