/* Henry Dashboard - Ultra Modern Design */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    /* Ultra-modern dark theme */
    --bg-primary: #09090b;
    --bg-secondary: #0f0f12;
    --bg-tertiary: #18181b;
    --bg-elevated: #1f1f23;
    --bg-chat: #0c0c0e;
    --bg-hover: rgba(255, 255, 255, 0.05);

    /* Modern indigo accent */
    --accent: #818cf8;
    --accent-hover: #6366f1;
    --accent-muted: rgba(129, 140, 248, 0.15);
    --accent-glow: rgba(129, 140, 248, 0.1);

    /* Text */
    --text-primary: #fafafa;
    --text-secondary: #a1a1aa;
    --text-muted: #52525b;

    /* Borders */
    --border-color: rgba(255, 255, 255, 0.08);
    --border-subtle: rgba(255, 255, 255, 0.04);

    /* Status colors */
    --success: #22c55e;
    --warning: #f59e0b;
    --error: #ef4444;

    /* Layout */
    --sidebar-width: 56px;
    --chat-width: 380px;
    --chat-history-width: 260px;
    --radius: 10px;
    --radius-lg: 16px;
    --transition: 180ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   LOGIN SCREEN
   ============================================ */

.login-screen {
    position: fixed;
    inset: 0;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.login-container {
    text-align: center;
    max-width: 400px;
    padding: 40px;
}

.login-logo {
    margin-bottom: 40px;
}

.login-logo-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--accent), #a5b4fc);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 32px;
    color: #fff;
    margin: 0 auto 20px;
    box-shadow: 0 8px 32px rgba(129, 140, 248, 0.3);
}

.login-logo h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.login-logo p {
    font-size: 14px;
    color: var(--text-secondary);
}

.login-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-bottom: 24px;
}

.login-box h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.login-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

#google-signin-btn {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

.login-error {
    color: var(--error);
    font-size: 13px;
    min-height: 20px;
}

.login-footer {
    font-size: 12px;
    color: var(--text-muted);
}

html, body {
    height: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Main Layout - Side by Side */
.app {
    display: flex;
    height: 100vh;
}

/* Minimal Sidebar - Always collapsed style */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 100;
}

.sidebar-toggle {
    width: 100%;
    height: 40px;
    background: var(--bg-tertiary);
    border: none;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.sidebar-toggle:hover {
    background: var(--accent-muted);
}

.sidebar-toggle:hover svg {
    color: var(--accent);
}

.sidebar-toggle svg {
    width: 18px;
    height: 18px;
    color: var(--text-secondary);
    transition: var(--transition);
}

.sidebar-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 12px 0;
    overflow: hidden;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    margin-bottom: 8px;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--accent), #a5b4fc);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    color: #fff;
    box-shadow: 0 4px 12px rgba(129, 140, 248, 0.25);
}

.logo span {
    display: none;
}

/* Navigation */
.nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 0 8px;
}

.nav-item {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: var(--radius);
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.nav-item:hover {
    background: var(--bg-hover);
    color: var(--text-secondary);
}

.nav-item.active {
    background: var(--accent-muted);
    color: var(--accent);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 20px;
    background: var(--accent);
    border-radius: 0 3px 3px 0;
}

.nav-item svg {
    width: 20px;
    height: 20px;
}

.nav-item span {
    display: none;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 8px;
    border-top: 1px solid var(--border-color);
}

.fast-mode-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    text-decoration: none;
    border-radius: var(--radius);
    transition: var(--transition);
    margin: 0 auto;
}

.fast-mode-link:hover {
    background: var(--accent-muted);
}

.fast-mode-link svg {
    width: 20px;
    height: 20px;
}

.fast-mode-link span {
    display: none;
}

/* Main Content Area - Side by Side Layout */
.main {
    flex: 1;
    display: flex;
    overflow: hidden;
    min-width: 0;
}

/* Remove view toggle - both visible */
.view {
    display: none;
}

.view.active {
    display: flex;
}

/* Override: Main view shows both panels */
.main-view {
    flex: 1;
    display: flex !important;
    gap: 0;
}

/* ============================================
   CHAT HISTORY SIDEBAR
   ============================================ */

