:root {
    --navy: #1F2043;
    --orange: #F59D24;
    --lila: #8F96CB;
    --cream: #FAF1DE;
    --white: #FFFFFF;
    --off-white: #F7F8FB;
    --success: #2BB673;
    --error: #C8452F;
    --line: #E6E8F3;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--cream);
    color: var(--navy);
    font: 15px/1.5 "Mona Sans", -apple-system, "Segoe UI", sans-serif;
}

h1, h2, .brand, .stat .value { font-family: Nunito, -apple-system, "Segoe UI", sans-serif; }
h1 { font-size: 26px; font-weight: 800; margin: 0 0 20px; }
h2 { font-size: 17px; margin: 0; }
p { margin: 0; }
a { color: var(--navy); }

.topbar {
    display: flex;
    align-items: center;
    gap: 28px;
    padding: 14px 28px;
    background: var(--navy);
    color: var(--white);
}
.brand { font-size: 20px; font-weight: 800; color: var(--white); text-decoration: none; }
.topbar nav { display: flex; gap: 6px; flex: 1; }
.topbar nav a { color: var(--white); text-decoration: none; padding: 6px 12px; border-radius: 999px; opacity: 0.75; }
.topbar nav a:hover { opacity: 1; }
.topbar nav a.active { opacity: 1; background: rgba(255, 255, 255, 0.14); }
.account { display: flex; align-items: center; gap: 14px; font-size: 14px; }
button.link { background: none; color: var(--white); padding: 0; text-decoration: underline; font-weight: 400; }

main { max-width: 1040px; margin: 0 auto; padding: 28px 20px 60px; }
main.narrow { max-width: 420px; padding-top: 56px; }

