:root {
    --bs-primary: #66689d;
    --bs-primary-rgb: 102, 104, 157;
    --vesper-primary: #66689d;
    --vesper-primary-dark: #4d4f78;
    --vesper-primary-light: #8587b3;
    --vesper-accent: #9496c9;
    --sidebar-width: 250px;
}

* {
    box-sizing: border-box;
}

html, body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

body {
    background-color: #f5f5f5;
}

/* ============================================================
   App Layout — CSS-only sidebar (no JS interop)
   ============================================================ */
.app-layout {
    display: flex;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

/* ---- Sidebar panel ---- */
.vadvisor-sidebar {
    width: 240px;
    min-width: 240px;
    background: linear-gradient(180deg, var(--vesper-primary) 0%, var(--vesper-primary-dark) 100%);
    color: white;
    box-shadow: 2px 0 12px rgba(0,0,0,0.15);
    transition: width 0.25s ease, min-width 0.25s ease;
    overflow: hidden;
    flex-shrink: 0;
    z-index: 100;
}

/* Collapsed state */
.sidebar-collapsed .vadvisor-sidebar {
    width: 56px;
    min-width: 56px;
}

.sidebar-collapsed .sidebar-label {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

/* Inner flex column — fills sidebar height */
.sidebar-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

/* ---- Shared icon/label pattern ---- */
.sidebar-icon {
    width: 24px;
    min-width: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sidebar-icon i {
    font-size: 1rem;
}

.sidebar-label {
    white-space: nowrap;
    overflow: hidden;
    transition: opacity 0.2s ease;
}

/* ---- Header ---- */
.sidebar-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.12);
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
}

.sidebar-header:hover {
    background: rgba(255,255,255,0.06);
}

.sidebar-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
    border-radius: 4px;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.brand-text strong {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    color: white;
}

.brand-text small {
    font-size: 0.68rem;
    color: rgba(255,255,255,0.6);
}

/* ---- Navigation ---- */
.sidebar-nav {
    flex: 1;
    padding: 6px 0;
    overflow-y: auto;
    overflow-x: hidden;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 16px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: all 0.15s ease;
    cursor: pointer;
    min-height: 40px;
}

.nav-item:hover:not(.disabled) {
    background: rgba(255,255,255,0.1);
    color: white;
}

.nav-item.active {
    background: rgba(255,255,255,0.15);
    color: white;
    border-left: 3px solid var(--vesper-accent);
    padding-left: 13px;
}

.nav-item.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ---- Footer ---- */
.sidebar-footer {
    padding: 10px 16px;
    border-top: 1px solid rgba(255,255,255,0.12);
    flex-shrink: 0;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    animation: pulse 2s infinite;
}

.status-ready {
    background: #28a745;
    box-shadow: 0 0 6px rgba(40, 167, 69, 0.6);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.status-text {
    display: flex;
    flex-direction: column;
}

.status-text strong {
    font-size: 0.78rem;
    font-weight: 600;
    color: white;
}

.status-text small {
    font-size: 0.68rem;
    color: rgba(255,255,255,0.6);
}

/* Vesper footer branding */
.vesper-brand {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
}

.vesper-link {
    display: inline-block;
    transition: opacity 0.3s ease;
    opacity: 0.75;
}

.vesper-link:hover {
    opacity: 1;
}

.vesper-footer-logo {
    max-width: 120px;
    height: auto;
    filter: brightness(0) invert(1);
}

/* ---- Main Content ---- */
.main-content {
    flex: 1;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}

.page {
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

main {
    flex: 1;
    height: 100%;
    width: 100%;
    overflow: hidden;
}

/* Chat Container - Full Screen */
.chat-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    margin: 0;
    background: #f9f9f9;
    overflow: hidden;
}

/* Header */
.chat-header {
    background: linear-gradient(135deg, var(--vesper-primary) 0%, var(--vesper-primary-dark) 100%);
    color: white;
    padding: 1rem 1.5rem;
    border-bottom: 3px solid var(--vesper-accent);
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.chat-header h4 {
    color: white;
    margin: 0;
    font-size: 1.25rem;
}

.chat-header small {
    color: rgba(255,255,255,0.9);
}

.chat-header .btn {
    font-size: 0.875rem;
}

/* Messages Area */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
    background: #f9f9f9;
}

/* Welcome Message */
.welcome-message {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 2rem;
}

.welcome-message .text-center {
    max-width: 600px;
}

.welcome-message i.fa-cloud {
    color: var(--vesper-primary);
}

.welcome-message .btn-primary {
    background: linear-gradient(135deg, var(--vesper-primary) 0%, var(--vesper-primary-dark) 100%);
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.welcome-message .btn-primary:hover {
    background: linear-gradient(135deg, var(--vesper-primary-dark) 0%, var(--vesper-primary) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 104, 157, 0.3);
}

.welcome-message .btn-outline-primary {
    border: 2px solid var(--vesper-primary);
    color: var(--vesper-primary);
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.welcome-message .btn-outline-primary:hover {
    background: var(--vesper-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 104, 157, 0.3);
}

/* Message Bubbles */
.message {
    display: flex;
    margin-bottom: 1.5rem;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-message {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.user-message .message-avatar {
    background: linear-gradient(135deg, var(--vesper-primary-light) 0%, var(--vesper-accent) 100%);
    color: white;
    margin-left: 1rem;
}

.assistant-message .message-avatar {
    background: linear-gradient(135deg, var(--vesper-primary) 0%, var(--vesper-primary-dark) 100%);
    color: white;
    margin-right: 1rem;
}

.message-content {
    flex: 1;
    max-width: 70%;
}

.message-header {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
    font-size: 0.875rem;
}

.message-text {
    background: white;
    padding: 1rem;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.user-message .message-text {
    background: linear-gradient(135deg, var(--vesper-primary) 0%, var(--vesper-primary-dark) 100%);
    color: white;
}

.tools-executed {
    margin-top: 0.5rem;
}

.badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: var(--vesper-primary);
    border-radius: 50%;
    animation: bounce 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;
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

/* Input Area */
.chat-input {
    padding: 1.5rem;
    background: white;
    border-top: 2px solid #e0e0e0;
    flex-shrink: 0;
    box-shadow: 0 -2px 4px rgba(0,0,0,0.05);
}

.chat-input input {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
}

.chat-input input:focus {
    border-color: var(--vesper-primary);
    box-shadow: 0 0 0 0.2rem rgba(102, 104, 157, 0.25);
    outline: none;
}

.chat-input .btn-primary {
    background: linear-gradient(135deg, var(--vesper-primary) 0%, var(--vesper-primary-dark) 100%);
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.chat-input .btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--vesper-primary-dark) 0%, var(--vesper-primary) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 104, 157, 0.3);
}

.chat-input .btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Header Buttons */
.chat-header .btn-outline-primary,
.chat-header .btn-outline-secondary {
    border-color: white;
    color: white;
    background: transparent;
}

.chat-header .btn-outline-primary:hover,
.chat-header .btn-outline-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: white;
    color: white;
}

/* Modal Styles */
.modal-header {
    background: linear-gradient(135deg, var(--vesper-primary) 0%, var(--vesper-primary-dark) 100%);
    color: white;
    border-bottom: 3px solid var(--vesper-accent);
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
}

.modal-footer .btn-primary {
    background: linear-gradient(135deg, var(--vesper-primary) 0%, var(--vesper-primary-dark) 100%);
    border: none;
    transition: all 0.3s ease;
}

.modal-footer .btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--vesper-primary-dark) 0%, var(--vesper-primary) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 104, 157, 0.3);
}

.modal-footer .btn-outline-primary {
    border-color: var(--vesper-primary);
    color: var(--vesper-primary);
}

.modal-footer .btn-outline-primary:hover {
    background: var(--vesper-primary);
    color: white;
}

/* Scrollbar Styling */
.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: var(--vesper-primary);
    border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: var(--vesper-primary-dark);
}

