/* ══════════════════════════════════════════════════════════
   IDB COMMAND CENTER — style.css
   Palet: #071520 bg · #0d1f35 card · #1a3a52 border
          #0098c8 accent · #e8f4f8 text · #4a7a96 muted
   Fonts: Space Mono (mono/titels) · Inter (body)
══════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:           #071520;
  --bg-panel:     #0d1f35;
  --border:       #1a3a52;
  --accent:       #0098c8;
  --text:         #e8f4f8;
  --muted:        #4a7a96;
  --green:        #22c55e;
  --font-mono:    'Space Mono', 'Courier New', monospace;
  --font-body:    'Inter', system-ui, sans-serif;
}

html, body { height: 100%; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── CINEMATIC INTRO ───────────────────────────────────── */

#intro-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: #000; overflow: hidden;
}
#intro-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%; display: block;
}
.intro-center {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -52%);
  display: flex; align-items: center; justify-content: center;
  z-index: 2; pointer-events: none;
}
.intro-glow-ring {
  position: absolute;
  width: 290px; height: 290px; border-radius: 50%;
  border: 1.5px solid rgba(0,152,200,0.45);
  box-shadow: 0 0 0 1px rgba(0,152,200,0.15),
              0 0 60px rgba(0,152,200,0.3),
              0 0 130px rgba(0,152,200,0.12),
              inset 0 0 60px rgba(0,152,200,0.08);
  opacity: 0; transform: scale(0);
  transition: opacity 0.45s ease, transform 0.8s cubic-bezier(0.34,1.56,0.64,1);
}
.intro-glow-ring.on {
  opacity: 1; transform: scale(1);
  animation: iGlowPulse 2s ease-in-out infinite;
}
@keyframes iGlowPulse {
  0%,100% { box-shadow: 0 0 60px rgba(0,152,200,0.3), 0 0 130px rgba(0,152,200,0.12), inset 0 0 60px rgba(0,152,200,0.08); }
  50%      { box-shadow: 0 0 100px rgba(0,152,200,0.55), 0 0 200px rgba(0,152,200,0.22), inset 0 0 80px rgba(0,152,200,0.14); }
}
.intro-logo-img {
  height: 130px; width: auto;
  background: rgba(255,255,255,0.04);
  padding: 14px 30px;
  border: 1px solid rgba(0,152,200,0.28);
  opacity: 0; transform: scale(0.12);
  filter: drop-shadow(0 0 40px rgba(0,152,200,1))
          drop-shadow(0 0 80px rgba(0,152,200,0.5)) brightness(1.15);
  transition: opacity 0.55s ease,
              transform 0.85s cubic-bezier(0.34,1.56,0.64,1),
              filter 0.6s;
  position: relative; z-index: 3;
}
.intro-logo-img.on { opacity: 1; transform: scale(1); }
.intro-titles {
  position: absolute;
  top: calc(50% + 108px); left: 0; right: 0;
  text-align: center; z-index: 3;
  pointer-events: none; padding: 0 16px;
}
.intro-main-title {
  font-family: var(--font-mono);
  font-size: clamp(0.9rem, 3vw, 1.9rem);
  font-weight: 700; color: #fff;
  letter-spacing: 0.3em; text-transform: uppercase;
  line-height: 1; white-space: nowrap;
}
.ichar {
  display: inline-block; opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.28s ease, transform 0.44s cubic-bezier(0.34,1.56,0.64,1);
}
.intro-sub-title {
  font-family: var(--font-mono);
  font-size: clamp(0.58rem, 1.2vw, 0.84rem);
  font-weight: 400; color: var(--accent);
  letter-spacing: 0.55em; text-transform: uppercase;
  opacity: 0; margin-top: 12px;
  transition: opacity 0.8s ease;
}
.intro-line {
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--accent) 25%, #00e5ff 50%, var(--accent) 75%, transparent 100%);
  box-shadow: 0 0 16px rgba(0,152,200,0.95), 0 0 32px rgba(0,152,200,0.4);
  width: 0; margin: 15px auto 0; opacity: 0;
  transition: width 0.85s cubic-bezier(0.16,1,0.3,1), opacity 0.05s;
}
#intro-skip {
  position: fixed; bottom: 26px; right: 26px; z-index: 10000;
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(0,152,200,0.35);
  color: rgba(255,255,255,0.5); padding: 8px 20px;
  font-family: var(--font-mono);
  font-size: 0.72rem; letter-spacing: 0.07em;
  cursor: pointer; opacity: 0;
  transition: opacity 0.5s, background 0.2s, color 0.2s;
  backdrop-filter: blur(10px);
}
#intro-skip:hover { background: rgba(0,152,200,0.22); color: #fff; border-color: rgba(0,152,200,0.7); }
#intro-skip.vis   { opacity: 1; }
@keyframes introExit {
  0%   { transform: scaleY(1)     scaleX(1);    opacity: 1;   filter: brightness(1); }
  18%  { transform: scaleY(1)     scaleX(1);    opacity: 1;   filter: brightness(4.5) saturate(2); }
  55%  { transform: scaleY(0.05)  scaleX(1.08); opacity: 1;   filter: brightness(7) blur(1px); }
  80%  { transform: scaleY(0.012) scaleX(1.14); opacity: 0.9; filter: brightness(10) blur(3px); }
  100% { transform: scaleY(0)     scaleX(1.18); opacity: 0;   filter: brightness(14) blur(6px); }
}
.intro-exiting {
  animation: introExit 0.7s cubic-bezier(0.4,0,0.2,1) forwards;
  pointer-events: none;
}

