/* Custom CSS for Modern CMRU Student Portal & Chatbot */
@import url('https://fonts.googleapis.com/css2?family=Prompt:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #8b5cf6; /* Violet */
    --primary-light: #a78bfa;
    --primary-dark: #6d28d9;
    --secondary: #ec4899; /* Pink */
    --secondary-dark: #db2777;
    --accent: #14b8a6; /* Teal */
    --warning: #f59e0b; /* Yellow */
    --bg-dark: #0f172a; /* Slate 900 */
    --bg-card: rgba(30, 41, 59, 0.65); /* Glassmorphic Slate 800 */
    --text-main: #f8fafc; /* Slate 50 */
    --text-muted: #94a3b8; /* Slate 400 */
    --border-color: rgba(255, 255, 255, 0.08);
    --glass-blur: blur(12px) saturate(180%);

    /* New theme variables for dark mode (default) */
    --body-bg: linear-gradient(135deg, #090d16 0%, #0f172a 40%, #1e1b4b 100%);
    --bg-sidebar: rgba(15, 23, 42, 0.88);
    --sidebar-shadow: 5px 0 25px rgba(0, 0, 0, 0.5);
    --bg-sidebar-input: rgba(255, 255, 255, 0.03);
    --border-sidebar-input: rgba(255, 255, 255, 0.08);
    --bg-search-input: rgba(30, 41, 59, 0.5);
    --bg-submenu: rgba(0, 0, 0, 0.2);
    --bg-chat-window: rgba(15, 23, 42, 0.95);
    --border-chat-window: rgba(255, 255, 255, 0.1);
    --bg-chat-bubble-bot: rgba(255, 255, 255, 0.05);
    --border-chat-bubble-bot: rgba(255, 255, 255, 0.05);
    --text-chat-bubble-bot: var(--text-main);
    --bg-chat-suggestion: rgba(255, 255, 255, 0.03);
    --border-chat-suggestion: rgba(255, 255, 255, 0.08);
    --bg-chat-footer: rgba(15, 23, 42, 0.5);
    --bg-chat-input: rgba(255, 255, 255, 0.03);
    --border-chat-input: rgba(255, 255, 255, 0.08);
    --brand-gradient: linear-gradient(to right, #ffffff, var(--primary-light));
    --banner-text-gradient: linear-gradient(to right, #fff, #fbcfe8, #c084fc);
    --welcome-img-border: var(--border-color);

    /* News items variables */
    --bg-news-item: rgba(255, 255, 255, 0.02);
    --border-news-item: rgba(255, 255, 255, 0.03);
    --bg-news-item-hover: rgba(255, 255, 255, 0.05);
    --border-news-item-hover: rgba(255, 255, 255, 0.1);

    /* Card icon variables */
    --bg-card-icon: rgba(255, 255, 255, 0.05);
    --border-card-icon: rgba(255, 255, 255, 0.05);
    --color-card-icon: var(--primary-light);
}

body.light-theme {
    --primary: #6d28d9; /* Deep Violet */
    --primary-light: #8b5cf6;
    --primary-dark: #4c1d95;
    --secondary: #db2777; /* Deep Pink */
    --secondary-dark: #be185d;
    --accent: #0d9488; /* Teal */
    --warning: #b45309; /* Dark Yellow/Amber */
    --bg-dark: #f8fafc; /* Light slate */
    --bg-card: rgba(255, 255, 255, 0.7); /* Glassmorphic White */
    --text-main: #1e293b; /* Slate 800 */
    --text-muted: #475569; /* Slate 600 */
    --border-color: rgba(0, 0, 0, 0.08);

    /* Pastel light theme variables */
    --body-bg: linear-gradient(135deg, #f0fdf4 0%, #fae8ff 40%, #e0f2fe 100%); /* Mint, Lavender, Sky Blue */
    --bg-sidebar: rgba(255, 255, 255, 0.9);
    --sidebar-shadow: 5px 0 25px rgba(0, 0, 0, 0.06);
    --bg-sidebar-input: rgba(0, 0, 0, 0.03);
    --border-sidebar-input: rgba(0, 0, 0, 0.1);
    --bg-search-input: rgba(255, 255, 255, 0.85);
    --bg-submenu: rgba(0, 0, 0, 0.04);
    --bg-chat-window: rgba(255, 255, 255, 0.97);
    --border-chat-window: rgba(0, 0, 0, 0.1);
    --bg-chat-bubble-bot: rgba(0, 0, 0, 0.04);
    --border-chat-bubble-bot: rgba(0, 0, 0, 0.05);
    --text-chat-bubble-bot: #1e293b;
    --bg-chat-suggestion: rgba(0, 0, 0, 0.03);
    --border-chat-suggestion: rgba(0, 0, 0, 0.06);
    --bg-chat-footer: rgba(241, 245, 249, 0.95);
    --bg-chat-input: rgba(255, 255, 255, 0.95);
    --border-chat-input: rgba(0, 0, 0, 0.1);
    --brand-gradient: linear-gradient(to right, #4c1d95, #c026d3); /* Deep Violet to Fuchsia */
    --banner-text-gradient: linear-gradient(to right, #1e1b4b, #4338ca, #be185d);
    --welcome-img-border: rgba(0, 0, 0, 0.08);

    /* News items variables */
    --bg-news-item: rgba(0, 0, 0, 0.02);
    --border-news-item: rgba(0, 0, 0, 0.03);
    --bg-news-item-hover: rgba(0, 0, 0, 0.05);
    --border-news-item-hover: rgba(0, 0, 0, 0.08);

    /* Card icon variables */
    --bg-card-icon: rgba(109, 40, 217, 0.06);
    --border-card-icon: rgba(109, 40, 217, 0.1);
    --color-card-icon: var(--primary);
}

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

body {
    font-family: 'Prompt', sans-serif !important;
    background: var(--body-bg) !important;
    color: var(--text-main) !important;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    transition: background 0.4s ease, color 0.4s ease;
}

/* Background Glowing Orbs */
.bg-glow-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.bg-glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.15;
}

.orb-1 {
    top: -10%;
    left: 10%;
    width: 450px;
    height: 450px;
    background: var(--primary);
    animation: floatOrb 25s infinite alternate;
}

.orb-2 {
    bottom: -10%;
    right: 10%;
    width: 500px;
    height: 500px;
    background: var(--secondary);
    animation: floatOrb 30s infinite alternate-reverse;
}

.orb-3 {
    top: 40%;
    left: 50%;
    width: 350px;
    height: 350px;
    background: var(--accent);
    opacity: 0.08;
}

@keyframes floatOrb {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 80px) scale(1.15); }
}

/* Modern Layout Styles */
#wrapper {
    display: flex;
    min-height: 100vh;
    padding: 0;
}

#main {
    flex: 1;
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
    padding: 20px 24px 80px 24px;
}

/* Navbar */
.navbar-custom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 40px;
}

