/* ==========================================================================
   Thema's: blue (standaard, uit style.css), studio (licht slate)
   Keuze staat op <html data-theme="..."> en in localStorage ('ithd-theme').
   ========================================================================== */

/* ---------- wisselaar ---------- */
.theme-switch {
  display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
}
.theme-opt {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px;
  border: 0; border-radius: 999px; background: none; cursor: pointer;
  color: var(--muted); font-size: 14px; font-weight: 700; line-height: 1;
  transition: background .15s, color .15s;
}
.theme-opt:hover { color: var(--text); }
.theme-opt[aria-checked="true"] { background: var(--surface-3); color: var(--text); }
.theme-opt:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.swatch { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.theme-opt[data-theme-set="blue"] .swatch   { background: linear-gradient(135deg, #1d4ed8, #3b82f6); }
.theme-opt[data-theme-set="studio"] .swatch { background: linear-gradient(135deg, #e2e8f0, #475569); box-shadow: inset 0 0 0 1px rgba(0,0,0,.18); }

/* taalknop volgt het thema */
html:not([data-lang="en"]) .lang-opt[data-l="nl"],
html[data-lang="en"] .lang-opt[data-l="en"] { background: var(--accent); color: var(--accent-ink); }

.topbar-actions { flex-wrap: nowrap; }
a.menu-item { color: inherit; text-decoration: none; }
@media (max-width: 820px) {
  .theme-name { display: none; }
  .theme-opt { padding: 7px; }
}
@media (max-width: 520px) {
  .topbar-actions { gap: 6px; }
  .lang-opt { padding: 6px 8px; }
}

/* ==========================================================================
   Studio - strak, minimalistisch, licht grijs/slate
   ========================================================================== */
html[data-theme="studio"] {
  color-scheme: light;
  --bg: #f1f5f9;
  --bg-2: #e9eef4;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #e2e8f0;
  --line: #d5dde7;
  --line-soft: #e5eaf1;
  --text: #0f172a;
  --text-soft: #334155;
  --muted: #64748b;
  --accent: #334155;
  --accent-2: #1e293b;
  --accent-ink: #ffffff;
  --accent-soft: rgba(51, 65, 85, .07);
  --accent-line: rgba(51, 65, 85, .30);
  --grad: linear-gradient(135deg, #0f172a 0%, #334155 60%, #475569 100%);
  --ok: #15803d;
  --danger: #b91c1c;
  --shadow-sm: 0 1px 2px rgba(15,23,42,.06);
  --shadow-md: 0 4px 14px rgba(15,23,42,.06);
  --shadow-lg: 0 14px 40px rgba(15,23,42,.08), 0 2px 6px rgba(15,23,42,.04);
}
html[data-theme="studio"] .bg-glow { background: var(--bg); }
html[data-theme="studio"] .bg-grid {
  background-image:
    linear-gradient(rgba(15,23,42,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15,23,42,.035) 1px, transparent 1px);
}
html[data-theme="studio"] .topbar { background: rgba(248,250,252,.86); }
html[data-theme="studio"] .login-card,
html[data-theme="studio"] .chat,
html[data-theme="studio"] .card { background: var(--surface); }
html[data-theme="studio"] .login-card::before { display: none; }
html[data-theme="studio"] .login-visual { background: var(--bg-2); }
html[data-theme="studio"] .chat-head { background: var(--surface-2); }
html[data-theme="studio"] .summary { background: var(--surface-2); }
html[data-theme="studio"] .brand-mark,
html[data-theme="studio"] .btn-primary,
html[data-theme="studio"] .btn-primary:hover,
html[data-theme="studio"] .btn-send,
html[data-theme="studio"] .pip.on,
html[data-theme="studio"] .steps li.is-active .num { box-shadow: none; }
html[data-theme="studio"] .btn-google { border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
html[data-theme="studio"] .btn-google:hover { box-shadow: var(--shadow-md); }
html[data-theme="studio"] .composer:focus-within { box-shadow: 0 0 0 3px rgba(51,65,85,.10); }
html[data-theme="studio"] .alert,
html[data-theme="studio"] .msg.error .bubble { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
html[data-theme="studio"] .eyebrow .dot,
html[data-theme="studio"] .status::before { box-shadow: none; }
html[data-theme="studio"] .theme-opt[aria-checked="true"] { background: var(--accent); color: var(--accent-ink); }


/* ==========================================================================
   Knop "Open Admin Dashboard" op de hoofdpagina (alleen zichtbaar voor beheerders)
   ========================================================================== */
.admin-cta {
  display: inline-flex; align-items: center; gap: 16px; max-width: 100%;
  margin: -8px 0 28px; padding: 16px 22px 16px 16px; border-radius: 18px;
  background: var(--grad); color: var(--accent-ink); text-decoration: none;
  box-shadow: 0 10px 30px color-mix(in srgb, var(--accent) 35%, transparent);
  transition: transform .12s, box-shadow .15s, filter .15s;
}
.admin-cta:hover { transform: translateY(-2px); filter: brightness(1.06); box-shadow: 0 14px 36px color-mix(in srgb, var(--accent) 45%, transparent); }
.admin-cta:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 3px; }
.admin-cta-icon {
  flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px;
  background: color-mix(in srgb, var(--accent-ink) 14%, transparent);
}
.admin-cta svg { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.admin-cta-icon svg { width: 26px; height: 26px; }
.admin-cta-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.admin-cta-text strong { font-size: 21px; font-weight: 800; letter-spacing: -.01em; line-height: 1.2; }
.admin-cta-text small { font-size: 14.5px; font-weight: 600; opacity: .82; }
.admin-cta-arrow { flex: none; width: 24px; height: 24px; margin-left: 6px; transition: transform .15s; }
.admin-cta:hover .admin-cta-arrow { transform: translateX(3px); }
@media (max-width: 520px) {
  .admin-cta { display: flex; gap: 12px; padding: 14px; }
  .admin-cta-text strong { font-size: 18px; }
  .admin-cta-icon { width: 40px; height: 40px; }
}

/* ==========================================================================
   Loginpagina: inloggen met e-mail + wachtwoord (naast Google)
   ========================================================================== */
.local-login { display: flex; flex-direction: column; gap: 14px; width: min(420px, 100%); margin: 0; }
.ll-field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 700; color: var(--text-soft); }
.ll-field input {
  box-sizing: border-box; width: 100%; height: 48px; padding: 0 14px; border-radius: 12px;
  font: inherit; font-size: 16px; font-weight: 500; color: var(--text);
  background: var(--bg-2); border: 1px solid var(--line); outline: 0;
  transition: border-color .15s, box-shadow .15s;
}
.ll-field input::placeholder { color: var(--muted); }
.ll-field input:focus { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }
.ll-submit { width: 100%; height: 48px; margin-top: 4px; font-size: 16px; }
.ll-divider {
  display: flex; align-items: center; gap: 12px; width: min(420px, 100%); margin: 20px 0;
  color: var(--muted); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
}
.ll-divider::before, .ll-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.local-login ~ .btn-google { width: min(420px, 100%); justify-content: center; box-sizing: border-box; }
.login-copy .alert { width: min(420px, 100%); box-sizing: border-box; }
