:root {
    --bg-dark: #0f1115;
    --bg-panel: rgba(23, 25, 30, 0.7);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-highlight: rgba(255, 255, 255, 0.03);
    --primary-accent: #6366f1; /* Indigo */
    --primary-glow: rgba(99, 102, 241, 0.4);
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
    --success: #10b981;
    
    --font-main: 'Inter', sans-serif;
    --font-display: 'Outfit', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(16, 185, 129, 0.1) 0%, transparent 20%);
    color: var(--text-main);
    font-family: var(--font-main);
    height: 100vh;
    overflow: hidden;
}

.app-container {
    display: grid;
    grid-template-columns: 260px 1fr 300px;
    height: 100vh;
    gap: 20px;
    padding: 20px;
}

/* Glassmorphism Utilities */
.glass-panel {
    background: var(--bg-panel);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.glass-panel-light {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    padding: 24px;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary-accent), #818cf8);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-family: var(--font-display);
}

.logo-text {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}

.nav-links {
    list-style: none;
    flex: 1;
}

.nav-links li {
    padding: 12px 16px;
    margin-bottom: 8px;
    border-radius: 10px;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-links li:hover, .nav-links li.active {
    background: var(--glass-highlight);
    color: var(--text-main);
    border: 1px solid var(--glass-border);
}

.nav-links li.active {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.2);
    color: #818cf8;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 20px;
    border-top: 1px solid var(--glass-border);
}

.avatar {
    width: 36px;
    height: 36px;
    background: #334155;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-info .name { font-size: 0.9rem; font-weight: 500; }
.user-info .role { font-size: 0.75rem; color: var(--text-muted); }

/* Main Chat Area */
.chat-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.chat-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.assistant-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

.assistant-info h2 {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
}

.status-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: block;
}

.icon-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: 0.2s;
}

.icon-btn:hover {
    background: var(--glass-highlight);
    color: var(--text-main);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.message {
    display: flex;
    gap: 16px;
    max-width: 80%;
    animation: fadeIn 0.3s ease;
}

.message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.message.assistant .message-avatar {
    background: linear-gradient(135deg, var(--primary-accent), #818cf8);
}

.message.user .message-avatar {
    background: #475569;
}

.message-content {
    background: rgba(255, 255, 255, 0.03);
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    line-height: 1.5;
    font-size: 0.95rem;
}

.message.user .message-content {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.2);
}

.chat-input-area {
    padding: 24px;
    border-top: 1px solid var(--glass-border);
}

.input-wrapper {
    display: flex;
    align-items: flex-end;
    padding: 8px;
    gap: 8px;
}

.input-wrapper textarea {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-main);
    padding: 8px;
    resize: none;
    font-family: var(--font-main);
    outline: none;
    max-height: 120px;
}

.attach-btn, .send-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 8px;
    transition: 0.2s;
}

.attach-btn:hover {
    background: var(--glass-highlight);
    color: var(--text-main);
}

.send-btn {
    background: var(--primary-accent);
    color: white;
}

.send-btn:hover {
    box-shadow: 0 0 12px var(--primary-glow);
}

/* Context Panel */
.context-panel {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.context-panel h3 {
    font-family: var(--font-display);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.status-card {
    margin-bottom: 16px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.85rem;
}

.value-highlight {
    color: #818cf8;
    font-weight: 500;
}

.progress-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar .fill {
    height: 100%;
    background: var(--primary-accent);
    border-radius: 2px;
}

.services-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.service-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    padding: 8px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.dot.green { background: var(--success); box-shadow: 0 0 6px rgba(16, 185, 129, 0.4); }

.active-task-card {
    padding: 16px;
    margin-top: auto;
}

.active-task-card h4 {
    font-size: 0.85rem;
    margin-bottom: 8px;
    color: #fca5a5;
}

.task-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
