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

:root {
    --green-primary: rgb(220, 226, 193);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

/* App Window Shell */
.app-window {
    display: flex;
    height: 100vh;
    background: #121212;
    color: rgb(224, 230, 197);
    font-family: 'Inter', sans-serif;
    overflow: hidden;
    position: relative;
}

.app-sidebar {
    width: 60px;
    background: #1a1a1a;
    border-right: 1px solid rgba(220, 226, 193, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 0;
    gap: 16px;
}

.app-sidebar-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.app-sidebar-icon i {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: inherit;
}

.app-sidebar-icon.active {
    background: rgba(220, 226, 193, 0.2);
    color: var(--green-primary);
}

.app-main {
    flex: 1;
    padding: 24px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: 100%;
}

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-shrink: 0;
}

.app-title {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
}

.app-subtitle {
    font-size: 12px;
    color: #888;
    margin-top: 4px;
}

/* Kanban Board Layout */
.kanban-board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    flex: 1;
    overflow: hidden;
}

.kanban-column {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.kanban-header {
    font-size: 11px;
    text-transform: uppercase;
    color: #888;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.task-count {
    color: #666;
}

.kanban-cards-container {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.kanban-card {
    background: #252525;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    cursor: move;
    transition: all 0.2s ease;
    user-select: none;
}

.kanban-card:hover {
    background: #2a2a2a;
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

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

.kanban-tag {
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.1);
    display: inline-block;
    margin-bottom: 6px;
    font-weight: 600;
    text-transform: uppercase;
}

/* Badge Colors */
.app-badge-green {
    background: rgba(46, 125, 50, 0.2);
    color: #81c784;
}

.app-badge-red {
    background: rgba(198, 40, 40, 0.2);
    color: #e57373;
}

.app-badge-yellow {
    background: rgba(249, 168, 37, 0.2);
    color: #fff176;
}

.app-badge-blue {
    background: rgba(21, 101, 192, 0.2);
    color: #64b5f6;
}

/* Job Info */
.job-info h4 {
    font-size: 14px;
    margin-bottom: 2px;
    color: rgb(224, 230, 197);
}

.job-info p {
    font-size: 11px;
    color: #888;
}

/* Checkbox Circle */
.checkbox-circle {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #444;
    display: flex;
    align-items: center;
    justify-content: center;
}

.checkbox-circle.checked {
    background: var(--green-primary);
    border-color: var(--green-primary);
    color: #000;
    font-size: 12px;
}

/* Drag and Drop States */
.kanban-card.dragging {
    opacity: 0.5;
    transform: rotate(2deg);
}

.kanban-column.drag-over {
    background: rgba(220, 226, 193, 0.05);
    border: 2px dashed rgba(220, 226, 193, 0.3);
}

.kanban-cards-container.drag-over {
    background: rgba(220, 226, 193, 0.03);
    border-radius: 4px;
}

/* Scrollbar Styling */
.kanban-cards-container::-webkit-scrollbar {
    width: 6px;
}

.kanban-cards-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.kanban-cards-container::-webkit-scrollbar-thumb {
    background: rgba(220, 226, 193, 0.3);
    border-radius: 3px;
}

.kanban-cards-container::-webkit-scrollbar-thumb:hover {
    background: rgba(220, 226, 193, 0.5);
}

.app-main::-webkit-scrollbar {
    width: 8px;
}

.app-main::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.app-main::-webkit-scrollbar-thumb {
    background: rgba(220, 226, 193, 0.3);
    border-radius: 4px;
}

.app-main::-webkit-scrollbar-thumb:hover {
    background: rgba(220, 226, 193, 0.5);
}

/* Gantt Timeline Scrollbar */
.gantt-timeline::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.gantt-timeline::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.gantt-timeline::-webkit-scrollbar-thumb {
    background: rgba(220, 226, 193, 0.3);
    border-radius: 4px;
}

.gantt-timeline::-webkit-scrollbar-thumb:hover {
    background: rgba(220, 226, 193, 0.5);
}

/* Stats View Scrollbar */
#stats-view::-webkit-scrollbar {
    width: 8px;
}

#stats-view::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

#stats-view::-webkit-scrollbar-thumb {
    background: rgba(220, 226, 193, 0.3);
    border-radius: 4px;
}

#stats-view::-webkit-scrollbar-thumb:hover {
    background: rgba(220, 226, 193, 0.5);
}

/* Gantt Chart Styles */
#gantt-view {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
    width: 100%;
}

.gantt-timeline {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: auto;
    height: 100%;
    width: 100%;
}

.gantt-header {
    display: flex;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 2px solid rgba(220, 226, 193, 0.2);
    position: sticky;
    top: 0;
    z-index: 10;
    margin-left: 200px;
    flex-shrink: 0;
}