/* Responsive — collapse sidebar on small screens */
@media (max-width: 768px) {
    .vadvisor-sidebar {
        width: 56px;
        min-width: 56px;
    }
    .vadvisor-sidebar .sidebar-label {
        opacity: 0;
        width: 0;
        overflow: hidden;
    }
}

/* Blazor Error UI */
#blazor-error-ui {
    background: #ffebe9;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
}

/* Blazor Reconnection UI */
#components-reconnect-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
}

#components-reconnect-modal.components-reconnect-show {
    display: block;
}

#components-reconnect-modal .components-reconnect-hide {
    display: none;
}

/* Show appropriate reconnection state */
#components-reconnect-modal.components-reconnect-show .show,
#components-reconnect-modal.components-reconnect-failed .failed,
#components-reconnect-modal.components-reconnect-rejected .rejected {
    display: block !important;
}

#components-reconnect-modal .show,
#components-reconnect-modal .failed,
#components-reconnect-modal .rejected {
    display: none;
}

/* ============================================================
   vAdvisor SfAIAssistView Theme — Brand Color #66689d
   ============================================================ */

/* Outer layout: chat history sidebar + chat area */
.vadvisor-chat-layout {
    display: flex;
    flex-direction: row;
    height: 100%;
    width: 100%;
    overflow: hidden;
}

