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

:root {
    --navy: #0f172a;
    --navy-light: #1e293b;
    --navy-lighter: #334155;
    --electric-blue: #3b82f6;
    --electric-blue-dark: #2563eb;
    --electric-blue-light: #60a5fa;
    --white: #ffffff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --purple: #8b5cf6;
    --pink: #ec4899;
    --yellow: #fbbf24;
    --amber: #f59e0b;
    
    --bg-primary: var(--white);
    --bg-secondary: var(--gray-50);
    --bg-card: var(--white);
    --text-primary: var(--navy);
    --text-secondary: var(--gray-500);
    --border: var(--gray-200);
    --shadow: rgba(15, 23, 42, 0.1);
}

body.dark-mode {
    --bg-primary: var(--navy);
    --bg-secondary: var(--navy-light);
    --bg-card: var(--navy-lighter);
    --text-primary: var(--white);
    --text-secondary: var(--gray-400);
    --border: var(--navy-lighter);
    --shadow: rgba(0, 0, 0, 0.3);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background 0.3s ease, color 0.3s ease;
}

/* Header */
.header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px var(--shadow);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--electric-blue), var(--purple));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.25rem;
}

/* Project Switcher */
.project-switcher {
    position: relative;
}

.project-current {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 250px;
}

.project-current:hover {
    border-color: var(--electric-blue);
}

.project-icon {
    font-size: 1.25rem;
}

.project-info {
    flex: 1;
}

.project-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.project-status {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.project-chevron {
    font-size: 0.875rem;
    color: var(--text-secondary);
    transition: transform 0.2s ease;
}

.project-switcher.open .project-chevron {
    transform: rotate(180deg);
}

.project-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    min-width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 8px 24px var(--shadow);
    display: none;
    z-index: 1000;
}

.project-switcher.open .project-dropdown {
    display: block;
}

.project-dropdown-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid var(--border);
}

.project-dropdown-item:last-child {
    border-bottom: none;
}

.project-dropdown-item:hover {
    background: var(--bg-secondary);
}

.project-dropdown-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.125rem;
}

.project-dropdown-meta {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.toggle-ai-feed {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

.toggle-ai-feed:hover {
    border-color: var(--electric-blue);
    color: var(--text-primary);
}

.toggle-ai-feed.has-activity::after {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    border: 2px solid var(--bg-primary);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.1);
    }
}

.theme-toggle {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.25rem;
}

.theme-toggle:hover {
    transform: scale(1.05);
    border-color: var(--electric-blue);
}