.gantt-date-column {
    flex: 1;
    min-width: 100px;
    padding: 12px 8px;
    text-align: center;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.gantt-date-column.gantt-today {
    background: rgba(220, 226, 193, 0.1);
    border-left: 2px solid var(--green-primary);
    border-right: 2px solid var(--green-primary);
}

.gantt-date-day {
    font-size: 10px;
    color: #888;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.gantt-date-number {
    font-size: 14px;
    color: rgb(224, 230, 197);
    font-weight: 600;
}

.gantt-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.gantt-row {
    display: flex;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    flex: 1;
    min-height: 70px;
    align-items: center;
}

.gantt-row:hover {
    background: rgba(255, 255, 255, 0.02);
}

.gantt-task-info {
    width: 200px;
    padding: 12px;
    border-right: 2px solid rgba(220, 226, 193, 0.1);
    flex-shrink: 0;
}

.gantt-task-title {
    font-size: 13px;
    color: rgb(224, 230, 197);
    font-weight: 500;
    margin-bottom: 4px;
}

.gantt-task-assignee {
    font-size: 11px;
    color: #888;
}

.gantt-timeline-row {
    flex: 1;
    display: flex;
    position: relative;
    height: 100%;
}

.gantt-cell {
    flex: 1;
    min-width: 100px;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    height: 100%;
}

.gantt-cell.gantt-cell-today {
    background: rgba(220, 226, 193, 0.05);
}

.gantt-bar {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    height: 40px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.gantt-bar:hover {
    transform: translateY(-50%) scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 5;
}

.gantt-bar-todo {
    background: rgba(100, 181, 246, 0.3);
    border-color: #64b5f6;
}

.gantt-bar-in-progress {
    background: rgba(255, 241, 118, 0.3);
    border-color: #fff176;
}

.gantt-bar-done {
    background: rgba(129, 199, 132, 0.3);
    border-color: #81c784;
    opacity: 0.7;
}

.gantt-bar-content {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    overflow: hidden;
}

.gantt-bar-priority {
    font-size: 8px;
    padding: 2px 4px;
    border-radius: 2px;
    font-weight: 600;
    text-transform: uppercase;
    flex-shrink: 0;
}

.gantt-bar-title {
    font-size: 12px;
    color: rgb(224, 230, 197);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* User Stats Styles */
#stats-view {
    flex: 1;
    overflow-y: auto;
    height: 100%;
}

.stats-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stats-section-title {
    font-size: 11px;
    color: rgb(224, 230, 197);
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stats-team-summary {
    background: rgba(255, 255, 255, 0.02);
    padding: 12px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.stats-summary-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.stats-summary-card {
    background: #252525;
    padding: 10px 8px;
    border-radius: 4px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.stats-summary-icon {
    font-size: 20px;
    color: var(--green-primary);
    margin-bottom: 4px;
}

.stats-summary-value {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 2px;
}

.stats-summary-label {
    font-size: 9px;
    color: #888;
    text-transform: uppercase;
}

.stats-users {
    background: rgba(255, 255, 255, 0.02);
    padding: 12px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.stats-user-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    min-width: 0;
}

.stats-user-card {
    background: #252525;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.stats-user-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.stats-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--green-primary);
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
}

.stats-user-info {
    flex: 1;
}

.stats-user-name {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 2px;
}

.stats-user-subtitle {
    font-size: 10px;
    color: #888;
}

.stats-user-metrics {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stats-metric {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stats-metric-label {
    font-size: 9px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.stats-progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.stats-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--green-primary) 0%, #81c784 100%);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.stats-metric-value {
    font-size: 11px;
    color: #fff;
    font-weight: 600;
}

.stats-metric-value-large {
    font-size: 16px;
    color: #fff;
    font-weight: 700;
}

.stats-user-breakdown {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 4px;
}

.stats-breakdown-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
}

.stats-breakdown-item i {
    font-size: 14px;
    flex-shrink: 0;
}

.stats-breakdown-label {
    flex: 1;
    color: rgb(224, 230, 197);
}

.stats-breakdown-value {
    font-weight: 600;
    color: #fff;
}

.stats-user-priorities {
    display: flex;
    gap: 6px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.stats-priority-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.stats-priority-badge {
    font-size: 7px;
    padding: 2px 4px;
    border-radius: 2px;
    font-weight: 600;
    text-transform: uppercase;
    width: 100%;
    text-align: center;
}

.stats-priority-count {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .stats-summary-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stats-user-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .gantt-task-info {
        width: 150px;
    }
}

@media (max-width: 600px) {
    .stats-user-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
}

@media (max-width: 500px) {
    .stats-summary-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
    
    .stats-summary-card {
        padding: 8px 6px;
    }
    
    .stats-summary-icon {
        font-size: 16px;
        margin-bottom: 2px;
    }
    
    .stats-summary-value {
        font-size: 16px;
    }
    
    .stats-summary-label {
        font-size: 8px;
    }
    
    .stats-user-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
    
    .stats-user-card {
        padding: 8px;
    }
    
    .stats-user-name {
        font-size: 11px;
    }
    
    .stats-user-subtitle {
        font-size: 9px;
    }
    
    .stats-user-avatar {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
    
    .stats-metric-value-large {
        font-size: 14px;
    }
}

@media (max-width: 400px) {
    .stats-user-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
    
    .stats-user-card {
        padding: 6px;
    }
    
    .stats-user-header {
        gap: 6px;
        padding-bottom: 6px;
    }
    
    .stats-user-name {
        font-size: 10px;
    }
    
    .stats-user-avatar {
        width: 28px;
        height: 28px;
        font-size: 11px;
    }
}

