/* VS Code Inspired Professional Theme with Dark Mode */

/* CSS Variables for VS Code Dark Theme (Default) */
:root {
    /* VS Code Dark Theme Colors */
    --vscode-bg: #1e1e1e;
    --vscode-sidebar-bg: #252526;
    --vscode-border: #3e3e42;
    --vscode-text: #cccccc;
    --vscode-text-muted: #858585;
    --vscode-text-accent: #4fc3f7;
    --vscode-button-bg: #0e639c;
    --vscode-button-hover: #1177bb;
    --vscode-input-bg: #3c3c3c;
    --vscode-input-border: #3e3e42;
    --vscode-hover-bg: #2a2d2e;
    --vscode-active-bg: #094771;
    --vscode-warning: #cca700;
    --vscode-error: #f48771;
    --vscode-success: #89d185;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.5);

    /* PWA Colors */
    --pwa-install-bg: #89d185;
    --pwa-install-hover: #75c172;
    --pwa-update-bg: #cca700;
    --pwa-offline-bg: #6f42c1;
}

/* Light Theme Variables */
:root[data-theme="light"] {
    /* VS Code Light Theme Colors */
    --vscode-bg: #ffffff;
    --vscode-sidebar-bg: #f3f3f3;
    --vscode-border: #e1e4e8;
    --vscode-text: #24292e;
    --vscode-text-muted: #586069;
    --vscode-text-accent: #0366d6;
    --vscode-button-bg: #0366d6;
    --vscode-button-hover: #0258c7;
    --vscode-input-bg: #ffffff;
    --vscode-input-border: #d1d5da;
    --vscode-hover-bg: #f1f8ff;
    --vscode-active-bg: #e1f5fe;
    --vscode-warning: #f66a0a;
    --vscode-error: #d73a49;
    --vscode-success: #28a745;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);

    /* PWA Colors */
    --pwa-install-bg: #28a745;
    --pwa-install-hover: #218838;
    --pwa-update-bg: #ffc107;
    --pwa-offline-bg: #6f42c1;
}

/* Reset and Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.5;
    color: var(--vscode-text);
    background: var(--vscode-bg);
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Activity Bar (Left Sidebar) */
.activity-bar {
    width: 240px;
    background: var(--vscode-sidebar-bg);
    border-right: 1px solid var(--vscode-border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.activity-bar-content {
    padding: 20px 16px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--vscode-border);
}

.logo {
    width: 32px;
    height: 32px;
    border-radius: 6px;
}

.logo-text {
    font-size: 16px;
    font-weight: 600;
    color: var(--vscode-text);
}

.activity-nav {
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    color: var(--vscode-text-muted);
    margin-bottom: 4px;
}

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

.nav-item.active {
    background: var(--vscode-active-bg);
    color: var(--vscode-text-accent);
    font-weight: 500;
}

.nav-item svg {
    flex-shrink: 0;
}

.nav-item span {
    font-size: 13px;
}

/* Main Container */
.main-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding-bottom: 24px; /* Account for version footer */
}

/* Title Bar */
.title-bar {
    background: var(--vscode-bg);
    border-bottom: 1px solid var(--vscode-border);
    padding: 24px 32px;
}

.title-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

.title-bar-left {
    flex: 1;
}

.title-bar-content h1 {
    font-size: 24px;
    font-weight: 600;
    color: var(--vscode-text);
    margin-bottom: 4px;
}

.subtitle {
    font-size: 14px;
    color: var(--vscode-text-muted);
}

/* Theme Toggle Button */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--vscode-sidebar-bg);
    border: 1px solid var(--vscode-border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--vscode-text);
    flex-shrink: 0;
}

.theme-toggle:hover {
    background: var(--vscode-hover-bg);
    border-color: var(--vscode-text-accent);
    color: var(--vscode-text-accent);
    transform: rotate(15deg);
}

.theme-toggle:active {
    transform: rotate(15deg) scale(0.95);
}

.theme-toggle svg {
    transition: opacity 0.2s ease;
}

/* Tab Content */
.tab-content {
    flex: 1;
    overflow-y: auto;
}

.tab-panel {
    display: none;
    padding: 24px 32px;
    max-width: 1200px;
}

.tab-panel.active {
    display: block;
}

/* Git server tab is controlled by JavaScript based on configuration */
.git-server-tab {
    display: none !important;
}

