/* ithd-theme: blue-v1 */
/* ==========================================================================
   Handpicked IT Helpdesk — donker thema, blauw accent
   ========================================================================== */
:root {
  --bg: #0b0c0f;
  --bg-2: #101217;
  --surface: #15171d;
  --surface-2: #1b1e26;
  --surface-3: #232733;
  --line: #2a2f3a;
  --line-soft: #20242d;
  --text: #f4f2ee;
  --text-soft: #c9c6bf;
  --muted: #8d909a;

  --accent: #2563eb;        /* blauw */
  --accent-2: #60a5fa;      /* lichtblauw */
  --accent-ink: #ffffff;    /* tekst op accent */
  --accent-soft: rgba(37, 99, 235, .12);
  --accent-line: rgba(59, 130, 246, .35);
  --grad: linear-gradient(135deg, #1d4ed8 0%, #2563eb 50%, #3b82f6 100%);

  --ok: #3ddc84;
  --warn: #ffb020;
  --danger: #ff5a4f;

  --r-sm: 10px;
  --r: 16px;
  --r-lg: 24px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow-md: 0 8px 24px rgba(0,0,0,.35), 0 2px 6px rgba(0,0,0,.3);
  --shadow-lg: 0 30px 80px rgba(0,0,0,.55), 0 10px 30px rgba(0,0,0,.35);
  --maxw: 1440px;
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 18px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--accent-2); }
button, input, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 15.5px; }
.grad {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}

/* ---------- achtergrond ---------- */
.bg-glow {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(900px 520px at 85% -10%, rgba(37, 99, 235,.20), transparent 60%),
    radial-gradient(700px 480px at -10% 110%, rgba(96, 165, 250,.10), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
}
.bg-grid {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 75%);
}

/* ---------- topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px clamp(16px, 3vw, 40px);
  background: rgba(11,12,15,.72);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
.brand-mark {
  width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center;
  background: var(--grad); box-shadow: 0 6px 20px rgba(37, 99, 235,.35);
}
.brand-mark svg { width: 22px; height: 22px; fill: none; stroke: var(--accent-ink); stroke-width: 3.4; stroke-linecap: round; }
.brand-text { font-size: 18px; letter-spacing: .01em; color: var(--text-soft); }
.brand-text strong { color: var(--text); font-weight: 800; }

/* ---------- profiel-dropdown ---------- */
.profile { position: relative; }
.profile-btn {
  display: flex; align-items: center; gap: 10px;
  padding: 5px 12px 5px 5px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); cursor: pointer;
  transition: border-color .15s, background .15s;
}
.profile-btn:hover, .profile-btn[aria-expanded="true"] { border-color: var(--accent-line); background: var(--surface-2); }
.avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; display: block; }
.avatar-fallback {
  display: grid; place-items: center; font-weight: 800; font-size: 17px;
  background: var(--grad); color: var(--accent-ink);
}
.profile-name { font-weight: 600; font-size: 17px; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chev { width: 16px; height: 16px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; transition: transform .2s; }
.profile-btn[aria-expanded="true"] .chev { transform: rotate(180deg); }
.profile-menu {
  position: absolute; right: 0; top: calc(100% + 10px); min-width: 260px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--shadow-lg); padding: 6px; animation: pop .16s ease-out;
}
.profile-head { padding: 12px 12px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.profile-head strong { display: block; }
.profile-head span { color: var(--muted); font-size: 15.5px; word-break: break-all; }
.menu-item {
  width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--r-sm); border: 0; background: none; cursor: pointer; text-align: left;
}
.menu-item:hover { background: var(--accent-soft); color: var(--accent-2); }
.menu-item svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }

/* ---------- knoppen ---------- */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border: 0; border-radius: 12px; cursor: pointer;
  background: var(--grad); color: var(--accent-ink); font-weight: 800;
  box-shadow: 0 8px 24px rgba(37, 99, 235,.28);
  transition: transform .12s, box-shadow .15s, filter .15s;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 30px rgba(37, 99, 235,.38); }
.btn-primary:disabled { filter: grayscale(.6) brightness(.7); cursor: progress; transform: none; }
.btn-ghost {
  padding: 11px 16px; border-radius: 12px; cursor: pointer; font-weight: 600;
  background: transparent; border: 1px solid var(--line); color: var(--text-soft);
  transition: border-color .15s, color .15s;
}
.btn-ghost:hover { border-color: var(--accent-line); color: var(--accent-2); }

/* ==========================================================================
   Loginpagina
   ========================================================================== */
