:root {
    --bg-dark: #090d16;
    --bg-card: rgba(17, 24, 43, 0.7);
    --bg-card-hover: rgba(23, 33, 58, 0.85);
    --border-glow: rgba(59, 130, 246, 0.2);
    --border-glow-active: rgba(59, 130, 246, 0.4);
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --primary: #3b82f6;
    --primary-gradient: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    --accent-green: #10b981;
    --accent-purple: #8b5cf6;
    --danger: #ef4444;
    --font-main: 'Plus Jakarta Sans', sans-serif;
    --font-display: 'Space Grotesk', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-main);
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background-image: 
        radial-gradient(at 0% 0%, rgba(30, 58, 138, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(99, 102, 241, 0.1) 0px, transparent 50%);
}

header {
    background: rgba(9, 13, 22, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-logo i {
    color: var(--primary);
    filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.5));
}

.header-logo h1 {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-status {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-green);
    padding: 0.4rem 0.8rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-badge.disconnected {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.status-badge i {
    width: 12px;
    height: 12px;
}

.main-container {
    flex: 1;
    display: flex;
    height: calc(100vh - 4.5rem);
    min-height: 0;
    position: relative;
}

/* Sidebar Column */
.sidebar {
    width: 320px;
    background: rgba(13, 19, 33, 0.5);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    overflow-y: auto;
}

.section-title {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.customer-selector-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

select.customer-dropdown {
    width: 100%;
    background: rgba(17, 24, 43, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-family: var(--font-main);
    font-size: 0.9rem;
    outline: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

select.customer-dropdown:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}

/* Profile Card Glassmorphic */
.profile-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glow);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.profile-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary-gradient);
}

.profile-card:hover {
    border-color: var(--border-glow-active);
    background: var(--bg-card-hover);
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.avatar-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    font-family: var(--font-display);
}

.profile-name {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1rem;
}

.profile-detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    font-size: 0.8rem;
}

.profile-detail-label {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.75rem;
}

.profile-detail-value {
    color: var(--text-main);
    font-family: var(--font-mono);
    word-break: break-all;
}

/* Security Panel */
.security-panel {
    background: rgba(16, 185, 129, 0.03);
    border: 1px solid rgba(16, 185, 129, 0.15);
    border-radius: 12px;
    padding: 1.25rem;
    font-size: 0.8rem;
    line-height: 1.4;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.security-panel h4 {
    color: var(--accent-green);
    font-family: var(--font-display);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.security-panel p {
    color: #cbd5e1;
}

/* Chat & Logs Split Screen */
.workspace-split {
    flex: 1;
    display: flex;
    flex-direction: row;
    height: 100%;
    min-height: 0;
}

/* Chat Panel */
.chat-panel {
    flex: 1.2;
    display: flex;
    flex-direction: column;
    background: rgba(9, 13, 22, 0.3);
    position: relative;
    height: 100%;
    min-height: 0;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    min-height: 0;
}

.message-bubble {
    max-width: 80%;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    line-height: 1.5;
    font-size: 0.92rem;
    animation: fadeInBubble 0.3s ease forwards;
    position: relative;
}

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

.message-bubble.user {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.25);
    color: var(--text-main);
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}

.message-bubble.assistant {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    align-self: flex-start;
    border-bottom-left-radius: 2px;
}

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

.message-bubble ul, .message-bubble ol {
    margin-left: 1.25rem;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.message-bubble li {
    margin-bottom: 0.25rem;
}

/* Tool logs visually injected in Chat stream */
.tool-log-bubble {
    align-self: flex-start;
    background: rgba(139, 92, 246, 0.08);
    border: 1px dashed rgba(139, 92, 246, 0.3);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    max-width: 90%;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: #d8b4fe;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    animation: fadeInBubble 0.25s ease forwards;
}

.tool-log-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent-purple);
}

.tool-log-header i {
    width: 14px;
    height: 14px;
}