.git-server-tab.active {
    display: block !important;
}

/* Panel Header */
.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.panel-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--vscode-text);
}

.panel-actions {
    display: flex;
    gap: 8px;
}

.btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: transparent;
    border: 1px solid var(--vscode-border);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    color: var(--vscode-text-muted);
}

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

/* Content Sections */
.content-section {
    margin-bottom: 32px;
}

.section-header {
    margin-bottom: 16px;
}

.section-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--vscode-text);
}

/* Forms */
.project-form {
    background: var(--vscode-bg);
    border: 1px solid var(--vscode-border);
    border-radius: 8px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.form-group label {
    font-size: 13px;
    font-weight: 500;
    color: var(--vscode-text);
    margin-bottom: 8px;
}

.form-group input,
.form-group select {
    padding: 8px 12px;
    border: 1px solid var(--vscode-input-border);
    border-radius: 4px;
    background: var(--vscode-input-bg);
    color: var(--vscode-text);
    font-size: 13px;
    transition: border-color 0.15s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--vscode-text-accent);
    box-shadow: 0 0 0 2px rgba(3, 102, 214, 0.15);
}

.form-group input::placeholder {
    color: var(--vscode-text-muted);
}

/* Form sections */
.form-section {
    border-top: 1px solid var(--vscode-border);
    padding-top: 20px;
    margin-top: 20px;
}

/* Checkbox styling */
.checkbox-group {
    margin-bottom: 24px;
    margin-top: 24px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
}

.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark {
    width: 16px;
    height: 16px;
    border: 1px solid var(--vscode-input-border);
    border-radius: 3px;
    position: relative;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: var(--vscode-button-bg);
    border-color: var(--vscode-button-bg);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: "✓";
    position: absolute;
    top: -1px;
    left: 2px;
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.checkbox-text {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--vscode-text);
}

.checkbox-text svg {
    color: var(--vscode-text-muted);
}

.checkbox-description {
    font-size: 12px;
    color: var(--vscode-text-muted);
    margin-top: 6px;
    margin-left: 24px;
}

/* Password input group */
.password-group {
    margin-top: 20px;
    margin-bottom: 20px;
}

.password-input-group {
    display: flex;
    gap: 8px;
    align-items: center;
}

.password-input-group input {
    flex: 1;
}

.password-requirements {
    font-size: 12px;
    color: var(--vscode-text-muted);
    margin-top: 8px;
}

/* Git repository input group */
.git-group {
    margin-top: 20px;
    margin-bottom: 20px;
}

.git-group input {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    direction: ltr;
    text-align: left;
}

.git-group label {
    display: block;
    text-align: left;
    margin-bottom: 10px;
}

/* Git URL info in project list */
.git-url-info {
    color: var(--vscode-text-accent) !important;
    display: inline-flex;
    align-items: center;
    cursor: help;
}

.git-url-info svg {
    opacity: 0.8;
}

/* Disabled checkboxes */
.checkbox-label input:disabled + .checkmark {
    opacity: 0.5;
    cursor: not-allowed;
}

.checkbox-label input:disabled ~ .checkbox-text {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Quick Clone Section */
.quick-clone-section {
    background: linear-gradient(135deg, rgba(79, 195, 247, 0.08) 0%, rgba(79, 195, 247, 0.12) 100%);
    border: 1px solid var(--vscode-text-accent);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(79, 195, 247, 0.15);
}

:root[data-theme="light"] .quick-clone-section {
    background: linear-gradient(135deg, #f8f9ff 0%, #f1f8ff 100%);
    box-shadow: 0 2px 8px rgba(3, 102, 214, 0.08);
}

.quick-clone-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--vscode-text);
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.quick-clone-description {
    font-size: 14px;
    color: var(--vscode-text-muted);
    margin-bottom: 20px;
    line-height: 1.4;
}

.quick-clone-form {
    max-width: 100%;
}

.quick-clone-input-group {
    display: flex;
    gap: 12px;
    align-items: stretch;
    margin-bottom: 12px;
}

.quick-clone-input-group input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--vscode-input-border);
    border-radius: 6px;
    background: var(--vscode-bg);
    color: var(--vscode-text);
    font-size: 14px;
    transition: all 0.15s ease;
}

.quick-clone-input-group input:focus {
    outline: none;
    border-color: var(--vscode-text-accent);
    box-shadow: 0 0 0 3px rgba(3, 102, 214, 0.15);
}

