/* Sprint Board Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f9fafb;
    min-height: 100vh;
    padding: 24px;
}

.container {
    max-width: 100%;
    margin: 0 auto;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.title-section h1 {
    font-size: 2rem;
    font-weight: bold;
    color: #12208A;
    margin-bottom: 8px;
}

.title-section p {
    font-size: 0.875rem;
    color: #6b7280;
}

.progress-section {
    min-width: 260px;
    width: 100%;
    max-width: 360px;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    margin-bottom: 4px;
}

.progress-label {
    font-weight: 500;
    color: #166B9D;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background-color: #e5e7eb;
    border-radius: 9999px;
    overflow: hidden;
    margin-bottom: 4px;
}

.progress-fill {
    height: 100%;
    background-color: #E6CF1F;
    transition: width 0.3s ease;
    border-radius: 9999px;
}

.progress-text {
    font-size: 0.75rem;
    color: #6b7280;
}

/* Controls */
.controls {
    display: flex;
    gap: 12px;
    align-items: center;
    width: 100%;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.input-group {
    display: flex;
    gap: 12px;
    flex: 1;
    min-width: 300px;
}

.input, .select {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    background: white;
    font-size: 0.875rem;
}

.button-group {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-standup {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn-standup:hover:not(:disabled) {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.btn-standup.active {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.btn-next {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn-next:hover {
    background: linear-gradient(135deg, #059669, #047857);
}

.btn-planning {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn-planning:hover:not(:disabled) {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

.btn-mute {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.btn-mute:hover {
    background: linear-gradient(135deg, #d97706, #b45309);
}

/* Stand-up indicator */
.standup-indicator {
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    border: 1px solid #d1d5db;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    display: none;
}

.standup-indicator.active {
    display: block;
    background: linear-gradient(135deg, #faf5ff, #f3e8ff);
    border-color: #c084fc;
}

.standup-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.standup-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 0.875rem;
}

.user-info h3 {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 2px;
}

.user-info p {
    font-size: 0.875rem;
    color: #6b7280;
}

/* Kanban Board */
.kanban-board {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 16px;
}

.kanban-column {
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.kanban-column[data-status="todo"] .tasks-container {
    background-color: #F5F5F5;
}

.kanban-column[data-status="in-progress"] .tasks-container {
    background-color: #FFF9E6;
}

.kanban-column[data-status="done"] .tasks-container {
    background-color: #E8F5E9;
}

.column-header {
    padding: 16px 20px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 2px 6px 0 rgba(0, 0, 0, 0.08);
    border-top: 4px solid #4F9ECD;
}

.column-header.over-limit {
    border-top-color: #dc2626;
    background-color: #fef2f2;
}

.column-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    font-size: 1.125rem;
    color: #1f2937;
}

.column-title-text {
    display: flex;
    align-items: center;
    gap: 8px;
}

.column-icon {
    font-size: 1.25rem;
}

.wip-limit {
    font-size: 0.75rem;
    color: #6b7280;
}

.task-count {
    background-color: #166B9D;
    color: white;
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 700;
    min-width: 32px;
    text-align: center;
}

.task-count.over-limit {
    background-color: #dc2626;
}

.tasks-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    min-height: 400px;
    max-height: 600px;
    overflow-y: auto;
    padding: 16px;
    background-color: #F5F5F5;
    border-radius: 8px;
}

/* Task Cards */
.task-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 2px 6px 0 rgba(0, 0, 0, 0.12);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    width: 100%;
    min-width: 0;
}

.task-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border-color: #d1d5db;
    transform: translateY(-2px);
}

.urgency-bar {
    display: none;
}

/* Nuovo sistema priorità con indicatori circolari */
.priority-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
}

.priority-indicator.A {
    background-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.2);
}

.priority-indicator.B {
    background-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

.priority-indicator.C {
    background-color: #DDB600;
    box-shadow: 0 0 0 3px rgba(221, 182, 0, 0.2);
}

.priority-indicator.D {
    background-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.card-content {
    padding-left: 4px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.urgency-badges {
    display: flex;
    align-items: center;
    gap: 8px;
}

.urgency-badge, .dept-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 9999px;
    color: white;
}

.urgency-badge.A {
    background-color: #dc2626;
}

.urgency-badge.B {
    background-color: #4F9ECD;
}

.urgency-badge.C {
    background-color: #DDB600;
}

.urgency-badge.D {
    background-color: #11A725;
}

.points-badge {
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    color: #374151;
    padding: 2px 6px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: bold;
}

.task-title {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 12px;
    line-height: 1.5;
    font-size: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.task-card:hover .task-title {
    color: #3b82f6;
}

.assignee-section {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.assignee-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.875rem;
    font-weight: bold;
    box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.15);
}

.assignee-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
}

/* Stile per la data di scadenza */
.due-date {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 8px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.due-date.overdue {
    color: #dc2626;
    font-weight: 600;
}

.due-date.due-soon {
    color: #f59e0b;
    font-weight: 500;
}

.labels {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.label {
    font-size: 0.75rem;
    padding: 2px 8px;
    background: linear-gradient(135deg, #f3f4f6, #f9fafb);
    color: #374151;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    font-weight: 500;
}

.label.more {
    background: linear-gradient(135deg, #dbeafe, #f0f9ff);
    color: #2563eb;
    border-color: #bfdbfe;
}

.empty-column {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 128px;
    color: #9ca3af;
    font-size: 0.875rem;
    border: 2px dashed #d1d5db;
    border-radius: 12px;
}

.loading {
    color: #6b7280;
    text-align: center;
    padding: 20px;
}

.error {
    color: #dc2626;
    font-size: 0.875rem;
    margin-bottom: 12px;
}

/* Fase 3: Dashboard Metriche */
.metrics-dashboard {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.metric-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.metric-icon {
    font-size: 1.5rem;
}

.metric-content h4 {
    font-size: 0.875rem;
    color: #64748b;
    margin: 0 0 4px 0;
    font-weight: 500;
}

.metric-content p {
    font-size: 1.125rem;
    color: #1e293b;
    margin: 0;
    font-weight: 700;
}

.metric-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    font-weight: 600;
}

.metric-status.high {
    color: #dc2626;
}

.metric-status.medium {
    color: #f59e0b;
}

.metric-status.low {
    color: #10b981;
}

/* Fase 3: Swimlanes per progetto */
.swimlane {
    margin-bottom: 24px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    background: white;
}

.swimlane-header {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    padding: 12px 20px;
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.swimlane-badge {
    background: rgba(255, 255, 255, 0.25);
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
}

.swimlane-content {
    padding: 16px;
}

/* Fase 3: Vista Team Member */
.team-view {
    display: none;
}

.team-view.active {
    display: block;
}

.team-member-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.team-member-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.team-member-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.team-member-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    font-weight: bold;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.team-member-name {
    font-weight: 700;
    font-size: 1.125rem;
    color: #1f2937;
}

/* Fase 3: Indicatori carico lavoro */
.workload-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.workload-indicator.normal {
    background-color: #d1fae5;
    color: #065f46;
}

.workload-indicator.high {
    background-color: #fef3c7;
    color: #92400e;
}

.workload-indicator.overload {
    background-color: #fee2e2;
    color: #991b1b;
}

.workload-icon {
    font-size: 1rem;
}

/* Vista standup */
.standup-view {
    display: none;
}

.standup-view.active {
    display: block;
}

.standup-section {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}

.standup-section-title {
    font-weight: 700;
    font-size: 1rem;
    color: #1f2937;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.standup-task-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

/* View toggle buttons */
.view-toggle {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    background: white;
    padding: 8px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.view-toggle-btn {
    flex: 1;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #6b7280;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.view-toggle-btn:hover {
    background: #f3f4f6;
    color: #1f2937;
}

.view-toggle-btn.active {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Responsive */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        align-items: flex-start;
    }

    .progress-section {
        width: 100%;
        max-width: none;
    }

    .controls {
        flex-direction: column;
        align-items: stretch;
    }

    .input-group {
        min-width: auto;
    }

    .button-group {
        justify-content: center;
    }

    .tasks-container {
        grid-template-columns: 1fr;
    }
}

