/* Personal Project Dashboard Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --secondary-color: #64748b;
    --success-color: #059669;
    --warning-color: #d97706;
    --danger-color: #dc2626;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Overview Section Styles */
.overview-section {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

/* Agent Status Section Styles */
.agents-section {
    margin-bottom: 30px;
}

.agent-overview-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.agent-card {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.agent-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.agent-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.1em;
    font-weight: 600;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 0.8em;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-badge.healthy {
    background: #dcfce7;
    color: #166534;
}

.agent-stats {
    display: grid;
    gap: 12px;
}

.agent-stats .stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.agent-stats .stat:last-child {
    border-bottom: none;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9em;
}

.stat-value {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9em;
}

.agents-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 24px;
    margin-bottom: 30px;
}

.agent-group {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.agent-group h3 {
    margin: 0 0 16px 0;
    color: var(--text-primary);
    font-size: 1em;
    font-weight: 600;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 8px;
}

.agent-list {
    display: grid;
    gap: 12px;
}

.agent-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.agent-info {
    flex: 1;
}

.agent-name {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9em;
    margin-bottom: 4px;
}

.agent-description {
    display: block;
    color: var(--text-secondary);
    font-size: 0.8em;
    line-height: 1.4;
}

.status-indicator {
    font-size: 12px;
    font-weight: bold;
    margin-left: 12px;
}

.status-indicator.active {
    color: #22c55e;
}

.agent-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Cost Overview Cards */
.cost-overview-cards {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.cost-card {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.cost-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.cost-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1em;
    font-weight: 600;
}

.cost-amount {
    font-size: 1.5em;
    font-weight: bold;
    color: #059669;
}

.cost-stats {
    display: grid;
    gap: 8px;
}

.cost-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
}

.cost-label {
    color: var(--text-secondary);
    font-size: 0.85em;
}

.cost-value {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.85em;
}

.cost-value.risk-low {
    color: #059669;
}

.cost-value.risk-medium {
    color: #d97706;
}

.cost-value.risk-high {
    color: #dc2626;
}

/* Master Controls */
.master-controls {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    margin-bottom: 30px;
}

.control-section h3 {
    margin: 0 0 16px 0;
    color: var(--text-primary);
    font-size: 1.1em;
    font-weight: 600;
}

.control-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.control-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9em;
}

.control-btn.primary {
    background: #2563eb;
    color: white;
}

.control-btn.primary:hover {
    background: #1d4ed8;
}

.control-btn.secondary {
    background: #059669;
    color: white;
}

.control-btn.secondary:hover {
    background: #047857;
}

.control-btn.warning {
    background: #dc2626;
    color: white;
}

.control-btn.warning:hover {
    background: #b91c1c;
}

/* Detailed Agent Cards */
.detailed-agents-list {
    margin-top: 20px;
}

.detailed-agents-list h3 {
    margin: 0 0 20px 0;
    color: var(--text-primary);
    font-size: 1.2em;
    font-weight: 600;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 8px;
}

.detailed-agent-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
}

.agent-main-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.agent-identity h4 {
    margin: 0 0 8px 0;
    color: var(--text-primary);
    font-size: 1.1em;
    font-weight: 600;
}

.agent-identity p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9em;
    line-height: 1.4;
}

.agent-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-text {
    font-size: 0.85em;
    font-weight: 500;
    color: var(--text-secondary);
}

.status-indicator.dormant {
    color: #6b7280;
}

.status-indicator.disabled {
    color: #dc2626;
}

.status-indicator.active {
    color: #059669;
}

.agent-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 24px;
    margin-bottom: 16px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 8px;
}

.detail-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-section label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.8em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.detail-section span {
    color: var(--text-secondary);
    font-size: 0.9em;
}

.schedule-info {
    font-weight: 500;
}

.api-status.no-api {
    color: #059669;
    font-weight: 500;
}

.api-status.has-api {
    color: #d97706;
    font-weight: 500;
}

.impact-scope {
    font-weight: 500;
}