/* Container fills the remaining space next to sidebar */
.vadvisor-chat-container {
    flex: 1;
    height: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Core component override — fill container */
.e-aiassistview.vadvisor-assist {
    border: none;
    border-radius: 0;
    box-shadow: none;
}

/* Header toolbar — Vesper branded */
.e-aiassistview.vadvisor-assist .e-view-header .e-toolbar,
.e-aiassistview.vadvisor-assist .e-view-header .e-toolbar-items {
    background: linear-gradient(135deg, var(--vesper-primary) 0%, var(--vesper-primary-dark) 100%);
    border-bottom: 3px solid var(--vesper-accent);
    color: white;
    min-height: 56px;
}

.e-aiassistview.vadvisor-assist .e-view-header .e-toolbar .e-tbar-btn {
    color: white;
}

.e-aiassistview.vadvisor-assist .e-view-header .e-toolbar .e-tbar-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

.e-aiassistview.vadvisor-assist .e-view-header .e-toolbar .e-tbar-btn:focus {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* Toolbar title styling */
.vadvisor-toolbar-title {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    font-size: 1.1rem;
    padding: 0 8px;
}

.vadvisor-toolbar-title strong {
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* Hamburger menu button in toolbar */
.vadvisor-toolbar-hamburger {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vadvisor-toolbar-hamburger:hover {
    background: rgba(255, 255, 255, 0.15);
}

.vadvisor-toolbar-hamburger:active {
    background: rgba(255, 255, 255, 0.25);
}

/* Content area background */
.e-aiassistview.vadvisor-assist .e-view-content {
    background: #f9f9f9;
}

/* Send / prompt input — Vesper primary */
.e-aiassistview.vadvisor-assist .e-view-content .e-input-group {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: border-color 0.2s;
}

.e-aiassistview.vadvisor-assist .e-view-content .e-input-group:focus-within {
    border-color: var(--vesper-primary);
    box-shadow: 0 0 0 3px rgba(102, 104, 157, 0.15);
}

.e-aiassistview.vadvisor-assist .e-send-icon,
.e-aiassistview.vadvisor-assist .e-assist-send {
    color: var(--vesper-primary) !important;
}

.e-aiassistview.vadvisor-assist .e-assist-send:hover {
    background: var(--vesper-primary);
    color: white !important;
    border-radius: 50%;
}

/* Prompt suggestions / chips — Vesper accent */
.e-aiassistview.vadvisor-assist .e-suggestion-list .e-btn,
.e-aiassistview.vadvisor-assist .e-suggestion-list button {
    border: 1px solid var(--vesper-primary);
    color: var(--vesper-primary);
    border-radius: 20px;
    font-size: 0.82rem;
    padding: 6px 16px;
    transition: all 0.2s ease;
}

.e-aiassistview.vadvisor-assist .e-suggestion-list .e-btn:hover,
.e-aiassistview.vadvisor-assist .e-suggestion-list button:hover {
    background: var(--vesper-primary);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(102, 104, 157, 0.3);
}

/* Suggestion header text */
.e-aiassistview.vadvisor-assist .e-suggestion-header {
    color: var(--vesper-primary);
    font-weight: 600;
    font-size: 0.85rem;
}

/* User prompt bubbles */
.e-aiassistview.vadvisor-assist .e-prompt-text,
.e-aiassistview.vadvisor-assist .e-prompt-item-template {
    background: linear-gradient(135deg, var(--vesper-primary) 0%, var(--vesper-primary-dark) 100%);
    color: white;
    border-radius: 12px;
    padding: 12px 16px;
}

/* Response items — clean white cards */
.e-aiassistview.vadvisor-assist .e-response-item-template {
    background: transparent;
}

/* Banner (welcome screen) */
.vadvisor-banner {
    text-align: center;
    padding: 48px 24px;
    max-width: 600px;
    margin: 0 auto;
}

.vadvisor-banner .banner-icon {
    font-size: 3rem;
    color: var(--vesper-primary);
    margin-bottom: 16px;
}

.vadvisor-banner h3 {
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 8px;
}

.vadvisor-banner p {
    color: #718096;
    font-size: 1rem;
    margin-bottom: 24px;
}

.vadvisor-banner .banner-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.vadvisor-banner .e-btn.e-primary {
    background: linear-gradient(135deg, var(--vesper-primary) 0%, var(--vesper-primary-dark) 100%);
    border: none;
    color: white;
    border-radius: 8px;
    padding: 10px 24px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.vadvisor-banner .e-btn.e-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 104, 157, 0.4);
}

.vadvisor-banner .e-btn.e-outline {
    border: 2px solid var(--vesper-primary);
    color: var(--vesper-primary);
    background: transparent;
    border-radius: 8px;
    padding: 10px 24px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.vadvisor-banner .e-btn.e-outline:hover {
    background: var(--vesper-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 104, 157, 0.3);
}

/* Response content formatting */
.vadvisor-response {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.vadvisor-response .response-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--vesper-primary);
}

.vadvisor-response .response-agent-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--vesper-primary) 0%, var(--vesper-primary-dark) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
}

.vadvisor-response .response-body {
    color: #2d3748;
    line-height: 1.7;
    padding-left: 36px;
}

/* Markdown in responses */
.vadvisor-response .response-body h3,
.vadvisor-response .response-body h4,
.vadvisor-response .response-body h5,
.vadvisor-response .response-body h6 {
    margin-top: 16px;
    margin-bottom: 8px;
    font-weight: 600;
    color: #1a202c;
}

.vadvisor-response .response-body h4 {
    color: var(--vesper-primary);
    border-bottom: 2px solid var(--vesper-accent);
    padding-bottom: 6px;
}

.vadvisor-response .response-body p {
    margin-bottom: 8px;
}

.vadvisor-response .response-body ul {
    margin: 8px 0;
    padding-left: 20px;
}

.vadvisor-response .response-body li {
    margin-bottom: 4px;
    color: #4a5568;
}

.vadvisor-response .response-body strong {
    color: #1a202c;
}

.vadvisor-response .response-body code {
    background: #f0f0f5;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 1px 6px;
    font-size: 0.88em;
    font-family: 'Courier New', monospace;
    color: var(--vesper-primary);
}

.vadvisor-response .response-body .code-block {
    background: #1a202c;
    border-radius: 8px;
    padding: 16px;
    overflow-x: auto;
    margin: 12px 0;
}

.vadvisor-response .response-body .code-block code {
    background: transparent;
    border: none;
    color: #e2e8f0;
    padding: 0;
    font-size: 0.9em;
    white-space: pre;
}

.vadvisor-response .response-body a {
    color: var(--vesper-primary);
    text-decoration: underline;
}

.vadvisor-response .response-body a:hover {
    color: var(--vesper-primary-dark);
}

.vadvisor-response .response-body hr {
    border: none;
    border-top: 1px solid #e2e8f0;
    margin: 16px 0;
}

/* Response metadata footer (agent, tokens, duration) */
.vadvisor-response .response-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 0 0 36px;
    margin-top: 4px;
    border-top: 1px solid #f0f0f5;
}