.tool-log-content {
    white-space: pre-wrap;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.5rem;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    max-height: 150px;
    overflow-y: auto;
}

/* Input Bar */
.chat-input-bar {
    padding: 1.25rem 1.5rem;
    background: rgba(13, 19, 33, 0.8);
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

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

.chat-input {
    width: 100%;
    background: rgba(17, 24, 43, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    padding: 0.85rem 1.25rem;
    border-radius: 9999px;
    font-family: var(--font-main);
    font-size: 0.95rem;
    outline: none;
    transition: all 0.2s ease;
}

.chat-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}

.send-btn {
    background: var(--primary-gradient);
    border: none;
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease, filter 0.2s ease;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
}

.send-btn:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.send-btn:active {
    transform: scale(0.95);
}

.send-btn i {
    color: white;
    margin-left: 2px;
}

/* Custom Vinyl Lounge Theme elements */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.spinning-vinyl {
    animation: spin 6s linear infinite;
    color: var(--primary);
    filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.6));
    width: 28px !important;
    height: 28px !important;
}

.header-tagline {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 0.1rem;
}

.sidebar-hero {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    height: 120px;
    margin-bottom: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.sidebar-banner {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.sidebar-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(9, 13, 22, 0) 40%, rgba(9, 13, 22, 0.8) 100%);
}

.spotlight-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.5rem;
}
.spotlight-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.spotlight-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glow);
    border-radius: 8px;
    padding: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}
.spotlight-card:hover {
    border-color: var(--border-glow-active);
    background: var(--bg-card-hover);
    transform: translateY(-2px);
}
.album-art {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.85rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
.art-led {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #090d16;
}
.art-acdc {
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
    color: white;
}
.album-info {
    display: flex;
    flex-direction: column;
}
.album-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-main);
}
.album-artist {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.quick-queries-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto;
    padding: 0.5rem 1.5rem;
}

.quick-query-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
    padding: 0.4rem 0.8rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-query-btn:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
    color: var(--primary);
}

/* Loading Spinner */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 0.2rem 0;
    align-items: center;
}

.typing-indicator span {
    width: 6px;
    height: 6px;
    background-color: var(--text-muted);
    border-radius: 50%;
    display: inline-block;
    animation: bounce 1.4s infinite ease-in-out both;
}

.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.0); }
}

/* Feedback Container */
.feedback-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.feedback-label {
    margin-right: 0.25rem;
    font-weight: 500;
}

.feedback-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.75rem;
    font-family: var(--font-main);
}

.feedback-btn:hover {
    transform: translateY(-1px);
}

.feedback-btn.up-btn:hover {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
    color: var(--accent-green);
}

.feedback-btn.down-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: var(--danger);
}

.feedback-btn.active-up {
    background: rgba(16, 185, 129, 0.15) !important;
    border-color: var(--accent-green) !important;
    color: var(--accent-green) !important;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.25);
}

.feedback-btn.active-down {
    background: rgba(239, 68, 68, 0.15) !important;
    border-color: var(--danger) !important;
    color: var(--danger) !important;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.25);
}

.feedback-btn i {
    width: 13px;
    height: 13px;
}

/* Feedback Text Comment Form */
.feedback-comment-wrapper {
    width: 100%;
}

.feedback-comment-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.6rem;
    animation: slideDown 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.feedback-comment-input {
    background: rgba(9, 13, 22, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-family: var(--font-main);
    font-size: 0.8rem;
    outline: none;
    resize: none;
    width: 100%;
    min-height: 48px;
    transition: all 0.2s ease;
}

.feedback-comment-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.feedback-comment-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.feedback-comment-submit {
    background: var(--primary-gradient);
    border: none;
    color: white;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.feedback-comment-submit:hover {
    filter: brightness(1.15);
}

.feedback-comment-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.feedback-thanks {
    font-size: 0.78rem;
    color: var(--accent-green);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    animation: fadeIn 0.3s ease;
    font-weight: 500;
}

.feedback-thanks i {
    width: 14px;
    height: 14px;
}

