:root {
    --pbi-bg: #f3f2f1;
    --pbi-card: #ffffff;
    --pbi-header: #1b2838;
    --pbi-accent: #118dff;
    --pbi-positive: #00b050;
    --pbi-neutral: #666;
    --pbi-border: #e1dfdd;
    --text: #323130;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
    background: var(--pbi-bg);
    color: var(--text);
    font-size: 14px;
}

.report-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 16px;
}

.report-header {
    background: var(--pbi-header);
    color: white;
    padding: 16px 24px;
    border-radius: 4px 4px 0 0;
    margin-bottom: 16px;
}

.report-header h1 {
    font-size: 22px;
    font-weight: 600;
}

.intro-text {
    background: var(--pbi-card);
    padding: 16px 20px;
    border: 1px solid var(--pbi-border);
    border-radius: 4px;
    margin-bottom: 20px;
    line-height: 1.5;
}

.section {
    margin-bottom: 24px;
}

.section h2 {
    font-size: 18px;
    margin-bottom: 12px;
    color: #201f1e;
}

.desc {
    margin-bottom: 10px;
    color: #605e5c;
    font-size: 13px;
}

.kpi-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.kpi-card {
    background: var(--pbi-card);
    border: 1px solid var(--pbi-border);
    border-radius: 4px;
    padding: 16px 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.kpi-card:hover, .kpi-card.active {
    border-color: var(--pbi-accent);
    box-shadow: 0 4px 12px rgba(17,141,255,0.15);
    transform: translateY(-2px);
}

.kpi-label {
    font-size: 12px;
    color: #605e5c;
    margin-bottom: 4px;
}

.kpi-number {
    font-size: 28px;
    font-weight: 600;
    color: #201f1e;
}

.kpi-delta {
    font-size: 12px;
    margin-top: 4px;
}

.kpi-delta.positive { color: var(--pbi-positive); }
.kpi-delta.neutral { color: var(--pbi-neutral); }

.two-col {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 16px;
}

.card {
    background: var(--pbi-card);
    border: 1px solid var(--pbi-border);
    border-radius: 4px;
    padding: 16px;
}

#fleetChart {
    max-height: 240px !important;
    height: 240px !important;
}

.category-explanations {
    margin-top: 12px;
}

.cat-item {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid #f3f2f1;
    cursor: pointer;
    transition: background 0.15s;
}

.cat-item:hover {
    background: #f3f2f1;
}

.explanations p {
    margin-bottom: 10px;
    font-size: 13px;
    line-height: 1.45;
}

.filter-bar {
    display: flex;
    gap: 8px;
    margin: 12px 0;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 6px 14px;
    border: 1px solid var(--pbi-border);
    background: white;
    border-radius: 16px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.15s;
}

.filter-btn.active, .filter-btn:hover {
    background: var(--pbi-accent);
    color: white;
    border-color: var(--pbi-accent);
}

.map-container {
    height: 380px;
    background: #e6f2ff;
    border: 1px solid var(--pbi-border);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    margin-top: 8px;
}

.map-bg {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #d0e7ff 0%, #b8d9ff 50%, #a0c8f0 100%);
}

.markers {
    position: absolute;
    inset: 0;
}

.marker {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #118dff;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    cursor: pointer;
    transition: transform 0.2s, opacity 0.3s;
}

.marker.b2c { background: #3498db; }
.marker.p2p { background: #9b59b6; }
.marker.bike { background: #27ae60; }
.marker.cargo { background: #f39c12; }

.marker:hover {
    transform: scale(1.6);
    z-index: 10;
}

.map-overlay {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(255,255,255,0.9);
    padding: 6px 10px;
    font-size: 12px;
    border-radius: 4px;
}

.provider-card {
    background: white;
    border: 1px solid var(--pbi-border);
    border-radius: 4px;
    padding: 20px;
}

.provider-link {
    display: inline-block;
    margin-top: 12px;
    color: var(--pbi-accent);
    text-decoration: none;
    font-weight: 600;
}

.charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.chart-box {
    height: 300px;
    position: relative;
    overflow: hidden;
}

.chart-box canvas {
    position: absolute;
    top: 40px;
    left: 0;
    right: 0;
    bottom: 40px;
    width: 100% !important;
    height: auto !important;
    max-height: 220px !important;
}

.access-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.access-item {
    background: white;
    border: 1px solid var(--pbi-border);
    border-radius: 4px;
    padding: 12px;
    text-align: center;
}

.access-item span {
    display: block;
    font-size: 12px;
    color: #605e5c;
}

.access-item strong {
    font-size: 22px;
    color: var(--pbi-accent);
}

.realtime-panel {
    margin: 16px 0;
}

.search-row {
    display: flex;
    gap: 8px;
    margin: 10px 0;
}

.search-row input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--pbi-border);
    border-radius: 4px;
    font-size: 14px;
}

.search-row button {
    padding: 8px 16px;
    background: var(--pbi-accent);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
}

.search-row button:hover {
    background: #0d6efd;
}

.search-status {
    font-size: 13px;
    color: #605e5c;
    min-height: 18px;
    margin-bottom: 8px;
}

.leaflet-map {
    height: 420px;
    border: 1px solid var(--pbi-border);
    border-radius: 4px;
    margin: 8px 0;
}

.nearby-list {
    margin-top: 10px;
}

.nearby-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f3f2f1;
    font-size: 13px;
}

.nearby-item .avail {
    font-weight: 600;
    color: var(--pbi-positive);
}

.nearby-item .avail.low {
    color: #e67e22;
}

.nearby-item .avail.none {
    color: #e74c3c;
}

@media (max-width: 900px) {
    .kpi-row { grid-template-columns: repeat(2, 1fr); }
    .two-col, .charts-grid { grid-template-columns: 1fr; }
}