.vadvisor-response .response-meta .meta-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.72rem;
    color: #9b9bb8;
    font-weight: 500;
}

.vadvisor-response .response-meta .meta-tag i {
    font-size: 0.68rem;
    opacity: 0.75;
}

.vadvisor-response .response-meta .meta-tag i.fa-coins {
    color: #d4a940;
    opacity: 1;
}

/* Tool execution display */
.vadvisor-response .response-tools {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 4px 0 0 36px;
    margin-top: 2px;
}

.vadvisor-response .response-tools .tools-label {
    font-size: 0.7rem;
    color: #9b9bb8;
    font-weight: 600;
}

.vadvisor-response .response-tools .tools-label i {
    font-size: 0.65rem;
    margin-right: 3px;
}

.vadvisor-response .response-tools .tool-tag {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.68rem;
    padding: 1px 7px;
    border-radius: 3px;
    font-weight: 500;
    cursor: default;
}

.vadvisor-response .response-tools .tool-tag.tool-success {
    background: rgba(72, 187, 120, 0.1);
    color: #38a169;
}

.vadvisor-response .response-tools .tool-tag.tool-failed {
    background: rgba(245, 101, 101, 0.1);
    color: #e53e3e;
}

/* Response toolbar icons (copy, thumbs) */
.e-aiassistview.vadvisor-assist .e-response-item-template .e-toolbar .e-tbar-btn {
    color: #a0aec0;
    transition: color 0.2s;
}

.e-aiassistview.vadvisor-assist .e-response-item-template .e-toolbar .e-tbar-btn:hover {
    color: var(--vesper-primary);
    background: rgba(102, 104, 157, 0.08);
}

/* Clear button */
.e-aiassistview.vadvisor-assist .e-clear-icon {
    color: #a0aec0;
}

.e-aiassistview.vadvisor-assist .e-clear-icon:hover {
    color: #e53e3e;
}