.card {
    background: var(--white);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 6px 18px rgba(31, 32, 67, 0.08);
}
.card > h2 { margin-bottom: 12px; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 14px; }
.actions { display: flex; align-items: center; gap: 10px; }
.highlight { border: 2px solid var(--orange); }
.highlight p { margin-bottom: 12px; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 16px; }
.stats .card { margin-bottom: 0; }
.stat { display: grid; gap: 2px; }
.stat .value { font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat .value small { font-size: 16px; color: var(--lila); }
.stat .value.bad { color: var(--error); }
.stat .label, .muted, .sub, .hint { color: #6C72A6; font-size: 13px; }
.sub { display: block; }
.sub.bad { color: var(--error); }

table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; text-transform: none; color: #6C72A6; font-weight: 600; padding: 0 10px 8px; }
td { padding: 10px; border-top: 1px solid var(--line); vertical-align: middle; }
th:first-child, td:first-child { padding-left: 0; }
th:last-child, td:last-child { padding-right: 0; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.right { text-align: right; }
td form { display: inline; }

.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; background: var(--off-white); }
.badge.ok { background: rgba(43, 182, 115, 0.15); color: #1B8553; }
.badge.warn { background: rgba(245, 157, 36, 0.2); color: #9A5B05; }
.badge.bad { background: rgba(200, 69, 47, 0.12); color: var(--error); }

.form { display: grid; gap: 14px; }
.form h1 { margin-bottom: 4px; }
label { display: grid; gap: 4px; font-weight: 600; font-size: 14px; }
label.check { display: flex; align-items: center; gap: 8px; font-weight: 400; }
input[type="text"], input[type="email"], input[type="password"] {
    font: inherit;
    padding: 10px 12px;
    border: 1.5px solid #DDDFEF;
    border-radius: 10px;
    background: var(--off-white);
    color: var(--navy);
    width: 100%;
}
input:focus { outline: none; border-color: var(--lila); }
.inline { display: flex; gap: 10px; }
.inline input { flex: 1; }

button {
    font: inherit;
    font-weight: 700;
    padding: 10px 16px;
    border: 0;
    border-radius: 10px;
    background: var(--navy);
    color: var(--white);
    cursor: pointer;
    white-space: nowrap;
}
button:disabled { opacity: 0.45; cursor: default; }
button.secondary { background: var(--off-white); color: var(--navy); }
button.small { padding: 6px 12px; font-size: 13px; }

.flash { padding: 10px 14px; border-radius: 10px; margin-bottom: 16px; font-size: 14px; }
.flash.ok { background: rgba(43, 182, 115, 0.15); color: #1B8553; }
.flash.bad { background: rgba(200, 69, 47, 0.1); color: var(--error); }

.filters, .pager { display: flex; gap: 6px; margin-bottom: 16px; align-items: center; }
.filters a, .pager a { text-decoration: none; padding: 6px 14px; border-radius: 999px; background: var(--white); font-size: 14px; }
.filters a.active { background: var(--navy); color: var(--white); }

code, pre { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 13px; }
code { background: var(--off-white); padding: 2px 6px; border-radius: 6px; }
code.key { display: block; padding: 12px; word-break: break-all; user-select: all; }
pre { background: var(--navy); color: var(--white); padding: 16px; border-radius: 12px; overflow-x: auto; margin: 0 0 10px; }

.empty ol { margin: 0 0 12px; padding-left: 20px; display: grid; gap: 6px; }

@media (max-width: 760px) {
    .topbar { flex-wrap: wrap; gap: 12px; padding: 12px 16px; }
    .topbar nav { order: 3; flex-basis: 100%; }
    .account { margin-left: auto; }
    .stats { grid-template-columns: repeat(2, 1fr); }
    .card { overflow-x: auto; }
    .card-head, .inline { flex-direction: column; }
}

fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; }
legend { font-weight: 600; font-size: 14px; padding: 0; margin-bottom: 6px; }
.break { word-break: break-all; }
.spaced { margin-bottom: 12px; }
.actions-cell { white-space: nowrap; }
.actions-cell form { margin-left: 4px; }

select, input[type="number"], input[type="file"] {
    font: inherit;
    padding: 9px 12px;
    border: 1.5px solid #DDDFEF;
    border-radius: 10px;
    background: var(--off-white);
    color: var(--navy);
    width: 100%;
}
a.button { display: inline-block; text-decoration: none; font-weight: 700; border-radius: 10px; }
a.button.secondary { background: var(--off-white); color: var(--navy); }
a.button.small { padding: 6px 12px; font-size: 13px; }
.grid-3 { display: grid; grid-template-columns: 120px 1fr 1fr; gap: 14px; }
.align-end { align-self: end; padding-bottom: 10px; }
.topbar nav { flex-wrap: wrap; }

.usage { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.usage-head { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 6px; }
.meter { height: 8px; border-radius: 999px; background: var(--off-white); overflow: hidden; }
.meter span { display: block; height: 100%; border-radius: 999px; background: var(--navy); }
.meter span.full { background: var(--error); }

.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.plan { display: grid; gap: 12px; align-content: start; }
.plan ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 14px; }
.price { font-family: Nunito, -apple-system, "Segoe UI", sans-serif; font-size: 20px; font-weight: 800; }
.price small { display: block; font: 400 13px/1.4 "Mona Sans", -apple-system, "Segoe UI", sans-serif; color: #6C72A6; }

.inline-plan { display: flex; gap: 6px; }
.inline-plan select { padding: 5px 8px; font-size: 13px; width: auto; }

/* Staafdiagram: één reeks, dunne staven met een afgeronde bovenkant en 2px tussenruimte. */
.chart { display: flex; gap: 10px; height: 180px; }
.chart-scale { display: flex; flex-direction: column; justify-content: space-between; font-size: 12px; color: #6C72A6; font-variant-numeric: tabular-nums; text-align: right; }
.chart-bars { flex: 1; display: flex; align-items: flex-end; gap: 2px; border-bottom: 1px solid var(--line); background: linear-gradient(var(--line), var(--line)) top / 100% 1px no-repeat; }
.chart-col { flex: 1; height: 100%; display: flex; align-items: flex-end; position: relative; outline: none; }
.chart-bar { width: 100%; max-width: 24px; margin: 0 auto; background: var(--navy); border-radius: 4px 4px 0 0; }
.chart-col:hover .chart-bar, .chart-col:focus .chart-bar { background: var(--lila); }
.chart-tip { display: none; position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); background: var(--navy); color: var(--white); font-size: 12px; padding: 4px 8px; border-radius: 6px; white-space: nowrap; z-index: 2; pointer-events: none; }
.chart-col:hover .chart-tip, .chart-col:focus .chart-tip { display: block; }
.chart-col:nth-child(-n+3) .chart-tip { left: 0; transform: none; }
.chart-col:nth-last-child(-n+3) .chart-tip { left: auto; right: 0; transform: none; }
.chart-axis { display: flex; justify-content: space-between; font-size: 12px; color: #6C72A6; margin: 6px 0 12px 34px; }
details summary { cursor: pointer; font-size: 13px; color: #6C72A6; }
details table { margin-top: 10px; }

@media (max-width: 760px) {
    .grid-3, .usage, .plans { grid-template-columns: 1fr; }
}

.back { margin-bottom: 8px; font-size: 14px; }
.diagnosis { border-left: 6px solid var(--lila); display: grid; gap: 8px; }
.diagnosis.ok { border-left-color: var(--success); }
.diagnosis.warn { border-left-color: var(--orange); }
.diagnosis.bad { border-left-color: var(--error); }
.diagnosis .card-head { margin-bottom: 0; }
.diagnosis .message { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 13px; background: var(--off-white); padding: 10px 12px; border-radius: 10px; word-break: break-word; }

.timeline { list-style: none; margin: 0; padding: 0 0 0 22px; border-left: 2px solid var(--line); display: grid; gap: 16px; }
.timeline li { position: relative; }
.timeline li::before { content: ""; position: absolute; left: -29px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--lila); border: 2px solid var(--white); }
.timeline li.ok::before { background: var(--success); }
.timeline li.bad::before { background: var(--error); }
.timeline-head { display: flex; justify-content: space-between; gap: 12px; }

.facts { display: grid; grid-template-columns: 140px 1fr; gap: 8px 16px; margin: 0; }
.facts dt { color: #6C72A6; font-size: 14px; }
.facts dd { margin: 0; }
.stat.wide { grid-column: span 2; align-content: center; }

.page-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 20px; }
.page-head h1 { margin: 0; }
a.button { background: var(--navy); color: var(--white); padding: 10px 16px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.spaced-top { margin-top: 12px; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; counter-reset: step; }
.steps li { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 14px 12px 52px; background: var(--off-white); border-radius: 12px; position: relative; counter-increment: step; }
.steps li::before { content: counter(step); position: absolute; left: 14px; top: 12px; width: 26px; height: 26px; border-radius: 50%; background: var(--navy); color: var(--white); font-weight: 700; font-size: 13px; display: grid; place-items: center; }
.steps li.done { opacity: 0.6; }
.steps li.done::before { content: "✓"; background: var(--success); }
.steps.numbered li { align-items: flex-start; }
.downloads { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.pair-code { display: block; font: 800 34px/1.2 ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: 0.08em; margin: 8px 0 4px; user-select: all; }

@media (max-width: 760px) {
    .grid-2 { grid-template-columns: 1fr; }
    .steps li { flex-direction: column; align-items: flex-start; }
}

.findings { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.findings li { padding: 10px 14px; border-radius: 10px; background: var(--off-white); border-left: 5px solid var(--lila); }
.findings li.ok { border-left-color: var(--success); }
.findings li.warn { border-left-color: var(--orange); }
.findings li.bad { border-left-color: var(--error); }
.log { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 14px; max-height: 320px; overflow-y: auto; }
.log .num { display: inline-block; min-width: 110px; }

.account a { color: var(--white); text-decoration: none; padding: 6px 12px; border-radius: 999px; }
.account a:hover, .account a.active { background: rgba(255, 255, 255, 0.14); }

.release-form { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.grid-3 input[type="text"] { width: 100%; }
.release-form .grid-3 { grid-template-columns: 1fr 1fr 2fr; }
@media (max-width: 760px) { .release-form .grid-3 { grid-template-columns: 1fr; } }
