/* Inlogpagina. Zelfde kleuren als de tracker (style.css), en het grafiekmotief is de eigen
   grafiek van de tracker: koers, GAK-trap en aankopen. Eén beweging: de grafiek tekent zich eenmaal. */
:root {
  color-scheme: light dark;
  --surface-1: #fcfcfb;
  --page: #f9f9f7;
  --text-primary: #0b0b0b;
  --text-secondary: #52514e;
  --muted: #6f6d67;
  --grid: #e1e0d9;
  --accent: #2a78d6;
  --gak: #d98a00;
  --bad: #c42f2f;
  --veld: #85847d;
  --knop-bg: #1f66bd;
  --knop-tekst: #ffffff;
}
@media (prefers-color-scheme: dark) {
  :root {
    --surface-1: #1a1a19;
    --page: #0d0d0d;
    --text-primary: #ffffff;
    --text-secondary: #c3c2b7;
    --muted: #9a998f;
    --grid: #2c2c2a;
    --accent: #3987e5;
    --gak: #f0a91a;
    --bad: #f08080;
    --veld: #6a6a65;
    --knop-bg: #3987e5;
    --knop-tekst: #0d0d0d;
  }
}
* { box-sizing: border-box; margin: 0; }
[hidden] { display: none !important; }
html { background: var(--page); }
body {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--text-primary);
  background: var(--page);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

.inlog { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }

/* ---- links: de grafiek op een raster ---------------------------------------------------- */
.beeld {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  padding: 48px;
  background: var(--surface-1);
  border-right: 1px solid var(--grid);
  overflow: hidden;
}
.beeld svg { position: relative; width: 100%; max-width: 820px; height: auto; display: block; overflow: visible; }
.beeld svg.raster { position: absolute; inset: 0; width: 100%; max-width: none; height: 100%; }
.raster line { stroke: var(--grid); stroke-width: 1; vector-effect: non-scaling-stroke; }
.l-koers { fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.l-gak { fill: none; stroke: var(--gak); stroke-width: 3.4; stroke-linejoin: round; }
.l-nu { stroke: var(--text-secondary); stroke-width: 1.2; stroke-dasharray: 5 6; opacity: .55; }
.stip { fill: var(--surface-1); stroke: var(--gak); stroke-width: 3; }
.nu { fill: var(--accent); }

@media (prefers-reduced-motion: no-preference) {
  .l-koers, .l-gak { stroke-dasharray: 1; stroke-dashoffset: 1; }
  .l-koers { animation: teken 1.7s cubic-bezier(.3, .1, .2, 1) .15s forwards; }
  .l-gak { animation: teken 1.1s cubic-bezier(.3, .1, .2, 1) .95s forwards; }
  .l-nu { opacity: 0; animation: toon .6s ease 1.9s forwards; }
  .stip, .nu { opacity: 0; transform-box: fill-box; transform-origin: center; animation: pop .35s cubic-bezier(.2, 1.4, .4, 1) forwards; }
  .s1 { animation-delay: .5s; }
  .s2 { animation-delay: 1.15s; }
  .s3 { animation-delay: 1.6s; }
  .nu { animation-delay: 1.85s; }
}
@media (prefers-reduced-motion: no-preference) {
  #stap-code:not([hidden]), #stap-wachtwoord.terug { animation: binnen .3s cubic-bezier(.16, 1, .3, 1); }
  .cijfers.mis { animation: schud .34s cubic-bezier(.36, .07, .19, .97); }
}
@keyframes binnen { from { opacity: 0; transform: translateY(10px); } }
@keyframes schud { 20% { transform: translateX(-6px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }
@keyframes teken { to { stroke-dashoffset: 0; } }
@keyframes toon { to { opacity: .55; } }
@keyframes pop { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: none; } }

/* ---- rechts: het formulier ---------------------------------------------------------------- */
.paneel { display: flex; align-items: center; justify-content: center; padding: 48px clamp(24px, 6vw, 80px); }
.blok { width: 100%; max-width: 360px; }
h1 { font-size: 30px; font-weight: 650; letter-spacing: -0.025em; line-height: 1.15; text-wrap: balance; }
h2 { font-size: 20px; font-weight: 600; letter-spacing: -0.015em; text-wrap: balance; }
.sub { margin-top: 8px; color: var(--text-secondary); font-size: 15px; max-width: 34ch; text-wrap: balance; }
#blok.code .sub { display: none; }                 /* bij de code één ding tegelijk: de uitleg van de pagina is dan klaar */
#blok.code #stap-code { margin-top: 28px; }

/* de delen van de browser die we niet tekenen, in dit kleurenpalet */
::selection { background: color-mix(in srgb, var(--accent) 28%, transparent); color: inherit; }
input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text-primary);
  box-shadow: 0 0 0 100px var(--surface-1) inset;      /* Chrome kleurt ingevulde velden anders geel of blauw; taste-skill-ignore */
  caret-color: var(--text-primary);
}
input::placeholder { color: var(--muted); }