.navbar-brand-custom {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-main);
    text-decoration: none;
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: all 0.3s ease;
}

/* Theme Toggle Button */
.theme-toggle-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    backdrop-filter: var(--glass-blur);
    outline: none !important;
}

body.light-theme .theme-toggle-btn {
    background: rgba(0, 0, 0, 0.04);
}

.theme-toggle-btn:hover {
    transform: scale(1.08) rotate(15deg);
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-light);
    color: var(--primary-light);
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.2);
}

body.light-theme .theme-toggle-btn:hover {
    background: rgba(0, 0, 0, 0.08);
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 0 12px rgba(109, 40, 217, 0.15);
}

.navbar-brand-custom:hover {
    opacity: 0.9;
    text-decoration: none;
}

/* Search bar header */
.search-container {
    position: relative;
    max-width: 500px;
    width: 100%;
    margin: 0 auto 40px auto;
}

.search-input {
    width: 100%;
    background: var(--bg-search-input);
    border: 1px solid var(--border-color);
    padding: 14px 20px 14px 50px;
    border-radius: 50px;
    color: var(--text-main);
    font-family: 'Prompt', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
    backdrop-filter: var(--glass-blur);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.3);
    background: var(--bg-search-input);
}

.search-icon-btn {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.1rem;
    pointer-events: none;
}

