/* ══════════════════════════════════════════════
   INNERLAB — design system
   Licht "Graphite"-thema — overgenomen uit de
   Claude Design-homepage (fris, licht, oranje accent).
   Playfair Display / DM Sans / Space Mono

   LET OP: de variabelenamen zijn historisch
   (--cream = tekstkleur, --bg = achtergrond). De
   NAMEN bleven gelijk zodat niets in de JS breekt;
   alleen de WAARDEN zijn nu licht. Houd deze tokens
   in sync met de homepage (public/index.html).
   ══════════════════════════════════════════════ */

:root {
  --bg: #FBFCFD;          /* pagina-achtergrond (licht) */
  --bg-2: #FFFFFF;        /* panelen, kaarten, sidebar, invoervelden */
  --bg-3: #EEF0F3;        /* hover / subtiele vlakken */
  --cream: #101216;       /* primaire tekst (donkere inkt) */
  --cream-dim: #545963;   /* secundaire tekst */
  --taupe: #7A828D;       /* labels / mono-tekst */
  --brown: #E4E7EC;       /* avatar-achtergrond */
  --orange: #F2691F;
  --orange-soft: rgba(242, 105, 31, .12);
  --line: rgba(16, 18, 22, .12);
  --ok: #2E9E6A;
  --warn: #C67C12;
  --err: #D23B3B;
  --radius: 10px;
  --font-serif: 'Playfair Display', serif;
  --font-sans: 'DM Sans', system-ui, sans-serif;
  --font-mono: 'Space Mono', monospace;
}

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

html, body {
  background: var(--bg);
  color: var(--cream);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  min-height: 100%;
}

h1, h2, h3 { font-family: var(--font-serif); font-weight: 700; line-height: 1.15; }
h1 { font-size: clamp(1.9rem, 4vw, 3rem); letter-spacing: .5px; }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.1rem; }

.mono-label {
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--taupe);
}

a { color: var(--orange); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── schermen ── */
.screen { display: none; }
.screen.active { display: block; }

/* ── knoppen ── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-sans); font-weight: 600; font-size: .88rem;
  padding: 12px 26px; border-radius: 999px; border: none; cursor: pointer;
  transition: all .18s ease;
}
.btn-primary { background: var(--orange); color: var(--bg); }
.btn-primary:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn-ghost {
  background: transparent; color: var(--cream);
  border: 1px solid var(--line);
}
.btn-ghost:hover { border-color: var(--taupe); }
.btn-small { padding: 7px 16px; font-size: .78rem; }
.btn-danger { background: transparent; color: var(--err); border: 1px solid rgba(224,92,92,.4); }
.btn:disabled { opacity: .5; cursor: default; transform: none; }

/* ── formulieren ── */
label { display: block; font-size: .8rem; color: var(--cream-dim); margin: 14px 0 6px; }
input, textarea, select {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--cream);
  font-family: var(--font-sans);
  font-size: .92rem;
  padding: 12px 14px;
  outline: none;
  transition: border-color .15s;
}
input:focus, textarea:focus, select:focus { border-color: var(--orange); }
textarea { resize: vertical; min-height: 90px; }

/* ── kaarten ── */
.card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
}
.card + .card { margin-top: 14px; }

/* ── badges ── */
.badge {
  display: inline-block; font-family: var(--font-mono); font-size: .62rem;
  letter-spacing: .14em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line);
  color: var(--cream-dim);
}
.badge.plan { color: var(--warn); border-color: rgba(224,168,60,.4); }
.badge.done { color: var(--ok); border-color: rgba(76,175,125,.4); }
.badge.open { color: var(--orange); border-color: rgba(242,105,31,.4); }

/* ── layout app ── */
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 250px; flex-shrink: 0;
  background: var(--bg-2);
  border-right: 1px solid var(--line);
  padding: 26px 18px;
  display: flex; flex-direction: column; gap: 4px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar .brand { margin-bottom: 26px; }
.brand-name { font-family: var(--font-serif); font-size: 1.3rem; font-weight: 700; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 8px; cursor: pointer;
  color: var(--cream-dim); font-size: .88rem; border: none; background: none;
  font-family: var(--font-sans); width: 100%; text-align: left;
}
.nav-item:hover { background: var(--bg-3); color: var(--cream); }
.nav-item.active { background: var(--orange-soft); color: var(--orange); font-weight: 600; }
.nav-section { margin-top: 18px; }

.main { flex: 1; padding: 34px 40px; max-width: 1050px; }

/* ── lijstitems ── */
.list-row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg-2); cursor: pointer; transition: border-color .15s;
  margin-bottom: 10px;
}
.list-row:hover { border-color: var(--taupe); }
.avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--brown); color: var(--cream);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .85rem; flex-shrink: 0;
}

/* ── chat ── */
.chat-box { display: flex; flex-direction: column; height: 60vh; }
.chat-msgs { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 6px 2px; }
.msg { max-width: 75%; padding: 10px 14px; border-radius: 14px; font-size: .88rem; }
.msg.me { align-self: flex-end; background: var(--orange); color: var(--bg); border-bottom-right-radius: 4px; }
.msg.them { align-self: flex-start; background: var(--bg-3); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg .msg-time { display: block; font-size: .62rem; opacity: .6; margin-top: 3px; }
.chat-input-row { display: flex; gap: 10px; margin-top: 12px; }
.chat-input-row input { flex: 1; }

/* ── modals ── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(20,24,30,.45); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; z-index: 100; padding: 20px;
}
.modal {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 16px;
  padding: 28px; width: 100%; max-width: 480px; max-height: 88vh; overflow-y: auto;
}
.modal h3 { margin-bottom: 4px; }
.modal .modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; }

/* ── landing ── */
.landing {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; padding: 30px 20px;
}
.landing .mono-label { margin-bottom: 18px; }
.landing h1 { max-width: 640px; margin-bottom: 14px; }
.landing h1 em { color: var(--orange); font-style: italic; }
.landing p { color: var(--cream-dim); max-width: 460px; margin-bottom: 34px; }
.login-card {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 18px;
  padding: 34px; width: 100%; max-width: 400px; text-align: left;
}

/* ── toast ── */
#toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(80px);
  background: var(--bg-3); border: 1px solid var(--taupe); color: var(--cream);
  padding: 12px 22px; border-radius: 999px; font-size: .85rem;
  transition: transform .25s ease; z-index: 200; max-width: 90vw;
}
#toast.show { transform: translateX(-50%) translateY(0); }

/* ── loading ── */
.loading-wrap {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 16px;
}
.pulse {
  width: 10px; height: 10px; border-radius: 50%; background: var(--orange);
  animation: pulse 1.1s infinite ease-in-out;
}
@keyframes pulse { 0%,100% { opacity: .3; transform: scale(.8);} 50% { opacity: 1; transform: scale(1.4);} }

/* ── video embed ── */
.video-embed { position: relative; padding-top: 56.25%; border-radius: var(--radius); overflow: hidden; margin-top: 10px; }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ── responsief ── */
.menu-btn { display: none; }
@media (max-width: 820px) {
  .app-shell { flex-direction: column; }
  .sidebar {
    position: fixed; z-index: 90; height: 100vh; transform: translateX(-100%);
    transition: transform .22s ease; width: 260px;
  }
  .sidebar.open { transform: translateX(0); box-shadow: 20px 0 60px rgba(0,0,0,.14); }
  .main { padding: 20px 16px; }
  .menu-btn {
    display: inline-flex; position: sticky; top: 12px; z-index: 80;
    margin-bottom: 10px;
  }
  .msg { max-width: 88%; }
}
