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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #1a1a2e;
    color: #e0e0e0;
}

.layout {
    display: flex;
    height: 100vh;
}

#map {
    flex: 1;
    min-width: 0;
}

#sidebar {
    width: 380px;
    background: #16213e;
    border-left: 1px solid #0f3460;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #0f3460;
}

.sidebar-header h1 {
    font-size: 1.3rem;
    color: #e94560;
}

.subtitle {
    font-size: 0.85rem;
    color: #8a8a9a;
    margin-top: 4px;
}

/* Filter panel */
#filter-panel {
    padding: 16px 20px;
    border-bottom: 1px solid #0f3460;
}

.filter-group {
    margin-bottom: 12px;
}

.filter-group label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #8a8a9a;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.filter-group select {
    width: 100%;
    padding: 8px 10px;
    background: #1a1a2e;
    color: #e0e0e0;
    border: 1px solid #0f3460;
    border-radius: 4px;
    font-size: 0.9rem;
}

/* Stats panel */
#stats-panel {
    padding: 16px 20px;
    border-bottom: 1px solid #0f3460;
}

.stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.stat-card {
    background: #1a1a2e;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #0f3460;
}

.stat-card .value {
    font-size: 1.3rem;
    font-weight: 700;
    color: #e94560;
}

.stat-card .label {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: #8a8a9a;
    margin-top: 2px;
    letter-spacing: 0.5px;
}

/* Feature detail */
#feature-detail {
    padding: 16px 20px;
    flex: 1;
}

.placeholder {
    color: #555;
    font-style: italic;
    font-size: 0.85rem;
}

.detail-table {
    width: 100%;
    font-size: 0.85rem;
}

.detail-table tr {
    border-bottom: 1px solid #0f3460;
}

.detail-table td {
    padding: 6px 0;
}

.detail-table td:first-child {
    color: #8a8a9a;
    width: 45%;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.detail-table td:last-child {
    text-align: right;
    font-weight: 500;
}

/* Bar chart */
.bar-row {
    display: flex;
    align-items: center;
    margin-bottom: 6px;
    font-size: 0.8rem;
}

.bar-label {
    width: 120px;
    flex-shrink: 0;
    color: #8a8a9a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bar-track {
    flex: 1;
    background: #1a1a2e;
    height: 18px;
    border-radius: 3px;
    overflow: hidden;
    margin: 0 8px;
}

.bar-fill {
    height: 100%;
    background: #e94560;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.bar-value {
    width: 60px;
    text-align: right;
    flex-shrink: 0;
    font-weight: 500;
}

/* Section headers */
.section-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #e94560;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

/* Kommune summary table */
.kommune-table {
    width: 100%;
    font-size: 0.8rem;
    border-collapse: collapse;
}

.kommune-table th {
    text-align: left;
    color: #8a8a9a;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 6px 4px;
    border-bottom: 1px solid #0f3460;
}

.kommune-table th:not(:first-child) {
    text-align: right;
}

.kommune-table td {
    padding: 6px 4px;
    border-bottom: 1px solid rgba(15, 52, 96, 0.5);
}

.kommune-table td:not(:first-child) {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.kommune-table tr:hover {
    background: rgba(233, 69, 96, 0.05);
}

/* Andel-bar (inline) */
.andel-bar {
    display: inline-block;
    height: 8px;
    border-radius: 2px;
    vertical-align: middle;
    margin-right: 6px;
}