.quick-clone-input-group input::placeholder {
    color: var(--vscode-text-muted);
}

.btn-quick-clone {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--vscode-button-bg);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

.btn-quick-clone:hover {
    background: var(--vscode-button-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(3, 102, 214, 0.25);
}

.btn-quick-clone:active {
    transform: translateY(0);
}

.btn-quick-clone:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.quick-clone-help {
    font-size: 12px;
    color: var(--vscode-text-muted);
    line-height: 1.4;
}

/* Form Divider */
.form-divider {
    display: flex;
    align-items: center;
    margin: 32px 0 24px 0;
    text-align: center;
}

.form-divider::before,
.form-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--vscode-border);
}

.form-divider span {
    padding: 0 16px;
    font-size: 13px;
    color: var(--vscode-text-muted);
    background: var(--vscode-bg);
}

/* Responsive design for quick clone */
@media (max-width: 768px) {
    .quick-clone-input-group {
        flex-direction: column;
        gap: 12px;
    }

    .btn-quick-clone {
        width: 100%;
        justify-content: center;
    }
}

/* Buttons */
.btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--vscode-button-bg);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.15s ease;
    min-height: 32px;
}

.btn-primary:hover {
    background: var(--vscode-button-hover);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    background: transparent;
    color: var(--vscode-text);
    border: 1px solid var(--vscode-border);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

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

/* Project Action Buttons - Unified Professional Theme */
.btn-open {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--vscode-button-bg);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-open:hover {
    background: var(--vscode-button-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.btn-success {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(79, 195, 247, 0.15);
    color: var(--vscode-text-accent);
    border: 1px solid rgba(79, 195, 247, 0.3);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-success:hover {
    background: rgba(79, 195, 247, 0.25);
    border-color: var(--vscode-text-accent);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(79, 195, 247, 0.2);
}

:root[data-theme="light"] .btn-success {
    background: rgba(3, 102, 214, 0.08);
    color: #0366d6;
    border-color: rgba(3, 102, 214, 0.3);
}

:root[data-theme="light"] .btn-success:hover {
    background: rgba(3, 102, 214, 0.15);
    border-color: #0366d6;
}

.btn-warning {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(133, 133, 133, 0.15);
    color: #a0a0a0;
    border: 1px solid rgba(133, 133, 133, 0.3);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-warning:hover {
    background: rgba(133, 133, 133, 0.25);
    border-color: #a0a0a0;
    color: #b8b8b8;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(133, 133, 133, 0.2);
}

:root[data-theme="light"] .btn-warning {
    background: rgba(88, 96, 105, 0.08);
    color: #586069;
    border-color: rgba(88, 96, 105, 0.3);
}

:root[data-theme="light"] .btn-warning:hover {
    background: rgba(88, 96, 105, 0.15);
    border-color: #586069;
    color: #24292e;
}

.btn-danger {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(244, 135, 113, 0.12);
    color: #f48771;
    border: 1px solid rgba(244, 135, 113, 0.3);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-danger:hover {
    background: rgba(244, 135, 113, 0.2);
    border-color: #f48771;
    color: #ff9580;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(244, 135, 113, 0.25);
}

:root[data-theme="light"] .btn-danger {
    background: rgba(215, 58, 73, 0.08);
    color: #d73a49;
    border-color: rgba(215, 58, 73, 0.3);
}

:root[data-theme="light"] .btn-danger:hover {
    background: rgba(215, 58, 73, 0.15);
    border-color: #d73a49;
    color: #cb2431;
}

.btn-open:disabled,
.btn-success:disabled,
.btn-warning:disabled,
.btn-danger:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Projects List */
.projects-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.project-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: var(--vscode-bg);
    border: 1px solid var(--vscode-border);
    border-radius: 8px;
    transition: all 0.15s ease;
}

.project-item:hover {
    border-color: var(--vscode-text-accent);
    box-shadow: var(--shadow-sm);
}

.project-info h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--vscode-text);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
}

.project-info h4 .git-repo-link {
    margin-left: 8px;
    color: var(--vscode-text-accent);
    text-decoration: none;
    opacity: 0.7;
    transition: opacity 0.15s ease;
    display: inline-flex;
    align-items: center;
}

.project-info h4 .git-repo-link:hover {
    opacity: 1;
}

.project-meta {
    font-size: 12px;
    color: var(--vscode-text-muted);
    display: flex;
    gap: 16px;
}

.disk-usage {
    color: var(--vscode-text-muted);
    font-weight: 500;
}

.disk-usage:before {
    content: "💾";
    margin-right: 4px;
    opacity: 0.7;
}

/* Project Grouping Styles */
.project-group {
    margin-bottom: 24px;
}

.group-header {
    margin-bottom: 8px;
}

.group-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 12px 16px;
    background: var(--vscode-sidebar-bg);
    border: 1px solid var(--vscode-border);
    border-radius: 8px;
    color: var(--vscode-text);
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
}

.group-toggle:hover {
    background: var(--vscode-hover-bg);
    border-color: var(--vscode-text-accent);
}

.group-toggle .chevron {
    transition: transform 0.15s ease;
    color: var(--vscode-text-muted);
}

.group-icon {
    font-size: 16px;
}

.group-name {
    flex: 1;
    font-weight: 600;
}

.group-count {
    color: var(--vscode-text-muted);
    font-weight: 400;
    font-size: 12px;
}

.group-projects {
    margin-left: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.group-projects .project-item {
    border-left: 2px solid var(--vscode-text-accent);
    border-left-color: rgba(3, 102, 214, 0.3);
    padding-left: 16px;
}

/* Form Group Input Container */
.group-input-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.group-input-container select {
    margin-bottom: 0;
}

.group-input-container input[type="text"] {
    padding: 12px 16px;
    border: 1px solid var(--vscode-input-border);
    border-radius: 6px;
    background: var(--vscode-bg);
    color: var(--vscode-text);
    font-size: 14px;
    transition: border-color 0.15s ease;
}

.group-input-container input[type="text"]:focus {
    outline: none;
    border-color: var(--vscode-text-accent);
    box-shadow: 0 0 0 3px rgba(3, 102, 214, 0.15);
}

.project-actions {
    display: flex;
    gap: 8px;
}

.project-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
}

.project-status.status-running {
    background: rgba(40, 167, 69, 0.1);
    color: var(--vscode-success);
}

.project-status.status-stopped {
    background: rgba(108, 117, 125, 0.1);
    color: var(--vscode-text-muted);
}

.project-status.status-creating {
    background: rgba(0, 123, 255, 0.1);
    color: var(--vscode-text-accent);
}

.project-status.status-error {
    background: rgba(220, 53, 69, 0.1);
    color: var(--vscode-error);
}

.creating-indicator {
    display: flex;
    align-items: center;
    font-size: 12px;
    color: var(--vscode-text-muted);
    font-style: italic;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--vscode-text-muted);
}

.empty-state svg {
    margin-bottom: 16px;
    opacity: 0.6;
}

.empty-state h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--vscode-text);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
}