.chat-history-panel {
    width: var(--chat-history-width);
    min-width: var(--chat-history-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

.chat-history-panel.collapsed {
    width: 0;
    min-width: 0;
    overflow: hidden;
    border-right: none;
}

.chat-history-header {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
}

.new-chat-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    background: linear-gradient(135deg, var(--accent), #6366f1);
    border: none;
    border-radius: var(--radius);
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.new-chat-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(129, 140, 248, 0.3);
}

.new-chat-btn svg {
    width: 16px;
    height: 16px;
}

.chat-search {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 8px 12px;
    transition: var(--transition);
}

.search-input-wrapper:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.search-input-wrapper svg {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.search-input-wrapper input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 13px;
    outline: none;
}

.search-input-wrapper input::placeholder {
    color: var(--text-muted);
}

.search-clear {
    background: transparent;
    border: none;
    padding: 2px;
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: var(--transition);
}

.search-clear:hover {
    background: var(--bg-hover);
    color: var(--text-secondary);
}

.search-clear svg {
    width: 14px;
    height: 14px;
}

.search-status {
    font-size: 11px;
    color: var(--text-muted);
    padding: 8px 0 0;
    min-height: 20px;
}

.chat-sessions-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.sessions-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-size: 13px;
    gap: 12px;
}

.loading-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid var(--border-color);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.session-item {
    padding: 12px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 4px;
    border: 1px solid transparent;
}

.session-item:hover {
    background: var(--bg-hover);
}

.session-item.active {
    background: var(--accent-muted);
    border-color: rgba(129, 140, 248, 0.3);
}

.session-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.session-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.session-date {
    font-size: 11px;
    color: var(--text-muted);
}

.session-messages-count {
    font-size: 10px;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    padding: 2px 6px;
    border-radius: 4px;
}

.no-sessions {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-size: 13px;
}

/* Search Results */
.search-results {
    padding: 8px;
}

.search-result-item {
    padding: 10px 12px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 4px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-tertiary);
}

.search-result-item:hover {
    border-color: var(--border-color);
    background: var(--bg-elevated);
}

.search-result-session {
    font-size: 11px;
    color: var(--accent);
    margin-bottom: 4px;
}

.search-result-content {
    font-size: 12px;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-result-similarity {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* History Toggle Button */
.history-toggle-btn {
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    border-radius: var(--radius);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    margin-right: 8px;
}

.history-toggle-btn:hover {
    background: var(--bg-hover);
    color: var(--text-secondary);
}

.history-toggle-btn.active {
    background: var(--accent-muted);
    color: var(--accent);
}

.history-toggle-btn svg {
    width: 18px;
    height: 18px;
}

/* User Profile in Sidebar */
.sidebar-footer {
    padding: 8px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: center;
}

.user-profile {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.user-profile:hover {
    background: var(--bg-hover);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    object-fit: cover;
}

.user-initial {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--accent), #a5b4fc);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    color: #fff;
}

.user-avatar + .user-initial {
    display: none;
}

.user-email {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 13px;
    color: var(--text-primary);
    flex: 1;
}

/* Chat Panel - Center */
.chat-panel {
    width: var(--chat-width);
    min-width: var(--chat-width);
    flex: 1;
    max-width: 500px;
    background: var(--bg-chat);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

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

.chat-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--accent), #a5b4fc);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: #fff;
}

.chat-title h1 {
    font-size: 16px;
    font-weight: 600;
}

.chat-status {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.chat-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Messages */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.message {
    display: flex;
    gap: 10px;
    max-width: 95%;
    animation: messageIn 0.25s ease;
}

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

.message.user {
    margin-left: auto;
    flex-direction: row-reverse;
}

.message-avatar {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 11px;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--accent), #a5b4fc);
    color: #fff;
}

.message.user .message-avatar {
    display: none;
}

.message-content {
    background: var(--bg-elevated);
    padding: 10px 14px;
    border-radius: 12px;
    border-top-left-radius: 4px;
    border: 1px solid var(--border-subtle);
}

.message.user .message-content {
    background: linear-gradient(135deg, var(--accent), #6366f1);
    color: #fff;
    border-radius: 12px;
    border-top-right-radius: 4px;
    border: none;
}

.message-text {
    font-size: 13px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}

.message-text code {
    background: rgba(0,0,0,0.25);
    padding: 2px 5px;
    border-radius: 4px;
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 12px;
}

.message-text pre {
    background: rgba(0,0,0,0.3);
    padding: 10px;
    border-radius: 8px;
    margin: 8px 0;
    overflow-x: auto;
}

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 4px 0;
}

.typing-indicator span {
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse 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 pulse {
    0%, 80%, 100% { transform: scale(0.5); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

/* Chat Input */
.chat-input-area {
    padding: 16px 20px 20px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
}

.chat-form {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    padding: 8px 8px 8px 16px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.chat-form:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.chat-form textarea {
    flex: 1;
    background: transparent;
    border: none;
    padding: 8px 0;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 13px;
    resize: none;
    min-height: 20px;
    max-height: 120px;
    line-height: 1.5;
}

.chat-form textarea:focus {
    outline: none;
}

.chat-form textarea::placeholder {
    color: var(--text-muted);
}

.send-button {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--accent), #6366f1);
    border: none;
    border-radius: var(--radius);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
}

.send-button:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(129, 140, 248, 0.3);
}

.send-button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.send-button svg {
    width: 16px;
    height: 16px;
}

.chat-hint {
    font-size: 11px;
    color: var(--text-muted);
    text-align: center;
    margin-top: 10px;
}

.chat-hint a {
    color: var(--accent);
    text-decoration: none;
}

.chat-hint a:hover {
    text-decoration: underline;
}

/* Kanban Panel - Right Side, Fills Rest */
.kanban-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
    min-width: 0;
}

.kanban-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.kanban-header h1 {
    font-size: 16px;
    font-weight: 600;
}

.kanban-board {
    display: flex;
    gap: 16px;
    padding: 20px;
    flex: 1;
    overflow-x: auto;
}

.kanban-column {
    min-width: 260px;
    flex: 1;
    max-width: 320px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
}

.column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
}

.column-header h3 {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-secondary);
}