/* ── LOGIN SPLIT SCREEN ────────────────────────────────── */

#login-screen {
  position: relative; z-index: 10;
  min-height: 100vh; display: flex;
}

/* Linker paneel */
.login-left {
  flex: 0 0 60%;
  background: var(--bg);
  position: relative; overflow: hidden;
  display: flex; flex-direction: column;
  justify-content: flex-end;
  padding: 40px;
  border-right: 1px solid var(--border);
}
#login-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}
.login-stats {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; gap: 14px;
  margin-bottom: 28px;
}
.stat-row {
  display: flex; align-items: center; gap: 12px;
}
.stat-dot {
  width: 6px; height: 6px; border-radius: 50%;
  flex-shrink: 0;
  animation: statPulse 2.5s ease-in-out infinite;
}
.accent-dot { background: var(--accent); box-shadow: 0 0 8px rgba(0,152,200,0.8); }
.green-dot  { background: var(--green);  box-shadow: 0 0 8px rgba(34,197,94,0.8); }
.muted-dot  { background: var(--muted);  box-shadow: 0 0 6px rgba(74,122,150,0.5); animation-delay: 1.2s; }
@keyframes statPulse {
  0%,100% { opacity: 1; }
  50%      { opacity: 0.35; }
}
.stat-label {
  font-family: var(--font-mono);
  font-size: 0.6rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.15em;
  color: var(--muted); min-width: 155px;
}
.stat-value {
  font-family: var(--font-mono);
  font-size: 0.82rem; font-weight: 700; letter-spacing: 0.05em;
}
.stat-value.accent { color: var(--accent); }
.stat-value.green  { color: var(--green);  }
.stat-value.muted  { color: var(--muted);  }
.login-left-footer {
  position: relative; z-index: 2;
  font-family: var(--font-mono);
  font-size: 0.6rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted);
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

/* Rechter paneel */
.login-right {
  flex: 0 0 40%;
  background: var(--bg-panel);
  display: flex; flex-direction: column;
  padding: 36px 48px;
}
.login-right-top { padding-bottom: 8px; }
.login-logo-small {
  height: 80px; width: auto; display: block;
  /* lichte achtergrond zodat het logo leesbaar is */
  background: rgba(255,255,255,0.04);
  padding: 10px 20px;
  border: 1px solid var(--border);
}
.login-form-area {
  flex: 1; display: flex; flex-direction: column;
  justify-content: center; padding: 24px 0 32px;
}
.login-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.62rem; font-weight: 700;
  letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 14px;
}
.login-title {
  font-family: var(--font-mono);
  font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 700;
  color: var(--text); letter-spacing: 0.03em;
  line-height: 1.05; margin-bottom: 12px;
}
.login-sub {
  font-size: 0.82rem; color: var(--muted);
  margin-bottom: 36px; line-height: 1.55;
}