/* Banner Dashboard */
.banner-card {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.25) 0%, rgba(236, 72, 153, 0.15) 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 28px;
    padding: 45px 35px;
    text-align: center;
    margin-bottom: 40px;
    backdrop-filter: var(--glass-blur);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.banner-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 60%);
    pointer-events: none;
}

.banner-card h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 15px;
    background: var(--banner-text-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.4;
}

.banner-card p {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 800px;
    margin: 0 auto;
    font-weight: 300;
}

/* Glass Cards Layout */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
}

.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 22px;
    padding: 28px;
    backdrop-filter: var(--glass-blur);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.glass-card:hover {
    transform: translateY(-8px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 15px 35px -5px rgba(139, 92, 246, 0.25);
    text-decoration: none;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    opacity: 0.7;
    transition: all 0.3s ease;
}

.glass-card:hover::before {
    height: 6px;
    opacity: 1;
}

.card-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 20px;
    background: var(--bg-card-icon);
    color: var(--color-card-icon);
    border: 1px solid var(--border-card-icon);
    transition: all 0.3s ease;
}

.glass-card:hover .card-icon {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    transform: scale(1.1) rotate(5deg);
}

.glass-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-main);
}

.glass-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
    flex-grow: 1;
    font-weight: 300;
}

/* Special styling for Links in cards */
.glass-card-link {
    text-decoration: none !important;
}

/* Sections Layout */
.section-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 30px;
    position: relative;
    display: inline-block;
    color: var(--text-main);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    border-radius: 2px;
}

/* News/Announcement Table Card */
.news-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 30px;
    backdrop-filter: var(--glass-blur);
    margin-bottom: 50px;
}

.news-list {
    list-style: none;
}

.news-item {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border-radius: 16px;
    background: var(--bg-news-item);
    border: 1px solid var(--border-news-item);
    margin-bottom: 15px;
    transition: all 0.25s ease;
}

.news-item:hover {
    background: var(--bg-news-item-hover);
    border-color: var(--border-news-item-hover);
    transform: translateX(5px);
}

.news-icon {
    font-size: 1.4rem;
    color: var(--secondary);
    margin-right: 20px;
}

.news-content {
    flex-grow: 1;
}

.news-title {
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--text-main);
    text-decoration: none;
    transition: all 0.2s ease;
}

.news-title:hover {
    color: var(--primary-light);
    text-decoration: none;
}

.news-badge {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 30px;
    font-weight: 500;
    margin-left: 15px;
    background: rgba(236, 72, 153, 0.15);
    color: var(--secondary);
    border: 1px solid rgba(236, 72, 153, 0.2);
}

.news-badge.pdf {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.news-badge.ppt {
    background: rgba(249, 115, 22, 0.15);
    color: #f97316;
    border: 1px solid rgba(249, 115, 22, 0.2);
}

/* Video Section */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(480px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

@media (max-width: 768px) {
    .video-grid {
        grid-template-columns: 1fr;
    }
}

.video-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    overflow: hidden;
    backdrop-filter: var(--glass-blur);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
}

.iframe-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
}

.iframe-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.video-info {
    padding: 24px;
}

.video-info h4 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-main);
}

.video-info p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 20px;
    font-weight: 300;
}

.btn-custom {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 22px;
    border-radius: 30px;
    font-weight: 500;
    font-size: 0.9rem;
    text-decoration: none !important;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-primary-custom {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white !important;
    border: none;
}

.btn-primary-custom:hover {
    box-shadow: 0 5px 15px rgba(139, 92, 246, 0.4);
    opacity: 0.95;
    transform: translateY(-2px);
}

/* Welcome Speech Section */
.welcome-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 40px;
    backdrop-filter: var(--glass-blur);
    margin-bottom: 50px;
    display: flex;
    gap: 40px;
    align-items: center;
}

@media (max-width: 992px) {
    .welcome-section {
        flex-direction: column;
        padding: 30px;
        gap: 30px;
    }
}

.welcome-img-wrapper {
    flex-shrink: 0;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--welcome-img-border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    background: #1e293b;
}

.welcome-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.welcome-text {
    flex-grow: 1;
}

.welcome-text h4 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--primary);
    line-height: 1.5;
}

.welcome-text p {
    font-size: 0.98rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 0;
    font-weight: 300;
    text-align: justify;
}

