/* Dashboard Styles */

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 32px;
    gap: 16px;
}

.header-left {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chantier-id {
    color: #6c757d;
    font-size: 16px;
    font-weight: 500;
    margin: 0;
}

.header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.dashboard-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 32px;
}

.summary-card,
.progress-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e5e5;
    overflow: hidden;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e5e5;
    background: #fafafa;
}

.card-header h2 {
    color: #2c3e50;
    font-size: 18px;
    font-weight: 500;
    margin: 0;
}

.card-icon {
    color: #2c3e50;
    flex-shrink: 0;
}

.card-content {
    padding: 24px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.summary-row:last-child {
    border-bottom: none;
}

.summary-label {
    color: #6c757d;
    font-size: 14px;
    font-weight: 600;
    min-width: 140px;
}

.summary-value {
    color: #2c3e50;
    font-size: 14px;
    text-align: right;
    flex: 1;
}

.progress-percentage {
    font-size: 48px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 16px;
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: #e5e5e5;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 24px;
}

.progress-bar-fill {
    height: 100%;
    background: #ff9800;
    border-radius: 6px;
    transition: width 0.3s ease;
}

.progress-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.stat-count {
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 12px;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.steps-tracking-section {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e5e5;
    overflow: hidden;
}

.steps-tracking-section .section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e5e5;
    background: #fafafa;
}

.steps-tracking-section .section-header h2 {
    color: #2c3e50;
    font-size: 20px;
    font-weight: 500;
    margin: 0;
}

.section-icon {
    color: #2c3e50;
    flex-shrink: 0;
}

.steps-table {
    width: 100%;
    border-collapse: collapse;
}

.steps-table th {
    background: #f8f9fa;
    color: #2c3e50;
    font-weight: 600;
    font-size: 14px;
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid #e5e5e5;
}

.steps-table td {
    padding: 16px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
    color: #495057;
    vertical-align: middle;
}

.steps-table tbody tr:hover {
    background: #f8f9fa;
}

.steps-table tbody tr:last-child td {
    border-bottom: none;
}

.date-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.date-info span {
    font-size: 13px;
    color: #495057;
}

.status-cell {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
}

.status-dot--success {
    background: #28a745;
}

.status-dot--warning {
    background: #ffc107;
}

.status-dot--error {
    background: #dc3545;
}

.status-dot--muted {
    background: #6c757d;
}

.delay-badge {
    display: inline-block;
    padding: 2px 8px;
    background: #dc3545;
    color: white;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.badge--error {
    background: #ffe8e8;
    color: #dc3545;
    border-color: #ffcdd2;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.row--active {
    background: #f0f7ff;
}

@media (max-width: 1024px) {
    .dashboard-cards {
        grid-template-columns: 1fr;
    }
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e5e5;
    padding: 24px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-card__icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-card__icon--blue {
    background: #e3f2fd;
    color: #1976d2;
}

.stat-card__icon--green {
    background: #e8f5e9;
    color: #2e7d32;
}

.stat-card__icon--orange {
    background: #fff3e0;
    color: #f57c00;
}

.stat-card__icon--purple {
    background: #f3e5f5;
    color: #7b1fa2;
}

.stat-card__content {
    flex: 1;
}

.stat-card__value {
    font-size: 32px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 4px;
    line-height: 1;
}

.stat-card__label {
    font-size: 14px;
    font-weight: 500;
    color: #495057;
    margin-bottom: 4px;
}

.stat-card__subtext {
    font-size: 12px;
    color: #6c757d;
    margin-top: 8px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.dashboard-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e5e5;
    overflow: hidden;
}

.dashboard-card .card-content {
    padding: 24px;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dashboard-card canvas {
    max-height: 300px;
}

.financial-summary {
    margin-bottom: 32px;
}

.financial-grid {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    width: 100%;
}

.financial-item {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e5e5e5;
}

.financial-item--warning {
    background: #fff3e0;
    border-color: #ffcc80;
}

.financial-label {
    font-size: 13px;
    color: #6c757d;
    font-weight: 500;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.financial-value {
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
}

.financial-item--warning .financial-value {
    color: #f57c00;
}

.recent-chantiers {
    margin-bottom: 32px;
}

.recent-chantiers .card-content {
    padding: 0;
}

.recent-chantiers .table-container {
    padding: 0;
}

@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}


.financial-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.financial-card {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e5e5;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    color: #2c3e50;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 120px;
}

.financial-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
}

.financial-card-title {
    font-size: 14px;
    font-weight: 500;
    color: #495057;
}

.financial-card-icon {
    color: #495057;
}

.financial-card-value {
    font-size: 32px;
    font-weight: 600;
    margin-top: 16px;
}

@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        align-items: stretch;
    }

    .header-actions {
        flex-direction: column;
        width: 100%;
    }

    .header-actions .btn {
        width: 100%;
    }

    .progress-stats {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .steps-table {
        font-size: 12px;
    }

    .steps-table th,
    .steps-table td {
        padding: 12px 8px;
    }

    .date-info {
        font-size: 11px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .financial-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-card .card-content {
        min-height: 250px;
    }
}