form { margin-top: 32px; display: flex; flex-direction: column; }
form + form { margin-top: 32px; }
#stap-code { margin-top: 36px; }
label { font-size: 13px; font-weight: 600; color: var(--text-secondary); margin: 18px 0 6px; }
label:first-of-type { margin-top: 0; }
input:not([type=checkbox]) {
  font: inherit; font-size: 16px; color: var(--text-primary);
  background: var(--surface-1); border: 1px solid var(--veld); border-radius: 10px;
  height: 46px; padding: 0 14px; width: 100%;
}
input:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input:focus-visible { border-color: var(--accent); outline-offset: 0; }
.veld { position: relative; }
.veld input { padding-right: 68px; }
.toon {
  position: absolute; right: 1px; top: 1px; height: 44px; padding: 0 14px;
  font: inherit; font-size: 13px; font-weight: 600; color: var(--text-secondary);
  background: transparent; border: 0; border-radius: 8px; cursor: pointer;
}
.toon:hover { color: var(--text-primary); }

.knop {
  margin-top: 26px; height: 48px; width: 100%;
  font: inherit; font-size: 16px; font-weight: 600; color: var(--knop-tekst); background: var(--knop-bg);
  border: 0; border-radius: 10px; cursor: pointer;
}
.knop:hover:not(:disabled) { filter: brightness(1.08); }
.knop:disabled { opacity: .6; cursor: default; }
.uitleg { margin-top: 12px; font-size: 13px; color: var(--muted); }
#stap-code .uitleg { margin-top: 8px; font-size: 14px; color: var(--text-secondary); }
#stap-code .uitleg strong { color: var(--text-primary); font-weight: 600; overflow-wrap: anywhere; }

.fout { font-size: 14px; color: var(--bad); margin: 12px 0 0; }
.fout:empty { display: none; }
.fout:not(:empty) + .knop { margin-top: 16px; }

/* de zes cijfers */
.cijfers { display: flex; gap: 8px; margin-top: 22px; }
.cijfer {
  flex: 1 1 0; min-width: 0; max-width: 54px; height: 62px; padding: 0 !important; text-align: center;
  font-size: 28px !important; font-weight: 600; font-variant-numeric: tabular-nums;
  caret-color: var(--accent);
}
.cijfer:nth-child(3) { margin-right: 8px; }          /* 482 913: een hapering in het midden */
.cijfer.vol { border-color: var(--text-secondary); }
.cijfers.mis .cijfer { border-color: var(--bad); }

.vink { display: flex; align-items: center; gap: 10px; min-height: 44px; margin: 14px 0 0 !important; font-size: 14px !important; font-weight: 400 !important; color: var(--text-secondary); cursor: pointer; }
.vink input { width: 18px; height: 18px; accent-color: var(--knop-bg); margin: 0; }

.acties { display: flex; justify-content: space-between; gap: 12px; margin-top: 6px; }
.tekst {
  font: inherit; font-size: 14px; font-weight: 500; color: var(--accent); background: transparent;
  border: 0; padding: 0; min-height: 44px; cursor: pointer; text-align: left;
}
.tekst:hover:not(:disabled) { text-decoration: underline; }
.tekst:disabled { color: var(--muted); cursor: default; }
.tekst.vergeten { align-self: flex-start; margin-top: 10px; }
#stap-vergeten, #stap-verstuurd, #stap-herstel { margin-top: 28px; }
#stap-vergeten .uitleg, #stap-verstuurd .uitleg, #stap-herstel .uitleg { margin: 8px 0 22px; font-size: 14px; color: var(--text-secondary); }
#stap-verstuurd .uitleg { margin-bottom: 8px; }
.melding-ok { font-size: 14px; color: var(--text-secondary); margin: 12px 0 0; }
.melding-ok:empty { display: none; }

/* ---- smal scherm: de grafiek wordt een band boven het formulier ------------------------------- */
@media (max-width: 820px) {
  .inlog { grid-template-columns: 1fr; min-height: 0; }
  .beeld { padding: 0; height: 45vw; align-items: flex-start; border-right: 0; border-bottom: 1px solid var(--grid); }
  .beeld svg:not(.raster) { max-width: none; margin-top: -11.6%; }          /* procent = van de breedte: de grafiek schaalt met het scherm mee */
  .paneel { padding: 28px 24px calc(40px + env(safe-area-inset-bottom)); align-items: flex-start; }
  h1 { font-size: 26px; }
  form { margin-top: 24px; }
}
@media (max-width: 380px) {
  .cijfers { gap: 6px; }
  .cijfer { height: 56px; font-size: 24px !important; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