/* Scrollbar in content area */
.e-aiassistview.vadvisor-assist .e-view-content::-webkit-scrollbar {
    width: 6px;
}

.e-aiassistview.vadvisor-assist .e-view-content::-webkit-scrollbar-thumb {
    background: var(--vesper-primary-light);
    border-radius: 3px;
}

.e-aiassistview.vadvisor-assist .e-view-content::-webkit-scrollbar-thumb:hover {
    background: var(--vesper-primary);
}

/* ============================================================
   vAdvisor SfDialog Theme
   ============================================================ */

/* Dialog header — Vesper branded gradient */
.e-dialog.vadvisor-dialog .e-dlg-header-content {
    background: linear-gradient(135deg, var(--vesper-primary) 0%, var(--vesper-primary-dark) 100%);
    border-bottom: 3px solid var(--vesper-accent);
    padding: 16px 24px;
}

.e-dialog.vadvisor-dialog .e-dlg-header {
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
}

.dialog-header-content {
    display: flex;
    align-items: center;
    color: white;
    font-weight: 600;
}

.dialog-header-content .fas {
    font-size: 1.1rem;
}

/* Close button in header */
.e-dialog.vadvisor-dialog .e-dlg-header-content .e-btn.e-dlg-closeicon-btn {
    color: white;
}

.e-dialog.vadvisor-dialog .e-dlg-header-content .e-btn.e-dlg-closeicon-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Dialog content */
.e-dialog.vadvisor-dialog .e-dlg-content {
    padding: 24px;
}

/* Dialog footer */
.e-dialog.vadvisor-dialog .e-footer-content {
    padding: 16px 24px;
    border-top: 1px solid #e2e8f0;
}

.dialog-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    width: 100%;
}

.dialog-footer .template-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.dialog-footer .template-links .e-btn.e-outline {
    border: 1px solid var(--vesper-primary);
    color: var(--vesper-primary);
    font-size: 0.8rem;
    padding: 4px 12px;
}

.dialog-footer .template-links .e-btn.e-outline:hover {
    background: var(--vesper-primary);
    color: white;
}

.dialog-footer .action-buttons {
    display: flex;
    gap: 8px;
}

/* Primary button in dialog */
.e-dialog.vadvisor-dialog .e-btn.e-primary {
    background: linear-gradient(135deg, var(--vesper-primary) 0%, var(--vesper-primary-dark) 100%);
    border: none;
    color: white;
    font-weight: 600;
    transition: all 0.2s ease;
}

.e-dialog.vadvisor-dialog .e-btn.e-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(102, 104, 157, 0.35);
}

.e-dialog.vadvisor-dialog .e-btn.e-primary:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

/* Dialog overlay */
.e-dialog.vadvisor-dialog + .e-dlg-overlay {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
}

/* ============================================================
   vAdvisor SfUploader Theme
   ============================================================ */

.vadvisor-uploader .e-upload {
    border: 2px dashed #cbd5e0;
    border-radius: 8px;
    transition: border-color 0.2s ease;
}

.vadvisor-uploader .e-upload:hover {
    border-color: var(--vesper-primary);
}

.vadvisor-uploader .e-upload .e-upload-drag-hover {
    border-color: var(--vesper-primary);
    background: rgba(102, 104, 157, 0.05);
}

.vadvisor-uploader .e-file-select-wrap .e-btn {
    background: var(--vesper-primary);
    color: white;
    border: none;
    border-radius: 6px;
}

.vadvisor-uploader .e-file-select-wrap .e-btn:hover {
    background: var(--vesper-primary-dark);
}

.vadvisor-uploader .e-upload .e-upload-files .e-upload-file-list {
    border-bottom: 1px solid #f0f0f5;
}

.vadvisor-uploader .e-icons.e-file-remove-btn:hover {
    color: #e53e3e;
}

/* Upload section spacing */
.upload-section {
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f5;
}

.upload-section:last-of-type {
    border-bottom: none;
}

/* CSV format guide */
.csv-format-guide {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
}

/* ============================================================
   Login Display — Sidebar auth user info
   ============================================================ */

.login-display {
    padding: 8px 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 8px;
}

.login-display .user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.8rem;
    margin-bottom: 4px;
}

.login-display .user-info i {
    font-size: 1.1rem;
    color: var(--vesper-accent);
}

.login-display .user-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.login-display .sign-out-link,
.login-display .sign-in-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.75rem;
    transition: color 0.2s;
}

.login-display .sign-out-link:hover,
.login-display .sign-in-link:hover {
    color: rgba(255, 255, 255, 0.95);
}