/* Form velden */
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.6rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.15em;
  color: var(--muted); margin-bottom: 7px;
}
.form-group input {
  width: 100%; padding: 12px 14px;
  background: rgba(7,21,32,0.9);
  border: 1px solid var(--border); border-radius: 0;
  font-family: var(--font-body); font-size: 0.88rem;
  color: var(--text); outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group input::placeholder { color: var(--muted); opacity: 0.5; }
.form-group input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(0,152,200,0.1);
}

/* Lockout */
.lockout-banner {
  display: none; align-items: center; gap: 10px;
  background: rgba(239,68,68,0.07);
  border: 1px solid rgba(239,68,68,0.22);
  padding: 10px 13px; margin-bottom: 14px;
  font-size: 0.76rem; color: #fca5a5; line-height: 1.4;
}
.lockout-banner.show { display: flex; }
.lockout-icon svg { width: 15px; height: 15px; flex-shrink: 0; color: #f87171; }
#lockout-timer { font-family: var(--font-mono); font-weight: 700; font-variant-numeric: tabular-nums; }

/* Pogingen */
.attempt-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 12px;
}
.attempt-dots { display: flex; gap: 6px; align-items: center; }
.attempt-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: rgba(0,152,200,0.12); border: 1px solid rgba(0,152,200,0.35);
  transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.attempt-dot.used {
  background: rgba(239,68,68,0.65); border-color: rgba(239,68,68,0.8);
  box-shadow: 0 0 6px rgba(239,68,68,0.45);
}
.attempt-label {
  font-family: var(--font-mono); font-size: 0.58rem;
  color: var(--muted); letter-spacing: 0.08em;
}