/* AI Tools Grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.tool-card {
    background: var(--vscode-bg);
    border: 1px solid var(--vscode-border);
    border-radius: 8px;
    padding: 20px;
    transition: all 0.15s ease;
    box-shadow: var(--shadow-sm);
}

.tool-card:hover {
    border-color: var(--vscode-text-accent);
    box-shadow: var(--shadow-md);
}

.tool-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--vscode-hover-bg);
    border-radius: 8px;
    margin-bottom: 16px;
    color: var(--vscode-text-accent);
}

.tool-card h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--vscode-text);
    margin-bottom: 8px;
}

.tool-card p {
    font-size: 13px;
    color: var(--vscode-text-muted);
    margin-bottom: 16px;
    line-height: 1.4;
}

.tool-commands {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tool-commands code {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 12px;
    background: var(--vscode-sidebar-bg);
    color: var(--vscode-text);
    padding: 6px 8px;
    border-radius: 4px;
    border: 1px solid var(--vscode-border);
}

.tool-link {
    display: inline-block;
    margin-top: 12px;
    font-size: 12px;
    color: var(--vscode-text-accent);
    text-decoration: none;
}

.tool-link:hover {
    text-decoration: underline;
}

/* Quick Setup */
.quick-setup {
    background: var(--vscode-sidebar-bg);
    border-radius: 8px;
    padding: 20px;
    border: 1px solid var(--vscode-border);
}

/* Git Server Styles */
.git-server-info {
    max-width: 800px;
}

