:root {
    --bg-main: #F8FAFC;
    --bg-panel: #FFFFFF;
    --color-primary: #2563EB;
    --color-primary-hover: #1D4ED8;
    --text-main: #111827;
    --text-muted: #6B7280;
    --border-color: #E5E7EB;
    --bg-assistant-msg: #E5E7EB;
    --sidebar-width: 260px;
    --tools-width: 300px;
    --border-radius: 12px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
}

body {
    background: var(--bg-main);
    color: var(--text-main);
    height: 100vh;
    overflow: hidden;
}

.dashboard-container {
    display: flex;
    width: 100vw;
    height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-panel);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
}

.sidebar-header {
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
}

.badge {
    background: var(--color-primary);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.nav-item {
    text-decoration: none;
    color: var(--text-muted);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    background: transparent;
    border: none;
    text-align: left;
    cursor: pointer;
    transition: 0.2s;
}

.nav-item:hover {
    background: var(--bg-main);
    color: var(--text-main);
}

.nav-item.active {
    background: #EFF6FF;
    color: var(--color-primary);
}

.sidebar-footer {
    margin-top: auto;
}

.text-danger {
    color: #DC2626 !important;
}

.text-danger:hover {
    background: #FEF2F2 !important;
}

.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--bg-main);
}

.chat-header {
    background: var(--bg-panel);
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--border-color);
}

.chat-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

.chat-messages {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.message {
    display: flex;
    flex-direction: column;
    max-width: 75%;
}

.message.user {
    align-self: flex-end;
}

.message.assistant {
    align-self: flex-start;
}

.message .content {
    padding: 1rem 1.25rem;
    border-radius: var(--border-radius);
    line-height: 1.5;
    font-size: 0.95rem;
    white-space: pre-wrap;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.message.user .content {
    background: var(--color-primary);
    color: #ffffff;
    border-bottom-right-radius: 4px;
}

.message.assistant .content {
    background: var(--bg-panel);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    border-bottom-left-radius: 4px;
}

.chat-input-wrapper {
    padding: 1.5rem 2rem;
    background: var(--bg-main);
}

.chat-input-form {
    display: flex;
    gap: 0.5rem;
    background: var(--bg-panel);
    padding: 0.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    align-items: center;
}

#message-input {
    flex: 1;
    border: none;
    padding: 0.75rem;
    font-size: 1rem;
    outline: none;
    background: transparent;
    color: var(--text-main);
}

.primary-btn {
    background: var(--color-primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s;
}

.primary-btn:hover {
    background: var(--color-primary-hover);
}

.icon-btn {
    background: transparent;
    border: none;
    font-size: 1.25rem;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 8px;
    transition: 0.2s;
}

.icon-btn:hover {
    background: var(--bg-main);
}

.tools-panel {
    width: var(--tools-width);
    background: var(--bg-panel);
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.tools-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.tools-header h3 {
    font-size: 1rem;
    font-weight: 600;
}

.tools-list {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow-y: auto;
}

.tool-card {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    text-align: left;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.tool-card:hover {
    border-color: var(--color-primary);
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.1);
    transform: translateY(-1px);
}

.tool-card span {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.tool-card h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
}

.tool-card p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.audio-analysis-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.audio-analysis-card h3 {
    color: var(--color-primary);
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.icon-btn.recording {
    color: #EF4444;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.15);
    }

    100% {
        transform: scale(1);
    }
}