.folders-affected {
    font-family: 'Courier New', monospace;
    font-size: 0.8em;
    background: #e5e7eb;
    padding: 4px 8px;
    border-radius: 4px;
}

.agent-actions-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.agent-btn {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: white;
    color: var(--text-primary);
    font-size: 0.8em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.agent-btn:hover:not(:disabled) {
    background: #f3f4f6;
}

.agent-btn.run {
    border-color: #059669;
    color: #059669;
}

.agent-btn.run:hover:not(:disabled) {
    background: #ecfdf5;
}

.agent-btn.pause {
    border-color: #d97706;
    color: #d97706;
}

.agent-btn.pause:hover:not(:disabled) {
    background: #fffbeb;
}

.agent-btn.enable {
    border-color: #2563eb;
    color: #2563eb;
}

.agent-btn.enable:hover:not(:disabled) {
    background: #eff6ff;
}

.agent-btn.logs {
    border-color: #6b7280;
    color: #6b7280;
}

.agent-btn.logs:hover:not(:disabled) {
    background: #f9fafb;
}

.agent-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Agent Group Headers */
.agent-group-header {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 16px;
    margin: 16px 0 0 0;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.agent-group-header:hover {
    background: #f8fafc;
}

.agent-group-header h4 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1em;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.toggle-icon {
    font-size: 0.8em;
    color: var(--text-secondary);
}

.agent-group-content {
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 8px 8px;
    padding: 16px;
    background: var(--card-bg);
}

.agent-summary-list {
    display: grid;
    gap: 8px;
}

.agent-summary-item {
    display: grid;
    grid-template-columns: 2fr 1fr 80px 2fr;
    gap: 12px;
    align-items: center;
    padding: 8px 12px;
    background: #f8fafc;
    border-radius: 6px;
    font-size: 0.85em;
}

.agent-summary-item .agent-name {
    font-weight: 600;
    color: var(--text-primary);
}

.agent-summary-item .agent-schedule {
    color: var(--text-secondary);
}

.agent-summary-item .agent-cost {
    font-weight: 600;
    color: #059669;
    text-align: center;
}

.agent-summary-item .agent-scope {
    color: var(--text-secondary);
    font-size: 0.8em;
}

.overview-card {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.overview-card h3 {
    margin-bottom: 15px;
    color: var(--text-primary);
    font-size: 1.1em;
}

.overview-stats {
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.overview-stats .stat {
    text-align: center;
}

.system-status {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status-label {
    color: var(--text-secondary);
    font-size: 0.9em;
}

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

/* Projects Grid Styles */
.projects-section {
    margin-bottom: 30px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.project-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    box-shadow: var(--shadow);
    transition: all 0.2s ease;
}

.project-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.project-card.active {
    border-left: 4px solid var(--primary-color);
}

.project-card.completed {
    border-left: 4px solid var(--success-color);
    opacity: 0.8;
}

.project-header {
    display: flex;
    justify-content: between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.project-title {
    font-size: 1.1em;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    flex: 1;
}

.priority-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 600;
    text-transform: uppercase;
}

.priority-badge.highest {
    background: #fef2f2;
    color: #dc2626;
}

.priority-badge.high {
    background: #fef3c7;
    color: #d97706;
}

.priority-badge.medium {
    background: #e0f2fe;
    color: #0369a1;
}

.priority-badge.low {
    background: #f0f9ff;
    color: #0284c7;
}

.priority-badge.completed {
    background: #f0fdf4;
    color: var(--success-color);
}

.project-description {
    color: var(--text-secondary);
    font-size: 0.9em;
    margin-bottom: 15px;
    line-height: 1.4;
}

.project-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8em;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.project-progress {
    width: 100%;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
}

.project-progress-bar {
    height: 100%;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

/* Project Links Section */
.project-links {
    margin-top: 15px;
    padding: 12px;
    background: var(--bg-color);
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.links-header {
    font-size: 0.85em;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.link-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.link-item:first-of-type {
    padding-top: 0;
}

.link-icon {
    font-size: 1em;
    flex-shrink: 0;
}

.link-label {
    font-size: 0.8em;
    color: var(--text-secondary);
    font-weight: 500;
    min-width: 50px;
}

.link-value {
    font-size: 0.8em;
    color: var(--primary-color);
    text-decoration: none;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

/* Project Notes Section */
.project-notes {
    margin-top: 15px;
    padding: 12px;
    background: var(--bg-color);
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.notes-header {
    font-size: 0.85em;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.notes-textarea {
    width: 100%;
    min-height: 80px;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.85em;
    font-family: inherit;
    resize: vertical;
    background: var(--card-bg);
    color: var(--text-primary);
    line-height: 1.4;
}

.notes-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 1px var(--primary-color);
}

.notes-textarea::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

.save-notes-btn {
    margin-top: 8px;
    padding: 6px 12px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.save-notes-btn:hover {
    background: #1d4ed8;
}

.save-notes-btn:active {
    transform: scale(0.98);
}

.health-score {
    font-weight: 600;
}

.health-score.excellent { color: #059669; }
.health-score.good { color: #65a30d; }
.health-score.needs-attention { color: #d97706; }
.health-score.critical { color: #dc2626; }

/* Real Project Styling */
.kanban-card.real-project {
    border-left: 3px solid var(--primary-color);
    background: linear-gradient(135deg, var(--card-bg), #f1f5f9);
}

.kanban-card.real-project .card-header h4 {
    font-size: 0.9em;
    color: var(--primary-color);
}

.security-score.good { color: var(--success-color); font-weight: bold; }
.security-score.warning { color: var(--warning-color); font-weight: bold; }
.security-score.critical { color: var(--danger-color); font-weight: bold; }

.security-overview {
    display: flex;
    align-items: center;
    gap: 10px;
}

.security-score-display {
    font-size: 1.5em;
    font-weight: bold;
    padding: 10px;
    border-radius: 8px;
    background: rgba(37, 99, 235, 0.1);
}

.files-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.loading-files, .no-files {
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    padding: 20px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.info-item label {
    font-weight: 500;
    color: var(--text-secondary);
}

.files-grid {
    display: grid;
    gap: 10px;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--card-bg);
    transition: all 0.2s ease;
}

.file-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow);
}

.file-icon {
    font-size: 1.5em;
    width: 32px;
    text-align: center;
}

.file-info {
    flex: 1;
}

.file-name {
    font-weight: 500;
    color: var(--text-primary);
}

.file-meta {
    font-size: 0.8em;
    color: var(--text-secondary);
}

.file-action {
    padding: 6px 12px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8em;
}

.file-action:hover {
    opacity: 0.9;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
}

/* Dashboard Container */
.dashboard-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

.header-left h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.current-date {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.focus-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.focus-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.focus-value {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Main Layout */
.dashboard-main {
    flex: 1;
    display: flex;
    gap: 0;
}

/* Sidebar */
.dashboard-sidebar {
    width: 280px;
    background: #ffffff;
    border-right: 1px solid var(--border-color);
    padding: 1.5rem;
    overflow-y: auto;
    height: calc(100vh - 73px);
}

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

.nav-section h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.nav-section ul {
    list-style: none;
}

.nav-section li {
    margin-bottom: 0.25rem;
}

.nav-link, .category-link {
    display: block;
    padding: 0.5rem 0.75rem;
    color: #000000;
    text-decoration: none;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    font-weight: 500;
}

.nav-link:hover, .category-link:hover {
    background: #1e293b;
    color: #ffffff;
    text-decoration: none;
}

.nav-link.active {
    background: var(--primary-color);
    color: white;
    text-decoration: none;
}

/* Dropdown Navigation Styles */
.nav-item-with-submenu {
    position: relative;
}

.nav-dropdown-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    color: #000000;
    text-decoration: none;
}

.nav-dropdown-toggle:hover {
    text-decoration: none;
    background: #1e293b;
    color: #ffffff;
    border-radius: 0.375rem;
}

.dropdown-arrow {
    font-size: 0.75rem;
    transition: transform 0.2s ease;
    margin-left: auto;
}

.nav-item-with-submenu.open .dropdown-arrow {
    transform: rotate(180deg);
}

.nav-submenu {
    list-style: none;
    margin: 0;
    padding-left: 1rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.nav-item-with-submenu.open .nav-submenu {
    max-height: 500px;
    margin-top: 0.25rem;
}

.nav-sublink {
    display: block;
    padding: 0.4rem 0.75rem;
    color: #6b7280;
    text-decoration: none;
    border-radius: 0.375rem;
    font-size: 0.8rem;
    transition: all 0.2s ease;
    margin-bottom: 0.2rem;
}

.nav-sublink:hover {
    background: #374151;
    color: #ffffff;
    text-decoration: none;
}

.nav-sublink.active {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
    font-weight: 500;
    text-decoration: none;
}

.category-progress {
    margin-top: 0.25rem;
    margin-left: 1.5rem;
}

.progress-bar-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.progress-bar {
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    overflow: hidden;
    flex: 1;
}

.progress-bar::after {
    content: '';
    display: block;
    height: 100%;
    background: var(--primary-color);
    width: var(--progress, 0%);
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.75rem;
    color: var(--text-secondary);
    min-width: 3rem;
}

/* Main Content */
.dashboard-content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    height: calc(100vh - 73px);
}

/* Top Section */
.top-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.focus-card, .sprint-card {
    background: var(--card-bg);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.focus-card h2, .sprint-card h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

/* Today's Tasks */
.today-tasks {
    list-style: none;
    margin-bottom: 1rem;
}

.task-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

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

.task-item input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    accent-color: var(--success-color);
}

.task-item label {
    flex: 1;
    cursor: pointer;
    font-size: 0.875rem;
}

.task-item input[type="checkbox"]:checked + label {
    text-decoration: line-through;
    color: var(--text-secondary);
}

.add-task-btn {
    background: var(--bg-color);
    border: 1px dashed var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    cursor: pointer;
    width: 100%;
    transition: all 0.2s ease;
}

.add-task-btn:hover {
    background: var(--border-color);
}

/* Sprint Info */
.sprint-info h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.sprint-info p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.sprint-progress {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1rem 0;
}

.progress-label {
    font-size: 0.875rem;
    font-weight: 500;
    min-width: 4rem;
}

.sprint-progress-bar {
    height: 8px;
    border-radius: 4px;
}

.sprint-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Kanban Board */
.kanban-section {
    margin-bottom: 2rem;
}

.kanban-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.kanban-board {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
    min-height: 400px;
}

.kanban-column {
    background: var(--bg-color);
    border-radius: 0.75rem;
    padding: 1rem;
    border: 1px solid var(--border-color);
}

.kanban-column h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.kanban-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-height: 300px;
}

/* Kanban Cards */
.kanban-card {
    background: var(--card-bg);
    border-radius: 0.5rem;
    padding: 1rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    cursor: grab;
    transition: all 0.2s ease;
}

.kanban-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-1px);
}

.kanban-card.active {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 1px var(--primary-color);
}

.kanban-card.completed {
    opacity: 0.8;
    border-color: var(--success-color);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
    gap: 0.5rem;
}

.card-header h4 {
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.4;
    flex: 1;
}

.priority-badge {
    padding: 0.125rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
}

.priority-badge.highest {
    background: #fef2f2;
    color: #991b1b;
}

.priority-badge.high {
    background: #fff7ed;
    color: #c2410c;
}

.priority-badge.medium {
    background: #fefce8;
    color: #a16207;
}

.priority-badge.completed {
    background: #f0fdf4;
    color: #166534;
}

.kanban-card p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
}

.points {
    background: var(--bg-color);
    color: var(--primary-color);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-weight: 500;
}

.category {
    color: var(--text-secondary);
}

.progress-indicator {
    margin-top: 0.75rem;
}

.progress-indicator .progress-bar {
    height: 3px;
}

.completion-date {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--success-color);
    font-weight: 500;
}

/* Quick Actions */
.actions-section {
    margin-top: 2rem;
}

.quick-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.action-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-btn:hover {
    background: var(--bg-color);
    box-shadow: var(--shadow);
}

.action-btn.primary {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.action-btn.primary:hover {
    background: #1d4ed8;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    background: var(--card-bg);
    margin: 5% auto;
    border-radius: 0.75rem;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

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

.modal-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
}

.close {
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    line-height: 1;
}

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

.modal-body {
    padding: 1.5rem;
}

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

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

.form-group textarea,
.form-group input[type="text"],
.form-group input[type="email"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    font-size: 0.875rem;
    resize: vertical;
    font-family: inherit;
}

.form-group textarea:focus,
.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 1px var(--primary-color);
}

.form-group input[type="range"] {
    width: calc(100% - 4rem);
    margin-right: 1rem;
}

#energyValue {
    font-weight: 600;
    color: var(--primary-color);
    min-width: 2rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.btn.primary {
    background: var(--primary-color);
    color: white;
}

.btn.primary:hover {
    background: #1d4ed8;
}

.btn.secondary {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--border-color);
}

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

/* Responsive Design */
@media (max-width: 1200px) {
    .kanban-board {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .kanban-column:nth-child(4),
    .kanban-column:nth-child(5) {
        grid-column: span 1;
    }
}

@media (max-width: 968px) {
    .dashboard-main {
        flex-direction: column;
    }
    
    .dashboard-sidebar {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    .top-section {
        grid-template-columns: 1fr;
    }
    
    .kanban-board {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .dashboard-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .dashboard-content {
        padding: 1rem;
    }
    
    .kanban-board {
        grid-template-columns: 1fr;
    }
    
    .quick-actions {
        justify-content: center;
    }
}

/* Animation for progress bars */
@keyframes fillProgress {
    from {
        width: 0%;
    }
    to {
        width: var(--progress);
    }
}

.progress-bar::after {
    animation: fillProgress 1s ease-out forwards;
}

/* Drag and Drop Enhancements */
.kanban-items.drag-over {
    background: rgba(37, 99, 235, 0.1);
    border: 2px dashed var(--primary-color);
    border-radius: 0.5rem;
}

.kanban-card:active {
    cursor: grabbing;
}

/* Project Drilldown Modal */
.project-drilldown-modal .modal-content {
    max-width: 1200px;
    width: 95%;
    max-height: 95vh;
}

.large-modal {
    max-width: 1200px !important;
    width: 95% !important;
    height: 850px !important;
}

.project-tabs {
    display: flex;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 1.5rem;
    gap: 0;
}

.tab-btn {
    background: transparent;
    border: none;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    color: var(--primary-color);
    background: var(--bg-color);
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background: var(--bg-color);
}

.tab-content {
    display: none;
}

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

/* Overview Tab Styles */
.overview-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.overview-section {
    background: var(--bg-color);
    border-radius: 0.5rem;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.overview-section.full-width {
    grid-column: span 2;
}

.overview-section h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

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

.info-item label {
    font-weight: 500;
    color: var(--text-secondary);
}

.status-badge, .priority-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-badge.in_progress {
    background: #dbeafe;
    color: #1d4ed8;
}

.status-badge.todo {
    background: #f3f4f6;
    color: #374151;
}

.status-badge.done {
    background: #f0fdf4;
    color: #166534;
}

/* Tags Container */
.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tag:hover {
    background: #1d4ed8;
}

.remove-tag {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 0.875rem;
    line-height: 1;
    padding: 0;
    margin-left: 0.25rem;
}

.remove-tag:hover {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
}

.add-tag-btn {
    background: var(--border-color);
    border: 1px dashed var(--text-secondary);
    color: var(--text-secondary);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.add-tag-btn:hover {
    background: var(--text-secondary);
    color: white;
}

.no-tags {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-style: italic;
}

/* Progress Section */
.progress-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.progress-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.description-box {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    padding: 1rem;
}

.description-box p {
    margin: 0;
    color: var(--text-primary);
    line-height: 1.6;
}

/* Tasks Tab Styles */
.tasks-section {
    max-height: 400px;
    overflow-y: auto;
}

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

.tasks-header h3 {
    margin: 0;
}

.btn.small {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

.tasks-list {
    max-height: 250px;
    overflow-y: auto;
    margin-bottom: 1.5rem;
}

.task-metrics {
    display: flex;
    gap: 2rem;
    padding: 1rem;
    background: var(--bg-color);
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
}

.metric {
    text-align: center;
}

.metric-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.metric-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.task-date {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-left: auto;
}

/* Files Tab Styles */
.files-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-color);
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.file-item:hover {
    box-shadow: var(--shadow);
}

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

.file-info {
    flex: 1;
}

.file-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.file-meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.file-action {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.file-action:hover {
    background: #1d4ed8;
}

/* Chat Sessions Styles */
.chats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.chat-sessions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 400px;
    overflow-y: auto;
}

.chat-session {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1rem;
    transition: all 0.2s ease;
}

.chat-session:hover {
    box-shadow: var(--shadow);
}

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

.session-date {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.session-duration {
    background: var(--primary-color);
    color: white;
    padding: 0.125rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.75rem;
}

.session-summary strong {
    color: var(--text-primary);
    display: block;
    margin-bottom: 0.5rem;
}

.session-summary p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

.session-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-bottom: 0.75rem;
}

.session-tags .tag {
    background: var(--bg-color);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.session-actions {
    display: flex;
    gap: 1rem;
}

.btn-link {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    font-size: 0.875rem;
    text-decoration: underline;
}

.btn-link:hover {
    color: #1d4ed8;
}

/* Settings Tab Styles */
.setting-group {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.setting-group:last-child {
    border-bottom: none;
}

.setting-group h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.setting-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    cursor: pointer;
}

.setting-item input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    accent-color: var(--primary-color);
}

.setting-item select {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    font-size: 0.875rem;
}

/* Notification System */
.notification {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 1001;
    max-width: 400px;
    animation: slideInRight 0.3s ease-out;
}

.notification.success {
    border-left: 4px solid var(--success-color);
}

.notification.info {
    border-left: 4px solid var(--primary-color);
}

.notification.warning {
    border-left: 4px solid var(--warning-color);
}

.notification.error {
    border-left: 4px solid var(--danger-color);
}

.notification-message {
    flex: 1;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.notification-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--text-secondary);
    line-height: 1;
    padding: 0;
}

.notification-close:hover {
    color: var(--text-primary);
}

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

/* Modal Footer */
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-color);
    border-radius: 0 0 0.75rem 0.75rem;
}

/* Responsive adjustments for drilldown modal */
@media (max-width: 768px) {
    .overview-grid {
        grid-template-columns: 1fr;
    }
    
    .overview-section.full-width {
        grid-column: span 1;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .project-tabs {
        flex-wrap: wrap;
    }
    
    .tab-btn {
        flex: 1;
        min-width: 0;
        padding: 0.5rem 0.75rem;
    }
    
    .large-modal {
        width: 98% !important;
        margin: 2% auto;
    }
}

/* Global text color rules for light backgrounds */
/* Ensure all elements with white or light backgrounds have dark text */
[style*="background: white"],
[style*="background: #fff"],
[style*="background: #ffffff"],
[style*="background: #f8fafc"],
[style*="background: #fef3c7"],
[style*="background: #dcfce7"],
[style*="background: #e0f2fe"],
[style*="background: #fef2f2"],
[style*="background-color: white"],
[style*="background-color: #fff"],
[style*="background-color: #ffffff"] {
    color: var(--text-primary) !important;
}

/* Ensure headings on light backgrounds are always dark */
[style*="background: white"] h1,
[style*="background: white"] h2,
[style*="background: white"] h3,
[style*="background: white"] h4,
[style*="background: white"] h5,
[style*="background: white"] h6,
[style*="background: #fff"] h1,
[style*="background: #fff"] h2,
[style*="background: #fff"] h3,
[style*="background: #fff"] h4,
[style*="background: #f8fafc"] h1,
[style*="background: #f8fafc"] h2,
[style*="background: #f8fafc"] h3,
[style*="background: #f8fafc"] h4 {
    color: var(--text-primary) !important;
}

/* Ensure paragraphs and spans on light backgrounds have proper color */
[style*="background: white"] p,
[style*="background: white"] span,
[style*="background: white"] div,
[style*="background: #fff"] p,
[style*="background: #fff"] span,
[style*="background: #fff"] div,
[style*="background: #f8fafc"] p,
[style*="background: #f8fafc"] span,
[style*="background: #f8fafc"] div:not(.progress-bar):not(.progress-fill) {
    color: inherit;
}

/* Specific fix for task cards and kanban items */
div[style*="background: #f8fafc"],
div[style*="background: #fef3c7"],
div[style*="background: #dcfce7"] {
    color: var(--text-primary);
}

/* Utility classes for proper text colors on various backgrounds */
.text-on-light {
    color: var(--text-primary) !important;
}

.text-on-dark {
    color: #ffffff !important;
}

/* Automatic contrast for common background patterns */
.bg-white,
.bg-light {
    background: var(--card-bg);
    color: var(--text-primary);
}

.bg-gray-light {
    background: #f8fafc;
    color: var(--text-primary);
}

.bg-yellow-light {
    background: #fef3c7;
    color: var(--text-primary);
}

.bg-green-light {
    background: #dcfce7;
    color: var(--text-primary);
}

.bg-blue-light {
    background: #e0f2fe;
    color: var(--text-primary);
}

/* Override for any element with light background that might have incorrect text color */
*[style*="background"][style*="#f"]:not([style*="color"]),
*[style*="background"][style*="white"]:not([style*="color"]) {
    color: var(--text-primary);
}

/* Comprehensive fallback - ensure all text in white containers is dark */
div[style*="background: white"] *:not(a):not(button),
div[style*="background: #fff"] *:not(a):not(button),
div[style*="background: #ffffff"] *:not(a):not(button),
div[style*="background-color: white"] *:not(a):not(button),
div[style*="background-color: #fff"] *:not(a):not(button) {
    color: inherit;
}

/* Ensure text inside light background divs inherits proper dark color */
div[style*="background: #f8fafc"]:not([style*="color"]),
div[style*="background: #fef3c7"]:not([style*="color"]),
div[style*="background: #dcfce7"]:not([style*="color"]),
div[style*="background: #e0f2fe"]:not([style*="color"]),
div[style*="background: #fef2f2"]:not([style*="color"]) {
    color: var(--text-primary);
}

/* Fix for any remaining white/light text issues globally */
html, body {
    color: var(--text-primary);
}

/* Make sure all paragraphs, headings, and text elements default to dark text */
p, h1, h2, h3, h4, h5, h6, span, div, li, td, th {
    color: inherit;
}

/* Force all h3 headings on white backgrounds to be dark and bold */
[style*="background: white"] h3,
[style*="background: #fff"] h3,
[style*="background: #ffffff"] h3,
[style*="background-color: white"] h3,
[style*="background-color: #fff"] h3 {
    color: #1e293b !important;
    font-weight: 600 !important;
}

/* Replace light grey text with darker grey globally */
[style*="color: #94a3b8"],
[style*="color: #cbd5e1"],
*[style*="background: white"] *[style*="color: #94a3b8"],
*[style*="background: #fff"] *[style*="color: #94a3b8"] {
    color: #475569 !important;
}

/* Dark mode support (for future) */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #0f172a;
        --card-bg: #1e293b;
        --border-color: #334155;
        --text-primary: #f1f5f9;
        --text-secondary: #94a3b8;
    }
}