/* Dashboard Sections */
.dashboard-section {
    margin-bottom: 30px;
}

.section-header {
    margin-bottom: 20px;
}

.section-title {
    font-size: 20px;
    font-weight: 700;
    color: white;
    margin-bottom: 5px;
}

.section-subtitle {
    font-size: 14px;
    color: rgba(255,255,255,0.9);
}

/* Filters Card */
.filters-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    display: grid;
    grid-template-columns: 2fr 3fr auto;
    gap: 20px;
    align-items: end;
}

.filters-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-label {
    font-size: 13px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.date-range-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
}

.date-separator {
    color: #999;
    font-size: 18px;
    font-weight: 300;
}

.filters-actions {
    display: flex;
    gap: 10px;
}

.filters-card input {
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'IBM Plex Mono', monospace;
    transition: border-color 0.3s;
}

.filters-card input:focus {
    outline: none;
    border-color: #667eea;
}

/* Stats Cards */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
}

.stat {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.stat:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    border-left-color: #667eea;
}

.stat h3 { 
    font-size: 13px; 
    color: #888; 
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.stat .value { 
    font-size: 28px; 
    font-weight: 700; 
    color: #333; 
    overflow-x: auto; 
    white-space: nowrap; 
    font-family: 'IBM Plex Mono', monospace;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Chart Cards */
.chart-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.chart-card:hover {
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    gap: 20px;
    flex-wrap: wrap;
}

.chart-title {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin-bottom: 5px;
}

.chart-subtitle {
    font-size: 13px;
    color: #888;
}

.widget-title {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f0f0;
}

.chart-metric-selector {
    min-width: 200px;
}

/* Widgets Row */
.widgets-row { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 30px;
    column-gap: 30px;
    row-gap: 30px;
}

.widgets-row .chart-card {
    margin: 0;
}

/* Tables */
.table-wrapper { 
    overflow-x: auto; 
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
}

table { 
    width: 100%; 
    border-collapse: collapse; 
    min-width: 600px;
}

table.fit-content { 
    min-width: 100%; 
}

th, td { 
    padding: 14px 16px; 
    text-align: left; 
    border-bottom: 1px solid #f0f0f0;
}

th { 
    background: #f9fafb; 
    font-weight: 600; 
    color: #666; 
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

td { 
    font-size: 14px; 
    color: #333; 
}

tr:hover td {
    background: #f9fafb;
}

/* Pagination */
.pagination { 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    gap: 15px; 
    margin-top: 25px;
}

.pagination button { 
    padding: 10px 18px; 
    border: 2px solid #e0e0e0; 
    border-radius: 8px; 
    background: white; 
    cursor: pointer; 
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
}

.pagination button:hover:not(:disabled) { 
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.pagination button:disabled { 
    opacity: 0.4; 
    cursor: not-allowed; 
}

.pagination span { 
    font-size: 14px; 
    color: #666;
    font-weight: 600;
}

/* Loading States */
.loading { 
    text-align: center; 
    color: #999;
    padding: 40px;
    font-size: 14px;
}

/* Lucide Icons */
.lucide {
    width: 18px;
    height: 18px;
    vertical-align: middle;
    margin-right: 6px;
}

h1 .lucide {
    width: 28px;
    height: 28px;
    margin-right: 10px;
}

h2 .lucide, h3 .lucide {
    width: 20px;
    height: 20px;
    margin-right: 8px;
}

.btn .lucide {
    width: 16px;
    height: 16px;
    margin-right: 6px;
}

.dropdown-trigger .lucide {
    width: 16px;
    height: 16px;
    margin-left: 6px;
}

.project-type-badge .lucide {
    width: 16px;
    height: 16px;
    margin-right: 6px;
}

.empty-state { 
    text-align: center; 
    padding: 60px 20px; 
    color: #999; 
    font-size: 15px;
    background: #f9fafb;
    border-radius: 8px;
}

.spinner { 
    display: inline-block; 
    width: 24px; 
    height: 24px; 
    border: 3px solid #f3f3f3; 
    border-top: 3px solid #667eea; 
    border-radius: 50%; 
    animation: spin 0.8s linear infinite; 
}

.spinner-container { 
    text-align: center; 
    padding: 50px; 
}

@keyframes spin { 
    0% { transform: rotate(0deg); } 
    100% { transform: rotate(360deg); } 
}

@media (max-width: 768px) {
    .stats { grid-template-columns: 1fr; }
    .widgets-row { 
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .filters { flex-direction: column; }
    .filters input, .filters button { width: 100%; }
    .stat .value { font-size: 20px; }
    table { min-width: 500px; }
    th, td { padding: 8px; font-size: 12px; }
}

/* Navigation Path Analysis Styles */
.path-cell {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 13px;
    max-width: 500px;
    overflow-x: auto;
    white-space: nowrap;
}

.flow-chart {
    padding: 10px 0;
}

.flow-header {
    display: grid;
    grid-template-columns: 2fr 3fr 2fr 80px;
    gap: 10px;
    padding: 10px;
    background: #f9f9f9;
    font-weight: 600;
    font-size: 13px;
    color: #666;
    border-radius: 4px;
    margin-bottom: 10px;
}

.flow-row {
    display: grid;
    grid-template-columns: 2fr 3fr 2fr 80px;
    gap: 10px;
    padding: 12px 10px;
    border-bottom: 1px solid #eee;
    align-items: center;
}

.flow-from, .flow-to {
    font-size: 13px;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.flow-bar-container {
    position: relative;
    height: 24px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}

.flow-bar {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.flow-count {
    text-align: right;
    font-weight: 600;
    font-size: 14px;
    color: #667eea;
}

.concern-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.concern-badge.high {
    background: #fee;
    color: #c33;
}

.concern-badge.medium {
    background: #ffeaa7;
    color: #d63031;
}

.concern-badge.low {
    background: #dfe6e9;
    color: #636e72;
}

.metric-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.metric-item {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
    border-radius: 8px;
    color: white;
}

.metric-label {
    font-size: 13px;
    opacity: 0.9;
    margin-bottom: 8px;
}

.metric-value {
    font-size: 32px;
    font-weight: 700;
    font-family: 'IBM Plex Mono', monospace;
    margin-bottom: 5px;
}

.metric-detail {
    font-size: 12px;
    opacity: 0.8;
}

@media (max-width: 768px) {
    .flow-header, .flow-row {
        grid-template-columns: 1.5fr 2fr 1.5fr 60px;
        gap: 5px;
        font-size: 11px;
    }
    
    .path-cell {
        max-width: 300px;
        font-size: 11px;
    }
    
    .metric-value {
        font-size: 24px;
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .filters-card {
        grid-template-columns: 1fr;
    }
    
    .filters-actions {
        width: 100%;
    }
    
    .filters-actions .btn {
        flex: 1;
    }
}

@media (max-width: 768px) {
    .stats { 
        grid-template-columns: 1fr; 
    }
    
    .widgets-row { 
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .date-range-inputs {
        flex-direction: column;
        gap: 8px;
    }
    
    .date-separator {
        display: none;
    }
    
    .stat .value { 
        font-size: 24px; 
    }
    
    .chart-header {
        flex-direction: column;
    }
    
    .chart-metric-selector {
        width: 100%;
    }
    
    table { 
        min-width: 500px; 
    }
    
    th, td { 
        padding: 10px 12px; 
        font-size: 13px; 
    }
    
    .section-title {
        font-size: 18px;
    }
}
