:root {
    --primary: #2563eb; --primary-dark: #1d4ed8; --primary-light: #3b82f6;
    --secondary: #64748b; --success: #10b981; --warning: #f59e0b; --danger: #ef4444;
    --gray-50: #f8fafc; --gray-100: #f1f5f9; --gray-200: #e2e8f0;
    --gray-300: #cbd5e1; --gray-400: #94a3b8; --gray-500: #64748b;
    --gray-600: #475569; --gray-700: #334155; --gray-800: #1e293b; --gray-900: #0f172a;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05); --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius-sm: 0.375rem; --radius-md: 0.5rem; --radius-lg: 0.75rem;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Inter', sans-serif; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); min-height: 100vh; color: var(--gray-800); line-height: 1.6; }
.container { max-width: 1400px; margin: 0 auto; padding: 0 1rem; }

.header { background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(255, 255, 255, 0.2); box-shadow: var(--shadow-md); position: sticky; top: 0; z-index: 100; }
.header-content { display: flex; justify-content: space-between; align-items: center; padding: 1rem 0; }
.logo h1 { font-size: 1.5rem; font-weight: 700; color: var(--primary); display: flex; align-items: center; gap: 0.5rem; }
.logo .subtitle { font-size: 0.875rem; color: var(--gray-500); font-weight: 500; }
.header-stats { display: flex; gap: 2rem; align-items: center; }
.stat { text-align: center; }
.stat-number { display: block; font-size: 1.5rem; font-weight: 700; color: var(--gray-800); }
.stat-label { font-size: 0.75rem; color: var(--gray-500); text-transform: uppercase; letter-spacing: 0.05em; }

.progress-circle { width: 60px; height: 60px; border-radius: 50%; background: conic-gradient(var(--primary) 0% var(--progress, 0%), var(--gray-200) var(--progress, 0%) 100%); display: flex; align-items: center; justify-content: center; position: relative; }
.progress-circle::before { content: ''; position: absolute; width: 50px; height: 50px; background: white; border-radius: 50%; }
.progress-text { position: relative; z-index: 1; font-weight: 700; font-size: 0.875rem; color: var(--gray-700); }

.alert { padding: 0.75rem 0; background: var(--warning); color: white; }
.alert-warning { background: linear-gradient(135deg, #f59e0b, #d97706); }
.alert .container { display: flex; align-items: center; gap: 0.5rem; }
.alert a { color: white; text-decoration: underline; margin-left: auto; }

.main { padding: 2rem 0; }
.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; background: rgba(255, 255, 255, 0.9); padding: 1rem 1.5rem; border-radius: var(--radius-lg); backdrop-filter: blur(10px); box-shadow: var(--shadow-md); }

.btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.75rem 1.5rem; border: none; border-radius: var(--radius-md); font-weight: 600; font-size: 0.875rem; cursor: pointer; transition: all 0.2s ease; text-decoration: none; }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.btn-outline { background: transparent; border: 2px solid var(--gray-300); color: var(--gray-600); }
.btn-outline:hover, .btn-outline.active { border-color: var(--primary); color: var(--primary); background: rgba(37, 99, 235, 0.05); }
.btn-icon { padding: 0.5rem; background: transparent; border: none; border-radius: var(--radius-sm); color: var(--gray-500); cursor: pointer; transition: all 0.2s ease; }
.btn-icon:hover { background: var(--gray-100); color: var(--gray-700); }

.kanban-board { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; align-items: start; }
.board-column { background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(10px); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); min-height: 600px; display: flex; flex-direction: column; }
.board-header { padding: 1.25rem; border-bottom: 1px solid var(--gray-200); border-left: 4px solid var(--primary); display: flex; justify-content: space-between; align-items: center; }
.board-header h3 { font-size: 1rem; font-weight: 600; color: var(--gray-800); }
.card-count { background: var(--gray-100); color: var(--gray-600); padding: 0.25rem 0.5rem; border-radius: 1rem; font-size: 0.75rem; font-weight: 600; }
.board-cards { flex: 1; padding: 1rem; display: flex; flex-direction: column; gap: 1rem; min-height: 400px; }

.card { background: white; border-radius: var(--radius-md); padding: 1.25rem; box-shadow: var(--shadow-sm); border: 1px solid var(--gray-200); transition: all 0.2s ease; cursor: grab; }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--primary-light); }
.card:active { cursor: grabbing; }
.card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 0.75rem; }
.card-header h4 { font-size: 0.875rem; font-weight: 600; color: var(--gray-800); line-height: 1.4; flex: 1; margin-right: 0.5rem; }
.card-description { font-size: 0.8rem; color: var(--gray-600); margin-bottom: 1rem; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; font-size: 0.75rem; }
.assignee { display: flex; align-items: center; gap: 0.5rem; color: var(--gray-600); }
.avatar { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
.due-date { display: flex; align-items: center; gap: 0.25rem; color: var(--gray-500); }
.due-date.overdue { color: var(--danger); font-weight: 600; }
.card-footer { display: flex; justify-content: space-between; align-items: center; }

.priority-badge { padding: 0.25rem 0.75rem; border-radius: 1rem; font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.priority-high { background: var(--danger); color: white; }
.priority-medium { background: var(--warning); color: white; }
.priority-low { background: var(--success); color: white; }

.progress-bar { width: 80px; height: 6px; background: var(--gray-200); border-radius: 3px; position: relative; overflow: hidden; }
.progress-fill { height: 100%; background: var(--primary); border-radius: 3px; transition: width 0.3s ease; }
.progress-text { position: absolute; top: -1px; left: 0; right: 0; text-align: center; font-size: 0.6rem; font-weight: 600; color: var(--gray-700); }

.add-card-btn { padding: 1rem; background: transparent; border: 2px dashed var(--gray-300); color: var(--gray-500); border-radius: var(--radius-md); cursor: pointer; transition: all 0.2s ease; margin: 1rem; font-weight: 500; }
.add-card-btn:hover { border-color: var(--primary); color: var(--primary); background: rgba(37, 99, 235, 0.05); }

.metrics-view { background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(10px); border-radius: var(--radius-lg); padding: 2rem; box-shadow: var(--shadow-md); }
.metrics-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.5rem; margin-bottom: 2rem; }
.metric-card { background: white; padding: 1.5rem; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); text-align: center; border-left: 4px solid var(--primary); }
.metric-card h3 { font-size: 0.875rem; color: var(--gray-600); margin-bottom: 1rem; display: flex; align-items: center; justify-content: center; gap: 0.5rem; }
.metric-value { font-size: 2rem; font-weight: 700; color: var(--gray-800); margin-bottom: 0.5rem; }
.metric-label { font-size: 0.75rem; color: var(--gray-500); text-transform: uppercase; letter-spacing: 0.05em; }

.hidden { display: none !important; }
.chart-placeholder { background: var(--gray-100); border-radius: var(--radius-md); padding: 2rem; text-align: center; color: var(--gray-500); }

@media (max-width: 768px) {
    .header-content { flex-direction: column; gap: 1rem; text-align: center; }
    .header-stats { gap: 1rem; }
    .toolbar { flex-direction: column; gap: 1rem; }
    .kanban-board { grid-template-columns: 1fr; }
    .container { padding: 0 0.5rem; }
}

.board-cards.drag-over { background: rgba(37, 99, 235, 0.05); border: 2px dashed var(--primary); border-radius: var(--radius-md); }
.card.dragging { opacity: 0.5; transform: rotate(5deg); }