/* Login knop */
.login-btn {
  width: 100%; padding: 13px;
  background: var(--accent); color: #fff;
  border: none; border-radius: 0;
  font-family: var(--font-mono); font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  cursor: pointer; margin-top: 6px;
  transition: background 0.2s, box-shadow 0.2s;
}
.login-btn:hover:not(:disabled) { background: #00aadc; box-shadow: 0 0 24px rgba(0,152,200,0.35); }
.login-btn:disabled { opacity: 0.4; cursor: default; }

/* Foutmelding */
.login-error {
  margin-top: 10px; padding: 9px 13px;
  background: rgba(239,68,68,0.07); color: #fca5a5;
  border: 1px solid rgba(239,68,68,0.2);
  font-size: 0.76rem; display: none;
}
.login-error.visible { display: block; }

/* Wachtwoord vergeten */
.forgot-link {
  display: block; text-align: center; margin-top: 20px;
  font-family: var(--font-mono); font-size: 0.68rem;
  letter-spacing: 0.06em; color: var(--muted);
  text-decoration: none; transition: color 0.2s;
}
.forgot-link:hover { color: var(--accent); }

/* ── WACHTWOORD VERGETEN MODAL ─────────────────────────── */

#forgot-modal {
  display: none; position: fixed; inset: 0; z-index: 8000;
  align-items: center; justify-content: center; padding: 24px;
  background: rgba(0,0,0,0.75); backdrop-filter: blur(6px);
}
#forgot-modal.open { display: flex; }
.forgot-card {
  background: var(--bg-panel); border: 1px solid var(--border);
  border-top: 2px solid var(--accent);
  padding: 38px 40px 32px; width: 100%; max-width: 420px;
  position: relative;
}
.forgot-close {
  position: absolute; top: 12px; right: 14px;
  background: none; border: none; color: var(--muted);
  font-size: 1.4rem; cursor: pointer; padding: 4px 8px; line-height: 1;
  transition: color 0.2s;
}
.forgot-close:hover { color: var(--text); }
.forgot-title {
  font-family: var(--font-mono); font-size: 1.05rem; font-weight: 700;
  color: var(--text); letter-spacing: 0.03em; margin-bottom: 8px;
}
.forgot-sub { font-size: 0.8rem; color: var(--muted); line-height: 1.55; margin-bottom: 22px; }
.forgot-send-btn {
  width: 100%; padding: 12px; margin-top: 14px;
  background: var(--accent); color: #fff;
  border: none; border-radius: 0;
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.15em; text-transform: uppercase;
  cursor: pointer; transition: background 0.2s, box-shadow 0.2s, opacity 0.2s;
}
.forgot-send-btn:hover:not(:disabled) { background: #00aadc; box-shadow: 0 0 20px rgba(0,152,200,0.3); }
.forgot-send-btn:disabled { opacity: 0.45; cursor: default; }
.forgot-msg { font-size: 0.78rem; margin-top: 12px; padding: 10px 13px; display: none; }
.forgot-msg.success { display: block; background: rgba(34,197,94,0.07); color: #86efac; border: 1px solid rgba(34,197,94,0.18); }
.forgot-msg.error   { display: block; background: rgba(239,68,68,0.07);  color: #fca5a5; border: 1px solid rgba(239,68,68,0.18); }
.emailjs-note {
  margin-top: 14px; padding: 10px 13px;
  background: rgba(0,152,200,0.04); border: 1px solid rgba(0,152,200,0.14);
  font-size: 0.68rem; color: var(--muted); line-height: 1.55;
}
.emailjs-note strong { color: var(--accent); }
.emailjs-note a { color: var(--accent); text-decoration: none; }
.emailjs-note a:hover { color: #00aadc; }

/* ── APP ───────────────────────────────────────────────── */

#app { display: none; min-height: 100vh; flex-direction: column; }
#app.visible { display: flex; }

/* Topbar */
.app-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--bg); border-bottom: 1px solid var(--accent);
  padding: 0 40px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  height: 52px; flex-shrink: 0;
}
.header-left  { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.header-logo  { height: 40px; width: auto; display: block; }
.header-divider { width: 1px; height: 24px; background: var(--border); }
.header-label {
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.2em; color: var(--text);
}
.header-center { flex: 1; text-align: center; }
.header-user-name {
  font-family: var(--font-mono); font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--text);
}
.header-user-role {
  font-family: var(--font-mono); font-size: 0.56rem;
  color: var(--muted); letter-spacing: 0.08em; margin-top: 2px;
}
.header-right { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.header-clock-wrap { text-align: right; }
.header-time {
  font-family: var(--font-mono); font-size: 0.8rem; font-weight: 700;
  color: var(--text); letter-spacing: 0.08em; font-variant-numeric: tabular-nums;
}
.header-date {
  font-family: var(--font-mono); font-size: 0.56rem;
  color: var(--muted); letter-spacing: 0.06em; margin-top: 2px;
}
.logout-btn {
  background: transparent; border: 1px solid var(--border);
  color: var(--muted); padding: 6px 14px;
  font-family: var(--font-mono); font-size: 0.6rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  cursor: pointer; transition: border-color 0.2s, color 0.2s;
}
.logout-btn:hover { border-color: rgba(239,68,68,0.35); color: #fca5a5; }

/* Main */
.app-main {
  flex: 1; padding: 52px 56px 48px;
  max-width: 1400px; margin: 0 auto; width: 100%;
}

/* Hero */
.hero-section { margin-bottom: 60px; }
.hero-eyebrow {
  font-family: var(--font-mono); font-size: 0.65rem; font-weight: 700;
  letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 14px;
  display: flex; align-items: center; gap: 12px;
}
.hero-eyebrow::before {
  content: ''; display: inline-block;
  width: 24px; height: 1px; background: var(--accent);
}
.hero-name {
  font-family: var(--font-body); font-size: 3rem; font-weight: 700;
  color: var(--text); letter-spacing: -0.02em;
  line-height: 1.05; margin-bottom: 14px;
}
.hero-sub {
  font-family: var(--font-mono); font-size: 0.72rem;
  color: var(--muted); letter-spacing: 0.12em; text-transform: uppercase;
}

/* Sectie-headers */
.section-header {
  display: flex; align-items: center; gap: 16px; margin-bottom: 22px;
}
.section-title {
  font-family: var(--font-mono); font-size: 0.62rem; font-weight: 700;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--muted); white-space: nowrap;
}
.section-line { flex: 1; height: 1px; background: var(--border); }
.section-count {
  font-family: var(--font-mono); font-size: 0.6rem; font-weight: 700;
  background: rgba(0,152,200,0.08); color: var(--accent);
  border: 1px solid rgba(0,152,200,0.18);
  padding: 3px 12px; letter-spacing: 0.08em;
}

/* Kaarten */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px; margin-bottom: 52px;
}
.tool-card {
  background: var(--bg-panel); border: 1px solid var(--border);
  border-radius: 0; padding: 32px 28px;
  display: flex; flex-direction: column;
  text-decoration: none; color: inherit;
  cursor: pointer; position: relative; overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.tool-card::after {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.22s ease;
}
.tool-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(0,152,200,0.08),
              0 12px 36px rgba(0,0,0,0.32),
              0 0 24px rgba(0,152,200,0.08);
}
.tool-card:hover::after { transform: scaleX(1); }
.card-icon-wrap {
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border);
  background: rgba(0,152,200,0.05); color: var(--accent);
  margin-bottom: 20px; flex-shrink: 0;
}
.card-icon-wrap svg { width: 24px; height: 24px; }
.card-icon-photo { padding: 0; overflow: hidden; border-color: var(--accent); }
.card-icon-photo img { width: 52px; height: 52px; object-fit: cover; display: block; }
.card-name  { font-weight: 600; font-size: 1.05rem; color: var(--text); margin-bottom: 8px; line-height: 1.3; }
.card-desc  { font-size: 0.84rem; color: var(--muted); line-height: 1.65; flex: 1; }
.card-footer {
  display: flex; align-items: center;
  margin-top: 22px; padding-top: 16px;
  border-top: 1px solid var(--border);
}
.card-tag {
  font-family: var(--font-mono); font-size: 0.58rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted);
}
.admin-badge {
  position: absolute; top: 14px; right: 14px;
  background: rgba(0,152,200,0.07); border: 1px solid rgba(0,152,200,0.22);
  color: var(--accent); padding: 3px 9px;
  font-family: var(--font-mono); font-size: 0.55rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em;
}