/* Main Navigation */
.main-nav {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 0 2rem;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-primary {
    display: flex;
    gap: 0.5rem;
}

.nav-primary-item {
    padding: 1rem 1.5rem;
    cursor: pointer;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-primary-item:hover {
    color: var(--text-primary);
}

.nav-primary-item.active {
    color: var(--electric-blue);
    border-bottom-color: var(--electric-blue);
}

/* Main Layout */
.container {
    display: grid;
    grid-template-columns: 280px 1fr;
    height: calc(100vh - 121px);
    gap: 0;
}

/* Sidebar */
.sidebar {
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    padding: 1.5rem;
    overflow-y: auto;
}

.sidebar-section {
    margin-bottom: 2rem;
}

.section-title {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Filters */
.filter-group {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.75rem;
}

.filter-item {
    padding: 0.5rem 0.625rem;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.25rem;
    transition: all 0.2s ease;
    font-size: 0.8125rem;
}

.filter-item:last-child {
    margin-bottom: 0;
}

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

.filter-item.active {
    background: linear-gradient(135deg, var(--electric-blue), var(--purple));
    color: white;
    font-weight: 500;
}

.filter-count {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 0.125rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.filter-item.active .filter-count {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Git Repos */
.repo-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.875rem;
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.repo-item:last-child {
    margin-bottom: 0;
}

.repo-item:hover {
    border-color: var(--electric-blue);
    transform: translateX(2px);
    box-shadow: 0 2px 8px var(--shadow);
}

.repo-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.repo-name {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
}

.repo-branch {
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.repo-stats {
    display: flex;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.repo-stat {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Environments */
.env-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.875rem;
    margin-bottom: 0.75rem;
    transition: all 0.2s ease;
}

.env-item:last-child {
    margin-bottom: 0;
}

.env-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.env-name {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.env-status {
    font-size: 1rem;
}

.env-url {
    font-size: 0.75rem;
    color: var(--electric-blue);
    margin-bottom: 0.25rem;
    text-decoration: none;
    display: block;
    font-weight: 500;
}

.env-url:hover {
    text-decoration: underline;
    color: var(--electric-blue-light);
}

.env-deploy {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Main Content */
.main-content {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--bg-primary);
}

.content-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2rem 1rem 2rem;
}

.content-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.content-actions {
    display: flex;
    gap: 0.75rem;
}

.create-ticket-btn {
    background: linear-gradient(135deg, var(--electric-blue), var(--purple));
    color: white;
    border: none;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.create-ticket-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

#viewContainer {
    flex: 1;
    overflow: hidden;
    padding: 0 2rem 1rem 2rem;
}

/* Board View */
.board-view {
    height: 100%;
    overflow: hidden;
}

/* Kanban Board */
.kanban-board {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 1rem;
    height: 100%;
}

.kanban-column {
    flex: 0 0 300px;
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    max-height: 100%;
}

/* Ideas column is wider and more prominent */
.kanban-column.inbox-column {
    flex: 0 0 360px;
    border-color: var(--electric-blue);
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.2);
}

.kanban-column.inbox-column .column-header {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.05));
    margin: -1rem -1rem 1rem -1rem;
    padding: 1rem;
    border-radius: 12px 12px 0 0;
}

.column-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border);
}

.column-title {
    font-size: 0.875rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.column-count {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 0.125rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.column-cards {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Ticket Card */
.ticket-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.ticket-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px var(--shadow);
    border-color: var(--electric-blue);
}

.ticket-card.dragging {
    opacity: 0.5;
    transform: rotate(3deg);
}

/* Creator badge - human vs AI */
.ticket-creator {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.ticket-creator.human-created {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.15), rgba(245, 158, 11, 0.15));
    color: var(--pink);
}

.ticket-creator.ai-created {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(139, 92, 246, 0.15));
    color: var(--electric-blue);
}

/* Grooming status badges */
.grooming-status {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    padding: 0.25rem 0.625rem;
    border-radius: 4px;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.grooming-status.ai-grooming {
    background: rgba(59, 130, 246, 0.15);
    color: var(--electric-blue);
}

.grooming-status.needs-input {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.grooming-status.ready {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Mini conversation thread */
.conversation-thread {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    max-height: 120px;
    overflow-y: auto;
}

.thread-message {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.8125rem;
}

.thread-message:last-child {
    margin-bottom: 0;
}

.thread-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.625rem;
    font-weight: 600;
    color: white;
    flex-shrink: 0;
}

.thread-avatar.ai {
    background: linear-gradient(135deg, var(--electric-blue), var(--purple));
}

.thread-avatar.human {
    background: linear-gradient(135deg, var(--pink), var(--warning));
}

.thread-text {
    flex: 1;
    color: var(--text-secondary);
    line-height: 1.4;
}

.ticket-title {
    font-size: 0.9375rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    line-height: 1.4;
}

.ticket-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.priority-badge {
    font-size: 0.75rem;
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
}

.priority-critical {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
    border: 1px solid var(--danger);
}

.priority-high {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.priority-medium {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.priority-low {
    background: rgba(59, 130, 246, 0.15);
    color: var(--electric-blue);
}

.ticket-labels {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.label-tag {
    font-size: 0.75rem;
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
}

.ticket-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.ticket-assignee {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
}

.avatar.ai {
    background: linear-gradient(135deg, var(--electric-blue), var(--purple));
    border: 2px solid var(--electric-blue-light);
}

.avatar.human {
    background: linear-gradient(135deg, var(--pink), var(--warning));
    border: 2px solid var(--pink);
}

.assignee-name {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.time-estimate {
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.confidence-indicator {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 2px solid var(--bg-secondary);
}

.confidence-high {
    background: var(--success);
}

.confidence-medium {
    background: var(--warning);
}

.confidence-low {
    background: var(--danger);
}

/* Review type indicators */
.ticket-card.ai-review {
    border-left: 3px solid var(--electric-blue);
}

.ticket-card.human-review {
    border-left: 3px solid var(--warning);
}

.review-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    padding: 0.25rem 0.625rem;
    border-radius: 4px;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.review-badge.ai-review-badge {
    background: rgba(59, 130, 246, 0.15);
    color: var(--electric-blue);
}

.review-badge.human-review-badge {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

/* Done card styling */
.ticket-card.done-card {
    opacity: 0.85;
}

.completion-info {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Docs View */
.docs-view {
    height: 100%;
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 1.5rem;
}

.docs-sidebar {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    overflow-y: auto;
}

.docs-category {
    margin-bottom: 1.5rem;
}

.docs-category:last-child {
    margin-bottom: 0;
}

.docs-category-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.docs-list {
    list-style: none;
}

.docs-list-item {
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.docs-list-item:hover {
    background: var(--bg-secondary);
}

.docs-list-item.active {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(139, 92, 246, 0.1));
    color: var(--electric-blue);
    font-weight: 500;
}

.docs-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    overflow-y: auto;
}

.docs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border);
}

.docs-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.docs-actions {
    display: flex;
    gap: 0.75rem;
}

.doc-btn {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.doc-btn:hover {
    border-color: var(--electric-blue);
    background: var(--electric-blue);
    color: white;
}

.doc-btn.primary {
    background: linear-gradient(135deg, var(--electric-blue), var(--purple));
    color: white;
    border: none;
}

.docs-meta {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.docs-body {
    line-height: 1.8;
    color: var(--text-primary);
}

.docs-body h1,
.docs-body h2,
.docs-body h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.docs-body h1 {
    font-size: 2rem;
}

.docs-body h2 {
    font-size: 1.5rem;
}

.docs-body h3 {
    font-size: 1.25rem;
}

.docs-body p {
    margin-bottom: 1rem;
}

.docs-body code {
    background: var(--bg-secondary);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
}

.docs-body pre {
    background: var(--navy);
    color: var(--gray-100);
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.docs-body pre code {
    background: none;
    padding: 0;
}

.docs-empty {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

/* Setup View */
.setup-view {
    height: 100%;
    overflow-y: auto;
}

.setup-banner {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(251, 191, 36, 0.1));
    border: 2px solid var(--amber);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-primary);
}

.setup-banner-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.setup-banner-text {
    font-size: 0.9375rem;
    font-weight: 500;
}

.setup-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 1.5rem;
}

.setup-section-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.ai-tool-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.ai-tool-card {
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.ai-tool-card:hover {
    border-color: var(--electric-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow);
}

.ai-tool-card.selected {
    border-color: var(--electric-blue);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.05));
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.2);
}

.ai-tool-icon {
    font-size: 3rem;
    margin-bottom: 0.75rem;
}

.ai-tool-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.setup-detail {
    display: none;
}

.setup-detail.active {
    display: block;
}

.setup-subsection {
    margin-bottom: 2rem;
}

.setup-subsection:last-child {
    margin-bottom: 0;
}

.setup-subsection-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.code-block {
    background: var(--navy);
    color: var(--gray-100);
    border-radius: 8px;
    padding: 1.25rem;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
    position: relative;
    overflow-x: auto;
}

.code-block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.code-block-title {
    color: var(--gray-400);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.copy-btn {
    background: rgba(59, 130, 246, 0.2);
    color: var(--electric-blue-light);
    border: 1px solid rgba(59, 130, 246, 0.3);
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.copy-btn:hover {
    background: rgba(59, 130, 246, 0.3);
    border-color: var(--electric-blue);
}

.setup-steps {
    list-style: none;
    counter-reset: step-counter;
}

.setup-step {
    counter-increment: step-counter;
    margin-bottom: 1rem;
    padding-left: 2.5rem;
    position: relative;
}

.setup-step:last-child {
    margin-bottom: 0;
}

.setup-step::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    background: linear-gradient(135deg, var(--electric-blue), var(--purple));
    color: white;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
}

.setup-step-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.setup-step-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-dot.disconnected {
    background: var(--danger);
    animation: pulse-slow 2s infinite;
}

.status-dot.connected {
    background: var(--success);
}

@keyframes pulse-slow {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.status-text {
    font-weight: 600;
    color: var(--text-primary);
}

/* AI Activity Drawer */
.ai-drawer {
    position: fixed;
    right: 0;
    top: 121px;
    bottom: 0;
    width: 360px;
    background: var(--bg-card);
    border-left: 1px solid var(--border);
    box-shadow: -4px 0 24px var(--shadow);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 90;
    display: flex;
    flex-direction: column;
}

.ai-drawer.open {
    transform: translateX(0);
}

.ai-drawer-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ai-drawer-title {
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ai-drawer-close {
    background: var(--bg-secondary);
    border: none;
    border-radius: 6px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.25rem;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.ai-drawer-close:hover {
    background: var(--border);
    color: var(--text-primary);
}

.ai-drawer-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.activity-empty {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

.activity-item {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.activity-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.activity-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
    color: white;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--electric-blue), var(--purple));
}

.activity-content {
    flex: 1;
}

.activity-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.activity-desc {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-bottom: 0.375rem;
}

.activity-time {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 2rem;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--bg-card);
    border-radius: 16px;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
}

.modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    background: var(--bg-card);
    z-index: 10;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-close {
    background: var(--bg-secondary);
    border: none;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: var(--border);
    color: var(--text-primary);
}

.modal-body {
    padding: 2rem;
}

/* Form */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--electric-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

.btn {
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--electric-blue), var(--purple));
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

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

.btn-secondary:hover {
    background: var(--border);
}

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

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 4px;
}

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

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease;
}

/* Hidden state utility */
.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 1200px) {
    .container {
        grid-template-columns: 1fr;
    }
    .sidebar {
        display: none;
    }
    .docs-view {
        grid-template-columns: 1fr;
    }
    .docs-sidebar {
        display: none;
    }
}