.git-server-info h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--vscode-text);
    margin-bottom: 12px;
}

.git-server-info p {
    font-size: 14px;
    color: var(--vscode-text-muted);
    margin-bottom: 24px;
    line-height: 1.5;
}

.git-server-actions {
    margin-bottom: 32px;
}

.git-features h4,
.git-setup h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--vscode-text);
    margin-bottom: 16px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.feature-item {
    background: var(--vscode-bg);
    border: 1px solid var(--vscode-border);
    border-radius: 8px;
    padding: 16px;
}

.feature-item h5 {
    font-size: 14px;
    font-weight: 600;
    color: var(--vscode-text);
    margin-bottom: 8px;
}

.feature-item p {
    font-size: 13px;
    color: var(--vscode-text-muted);
    line-height: 1.4;
    margin: 0;
}

.git-setup {
    background: var(--vscode-sidebar-bg);
    border-radius: 8px;
    padding: 20px;
    border: 1px solid var(--vscode-border);
}

.git-setup p {
    font-size: 14px;
    color: var(--vscode-text);
    margin-bottom: 16px;
}

.setup-steps ol {
    margin: 0;
    padding-left: 20px;
    color: var(--vscode-text);
}

.setup-steps li {
    font-size: 13px;
    margin-bottom: 8px;
    line-height: 1.4;
}

.quick-setup h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--vscode-text);
    margin-bottom: 12px;
}

.quick-setup p {
    font-size: 13px;
    color: var(--vscode-text-muted);
    margin-bottom: 12px;
}

.command-block {
    background: var(--vscode-bg);
    border: 1px solid var(--vscode-border);
    border-radius: 6px;
    padding: 12px;
}

.command-block code {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 13px;
    color: var(--vscode-text-accent);
    font-weight: 500;
}

/* Git Commands Styling */
.git-commands {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 24px;
}

.command-section {
    background: var(--vscode-bg);
    border: 1px solid var(--vscode-border);
    border-radius: 8px;
    padding: 16px;
}

.command-section h5 {
    font-size: 14px;
    font-weight: 600;
    color: var(--vscode-text);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.command-section code {
    display: block;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 13px;
    background: var(--vscode-sidebar-bg);
    color: var(--vscode-text-accent);
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid var(--vscode-border);
    margin-bottom: 8px;
    word-break: break-all;
    line-height: 1.4;
}

.command-section code:last-child {
    margin-bottom: 0;
}

.command-section p {
    font-size: 13px;
    color: var(--vscode-text-muted);
    margin-bottom: 8px;
    line-height: 1.4;
}

.setup-note {
    background: var(--vscode-hover-bg);
    border: 1px solid var(--vscode-border);
    border-radius: 6px;
    padding: 12px;
    margin-top: 16px;
}

.setup-note p {
    font-size: 13px;
    color: var(--vscode-text);
    margin: 0;
    line-height: 1.4;
}

.setup-note code {
    display: inline;
    padding: 2px 4px;
    margin: 0;
    font-size: 12px;
}

/* Code Elements */
code {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 12px;
    background: var(--vscode-sidebar-bg);
    color: var(--vscode-text-accent);
    padding: 2px 4px;
    border-radius: 3px;
    border: 1px solid var(--vscode-border);
}

/* Loading States */
.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.spinner-large {
    width: 32px;
    height: 32px;
    border: 3px solid var(--vscode-border);
    border-top: 3px solid var(--vscode-text-accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(30, 30, 30, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

:root[data-theme="light"] .loading-overlay {
    background: rgba(255, 255, 255, 0.9);
}

.loading-content {
    text-align: center;
    color: var(--vscode-text);
}

.loading-content p {
    font-size: 14px;
    margin-bottom: 4px;
}

.loading-detail {
    font-size: 12px;
    color: var(--vscode-text-muted);
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.modal-content {
    background: var(--vscode-bg);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    width: 90%;
    max-width: 500px;
    border: 1px solid var(--vscode-border);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--vscode-border);
}

.modal-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--vscode-text);
}

.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--vscode-text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.15s ease;
}

.modal-close:hover {
    background: var(--vscode-hover-bg);
    color: var(--vscode-text);
}

.modal-body {
    padding: 20px 24px;
}

.modal-body p {
    font-size: 14px;
    color: var(--vscode-text);
    margin-bottom: 12px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px 20px;
    border-top: 1px solid var(--vscode-border);
}

.workspace-link {
    color: var(--vscode-text-accent);
    text-decoration: none;
    font-weight: 500;
}

.workspace-link:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    body {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
    }

    .activity-bar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--vscode-border);
    }

    .activity-bar-content {
        flex-direction: row;
        align-items: center;
        padding: 16px;
    }

    .logo-section {
        margin-bottom: 0;
        padding-bottom: 0;
        border-bottom: none;
        margin-right: auto;
    }

    .activity-nav {
        flex: none;
        display: flex;
        gap: 8px;
    }

    .nav-item span {
        display: none;
    }

    .main-container {
        overflow-y: auto;
    }

    .title-bar,
    .tab-panel {
        padding: 20px;
    }

    .title-bar-content {
        flex-direction: row;
        gap: 16px;
    }

    .theme-toggle {
        width: 36px;
        height: 36px;
    }
}

