/* RESET & BASE */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #f1f5f9;
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, sans-serif;
    padding: 2rem 1.5rem;
    color: #0f172a;
}

.dashboard-container {
    max-width: 1600px;
    margin: 0 auto;
}

/* HEADER */
.header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    gap: 1rem;
}
h1 {
    font-size: 1.8rem;
    font-weight: 600;
    background: linear-gradient(135deg, #1e293b, #3b82f6);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    letter-spacing: -0.3px;
}
.btn-primary {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 40px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    font-size: 0.9rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.btn-primary:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

/* FILTRI */
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 24px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
    align-items: flex-end;
}
.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    flex: 1;
    min-width: 160px;
}
.filter-group label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #475569;
}
.filter-group input, .filter-group select {
    padding: 0.6rem 0.8rem;
    border-radius: 14px;
    border: 1px solid #cbd5e1;
    background: #fefefe;
    font-size: 0.9rem;
    transition: 0.2s;
}
.filter-group input:focus, .filter-group select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.2);
}
.reset-filters {
    background: #f1f5f9;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 30px;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s;
    margin-top: 1.2rem;
    font-size: 0.85rem;
}
.reset-filters:hover {
    background: #e2e8f0;
}

/* KANBAN (colonne) */
.kanban-board {
    display: flex;
    flex-wrap: wrap;
    gap: 1.8rem;
    margin-top: 0.5rem;
}
.column {
    flex: 1;
    min-width: 280px;
    background: #f8fafc;
    border-radius: 28px;
    padding: 1rem 1rem 1.5rem 1rem;
    box-shadow: 0 8px 20px rgba(0,0,0,0.03);
    border: 1px solid #e2edf2;
    transition: all 0.2s;
}
.column-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 0 0.5rem 1rem 0.5rem;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 1.2rem;
}
.column-title {
    font-weight: 700;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 8px;
}
.task-count {
    background: #e2e8f0;
    padding: 0.2rem 0.6rem;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 600;
}
.task-list {
    min-height: 500px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* CARD */
.task-card {
    background: white;
    border-radius: 20px;
    padding: 1rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03), 0 1px 2px rgba(0,0,0,0.05);
    border: 1px solid #eef2f6;
    transition: all 0.2s;
    cursor: grab;
    position: relative;
}
.task-card:active {
    cursor: grabbing;
}
.task-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 20px -12px rgba(0,0,0,0.15);
    border-color: #cbd5e1;
}
.card-title {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.card-title h4 {
    font-size: 1rem;
    font-weight: 600;
    flex: 1;
}
.status-badge {
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 30px;
    background: #f1f5f9;
    color: #1e293b;
    white-space: nowrap;
}
.status-badge.in-progress { background: #dbeafe; color: #1e40af; }
.status-badge.todo { background: #fff3e3; color: #b45309; }
.status-badge.done { background: #dcfce7; color: #15803d; }
.status-badge.waiting { background: #fef9c3; color: #854d0e; }

.card-description {
    font-size: 0.8rem;
    color: #334155;
    margin: 0.5rem 0;
    line-height: 1.4;
}
.assignees {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.5rem;
}
.assignee {
    background: #eef2ff;
    font-size: 0.7rem;
    font-weight: 500;
    padding: 0.2rem 0.6rem;
    border-radius: 30px;
    color: #1e3a8a;
}
.extra-note {
    font-size: 0.7rem;
    color: #5b6e8c;
    margin-top: 0.5rem;
    border-top: 1px dashed #e2e8f0;
    padding-top: 0.4rem;
}
.empty-message {
    text-align: center;
    padding: 2rem;
    color: #64748b;
    font-style: italic;
    background: #f1f5f9;
    border-radius: 24px;
}

/* Pulsanti dentro card */
.delete-btn, .edit-btn {
    background: transparent;
    border: none;
    font-size: 0.8rem;
    cursor: pointer;
    padding: 0.2rem 0.5rem;
    border-radius: 30px;
    transition: 0.1s;
}
.delete-btn {
    color: #dc2626;
}
.delete-btn:hover {
    background: #fee2e2;
}
.edit-btn {
    color: #3b82f6;
    margin-top: 0.5rem;
    width: 100%;
    text-align: left;
    font-size: 0.7rem;
}
.edit-btn:hover {
    background: #eff6ff;
}

/* MODALE */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
}
.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 32px;
    width: 90%;
    max-width: 550px;
    box-shadow: 0 25px 40px rgba(0,0,0,0.2);
    position: relative;
}
.close {
    position: absolute;
    right: 1.5rem;
    top: 1rem;
    font-size: 1.8rem;
    font-weight: bold;
    cursor: pointer;
    color: #94a3b8;
}
.close:hover {
    color: #0f172a;
}
.modal-content h3 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}
.modal-content label {
    display: block;
    margin: 0.8rem 0 0.3rem 0;
    font-weight: 600;
    color: #1e293b;
}
.modal-content input, .modal-content select, .modal-content textarea {
    width: 100%;
    padding: 0.7rem;
    border-radius: 16px;
    border: 1px solid #cbd5e1;
    font-family: inherit;
    font-size: 0.9rem;
}
.modal-content select[multiple] {
    height: 120px;
}
.modal-content button[type="submit"] {
    margin-top: 1.5rem;
    background: #3b82f6;
    color: white;
    border: none;
    padding: 0.7rem;
    width: 100%;
    border-radius: 40px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
}
.modal-content button[type="submit"]:hover {
    background: #2563eb;
}

/* FOOTER */
footer {
    margin-top: 2.5rem;
    text-align: center;
    font-size: 0.75rem;
    color: #5b6e8c;
    border-top: 1px solid #e2e8f0;
    padding-top: 1.5rem;
}

/* RESPONSIVE */
@media (max-width: 780px) {
    body { padding: 1rem; }
    .column { min-width: 100%; }
    .modal-content { margin: 20% auto; width: 95%; padding: 1.5rem; }
}