/* Made with love */
.made-with-love {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 28px 0 36px;
  opacity: 0.45;
  transition: opacity 0.2s;
}
.made-with-love:hover { opacity: 0.8; }
.mwl-photo {
  width: 28px; height: 28px; border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
  filter: grayscale(30%);
}
.mwl-text {
  font-family: var(--font-mono); font-size: 0.6rem;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted);
}
.mwl-heart { color: #e05; font-size: 0.7rem; }

/* Status footer */
.app-footer {
  background: var(--bg); border-top: 1px solid var(--border);
  height: 32px; padding: 0 40px;
  display: flex; align-items: center;
  font-family: var(--font-mono); font-size: 0.58rem;
  color: var(--muted); letter-spacing: 0.07em; flex-shrink: 0;
}
.footer-left   { display: flex; align-items: center; gap: 8px; }
.footer-center { flex: 1; text-align: center; color: rgba(74,122,150,0.55); }
.footer-right  { color: rgba(74,122,150,0.45); }
.pulse-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 6px rgba(34,197,94,0.7);
  flex-shrink: 0; animation: footerPulse 2.5s ease-in-out infinite;
}
@keyframes footerPulse {
  0%,100% { opacity: 1;   box-shadow: 0 0 6px rgba(34,197,94,0.7); }
  50%      { opacity: 0.5; box-shadow: 0 0 3px rgba(34,197,94,0.2); }
}
.footer-sep { width: 1px; height: 12px; background: var(--border); margin: 0 20px; }

/* Responsive */
@media (max-width: 900px) {
  .login-left    { display: none; }
  .login-right   { flex: 0 0 100%; }
  .app-header    { padding: 0 20px; }
  .app-main      { padding: 28px 20px 32px; }
  .app-footer    { padding: 0 16px; }
  .header-center { display: none; }
  .hero-name     { font-size: 2rem; }
  .card-grid     { grid-template-columns: 1fr; }
}
