:root {
  --bg: #0b0d12;
  --surface: #12151c;
  --surface-2: #1b1f28;
  --border: #2a2f3a;
  --text: #e6e9ef;
  --muted: #9aa3b2;
  --accent: #5b8cff;
  --accent-2: #4ecb8a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: radial-gradient(1200px 600px at 50% -10%, #1a2233, #0b0d12 60%);
  color: var(--text);
  height: 100vh;
}

#app { height: 100vh; display: flex; flex-direction: column; }

.center { height: 100%; display: flex; align-items: center; justify-content: center; }
.muted { color: var(--muted); }

/* Auth-kaart */
.auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.auth-card {
  width: min(440px, 94vw);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}
.brand { text-align: center; margin-bottom: 22px; }
.brand-logo { font-size: 24px; font-weight: 800; letter-spacing: 0.04em; }
.brand-tag { display: block; margin-top: 6px; color: var(--muted); font-size: 14px; }
.auth-card label { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 4px; }
.auth-card input {
  width: 100%; padding: 12px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text); font-size: 15px;
}
.err { color: #ff6b6b; font-size: 13px; min-height: 18px; margin-top: 8px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 16px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text); cursor: pointer; font-size: 14px;
}
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.btn-block { width: 100%; margin-top: 18px; }
.btn:disabled { opacity: 0.5; cursor: default; }

/* App-layout */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 18px; border-bottom: 1px solid var(--border); background: var(--surface);
}
.topbar .who { font-weight: 600; }
.topbar .who small { color: var(--muted); font-weight: 400; margin-left: 8px; }
.layout { flex: 1; display: flex; min-height: 0; }
.sidebar { width: 280px; border-right: 1px solid var(--border); overflow-y: auto; background: var(--surface); }
.sidebar h4 { margin: 0; padding: 14px 16px 8px; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; }
.conv-item { padding: 12px 16px; cursor: pointer; border-bottom: 1px solid var(--border); }
.conv-item:hover { background: var(--surface-2); }
.conv-item.active { background: var(--surface-2); border-left: 3px solid var(--accent); }
.conv-item .title { font-weight: 600; font-size: 14px; }
.conv-item .sub { color: var(--muted); font-size: 12px; margin-top: 2px; }

.chat { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.messages { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 14px; }

/* Auteur-uitlijning: host links, gast (jij) rechts, AI SODA in het midden.
   Het icoon staat vóór de ballon. */
.msg-row { display: flex; gap: 8px; align-items: flex-start; max-width: 100%; }
.msg-row.row-host { justify-content: flex-start; }
.msg-row.row-guest { justify-content: flex-end; }
.msg-row.row-center { justify-content: center; }
.msg-avatar {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 15px;
  border: 1px solid var(--border); background: var(--surface-2);
}
.bubble {
  max-width: 76%; padding: 10px 14px; border-radius: 14px; line-height: 1.5;
  white-space: pre-wrap; word-wrap: break-word;
  background: var(--surface-2); border: 1px solid var(--border);
}
.bubble .author { font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.bubble-center { background: var(--surface); }

/* Release-log (portal) */
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.btn-ghost { background: transparent; }
.btn-ghost:hover { background: var(--surface-2); }
.release-overlay {
  position: fixed; inset: 0; background: rgba(0, 0, 0, 0.55);
  display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 50;
}
.release-card {
  width: min(560px, 96vw); max-height: 84vh; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  padding: 22px 24px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}
.release-topbar { display: flex; align-items: center; justify-content: space-between; }
.release-topbar h3 { margin: 0; font-size: 18px; }
.release-intro { margin: 6px 0 18px; line-height: 1.5; font-size: 14px; }
.release-entry { padding: 14px 0; border-top: 1px solid var(--border); }
.release-entry:first-of-type { border-top: none; }
.release-head { display: flex; align-items: baseline; gap: 10px; }
.release-version { font-weight: 700; font-size: 15px; }
.release-date { color: var(--muted); font-size: 12px; }
.release-items { margin: 8px 0 0; padding-left: 18px; }
.release-items li { margin: 4px 0; line-height: 1.5; font-size: 14px; color: var(--text); }

.composer { display: flex; gap: 10px; padding: 14px 18px; border-top: 1px solid var(--border); background: var(--surface); }
.composer textarea {
  flex: 1; resize: none; padding: 12px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text); font-size: 15px; font-family: inherit; min-height: 46px; max-height: 160px;
}
.empty { color: var(--muted); text-align: center; margin: auto; }
.pending { color: var(--muted); font-style: italic; align-self: flex-start; }
