/* Dashboard specific styles */

.header-nav {
    margin-top: 1rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.nav-link {
    padding: 0.5rem 1.5rem;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    border-radius: 20px;
    font-weight: 600;
    transition: all 0.3s;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.nav-link.active {
    background: white;
    color: #667eea;
}

.dashboard-content {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.stat-card.warning {
    background: linear-gradient(135deg, #fff3cd 0%, #fff 100%);
    border-left: 4px solid #ffc107;
}

.stat-icon {
    font-size: 2.5rem;
    opacity: 0.8;
}

.stat-content h3 {
    font-size: 2rem;
    color: #667eea;
    margin-bottom: 0.25rem;
}

.stat-content p {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
}

.panel.full-width {
    grid-column: 1 / -1;
}

.chart-panel {
    min-height: 300px;
}

.chart-container {
    margin-top: 1rem;
    padding: 1rem;
}

.list-container {
    max-height: 400px;
    overflow-y: auto;
}

.contractor-item-dashboard {
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
}

.contractor-item-dashboard:hover {
    background: #e9ecef;
}

.contractor-info h4 {
    margin: 0 0 0.25rem 0;
    color: #333;
    font-size: 1rem;
}

.contractor-info p {
    margin: 0.125rem 0;
    color: #666;
    font-size: 0.85rem;
}

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

.badge {
    padding: 0.25rem 0.75rem;
    background: #667eea;
    color: white;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge.secondary {
    background: #6c757d;
}

.table-container {
    overflow-x: auto;
}

.dashboard-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.dashboard-table th {
    background: #f8f9fa;
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    color: #667eea;
    border-bottom: 2px solid #dee2e6;
}

.dashboard-table td {
    padding: 0.75rem;
    border-bottom: 1px solid #dee2e6;
}

.dashboard-table tr:hover {
    background: #f8f9fa;
}

.responsibility-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
}

.responsibility-badge.construction {
    background: #ffc107;
    color: #333;
}

.responsibility-badge.maintenance {
    background: #28a745;
    color: white;
}

.bar-chart {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem 0;
}

.bar-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.bar-label {
    min-width: 120px;
    font-weight: 600;
    color: #333;
}

.bar-container {
    flex: 1;
    height: 30px;
    background: #e9ecef;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

.bar-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10px;
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
}

.search-box {
    margin-bottom: 1rem;
}

.search-box input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.9rem;
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #999;
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.empty-state p {
    font-size: 1rem;
}

.timestamp {
    color: #999;
    font-size: 0.8rem;
}

.road-link, .contractor-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.road-link:hover, .contractor-link:hover {
    text-decoration: underline;
}

.loading {
    text-align: center;
    padding: 2rem;
    color: #999;
}

.loading::after {
    content: '...';
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-content {
        padding: 1rem;
    }
}

