/* =================================================================
   Grimoire — Inlogpagina  v2.0  (Style C — Licht Atelier)
   Split-screen: donker merk-paneel links · licht formulier rechts
   ================================================================= */

/* ── 1. Lettertype (lokaal gehost) ── */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../assets/fonts/space-grotesk/SpaceGrotesk-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../assets/fonts/space-grotesk/SpaceGrotesk-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122,
    U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ── 2. Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── 3. Pagina-achtergrond ── */
body {
  font-family: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  background: #F4F0EA;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  -webkit-font-smoothing: antialiased;
}

/* ── 4. Split-screen container ── */
.login-split {
  display: flex;
  width: min(860px, 100%);
  min-height: 520px;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .14), 0 4px 16px rgba(0, 0, 0, .08);
}

/* ── 5. Linker paneel — donker merk-paneel ── */
.login-panel-left {
  flex: 0 0 38%;
  background: #161210;
  display: flex;
  flex-direction: column;
  padding: 36px 32px;
  position: relative;
  overflow: hidden;
}

/* Subtiele glow-overlay */
.login-panel-left::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 15% 5%,  rgba(138, 170, 187, .10) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 95%, rgba(138, 170, 187, .06) 0%, transparent 45%);
  pointer-events: none;
}

/* — Merk (logo + naam) — */
.lp-top { position: relative; z-index: 1; }

.lp-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lp-logo {
  width: 34px;
  height: 34px;
  background: #4C6B84;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  color: #F2EDE7;
  flex-shrink: 0;
  letter-spacing: -0.02em;
}

.lp-brand-name {
  font-size: 15px;
  font-weight: 600;
  color: #F2EDE7;
  letter-spacing: -0.01em;
}

/* — Hero-tekst — */
.lp-hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 44px 0 24px;
  position: relative;
  z-index: 1;
}

.lp-headline {
  font-size: 27px;
  font-weight: 700;
  color: #F2EDE7;
  letter-spacing: -0.03em;
  line-height: 1.25;
  margin-bottom: 14px;
}

.lp-tagline {
  font-size: 13px;
  color: rgba(242, 237, 231, .50);
  line-height: 1.65;
}

/* — Bodem: stippen + copyright — */
.lp-bottom {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.lp-dots {
  display: flex;
  gap: 6px;
  align-items: center;
}

.lp-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(242, 237, 231, .25);
}

.lp-dot--active {
  background: #F2EDE7;
  width: 8px;
  height: 8px;
}

.lp-copy {
  font-size: 11px;
  color: rgba(242, 237, 231, .35);
}

/* ── 6. Rechter paneel — licht formulier-paneel ── */
.login-panel-right {
  flex: 1;
  background: #F4F0EA;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 52px;
}

.login-form-wrap {
  width: 100%;
  max-width: 340px;
}

.lf-title {
  font-size: 24px;
  font-weight: 700;
  color: #1A1A1E;
  letter-spacing: -0.03em;
  margin-bottom: 6px;
}

.lf-sub {
  font-size: 13px;
  color: #7A7A8A;
  margin-bottom: 28px;
  line-height: 1.5;
}

/* ── 7. Formulier ── */
.inlog { width: 100%; }

.field-group { margin-bottom: 16px; }

.field-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #1A1A1E;
  margin-bottom: 6px;
}

.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.label-row .field-label { margin-bottom: 0; }