/* Footer styling */
.footer-custom {
    text-align: center;
    padding: 40px 20px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 300;
}

.footer-custom a {
    color: var(--primary-light);
    text-decoration: none;
}

.footer-custom a:hover {
    text-decoration: underline;
}

/* ---------------------------------------------------- */
/* CHATBOT FLOATING WINDOW & WIDGET                     */
/* ---------------------------------------------------- */

/* Floating Chatbot Toggle Button */
.chat-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.5);
    z-index: 9999;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid rgba(255, 255, 255, 0.15);
}

.chat-toggle:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.7);
}

.chat-toggle .badge-notify {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: red;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    font-weight: bold;
    animation: pulseNotify 2s infinite;
}

@keyframes pulseNotify {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Chat Window Panel */
.chat-window {
    position: fixed;
    bottom: 105px;
    right: 30px;
    width: 400px;
    height: 600px;
    background: var(--bg-chat-window);
    border: 1px solid var(--border-chat-window);
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.3);
    z-index: 9998;
    backdrop-filter: blur(20px);
    overflow: hidden;
    transform: scale(0.8) translateY(100px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.chat-window.open {
    transform: scale(1) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

@media (max-width: 480px) {
    .chat-window {
        width: calc(100vw - 40px);
        height: calc(100vh - 140px);
        right: 20px;
        bottom: 95px;
    }
}

/* Chat Header */
.chat-header {
    padding: 18px 22px;
    background: linear-gradient(to right, rgba(139, 92, 246, 0.15), rgba(236, 72, 153, 0.1));
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-avatar {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.chat-status-wrapper {
    display: flex;
    flex-direction: column;
}

.chat-bot-name {
    font-size: 0.98rem;
    font-weight: 600;
    color: var(--text-main);
}

.chat-status {
    font-size: 0.75rem;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 5px;
}

.chat-status::before {
    content: '';
    width: 7px;
    height: 7px;
    background: var(--accent);
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 8px var(--accent);
    animation: blinkStatus 1.5s infinite;
}

@keyframes blinkStatus {
    0% { opacity: 0.3; }
    50% { opacity: 1; }
    100% { opacity: 0.3; }
}

.chat-close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.2s ease;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-close-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

/* Chat Messages */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    scroll-behavior: smooth;
}

/* Custom Scrollbar for messages */
.chat-messages::-webkit-scrollbar {
    width: 6px;
}
.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}
.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}
.chat-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Chat bubble structures */
.message-bubble {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 0.92rem;
    line-height: 1.5;
    word-wrap: break-word;
    position: relative;
    animation: messageSlideIn 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
    opacity: 0;
    transform: translateY(10px);
}

@keyframes messageSlideIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-bubble.bot {
    align-self: flex-start;
    background: var(--bg-chat-bubble-bot);
    border: 1px solid var(--border-chat-bubble-bot);
    color: var(--text-chat-bubble-bot);
    border-top-left-radius: 4px;
}

.message-bubble.user {
    align-self: flex-end;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: white;
    border-top-right-radius: 4px;
    box-shadow: 0 4px 15px rgba(109, 40, 217, 0.2);
}

/* Markdown formatting inside bubbles */
.message-bubble p {
    margin-bottom: 8px;
}
.message-bubble p:last-child {
    margin-bottom: 0;
}
.message-bubble ul, .message-bubble ol {
    margin-left: 20px;
    margin-bottom: 8px;
}
.message-bubble blockquote {
    border-left: 3px solid var(--secondary);
    padding-left: 10px;
    margin: 8px 0;
    font-style: italic;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 4px;
    padding-top: 4px;
    padding-bottom: 4px;
}
.message-bubble strong {
    color: var(--primary-light);
}
.message-bubble.user strong {
    color: white;
    text-decoration: underline;
}

/* Suggestions Container */
.chat-suggestions {
    padding: 0 20px 15px 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.suggestion-chip {
    background: var(--bg-chat-suggestion);
    border: 1px solid var(--border-chat-suggestion);
    border-radius: 30px;
    padding: 6px 14px;
    font-size: 0.8rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 300;
}

.suggestion-chip:hover {
    background: rgba(139, 92, 246, 0.1);
    border-color: rgba(139, 92, 246, 0.3);
    color: var(--primary-light);
    transform: translateY(-1px);
}

/* Chat Footer & Input */
.chat-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 10px;
    align-items: center;
    background: var(--bg-chat-footer);
}

.chat-input-wrapper {
    position: relative;
    flex: 1;
}

.chat-input {
    width: 100%;
    background: var(--bg-chat-input);
    border: 1px solid var(--border-chat-input);
    padding: 12px 16px;
    border-radius: 30px;
    color: var(--text-main);
    font-family: 'Prompt', sans-serif;
    font-size: 0.9rem;
    transition: all 0.25s ease;
}

.chat-input:focus {
    outline: none;
    border-color: var(--primary-light);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.2);
}

.chat-send-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.25s ease;
    box-shadow: 0 4px 10px rgba(139, 92, 246, 0.3);
    flex-shrink: 0;
}

