/* Het platform van GreenPulse: dezelfde kleuren en lettertypen als de rapporten (document.css), maar voor het scherm.
   Bewust sober: de rapporten zijn het product, het platform is de weg ernaartoe. */

@font-face { font-family: "Bricolage Grotesque"; src: url("/assets/bricolage-grotesque-3084aa15.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("/assets/source-serif-4-bc3e7e90.woff2") format("woff2"); font-weight: 200 900; font-display: swap; }

:root {
  --pine: #0e3b2e;
  --pulse: #18a06a;
  --mist: #eef4f0;
  --ink: #18211d;
  --slate: #5b6963;
  --line: #d8e0db;
  --surface: #ffffff;
  --page: #f6f8f7;
  --danger: #b3261e;
  --sans: "Bricolage Grotesque", system-ui, sans-serif;
  --serif: "Source Serif 4", Georgia, serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 1rem/1.5 var(--sans); color: var(--ink); background: var(--page); }
a { color: var(--pine); text-underline-offset: 0.18em; }
h1 { font: 700 2rem/1.1 var(--sans); letter-spacing: -0.02em; color: var(--pine); margin: 0; }
h2 { font: 700 1.15rem/1.25 var(--sans); color: var(--pine); margin: 0 0 0.75rem; }
p { margin: 0 0 0.75rem; }
code { font: 0.875em/1.4 ui-monospace, "SF Mono", Menlo, Consolas, monospace; background: var(--mist); padding: 0.1em 0.35em; border-radius: 4px; overflow-wrap: anywhere; }
pre { background: var(--pine); color: #e7f3ec; padding: 1rem 1.1rem; border-radius: 8px; overflow-x: auto; font: 0.84rem/1.55 ui-monospace, "SF Mono", Menlo, Consolas, monospace; margin: 0 0 1rem; }
pre code { background: none; padding: 0; color: inherit; font: inherit; }
:focus-visible { outline: 2px solid var(--pulse); outline-offset: 2px; }

.logo { display: inline-flex; align-items: center; gap: 0.5rem; font: 700 1.25rem/1 var(--sans); letter-spacing: -0.015em; color: var(--pine); text-decoration: none; }
.logo svg { width: 2.1rem; height: 2.1rem; }
.login-brand .logo svg path { stroke: #3fd39a; }

/* ---- Kop en pagina ---------------------------------------------------------------------------------------------- */

.top { background: var(--surface); border-bottom: 1px solid var(--line); }
.top-inner { max-width: 72rem; margin: 0 auto; padding: 0.8rem 1.25rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 2rem; }
.nav { display: flex; gap: 1.5rem; flex: 1; }
.nav a { text-decoration: none; font-weight: 500; color: var(--slate); padding: 0.25rem 0; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--pine); }
.nav a[aria-current] { color: var(--pine); border-bottom-color: var(--pulse); }
.who { display: flex; align-items: center; gap: 0.9rem; font-size: 0.9rem; color: var(--slate); }
.who form { margin: 0; }
.page { max-width: 72rem; margin: 0 auto; padding: 2rem 1.25rem 4rem; }
.page-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.page-head .sub { color: var(--slate); margin: 0.35rem 0 0; }
.lede { font: 400 1.1rem/1.55 var(--serif); color: var(--slate); max-width: 44rem; }

.flash { padding: 0.75rem 1rem; border-radius: 8px; background: var(--mist); border: 1px solid #cfe3d8; margin: 0 0 1.25rem; }
.flash.alert, .errors { background: #fdf1ef; border: 1px solid #f1c9c4; color: #7a1a14; }
.errors { padding: 0.75rem 1rem; border-radius: 8px; margin: 0 0 1.25rem; }
.errors ul { margin: 0.25rem 0 0; padding-left: 1.2rem; }

/* ---- Knoppen en formulieren ------------------------------------------------------------------------------------- */

.button, button.button { display: inline-flex; align-items: center; gap: 0.4rem; font: 600 0.95rem/1 var(--sans); padding: 0.7rem 1rem; border-radius: 6px; border: 1px solid var(--pine); background: var(--pine); color: #fff; text-decoration: none; cursor: pointer; }
.button:hover { background: #14503e; }
.button.quiet { background: var(--surface); color: var(--pine); border-color: var(--line); }
.button.quiet:hover { border-color: var(--pine); background: var(--surface); }
.button.danger { background: var(--surface); color: var(--danger); border-color: #f1c9c4; }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: var(--pine); text-decoration: underline; text-underline-offset: 0.18em; cursor: pointer; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 1.25rem; }
.panel + .panel { margin-top: 1rem; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 0.9rem 1rem; }
.field { display: flex; flex-direction: column; gap: 0.3rem; min-width: 0; }
.field.wide { grid-column: 1 / -1; }
label, legend { font-weight: 600; font-size: 0.9rem; }
.hint { font-size: 0.82rem; color: var(--slate); font-weight: 400; }
input[type="text"], input[type="email"], input[type="number"], select { width: 100%; font: 400 1rem/1.3 var(--sans); padding: 0.6rem 0.7rem; border: 1px solid #b9c5be; border-radius: 6px; background: #fff; color: var(--ink); }
fieldset { border: 0; padding: 0; margin: 1.5rem 0 0; min-width: 0; }
legend { font: 700 1.05rem/1.3 var(--sans); color: var(--pine); padding: 0; margin-bottom: 0.2rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.25rem; align-items: center; }

/* ---- Tabellen --------------------------------------------------------------------------------------------------- */

.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
table { width: 100%; border-collapse: collapse; font-size: 0.93rem; font-variant-numeric: tabular-nums; }
th { text-align: left; font-weight: 600; font-size: 0.8rem; color: var(--slate); padding: 0.75rem 1rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 0.8rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
td .sub { display: block; color: var(--slate); font-size: 0.85rem; }
td a.main { font-weight: 600; text-decoration: none; }
td a.main:hover { text-decoration: underline; }
.none { color: var(--slate); }
.empty { padding: 2.5rem 1.25rem; text-align: center; color: var(--slate); }
.empty p { margin-left: auto; margin-right: auto; max-width: 30rem; }

.state { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.85rem; }
.state::before { content: ""; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--pulse); flex: none; }
.state.off::before { background: #b9c5be; }
.state.failed::before { background: var(--danger); }

/* ---- Inloggen --------------------------------------------------------------------------------------------------- */

.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); background: var(--surface); }
.login-brand { background: var(--pine); color: #fff; padding: 2.5rem; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.login-brand .logo { color: #fff; }
.login-brand .claim { font: 700 clamp(1.8rem, 3.4vw, 2.9rem)/1.08 var(--sans); letter-spacing: -0.02em; max-width: 14ch; margin: 0; }
.login-brand .about { font: 400 1.05rem/1.5 var(--serif); color: #cfe6da; max-width: 30ch; margin: 1rem 0 0; }
.login-brand .pulse { position: absolute; left: 0; right: 0; top: 38%; width: 100%; height: 3.5rem; }
.login-form { display: flex; flex-direction: column; justify-content: center; padding: 2.5rem clamp(1.5rem, 6vw, 5rem); max-width: 34rem; }
.login-form h1 { margin-bottom: 0.5rem; }
.login-form form { margin-top: 1.5rem; display: grid; gap: 0.9rem; }

/* ---- Rapport ---------------------------------------------------------------------------------------------------- */

.report { display: grid; grid-template-columns: minmax(0, 1fr) 21rem; gap: 1.25rem; align-items: start; }
.preview { background: #dfe6e2; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.preview-bar { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; align-items: center; justify-content: space-between; padding: 0.6rem 0.9rem; background: var(--surface); border-bottom: 1px solid var(--line); font-size: 0.9rem; }
.preview-bar .tabs { display: flex; gap: 1rem; }
.preview iframe { display: block; width: 100%; height: 78vh; border: 0; background: #dfe6e2; }
.sources { list-style: none; margin: 0; padding: 0; font-size: 0.88rem; }
.sources li { padding: 0.45rem 0; border-bottom: 1px solid var(--line); }
.sources li:last-child { border-bottom: 0; }
.sources .why { display: block; color: var(--slate); font-size: 0.82rem; margin-left: 0.95rem; }
.estimate { background: var(--mist); border: 1px solid #cfe3d8; border-radius: 8px; padding: 0.8rem 0.9rem; margin: 0 0 1rem; font-size: 0.9rem; }
.estimate p { margin: 0; }
.estimate form { margin-top: 0.7rem; }
.issued { background: var(--mist); border: 1px solid #cfe3d8; border-radius: 10px; padding: 1rem 1.25rem; margin-bottom: 1.25rem; }
.issued code { display: block; margin-top: 0.4rem; font-size: 1rem; padding: 0.6rem 0.7rem; background: #fff; border: 1px solid var(--line); user-select: all; }
.docs { max-width: 50rem; }
.docs h2 { margin-top: 2.25rem; }
.docs table { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 1rem; }

@media (max-width: 60rem) {
  .report { grid-template-columns: minmax(0, 1fr); }
  .login { grid-template-columns: minmax(0, 1fr); }
  .login-brand { min-height: 15rem; padding: 1.5rem; }
  .login-brand .pulse { top: 46%; }
}
@media (prefers-reduced-motion: no-preference) { .button, .nav a { transition: background-color 0.15s, border-color 0.15s, color 0.15s; } }