.field-forgot {
  font-size: 11px;
  color: #7A7A8A;
  text-decoration: none;
  font-weight: 500;
  transition: color .15s;
}
.field-forgot:hover { color: #4C6B84; }

/* — Inputveld-wrapper — */
.field-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.field-wrap input[type="text"],
.field-wrap input[type="password"],
.field-wrap input[type="email"] {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 13px;
  width: 100%;
  background: #FFFFFF;
  border: 1px solid #DDD8CC;
  border-radius: 8px;
  color: #1A1A1E;
  padding: 11px 14px 11px 40px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none;
}

.field-wrap input:focus {
  border-color: #4C6B84;
  box-shadow: 0 0 0 3px rgba(76, 107, 132, .14);
}

.field-wrap input::placeholder { color: #C0C0D0; }

/* — Pictogrammen links van input — */
.field-icon {
  position: absolute;
  left: 13px;
  width: 16px;
  height: 16px;
  pointer-events: none;
  display: inline-block;
  background-size: 16px 16px;
  background-repeat: no-repeat;
  background-position: center;
  flex-shrink: 0;
}

/* Person-icoon (gebruikersnaam) */
.fi-user {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23999' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='8' cy='5.5' r='2.5'/%3E%3Cpath d='M2.5 14c0-3.038 2.462-5.5 5.5-5.5s5.5 2.462 5.5 5.5'/%3E%3C/svg%3E");
}

/* Slot-icoon (wachtwoord) */
.fi-lock {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23999' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2.5' y='7.5' width='11' height='7' rx='2'/%3E%3Cpath d='M5 7.5V5a3 3 0 0 1 6 0v2.5'/%3E%3C/svg%3E");
}

/* — Oog-toggle (wachtwoord tonen/verbergen) — */
.field-wrap--pass input { padding-right: 40px; }

.toggle-eye {
  position: absolute;
  right: 11px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 5px;
  transition: background .15s;
  flex-shrink: 0;
}

.toggle-eye:hover { background: rgba(0, 0, 0, .06); }

.fi-eye {
  display: inline-block;
  width: 16px;
  height: 16px;
  background-size: 16px 16px;
  background-repeat: no-repeat;
  background-position: center;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23999' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 8s2.5-5 7-5 7 5 7 5-2.5 5-7 5-7-5-7-5z'/%3E%3Ccircle cx='8' cy='8' r='2'/%3E%3C/svg%3E");
}

.toggle-eye.active .fi-eye {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%234C6B84' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 8s2.5-5 7-5 7 5 7 5-2.5 5-7 5-7-5-7-5z'/%3E%3Ccircle cx='8' cy='8' r='2'/%3E%3C/svg%3E");
}

/* ── 8. Inlogknop ── */
.btn-inlog {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 700;
  width: 100%;
  background: #4C6B84;
  color: #F2EDE7;
  border: none;
  border-radius: 8px;
  padding: 13px;
  cursor: pointer;
  letter-spacing: .2px;
  transition: background .15s;
  margin-top: 8px;
  display: block;
  text-align: center;
}

.btn-inlog:hover { background: #3A5A73; }

/* ── 9. Onderkant: hulp + versie ── */
.lf-help {
  margin-top: 22px;
  font-size: 12px;
  color: #7A7A8A;
  text-align: center;
}

.lf-help a {
  color: #4C6B84;
  text-decoration: none;
  font-weight: 500;
}

.lf-help a:hover { text-decoration: underline; }

.lf-versie {
  margin-top: 8px;
  font-size: 11px;
  color: #C0C0D0;
  text-align: center;
}

/* ── 10. Foutmelding (brute-force / login-error) ── */
.login-error,
.alert,
.error-message {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 13px;
  background: rgba(204, 48, 48, .10);
  color: #CC3030;
  border: 1px solid rgba(204, 48, 48, .20);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 16px;
}

/* ── 11. Responsief ── */
@media (max-width: 640px) {
  body { padding: 0; align-items: flex-start; }
  .login-split { flex-direction: column; border-radius: 0; box-shadow: none; min-height: 100dvh; width: 100%; }
  .login-panel-left { flex: 0 0 auto; padding: 28px 24px; }
  .lp-hero { padding: 24px 0 16px; }
  .lp-headline { font-size: 22px; }
  .lp-bottom { display: none; }
  .login-panel-right { padding: 36px 24px 40px; align-items: flex-start; }
}

/* ════════════════════════════════════════════════════════════════
   FALLBACK — standaard Merlin login-markup (zonder module-aanpassing)
   Style't de kale form.inlog > label/input/.submit + a.pw_reset.
   '>' (direct child) zodat de nieuwe .field-wrap-markup NIET wordt geraakt.
   ════════════════════════════════════════════════════════════════ */
.login .inlog > label {
  display: block;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 12px; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase;
  color: #7A7A8A; margin: 0 0 6px;
}
.login .inlog > input[type="text"],
.login .inlog > input[type="password"],
.login .inlog > input[type="email"] {
  width: 100%;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 13px;
  background: #FFFFFF;
  border: 1px solid #D8D4CC;
  border-radius: 8px;
  color: #1A1A1E;
  padding: 11px 14px;
  margin-bottom: 16px;
  outline: none;
  -webkit-appearance: none;
  box-sizing: border-box;
  transition: border-color .15s, box-shadow .15s;
}
.login .inlog > input:focus {
  border-color: #4C6B84;
  box-shadow: 0 0 0 3px rgba(76, 107, 132, .14);
}
.login .inlog > .submit,
.login .inlog > input[type="submit"],
.login .inlog > input[type="button"] {
  width: 100%;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 14px; font-weight: 700;
  background: #4C6B84; color: #F0F4F8;
  border: none; border-radius: 8px;
  padding: 13px; cursor: pointer; margin-top: 4px;
  transition: opacity .15s;
}
.login .inlog > .submit:hover,
.login .inlog > input[type="submit"]:hover { opacity: .9; }
.login .pw_reset {
  display: inline-block; margin-top: 16px;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 13px; color: #4C6B84; text-decoration: none;
}
.login .pw_reset:hover { text-decoration: underline; }

/* ════════════════════════════════════════════════════════════════
   MICROSOFT 365 (SSO) — knop, scheiding en melding op het inlogscherm.
   Wordt getoond door inc/modules/M365 (User::Login -> M365::loginButton).
   Staat SSO uit, dan komt deze markup er niet en verandert er niets.
   ════════════════════════════════════════════════════════════════ */
.login .m365-sep {
  display: flex; align-items: center; gap: 12px;
  margin: 20px 0 14px;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: #9A9AA8;
}
.login .m365-sep::before,
.login .m365-sep::after {
  content: ""; flex: 1 1 auto; height: 1px; background: #E2DED6;
}

.login .m365-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; box-sizing: border-box;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 14px; font-weight: 600;
  background: #FFFFFF; color: #1A1A1E;
  border: 1px solid #D8D4CC; border-radius: 8px;
  padding: 12px 14px; margin-bottom: 10px;
  text-decoration: none; cursor: pointer;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.login .m365-btn:hover {
  border-color: #4C6B84;
  box-shadow: 0 0 0 3px rgba(76, 107, 132, .12);
}
.login .m365-btn svg { flex: 0 0 auto; }

.login .m365-msg {
  margin: 0 0 14px;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 13px; line-height: 1.55;
  color: #8A4B2A;
  background: rgba(224, 96, 64, .10);
  border-left: 3px solid #E06040;
  border-radius: 0 6px 6px 0;
  padding: 10px 12px;
}