.task-count {
    background: var(--bg-tertiary);
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
}

.column-tasks {
    padding: 12px;
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 80px;
}

.task-card {
    background: var(--bg-tertiary);
    border-radius: var(--radius);
    padding: 14px;
    cursor: grab;
    transition: var(--transition);
    border: 1px solid var(--border-subtle);
}

.task-card:hover {
    border-color: var(--border-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.task-card.dragging {
    opacity: 0.5;
}

.task-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 6px;
}

.task-card-title {
    font-weight: 500;
    font-size: 13px;
    line-height: 1.4;
}

.task-card-priority {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 4px;
}

.task-card-priority.high { background: var(--error); }
.task-card-priority.medium { background: var(--warning); }
.task-card-priority.low { background: var(--success); }

.task-card-description {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.task-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.task-card-date {
    font-size: 10px;
    color: var(--text-muted);
}

.task-card-delete {
    width: 26px;
    height: 26px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    opacity: 0;
}

.task-card:hover .task-card-delete {
    opacity: 1;
}

.task-card-delete:hover {
    background: var(--error);
    color: #fff;
}

.task-card-delete svg {
    width: 14px;
    height: 14px;
}

/* Settings View - Hidden by default, shown via nav */
.settings-view {
    flex-direction: column;
    background: var(--bg-primary);
    position: absolute;
    inset: 0;
    left: var(--sidebar-width);
    z-index: 50;
    display: none;
}

.settings-view.active {
    display: flex;
}

.settings-header {
    padding: 16px 24px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.settings-header h1 {
    font-size: 16px;
    font-weight: 600;
}

.settings-content {
    padding: 24px;
    max-width: 560px;
    overflow-y: auto;
}

.settings-section {
    margin-bottom: 28px;
}

.settings-section h2 {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.settings-item {
    background: var(--bg-secondary);
    padding: 16px;
    border-radius: var(--radius);
    margin-bottom: 10px;
    border: 1px solid var(--border-color);
}

.settings-item label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 10px;
}

.settings-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.settings-row input {
    flex: 1;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 10px 12px;
    color: var(--text-primary);
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 12px;
}

.settings-hint {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 10px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: var(--radius);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-decoration: none;
}

.btn svg {
    width: 14px;
    height: 14px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 11px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), #6366f1);
    color: #fff;
}

.btn-primary:hover {
    box-shadow: 0 4px 12px rgba(129, 140, 248, 0.25);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--text-muted);
}

.btn-accent {
    background: var(--accent-muted);
    color: var(--accent);
    border: 1px solid rgba(129, 140, 248, 0.3);
}

.btn-accent:hover {
    background: var(--accent);
    color: #fff;
}

.btn-icon {
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    border-radius: var(--radius);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.btn-icon:hover {
    background: var(--bg-hover);
    color: var(--text-secondary);
}

.btn-icon svg {
    width: 16px;
    height: 16px;
}

/* Tasks View - Hidden, integrated into main */
.tasks-view {
    display: none !important;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
}

.modal-content {
    position: relative;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 24px;
    width: 90%;
    max-width: 400px;
    border: 1px solid var(--border-color);
    animation: modalIn 0.2s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-content h2 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 10px 12px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 13px;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 24px;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Responsive */
@media (max-width: 900px) {
    .main-view {
        flex-direction: column;
    }

    .chat-panel {
        width: 100%;
        min-width: 100%;
        height: 50vh;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }

    .kanban-panel {
        height: 50vh;
    }

    .kanban-board {
        padding: 12px;
    }

    .kanban-column {
        min-width: 220px;
    }
}
