body {
    font-family: 'Inter', sans-serif;
    background-color: #0f172a;
    color: #e2e8f0;
}

.card {
    background-color: #1e293b;
    border-radius: 0.75rem;
    padding: 1.5rem;
    border: 1px solid #334155;
    transition: all 0.2s ease-in-out;
}

.btn-primary {
    background-color: #2563eb;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: background 0.2s;
}

.btn-primary:hover {
    background-color: #1d4ed8;
}

.select-dark {
    background-color: #334155;
    color: white;
    border: 1px solid #475569;
    padding: 0.5rem;
    border-radius: 0.5rem;
}

.hidden {
    display: none;
}

.variation-up {
    color: #ef4444;
}

.variation-down {
    color: #22c55e;
}

.variation-neutral {
    color: #94a3b8;
}

.kpi-card {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid #334155;
    border-radius: 0.75rem;
    padding: 1.25rem;
    position: relative;
    overflow: hidden;
}

.kpi-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 80px;
    height: 80px;
    border-radius: 0 0 0 80px;
    opacity: 0.05;
}

.donut-legend-item {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Heatmap styles */
.heatmap-card {
    border-radius: 0.5rem;
    padding: 1rem;
    border: 1px solid transparent;
    transition: transform 0.15s, box-shadow 0.15s;
}

.heatmap-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.heatmap-none {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border-color: #475569;
}

.heatmap-low {
    background: linear-gradient(135deg, #1e3a5f 0%, #1e293b 100%);
    border-color: #3b82f6;
}

.heatmap-medium {
    background: linear-gradient(135deg, #713f12 0%, #1e293b 100%);
    border-color: #f59e0b;
}

.heatmap-high {
    background: linear-gradient(135deg, #7f1d1d 0%, #1e293b 100%);
    border-color: #ef4444;
}

.heatmap-critical {
    background: linear-gradient(135deg, #581c87 0%, #1e293b 100%);
    border-color: #a855f7;
}

.intensity-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.intensity-badge .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

/* Toggle buttons */
.toggle-group {
    display: inline-flex;
    background: #1e293b;
    border-radius: 0.5rem;
    padding: 0.25rem;
    border: 1px solid #334155;
}

.toggle-btn {
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toggle-btn:hover {
    color: #e2e8f0;
}

.toggle-btn.active {
    background: #3b82f6;
    color: white;
}

/* Issues bar chart */
.issue-bar-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.issue-bar-label {
    width: 160px;
    font-size: 0.75rem;
    text-align: right;
    color: #cbd5e1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.issue-bar-track {
    flex: 1;
    height: 24px;
    background: #1e293b;
    border-radius: 0.25rem;
    overflow: hidden;
}

.issue-bar-fill {
    height: 100%;
    border-radius: 0.25rem;
    display: flex;
    align-items: center;
    padding-left: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    transition: width 0.3s ease;
}

/* Skeleton Loading Animation */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }

    100% {
        background-position: 1000px 0;
    }
}

.skeleton {
    background: #334155;
    background-image: linear-gradient(to right, #334155 0%, #475569 20%, #334155 40%, #334155 100%);
    background-repeat: no-repeat;
    background-size: 1000px 100%;
    animation: shimmer 2s infinite linear;
    border-radius: 0.25rem;
}

.skeleton-text {
    height: 1rem;
    margin-bottom: 0.5rem;
    width: 100%;
}

.skeleton-text-lg {
    height: 1.5rem;
    margin-bottom: 0.5rem;
    width: 70%;
}

.skeleton-block {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
}

/* Section Navigation */
.section-nav {
    display: flex;
    gap: 0.25rem;
    background: #0f172a;
    border-radius: 0.5rem;
    padding: 0.25rem;
    border: 1px solid #334155;
}

.section-nav-btn {
    flex: 1;
    padding: 0.5rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    border: none;
    background: transparent;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.section-nav-btn:hover {
    color: #e2e8f0;
    background: #1e293b;
}

.section-nav-btn.active {
    background: #2563eb;
    color: white;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

/* Reports Data Table */
.report-table-container {
    overflow-x: auto;
    border-radius: 0.75rem;
    border: 1px solid #334155;
}

.report-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.report-table thead th {
    background: #1e293b;
    color: #94a3b8;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 2px solid #334155;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    transition: color 0.15s;
    position: sticky;
    top: 0;
    z-index: 1;
}

.report-table thead th:hover {
    color: #e2e8f0;
}

.report-table thead th.sorted {
    color: #3b82f6;
}

.report-table thead th .sort-arrow {
    margin-left: 0.375rem;
    font-size: 0.625rem;
}

.report-table tbody tr {
    border-bottom: 1px solid #1e293b;
    transition: background 0.15s;
}

.report-table tbody tr:hover {
    background: #1e293b;
}

.report-table tbody tr:nth-child(even) {
    background: #0f172a33;
}

.report-table tbody tr:nth-child(even):hover {
    background: #1e293b;
}

.report-table tbody td {
    padding: 0.625rem 1rem;
    color: #e2e8f0;
    white-space: nowrap;
}

.report-table tbody td.text-right {
    text-align: right;
}

.report-table tbody td.text-center {
    text-align: center;
}

.report-table thead th.text-right {
    text-align: right;
}

.report-table thead th.text-center {
    text-align: center;
}

/* Total row */
.report-table tfoot tr {
    background: #1e293b;
    border-top: 2px solid #3b82f6;
}

.report-table tfoot td {
    padding: 0.75rem 1rem;
    font-weight: 700;
    color: #e2e8f0;
    white-space: nowrap;
}

/* CPI Color Bar */
.cpi-bar-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 140px;
}

.cpi-bar-track {
    flex: 1;
    height: 8px;
    background: #334155;
    border-radius: 4px;
    overflow: hidden;
}

.cpi-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.4s ease;
}

.cpi-value {
    font-weight: 700;
    font-size: 0.875rem;
    min-width: 50px;
    text-align: right;
}

/* Export Button */
.btn-export {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    white-space: nowrap;
}

.btn-export:hover {
    background: linear-gradient(135deg, #047857 0%, #065f46 100%);
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.3);
}

/* Report KPI Summary Cards */
.report-kpi {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid #334155;
    border-radius: 0.75rem;
    padding: 1.25rem;
    text-align: center;
}

.report-kpi-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
}

.report-kpi-label {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 0.25rem;
}

/* Plant comparison bar chart */
.plant-cpi-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.625rem;
}

.plant-cpi-label {
    width: 200px;
    font-size: 0.8125rem;
    text-align: right;
    color: #cbd5e1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 0;
}

.plant-cpi-track {
    flex: 1;
    height: 28px;
    background: #1e293b;
    border-radius: 0.25rem;
    overflow: hidden;
    position: relative;
}

.plant-cpi-fill {
    height: 100%;
    border-radius: 0.25rem;
    display: flex;
    align-items: center;
    padding-left: 0.625rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
    transition: width 0.5s ease;
    min-width: 32px;
}

.plant-cpi-pct {
    min-width: 50px;
    font-size: 0.8125rem;
    font-weight: 700;
    text-align: right;
    flex-shrink: 0;
}