.chat-send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.5);
}

/* Typing Indicator Animation */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 5px;
    align-items: center;
}

.typing-dot {
    width: 7px;
    height: 7px;
    background: var(--text-muted);
    border-radius: 50%;
    animation: pulseDot 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes pulseDot {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* ---------------------------------------------------- */
/* SIDEBAR & MENU OVERRIDES                             */
/* ---------------------------------------------------- */

#sidebar {
    background: var(--bg-sidebar) !important;
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-color);
    box-shadow: var(--sidebar-shadow);
    z-index: 1000 !important;
    transition: min-width 0.5s ease, max-width 0.5s ease, opacity 0.5s ease, left 0.5s ease, background-color 0.4s ease !important;
}

#sidebar .inner {
    padding: 2.5em 2em !important;
    background: transparent !important;
}

#sidebar .toggle {
    background: linear-gradient(135deg, var(--primary), var(--secondary)) !important;
    border-radius: 0 10px 10px 0 !important;
    color: white !important;
    box-shadow: 3px 0 10px rgba(139, 92, 246, 0.3) !important;
    border: 1px solid rgba(255,255,255,0.1);
    border-left: none;
    transition: all 0.3s ease !important;
    width: 4rem !important;
    height: 4rem !important;
    line-height: 4rem !important;
}

#sidebar .toggle::before {
    color: white !important;
    line-height: 4rem !important;
}

#sidebar input[type="text"] {
    background: var(--bg-sidebar-input) !important;
    border: 1px solid var(--border-sidebar-input) !important;
    border-radius: 30px !important;
    color: var(--text-main) !important;
    font-family: 'Prompt', sans-serif !important;
}

#sidebar input[type="text"]:focus {
    border-color: var(--primary-light) !important;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.2) !important;
}

/* Menu Customization */
#menu > ul > li {
    border-top: 1px solid var(--border-color) !important;
    margin: 0.25em 0 0 0 !important;
    padding: 0.25em 0 0 0 !important;
}

#menu > ul > li:first-child {
    border-top: none !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
}

#menu ul li a {
    color: var(--text-muted) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03) !important;
    font-weight: 400 !important;
    transition: all 0.2s ease !important;
    font-family: 'Prompt', sans-serif !important;
    font-size: 0.88rem !important;
    padding: 8px 0px !important;
}

#menu ul li a:hover {
    color: var(--primary-light) !important;
    padding-left: 10px !important;
    background: transparent !important;
}

#menu ul li span.opener {
    color: var(--text-main) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03) !important;
    font-weight: 500 !important;
    font-family: 'Prompt', sans-serif !important;
    font-size: 0.90rem !important;
    padding: 8px 0px !important;
    position: relative !important;
}

#menu ul li span.opener:before {
    color: var(--text-muted) !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    margin: 0 !important;
}

#menu ul li span.opener.active {
    color: var(--primary-light) !important;
}

#menu ul li span.opener.active:before {
    transform: translateY(-50%) rotate(-180deg) !important;
}

#menu ul li ul {
    background: var(--bg-submenu) !important;
    border-radius: 8px !important;
    margin: 4px 0 !important;
    padding: 4px 12px !important;
    border: 1px solid var(--border-color) !important;
}

#menu ul li ul li a {
    border-bottom: none !important;
    font-size: 0.82rem !important;
    padding: 5px 0px !important;
}
