/* Noordiq-portaal: one stylesheet, no build step, no JavaScript. Mobile first; light and dark through the tokens. */
:root {
  --bg: #f5f6f8; --card: #ffffff; --text: #14171c; --muted: #5d6676; --faint: #98a2b3;
  --line: #e7e9ee; --chip: #f0f2f5;
  --accent: #0e7c66; --accent-soft: #e3f4ef; --accent-text: #0a5c4c; --on-accent: #ffffff;
  --series: #007f69; /* chart bars and the meter's fill (checked with the dataviz palette validator) */
  --track: #cfeae2;  /* the meter's unfilled part: a lighter step of the same hue */
  --ok-bg: #d1fadf; --ok-fg: #05603a; --bad-bg: #fee4e2; --bad-fg: #b42318;
  --doing-bg: #d1e9ff; --doing-fg: #175cd3;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .04);
  --radius: 14px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0f13; --card: #161a21; --text: #e8eaee; --muted: #a3acba; --faint: #6b7280;
    --line: #252a33; --chip: #20252e;
    --accent: #3cc8a4; --accent-soft: #10302a; --accent-text: #7fe3c8; --on-accent: #06251e;
    --series: #26ad8b; --track: #1d4a3f;
    --ok-bg: #053321; --ok-fg: #75e0a7; --bad-bg: #55160c; --bad-fg: #fda29b;
    --doing-bg: #102a56; --doing-fg: #84caff;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
       background: var(--bg); color: var(--text); }
a { color: var(--accent-text); }
h1 { margin: 20px 0 4px; font-size: 26px; line-height: 1.2; letter-spacing: -.01em; }
h2 { margin: 28px 0 12px; font-size: 18px; }
h3 { margin: 0 0 12px; font-size: 15px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.center { text-align: center; }
.wrap { width: 100%; max-width: 960px; margin: 0 auto; padding: 0 16px; }

/* ---------- header with the two tabs ---------- */
.top { background: var(--card); border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 17px;
        text-decoration: none; }
.mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--accent);
        color: var(--on-accent); font-weight: 800; font-size: 15px; }
.client { color: var(--muted); font-size: 14px; text-align: right; overflow: hidden; text-overflow: ellipsis;
          white-space: nowrap; min-width: 0; }
.tabs { display: flex; gap: 4px; margin-top: 8px; }
.tabs a { padding: 10px 14px; color: var(--muted); font-weight: 600; text-decoration: none;
          border-bottom: 2px solid transparent; }
.tabs a.on { color: var(--accent-text); border-bottom-color: var(--accent); }
.main { padding-bottom: 32px; }
.foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px;
        padding-top: 16px; padding-bottom: 32px; border-top: 1px solid var(--line); }
.foot form { margin: 0; }
button.link { background: none; border: 0; padding: 0; color: var(--accent-text); font: inherit; cursor: pointer;
              text-decoration: underline; }

/* ---------- cards ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
        padding: 16px; }
.card + .card, .grid + .card, .card + .grid, .tiles + .card { margin-top: 12px; }
.grid > .card, .tiles > .card { margin-top: 0; }
.grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.empty p { margin: 0; }
.block + .block { margin-top: 28px; padding-top: 4px; }
.site-title { margin-top: 0; }

/* ---------- Overzicht: sites ---------- */
.site-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.site-name { font-weight: 650; font-size: 17px; overflow-wrap: anywhere; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 99px; font-size: 14px;
        font-weight: 600; background: var(--chip); color: var(--muted); }
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.pill.ok { background: var(--ok-bg); color: var(--ok-fg); }
.pill.bad { background: var(--bad-bg); color: var(--bad-fg); }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 14px 0 8px; }
.facts dt { color: var(--muted); font-size: 14px; }
.facts dd { margin: 0; font-weight: 650; font-size: 18px; }
.site p { margin: 0; }

/* ---------- Overzicht: milestones ---------- */
.summary { margin: -4px 0 10px; }
.milestones { list-style: none; margin: 0; padding: 4px 16px; }
.ms { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; }
.ms + .ms { border-top: 1px solid var(--line); }
.ms-mark { flex: none; width: 12px; height: 12px; margin-top: 6px; border-radius: 50%; border: 2px solid var(--faint); }
.ms.klaar .ms-mark { background: var(--accent); border-color: var(--accent); }
.ms.bezig .ms-mark { border-color: var(--doing-fg); background: var(--doing-bg); }
.ms-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.ms-name { font-weight: 600; }
.tag { flex: none; padding: 1px 10px; border-radius: 99px; font-size: 13px; font-weight: 600; background: var(--chip);
       color: var(--muted); }
.tag.klaar { background: var(--ok-bg); color: var(--ok-fg); }
.tag.bezig { background: var(--doing-bg); color: var(--doing-fg); }

/* ---------- Cijfers ---------- */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tile { display: flex; flex-direction: column; }
.tile-label { font-weight: 650; }
.tile-value { margin-top: 10px; font-size: 26px; font-weight: 650; line-height: 1.15; font-variant-numeric: tabular-nums; }
.tile-value.second { font-size: 20px; }
.chart { display: block; width: 100%; max-width: 560px; height: auto; overflow: visible; }
.chart .grid-line { stroke: var(--line); stroke-width: 1; }
.chart .grid-line.base { stroke: var(--faint); }
.chart .axis { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart .bar path { fill: var(--series); }
.chart .bar .hit { fill: transparent; }
.chart .bar:hover .hit { fill: var(--chip); }
.chart .bar.now .axis { fill: var(--text); font-weight: 650; }
.table-view { margin-top: 10px; }
.table-view summary { cursor: pointer; color: var(--accent-text); font-size: 14px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 6px; }
th { text-align: left; color: var(--muted); font-weight: 600; padding: 6px 0; border-bottom: 1px solid var(--line); }
td { padding: 6px 0; border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: 0; }
.num { text-align: right; font-variant-numeric: tabular-nums; padding-left: 12px; white-space: nowrap; }
.rank { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.rank li { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; }
.rank li + li { border-top: 1px solid var(--line); }
.rank .path { min-width: 0; overflow-wrap: anywhere; }
.goals ul { list-style: none; margin: 0; padding: 0; }
.goal { display: flex; flex-direction: column; gap: 4px; padding: 10px 0; }
.goal + .goal { border-top: 1px solid var(--line); }
.goal-name { font-weight: 600; }
.meter { display: block; width: 100%; height: 8px; }
.meter .track { fill: var(--track); }
.meter .fill { fill: var(--series); }

/* ---------- login pages (no header) ---------- */
.bare { max-width: 420px; margin: 0 auto; padding: 48px 16px; }
.logo.big { justify-content: center; display: flex; margin-bottom: 20px; }
.login h1 { margin-top: 0; font-size: 22px; }
.login p { margin: 0 0 14px; }
.login label { display: block; font-weight: 600; margin: 6px 0; }
input[type=email] { width: 100%; padding: 12px; font: inherit; color: var(--text); background: var(--bg);
                    border: 1px solid var(--line); border-radius: 10px; }
input[type=email]:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
button[type=submit], .button { display: inline-block; width: 100%; margin-top: 14px; padding: 12px 16px;
                               border: 0; border-radius: 10px; background: var(--accent); color: var(--on-accent);
                               font: inherit; font-weight: 650; text-align: center; text-decoration: none;
                               cursor: pointer; }
.button.secondary { background: var(--chip); color: var(--text); }
.error { color: var(--bad-fg); background: var(--bad-bg); padding: 8px 12px; border-radius: 10px; }

@media (min-width: 720px) {
  h1 { margin-top: 28px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card { padding: 20px; }
}