/* PWA Specific Styles */

/* PWA Install Button */
.pwa-install-btn {
    background: var(--pwa-install-bg) !important;
    border-color: var(--pwa-install-bg) !important;
    margin-left: 16px;
    transition: all 0.2s ease;
}

.pwa-install-btn:hover {
    background: var(--pwa-install-hover) !important;
    border-color: var(--pwa-install-hover) !important;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.pwa-install-btn svg {
    transition: transform 0.2s ease;
}

.pwa-install-btn:hover svg {
    transform: translateY(-1px);
}

/* PWA Update Notification */
.pwa-update-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--vscode-bg);
    border: 1px solid var(--pwa-update-bg);
    border-radius: 8px;
    padding: 16px;
    box-shadow: var(--shadow-lg);
    z-index: 10000;
    max-width: 400px;
    animation: slideInRight 0.3s ease-out;
}

.update-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.update-content span {
    font-size: 14px;
    color: var(--vscode-text);
    font-weight: 500;
}

.update-content .update-btn {
    background: var(--pwa-update-bg);
    color: #212529;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.update-content .update-btn:hover {
    background: #e0a800;
    transform: translateY(-1px);
}

.update-content .dismiss-btn {
    background: none;
    border: none;
    color: var(--vscode-text-muted);
    font-size: 13px;
    cursor: pointer;
    text-decoration: underline;
    align-self: flex-start;
}

.update-content .dismiss-btn:hover {
    color: var(--vscode-text);
}

/* Offline Indicator */
.offline-indicator {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--pwa-offline-bg);
    color: white;
    padding: 12px 20px;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow-lg);
    z-index: 10000;
    animation: slideInUp 0.3s ease-out;
}

.offline-indicator svg {
    opacity: 0.9;
}

