* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.5 system-ui, sans-serif; color: #1c2430; background: #f5f7fa; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: .75rem 1.25rem; background: #1c2430; color: #fff; }
.brand { color: #fff; font-weight: 600; text-decoration: none; }
.sync-badge { font-size: .8rem; padding: .2rem .6rem; border-radius: 1rem; background: #3a4656; }
.sync-badge.ok { background: #1f7a4d; } .sync-badge.err { background: #b3261e; } .sync-badge.warn { background: #8a6d1f; }
.container { max-width: 1100px; margin: 1.5rem auto; padding: 0 1.25rem; }
.container.wide { max-width: 95%; }
h1 { font-size: 1.4rem; margin: 0 0 .25rem; }
.muted { color: #6b7785; font-size: .85rem; }
.grid { width: 100%; border-collapse: collapse; background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.grid th, .grid td { text-align: left; padding: .5rem .75rem; border-bottom: 1px solid #eceff3; vertical-align: top; }
.grid th { background: #eef1f5; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; }
.grid tr:hover td { background: #f8fafc; }
/* Explorer-tabeller: vandret scroll + ingen wrap, så mange kolonner ikke brækker grimt */
.table-scroll { overflow-x: auto; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.table-scroll .grid { box-shadow: none; border-radius: 0; }
.table-scroll .grid th, .table-scroll .grid td { white-space: nowrap; }
a { color: #1a5fb4; }
.toolbar { display: flex; gap: .5rem; align-items: center; margin: 1rem 0; flex-wrap: wrap; }
.toolbar input[type=search] { padding: .4rem .6rem; border: 1px solid #cbd2db; border-radius: 6px; }
.btn { padding: .4rem .8rem; border: 0; border-radius: 6px; background: #1a5fb4; color: #fff; cursor: pointer; text-decoration: none; }
.pager { display: flex; gap: .5rem; margin: 1rem 0; align-items: center; }
pre.json { background: #0d1117; color: #c9d1d9; padding: 1rem; border-radius: 8px; overflow: auto; }
.nav { display: flex; gap: 1rem; margin-right: auto; margin-left: 1.5rem; }
.nav a { color: #c7d0db; text-decoration: none; font-size: .9rem; }
.nav a:hover { color: #fff; }
.kpis { display: flex; gap: 1rem; flex-wrap: wrap; margin: 1rem 0; }
.kpi { background: #fff; border-radius: 8px; padding: 1rem 1.25rem; box-shadow: 0 1px 3px rgba(0,0,0,.08); min-width: 160px; }
.kpi .val { font-size: 1.6rem; font-weight: 700; }
.kpi .lbl { color: #6b7785; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; }
.chart-wrap { background: #fff; border-radius: 8px; padding: 1rem; box-shadow: 0 1px 3px rgba(0,0,0,.08); margin: 1rem 0; }
.filters { display: flex; gap: .5rem; align-items: end; flex-wrap: wrap; margin: 1rem 0; }
.filters label { display: flex; flex-direction: column; font-size: .8rem; color: #6b7785; gap: .2rem; }
.filters input, .filters select { padding: .4rem .6rem; border: 1px solid #cbd2db; border-radius: 6px; }
.empty { background: #fff; border-radius: 8px; padding: 2rem; text-align: center; color: #6b7785; }
.section-title { margin: 1.5rem 0 .5rem; font-size: 1.05rem; }
.kpi .delta { display: block; margin-top: .35rem; font-size: .78rem; }
.delta.up { color: #1f7a4d; } .delta.down { color: #b3261e; } .delta.flat { color: #6b7785; }
.grid tfoot th { background: #eef1f5; font-weight: 700; border-top: 2px solid #cbd2db; text-transform: none; letter-spacing: 0; }
.grid.sortable thead th { cursor: pointer; user-select: none; }
.grid.sortable thead th:hover { background: #e3e8ee; }