.login-wrap { min-height: calc(100vh - 66px); display: grid; place-items: center; padding: 32px 16px; }
.login-card {
  width: min(1180px, 100%); min-height: min(640px, 76vh);
  display: grid; grid-template-columns: 1.05fr 1fr; overflow: hidden;
  background: linear-gradient(180deg, rgba(27,30,38,.92), rgba(21,23,29,.92));
  border: 1px solid var(--line); border-radius: 28px; box-shadow: var(--shadow-lg);
  position: relative;
}
.login-card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(600px 300px at 0% 0%, rgba(37, 99, 235,.10), transparent 70%);
}
.login-copy { padding: clamp(32px, 5vw, 64px); display: flex; flex-direction: column; justify-content: center; position: relative; }
.eyebrow {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px; font-size: 14.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  background: var(--accent-soft); border: 1px solid var(--accent-line); color: var(--accent-2);
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 10px var(--accent-2); }
.login-copy h1 { font-size: clamp(32px, 4.2vw, 52px); line-height: 1.08; letter-spacing: -.025em; margin: 20px 0 16px; font-weight: 800; }
.lead { color: var(--text-soft); font-size: 20.5px; max-width: 56ch; margin: 0 0 28px; }
.btn-google {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 12px;
  padding: 14px 26px 14px 18px; border-radius: 14px; text-decoration: none;
  background: #fff; color: #1f1f1f; font-weight: 700; font-size: 19px;
  box-shadow: 0 10px 30px rgba(0,0,0,.35); transition: transform .12s, box-shadow .15s;
}
.btn-google:hover { transform: translateY(-1px); box-shadow: 0 14px 36px rgba(37, 99, 235,.25); }
.btn-google svg { width: 22px; height: 22px; }
.fine { color: var(--muted); font-size: 15.5px; margin-top: 16px; }
.alert {
  margin: 0 0 20px; padding: 12px 16px; border-radius: 12px;
  background: rgba(255,90,79,.1); border: 1px solid rgba(255,90,79,.4); color: #ffb4ae;
}
.login-visual {
  position: relative; display: grid; place-items: center; padding: 40px;
  background:
    radial-gradient(420px 300px at 70% 30%, rgba(59, 130, 246,.18), transparent 70%),
    var(--bg-2);
  border-left: 1px solid var(--line);
}
.mock-chat { width: min(420px, 100%); display: flex; flex-direction: column; gap: 12px; }
.mock-msg {
  max-width: 85%; padding: 12px 16px; border-radius: 16px; font-size: 17px; line-height: 1.5;
  opacity: 0; animation: rise .5s ease-out forwards;
}
.mock-msg.user { align-self: flex-end; background: var(--grad); color: var(--accent-ink); font-weight: 600; border-bottom-right-radius: 6px; }
.mock-msg.bot { align-self: flex-start; background: var(--surface-2); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.mock-msg:nth-child(1) { animation-delay: .2s; }
.mock-msg:nth-child(2) { animation-delay: .9s; }
.mock-msg:nth-child(3) { animation-delay: 1.6s; }
.mock-msg:nth-child(4) { animation-delay: 2.3s; }
.mock-step { display: block; font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 2px; }
.mock-typing { align-self: flex-start; opacity: 0; animation: rise .4s 3s ease-out forwards; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ==========================================================================
   App
   ========================================================================== */
.workspace { width: min(var(--maxw), 100%); margin: 0 auto; padding: clamp(20px, 3vw, 40px) clamp(16px, 3vw, 40px) 48px; }
.hero h1 { font-size: clamp(28px, 3.4vw, 44px); letter-spacing: -.025em; line-height: 1.1; margin: 8px 0 10px; font-weight: 800; }
.hero .lead { margin-bottom: 28px; }

.layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }

/* ---------- chatvenster ---------- */
.chat {
  display: flex; flex-direction: column;
  height: min(78vh, 860px); min-height: 560px;
  background: linear-gradient(180deg, rgba(27,30,38,.94), rgba(21,23,29,.94));
  border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg); overflow: hidden;
}
.chat-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 22px; border-bottom: 1px solid var(--line); background: rgba(16,18,23,.6);
}
.chat-title { display: flex; align-items: center; gap: 12px; }
.chat-title strong { display: block; font-size: 18px; }
.status { font-size: 15px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.chat.is-busy .status::before { background: var(--accent-2); box-shadow: 0 0 8px var(--accent-2); animation: blink 1s infinite; }
.bot-badge {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: var(--accent-soft); border: 1px solid var(--accent-line);
}
.bot-badge svg { width: 22px; height: 22px; fill: none; stroke: var(--accent-2); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.progress { display: flex; align-items: center; gap: 6px; }
.pip { width: 28px; height: 6px; border-radius: 99px; background: var(--surface-3); transition: background .3s, box-shadow .3s; }
.pip.on { background: var(--grad); box-shadow: 0 0 10px rgba(59, 130, 246,.4); }
.progress-label { margin-left: 8px; font-size: 15px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }

.messages { flex: 1; overflow-y: auto; padding: 26px clamp(16px, 2.4vw, 32px); display: flex; flex-direction: column; gap: 16px; scroll-behavior: smooth; }
.messages::-webkit-scrollbar { width: 10px; }
.messages::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }

.msg { display: flex; animation: rise .3s ease-out; }
.msg.user { justify-content: flex-end; }
.bubble {
  max-width: min(760px, 82%); padding: 14px 18px; border-radius: 18px;
  white-space: pre-wrap; word-wrap: break-word;
}
.bubble p { margin: 0 0 8px; } .bubble p:last-child { margin: 0; }
.msg.bot .bubble { background: var(--surface-2); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.msg.user .bubble { background: var(--grad); color: var(--accent-ink); font-weight: 600; border-bottom-right-radius: 6px; }
.msg.intro .bubble { white-space: normal; max-width: 100%; }
.q-label { display: block; font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 4px; }
.msg.error .bubble { background: rgba(255,90,79,.08); border-color: rgba(255,90,79,.4); color: #ffcfcb; white-space: normal; }
.msg.error .row { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; white-space: normal; }
.chip {
  padding: 8px 14px; border-radius: 999px; cursor: pointer; font-size: 16px; font-weight: 600;
  background: var(--surface); border: 1px solid var(--line); color: var(--text-soft);
  transition: border-color .15s, color .15s, background .15s, transform .1s;
}
.chip:hover { border-color: var(--accent-line); color: var(--accent-2); background: var(--accent-soft); }
.chip:active { transform: scale(.97); }
.chips.is-used .chip { opacity: .45; pointer-events: none; }

.typing { display: inline-flex; gap: 5px; padding: 16px 18px; }
.typing span, .mock-typing span {
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent-2); display: inline-block;
  animation: bounce 1.2s infinite ease-in-out;
}
.mock-typing { display: inline-flex; gap: 5px; padding: 14px 16px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 16px; }
.typing span:nth-child(2), .mock-typing span:nth-child(2) { animation-delay: .15s; }
.typing span:nth-child(3), .mock-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%, 80%, 100% { transform: translateY(0); opacity: .4; } 40% { transform: translateY(-6px); opacity: 1; } }
@keyframes blink { 50% { opacity: .3; } }

/* ---------- composer ---------- */
.composer {
  display: flex; align-items: flex-end; gap: 12px;
  margin: 0 16px; padding: 10px 10px 10px 18px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 18px;
  transition: border-color .15s, box-shadow .15s;
}
.composer:focus-within { border-color: var(--accent-line); box-shadow: 0 0 0 4px rgba(37, 99, 235,.08); }
.composer textarea {
  flex: 1; resize: none; border: 0; outline: 0; background: transparent;
  padding: 10px 0; max-height: 200px; line-height: 1.5; font-size: 18px;
}
.composer textarea::placeholder { color: var(--muted); }
.composer-actions { display: flex; align-items: center; gap: 8px; }
.btn-send {
  width: 46px; height: 46px; border-radius: 14px; border: 0; cursor: pointer; display: grid; place-items: center;
  background: var(--grad); box-shadow: 0 6px 18px rgba(37, 99, 235,.3); transition: transform .12s, filter .15s;
}
.btn-send:hover { transform: translateY(-1px); }
.btn-send:disabled { filter: grayscale(.8) brightness(.6); cursor: not-allowed; transform: none; box-shadow: none; }
.btn-send svg { width: 22px; height: 22px; fill: none; stroke: var(--accent-ink); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.composer-hint { margin: 8px 22px 14px; font-size: 14.5px; color: var(--muted); }
.chat.is-done .composer, .chat.is-done .composer-hint { display: none; }

/* ---------- samenvatting ---------- */
.summary {
  width: 100%; padding: 24px clamp(18px, 2.4vw, 30px); border-radius: 20px;
  background: linear-gradient(180deg, rgba(37, 99, 235,.07), rgba(37, 99, 235,.02)), var(--surface);
  border: 1px solid var(--accent-line); box-shadow: var(--shadow-md);
  animation: rise .35s ease-out; white-space: normal;
}
.summary-top { display: flex; gap: 8px; flex-wrap: wrap; }
.tag { padding: 4px 10px; border-radius: 999px; font-size: 14.5px; font-weight: 700; border: 1px solid var(--line); background: var(--surface-2); }
.tag-urg[data-level="Laag"] { color: var(--ok); border-color: rgba(61,220,132,.4); }
.tag-urg[data-level="Normaal"] { color: var(--accent-2); border-color: var(--accent-line); }
.tag-urg[data-level="Hoog"] { color: var(--accent); border-color: rgba(37, 99, 235,.5); }
.tag-urg[data-level="Kritiek"] { color: var(--danger); border-color: rgba(255,90,79,.5); }
.summary h3 { margin: 14px 0 16px; font-size: 26.5px; letter-spacing: -.01em; line-height: 1.25; }
.summary h4 { margin: 0 0 6px; font-size: 14.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); }
.summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.summary-grid > div, .summary-steps { padding: 16px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line-soft); }
.summary-grid p { margin: 0; color: var(--text-soft); }
.summary-steps { margin-top: 18px; }
.summary-steps ul { margin: 0; padding-left: 18px; color: var(--text-soft); }
.note-label { display: block; margin: 20px 0 8px; font-weight: 600; font-size: 17px; }
.note {
  width: 100%; resize: vertical; padding: 12px 14px; border-radius: 12px;
  background: var(--bg-2); border: 1px solid var(--line); outline: 0;
}
.note:focus { border-color: var(--accent-line); }
.summary-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }

.done {
  width: 100%; text-align: center; padding: 40px 24px; border-radius: 20px;
  background: var(--surface); border: 1px solid rgba(61,220,132,.35); animation: rise .35s ease-out; white-space: normal;
}
.done .check {
  width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(61,220,132,.12); border: 1px solid rgba(61,220,132,.45);
}
.done .check svg { width: 30px; height: 30px; fill: none; stroke: var(--ok); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.done h3 { margin: 0 0 6px; font-size: 26.5px; }
.done p { color: var(--text-soft); margin: 0 0 18px; }

/* ---------- zijpaneel ---------- */
.side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 90px; }
.card { padding: 20px 22px; border-radius: var(--r); background: rgba(21,23,29,.9); border: 1px solid var(--line); }
.card h2 { margin: 0 0 14px; font-size: 15.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.card p { margin: 0 0 10px; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.steps li { display: flex; gap: 12px; align-items: flex-start; opacity: .5; transition: opacity .25s; }
.steps li.is-active, .steps li.is-done { opacity: 1; }
.steps .num {
  flex: none; width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center;
  font-size: 15.5px; font-weight: 800; background: var(--surface-3); color: var(--text-soft); transition: background .25s, color .25s;
}
.steps li.is-active .num { background: var(--grad); color: var(--accent-ink); box-shadow: 0 4px 14px rgba(37, 99, 235,.35); }
.steps li.is-done .num { background: rgba(61,220,132,.15); color: var(--ok); }
.steps strong { display: block; font-size: 17px; }
.steps small { color: var(--muted); font-size: 15px; line-height: 1.45; display: block; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .layout { grid-template-columns: 1fr; }
  .side { position: static; display: grid; grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  .login-card { grid-template-columns: 1fr; }
  .login-visual { display: none; }
  .summary-grid { grid-template-columns: 1fr; }
  .side { grid-template-columns: 1fr; }
  .profile-name { display: none; }
  .progress .pip { width: 16px; }
}
@media (max-width: 520px) {
  .chat { height: calc(100vh - 140px); min-height: 480px; border-radius: 18px; }
  .chat-head { padding: 12px 14px; }
  .bubble { max-width: 92%; }
  .brand-text { display: none; }
  .composer { margin: 0 10px; flex-wrap: wrap; padding: 8px 8px 8px 14px; }
  .composer textarea { flex-basis: 100%; }
  .composer-actions { width: 100%; justify-content: flex-end; }
}

/* ==========================================================================
   Taalknop NL / EN + basisgrootte (toegevoegd door update-theme.ps1)
   ========================================================================== */
body { font-size: 18px; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.lang-toggle {
  display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line);
  font-size: 14px; font-weight: 700; letter-spacing: .04em; line-height: 1;
  transition: border-color .15s;
}
.lang-toggle:hover { border-color: var(--accent-line); }
.lang-toggle:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.lang-opt { padding: 7px 12px; border-radius: 999px; color: var(--muted); transition: background .15s, color .15s; }
html:not([data-lang="en"]) .lang-opt[data-l="nl"],
html[data-lang="en"] .lang-opt[data-l="en"] { background: #2563eb; color: #fff; }