/* Reset i base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.4;
    color: #333;
    background-color: #f5f7fa;
}

.container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: white;
    padding: 0.75rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

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

.logo i {
    font-size: 1.5rem;
}

.logo h1 {
    font-size: 1.2rem;
    font-weight: 600;
}

.stats {
    display: flex;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.15);
    padding: 0.5rem 1rem;
    border-radius: 40px;
    backdrop-filter: blur(4px);
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-label {
    font-size: 0.7rem;
}

.stat-value {
    font-size: 1rem;
    font-weight: 700;
}

/* Main content layout */
.main-content {
    display: flex;
    flex: 1;
    padding: 1rem;
    gap: 1rem;
}

/* Sidebar */
.sidebar {
    width: 250px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Seccions */
.form-section, .filters-section {
    background: white;
    border-radius: 10px;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.form-section h2, .filters-section h2 {
    color: #2d3748;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Formulari */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.3rem;
    font-weight: 600;
    font-size: 0.85rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.9rem;
}

.form-row {
    display: flex;
    gap: 0.5rem;
}

.form-row .form-group {
    flex: 1;
}

.search-box {
    position: relative;
}

.search-box i {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: #a0aec0;
}

/* Botons */
.form-buttons {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    font-size: 0.85rem;
    flex: 1;
}

.btn-primary {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #3182ce 0%, #2c5282 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(49, 130, 206, 0.3);
}

.btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
}

.btn-secondary:hover {
    background: #cbd5e0;
}

/* Filtres */
.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.filter-btn {
    padding: 0.3rem 0.6rem;
    border: 1px solid #e2e8f0;
    background: #f7fafc;
    border-radius: 20px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn.active {
    background: #4299e1;
    color: white;
    border-color: #4299e1;
}

.filter-btn:hover:not(.active) {
    background: #edf2f7;
}

.priority-low {
    border-left: 4px solid #48bb78;
}

.priority-medium {
    border-left: 4px solid #ed8936;
}

.priority-high {
    border-left: 4px solid #f56565;
}

/* Kanban Board */
.kanban-board {
    flex: 1;
}

.board-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.columns-container {
    display: flex;
    gap: 1rem;
    height: auto;
}

.column {
    flex: 1;
    background: #f7fafc;
    border-radius: 10px;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    border: 1px solid #e2e8f0;
}

.column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.column-header h3 {
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.column-header h3 i.fa-circle {
    color: #f56565;
}

.column-header h3 i.fa-spinner {
    color: #ed8936;
}

.column-header h3 i.fa-check-circle {
    color: #48bb78;
}

.task-count {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: 15px;
    background: #e2e8f0;
    font-weight: 600;
}

/* Tasks scroll compacte */
.tasks-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.25rem;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 1rem 0.5rem;
    color: #a0aec0;
}

.empty-state i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

/* Tasques Kanban */
.tasca-card {
    background: #fff;
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.5rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.85rem;
}

.tasca-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}

.badge-prioritat {
    padding: 0.1rem 0.3rem;
    border-radius: 12px;
    font-size: 0.7rem;
    text-transform: capitalize;
    color: white;
}

.priority-baixa .badge-prioritat {
    background: #48bb78; /* verd */
}

.priority-mitjana .badge-prioritat {
    background: #ed8936; /* taronja */
}

.priority-alta .badge-prioritat {
    background: #f56565; /* vermell */
}

.tasca-descripcio {
    font-size: 0.8rem;
    color: #4a5568;
}

.tasca-estat {
    margin-top: 0.25rem;
    padding: 0.25rem;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
    font-size: 0.8rem;
}

.tasca-controls {
    display: flex;
    gap: 0.3rem;
    margin-top: 0.25rem;
}

.tasca-controls .btn-sm {
    padding: 0.2rem 0.4rem;
    font-size: 0.7rem;
}

/* Footer */
.footer {
    background: #2d3748;
    color: #cbd5e0;
    text-align: center;
    padding: 1rem;
    font-size: 0.75rem;
}

.footer p {
    margin: 0.25rem 0;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .columns-container {
        flex-direction: column;
        height: auto;
    }
    
    .column {
        min-height: 250px;
    }
}

@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
    }
    
    .header {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .stats {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 0.5rem;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .form-section, .filters-section {
        padding: 0.75rem;
    }
}