/* PWA Animations */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInUp {
    from {
        transform: translate(-50%, 100%);
        opacity: 0;
    }
    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

/* PWA Media Queries */
@media (max-width: 768px) {
    .pwa-install-btn {
        margin-left: 8px;
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .pwa-update-notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .offline-indicator {
        bottom: 10px;
        left: 10px;
        right: 10px;
        transform: none;
        border-radius: 8px;
    }
}

@media (max-width: 480px) {
    .pwa-install-btn span {
        display: none;
    }
    
    .pwa-install-btn {
        padding: 8px;
        min-width: auto;
    }
}

/* PWA Standalone Mode Styles */
@media (display-mode: standalone) {
    body {
        /* Add any standalone-specific styles here */
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }
    
    /* Hide install button when in standalone mode */
    .pwa-install-btn {
        display: none !important;
    }
    
    /* Add some padding for potential notches/safe areas */
    .title-bar {
        padding-top: env(safe-area-inset-top, 20px);
    }
}

/* Version Footer */
.version-footer {
    position: fixed;
    bottom: 0;
    left: 240px; /* Account for activity bar width */
    right: 0;
    background: var(--vscode-sidebar-bg);
    border-top: 1px solid var(--vscode-border);
    padding: 4px 16px;
    font-size: 11px;
    color: var(--vscode-text-muted);
    z-index: 100;
    user-select: none;
    transition: all 0.2s ease;
}

.version-footer:hover {
    background: var(--vscode-hover-bg);
    color: var(--vscode-text);
}

#version-info {
    cursor: default;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

/* Version Footer Responsive */
@media (max-width: 768px) {
    .version-footer {
        left: 0;
        padding: 6px 16px;
        text-align: center;
    }
}

@media (display-mode: standalone) {
    .version-footer {
        /* Add padding for potential home indicator */
        padding-bottom: env(safe-area-inset-bottom, 4px);
    }
}

/* Project Notes Styles */
.notes-btn {
    background: none;
    border: none;
    color: var(--vscode-text-muted);
    cursor: pointer;
    padding: 2px;
    margin-left: 6px;
    border-radius: 3px;
    display: inline-flex;
    align-items: center;
    position: relative;
    transition: all 0.2s ease;
    vertical-align: text-bottom;
}

.notes-btn:hover {
    color: var(--vscode-text-accent);
    background: var(--vscode-hover-bg);
}

.notes-btn svg {
    transition: color 0.2s ease;
}

.notes-indicator {
    position: absolute;
    top: 0;
    right: 0;
    width: 6px;
    height: 6px;
    background: var(--vscode-text-accent);
    border-radius: 50%;
    transform: translate(2px, -2px);
}

.alias-count {
    display: inline-block;
    margin-left: 4px;
    min-width: 14px;
    padding: 0 4px;
    font-size: 10px;
    line-height: 14px;
    text-align: center;
    background: var(--vscode-text-accent, #007acc);
    color: white;
    border-radius: 7px;
    vertical-align: text-top;
}

/* Notes Modal Styles */
.notes-modal-content {
    max-width: 700px;
    width: 95%;
    max-height: 90vh;
}

.notes-editor {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.notes-editor textarea {
    width: 100%;
    min-height: 300px;
    padding: 12px;
    border: 1px solid var(--vscode-input-border);
    border-radius: 6px;
    background: var(--vscode-input-bg);
    color: var(--vscode-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
    transition: border-color 0.2s ease;
}

.notes-editor textarea:focus {
    outline: none;
    border-color: var(--vscode-text-accent);
    box-shadow: 0 0 0 3px rgba(3, 102, 214, 0.1);
}

.notes-editor textarea::placeholder {
    color: var(--vscode-text-muted);
    line-height: 1.4;
}

.notes-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--vscode-text-muted);
}

.notes-char-count {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

.notes-help {
    opacity: 0.8;
}

/* Character count color feedback */
#notesCharCount.warning {
    color: var(--vscode-warning);
}

#notesCharCount.error {
    color: var(--vscode-error);
}

/* Responsive Notes Modal */
@media (max-width: 768px) {
    .notes-modal-content {
        width: 98%;
        max-height: 95vh;
    }

    .notes-editor textarea {
        min-height: 250px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* Squid Logs Modal Styles */
.logs-modal-content {
    max-width: 900px;
    width: 95%;
    max-height: 90vh;
}

.logs-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    margin-right: 12px;
}

.logs-controls .checkbox-label {
    margin: 0;
    font-size: 13px;
}

.logs-controls .checkbox-text {
    margin-left: 6px;
}

.logs-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: var(--vscode-bg-secondary);
    border-radius: 6px;
    margin-bottom: 12px;
    font-size: 13px;
    color: var(--vscode-text-muted);
}

.logs-info code {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    background: var(--vscode-bg);
    padding: 2px 6px;
    border-radius: 3px;
    color: var(--vscode-text-accent);
}

.logs-container {
    background: var(--vscode-bg);
    border: 1px solid var(--vscode-input-border);
    border-radius: 6px;
    padding: 12px;
    max-height: 500px;
    overflow-y: auto;
}

.logs-container pre {
    margin: 0;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 12px;
    line-height: 1.6;
    color: var(--vscode-text);
    white-space: pre-wrap;
    word-wrap: break-word;
}

.logs-btn {
    background: none;
    border: none;
    padding: 4px 6px;
    cursor: pointer;
    color: var(--vscode-text-muted);
    transition: color 0.2s ease;
    display: inline-flex;
    align-items: center;
}

.logs-btn:hover {
    color: var(--vscode-text-accent);
}

.ai-conv-btn {
    background: none;
    border: none;
    padding: 4px 6px;
    cursor: pointer;
    color: var(--vscode-text-muted);
    transition: color 0.2s ease;
    display: inline-flex;
    align-items: center;
}

.ai-conv-btn:hover {
    color: var(--vscode-text-accent);
}

/* Success Toast Notification */
.success-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #2ea043;
    color: white;
    padding: 12px 16px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    font-size: 14px;
    font-weight: 500;
    opacity: 0;
    transform: translateX(100px);
    transition: all 0.3s ease;
    z-index: 10000;
    max-width: 400px;
}

.success-toast.show {
    opacity: 1;
    transform: translateX(0);
}

.success-toast svg {
    flex-shrink: 0;
}

.btn-icon {
    background: none;
    border: none;
    padding: 4px 6px;
    cursor: pointer;
    color: var(--vscode-text-muted);
    transition: color 0.2s ease;
    display: inline-flex;
    align-items: center;
    border-radius: 4px;
}

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

/* Responsive Logs Modal */
@media (max-width: 768px) {
    .logs-modal-content {
        width: 98%;
        max-height: 95vh;
    }

    .logs-container {
        max-height: 400px;
    }

    .logs-container pre {
        font-size: 11px;
    }

    .logs-controls {
        flex-wrap: wrap;
        gap: 6px;
    }
}

/* Groups Section Styles */
.groups-section {
    margin-top: 20px;
}

.groups-divider {
    height: 1px;
    background: var(--vscode-border);
    margin: 16px 0;
}

.groups-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 600;
    color: var(--vscode-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.groups-list {
    margin-bottom: 8px;
}

.group-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    margin-bottom: 2px;
    min-height: 32px;
    position: relative;
}

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

.group-item.active {
    background: var(--vscode-active-bg);
    color: var(--vscode-text-accent);
    font-weight: 500;
}

.group-item.drag-over {
    background: rgba(3, 102, 214, 0.1);
    border: 2px dashed var(--vscode-text-accent);
    animation: pulse-highlight 1s ease-in-out infinite;
}

.group-name {
    flex: 1;
    font-size: 13px;
    color: inherit;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    user-select: none;
}

.group-actions {
    display: flex;
    gap: 2px;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.group-item:hover .group-actions {
    opacity: 1;
}

.group-action-btn {
    background: none;
    border: none;
    padding: 4px;
    border-radius: 3px;
    cursor: pointer;
    color: var(--vscode-text-muted);
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.group-action-btn:hover {
    background: var(--vscode-hover-bg);
    color: var(--vscode-text);
}

.add-group-container {
    padding: 0 12px;
}

.add-group-btn {
    width: 100%;
    padding: 6px 8px;
    background: none;
    border: 1px dashed var(--vscode-border);
    border-radius: 6px;
    color: var(--vscode-text-muted);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

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

/* Drag and Drop Styles */
.project-item[draggable="true"] {
    cursor: grab;
}

.project-item.dragging {
    opacity: 0.5;
    transform: rotate(2deg);
    z-index: 1000;
    cursor: grabbing;
}

.project-group-badge {
    background: var(--vscode-sidebar-bg);
    color: var(--vscode-text-accent);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid var(--vscode-border);
    transition: all 0.15s ease;
}

.project-group-badge:hover {
    background: var(--vscode-hover-bg);
    border-color: var(--vscode-text-accent);
}

.no-projects-in-group {
    text-align: center;
    padding: 40px 20px;
    color: var(--vscode-text-muted);
}

.no-projects-in-group p {
    margin-bottom: 12px;
    font-size: 14px;
}

.btn-link {
    background: none;
    border: none;
    color: var(--vscode-text-accent);
    cursor: pointer;
    text-decoration: underline;
    font-size: inherit;
}

.btn-link:hover {
    color: var(--vscode-button-hover);
}

/* Drop Success Feedback */
.drop-success-feedback {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--vscode-success);
    color: white;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    box-shadow: var(--shadow-md);
    z-index: 10001;
    animation: slideInRight 0.3s ease-out, fadeOut 0.5s ease-in 1.5s forwards;
}

/* Drag and Drop Animations */
@keyframes pulse-highlight {
    0%, 100% {
        background: rgba(3, 102, 214, 0.1);
    }
    50% {
        background: rgba(3, 102, 214, 0.2);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* Responsive Groups Section */
@media (max-width: 768px) {
    .groups-section {
        margin-top: 16px;
    }

    .group-item {
        padding: 8px 16px;
        min-height: 36px;
    }

    .group-actions {
        opacity: 1; /* Always show on mobile */
    }

    .drop-success-feedback {
        top: 10px;
        right: 10px;
        left: 10px;
        text-align: center;
    }
}