* {
  box-sizing: border-box;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
body {
  margin: 0;
  background: #f3f5f9;
  color: #1f2933;
}
body.light {
  background: #f3f5f9;
  color: #1f2933;
}

body.light .card {
  background: #ffffff;
  border-color: #e1e7f0;
}

body.light .primary-btn {
  background: #1d3557;
  color: #ffffff;
}
body.dark {
  background: #0e1117;
  color: #e6e6e6;
}

/* Fade tussen thema’s */
body {
  transition: background-color 0.4s ease, 
              color 0.4s ease,
              border-color 0.4s ease,
              box-shadow 0.4s ease;
}

.card,
.main-shell,
header.topbar,
main.content,
.table td,
.table th,
input,
textarea,
select,
.primary-btn,
.secondary-btn {
  transition: background-color 0.4s ease,
              color 0.4s ease,
              border-color 0.4s ease,
              box-shadow 0.4s ease;
}



/* ============================
   DARK MODE — Containers & Layout
   ============================ */

body.dark .main-shell {
  background: #161b22;        /* donker neutraal */
  border-color: #2d333b;
  box-shadow: none;
}

body.dark header.topbar {
  background: #161b22;        /* match main-shell */
  border-bottom-color: #2d333b;
}

body.dark main.content {
  background: #161b22;
  color: #e6e6e6;
}

/* ============================
   CARDS
   ============================ */

body.dark .card {
  background: #1f242d;
  border-color: #30363d;
  color: #e6e6e6;
}

/* ============================
   TABLES
   ============================ */

body.dark .table th,
body.dark .table td {
  background: #161b22;
  border-bottom-color: #30363d;
  color: #e6e6e6;
}

/* ============================
   INPUTS
   ============================ */

body.dark input,
body.dark textarea,
body.dark select {
  background: #1f242d;
  color: #e6e6e6;
  border-color: #30363d;
}

body.dark input:focus,
body.dark textarea:focus,
body.dark select:focus {
  border-color: #3ba4ff;
  box-shadow: 0 0 0 1px rgba(59,164,255,.5);
}

/* ============================
   BUTTONS
   ============================ */

body.dark .primary-btn {
  background: #2384ff;
  color: #ffffff;
}

body.dark .secondary-btn {
  background: #2d333b;
  color: #ccd6e0;
}

body.dark .link-btn {
  color: #8fb0ff;
}

/* ============================
   FOOTER
   ============================ */

body.dark .main-footer {
  background: #161b22;
  color: #6c737d;
}



/* ============================
   THEMA 3: CALM MODE
   ============================ */

body.calm {
  background: #dfe7ee; /* heel zacht lichtblauw-grijs */
  color: #2a2f35;
}

body.calm .main-shell {
  background: #eef3f7;
  border-color: #cfd8e0;
}

body.calm header.topbar {
  background: #eef3f7;
  border-bottom-color: #cfd8e0;
}

body.calm main.content {
  background: #eef3f7;
  color: #2a2f35;
}

body.calm .card {
  background: #f7fafc;
  border-color: #d5dee7;
  color: #2a2f35;
}

body.calm .table th,
body.calm .table td {
  background: #eef3f7;
  border-bottom-color: #d5dee7;
  color: #2a2f35;
}

body.calm input,
body.calm textarea,
body.calm select {
  background: #ffffff;
  border-color: #c3cdd7;
  color: #2a2f35;
}

body.calm input:focus,
body.calm textarea:focus,
body.calm select:focus {
  border-color: #8ab3d1;
  box-shadow: 0 0 0 1px rgba(138,179,209,.5);
}

body.calm .primary-btn {
  background: #4c83b6; /* mild blauw */
  color: #ffffff;
}

body.calm .secondary-btn {
  background: #d8e3ed;
  color: #2a2f35;
}

body.calm .link-btn {
  color: #4c83b6;
}

body.calm .main-footer {
  background: #eef3f7;
  color: #66727c;
}






a { color: #1d3557; text-decoration: none; }
.main-shell {
  max-width: 960px;
  margin: 24px auto 40px;
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  overflow: hidden;
}
header.topbar {
  padding: 16px 24px;
  border-bottom: 1px solid #e4e7f2;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { font-weight: 700; letter-spacing: 0.08em; font-size: 13px; text-transform: uppercase; }
.brand span { color: #1d3557; }
nav a { margin-left: 16px; font-size: 14px; }
main.content { padding: 24px 24px 30px; }
h1, h2, h3 { color: #102a43; margin-top: 0; }
h1 { font-size: 26px; }
h2 { font-size: 20px; }
h3 { font-size: 18px; }
p { font-size: 14px; line-height: 1.6; }
.card {
  background: #f8fafc;
  border-radius: 18px;
  padding: 16px 16px 14px;
  border: 1px solid #e1e7f0;
  margin-bottom: 16px;
}
.badge {
  display: inline-flex;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  background: #edf2ff;
  color: #4253b3;
  margin-bottom: 6px;
}
.btn-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}
button,
.primary-btn,
.secondary-btn,
.link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 999px;
  font-size: 14px;
  padding: 8px 18px;
  border: none;
  cursor: pointer;
  text-decoration: none;
}
.primary-btn {
  background: #1d3557;
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(29, 53, 87, 0.32);
}
.primary-btn:hover { filter: brightness(1.05); }
.secondary-btn { background: #e4ebf5; color: #243b53; }
.link-btn { background: transparent; color: #486581; padding: 6px 0; }
input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
  width: 100%;
  border-radius: 999px;
  border: 1px solid #d8e2ec;
  padding: 8px 12px;
  font-size: 14px;
  outline: none;
  background: #ffffff;
}
textarea {
  border-radius: 16px;
  min-height: 80px;
  resize: vertical;
}
input:focus,
textarea:focus,
select:focus {
  border-color: #1d3557;
  box-shadow: 0 0 0 1px rgba(29, 53, 87, 0.15);
}
.input-group { margin-bottom: 12px; }
label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #52606d;
  margin-bottom: 4px;
}
.small-note { font-size: 11px; color: #9fb3c8; }
.alert {
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 14px;
}
.alert.error { background: #ffe3e3; color: #9b1c1c; }
.alert.success { background: #e3f9e5; color: #046c4e; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th,
.table td {
  padding: 8px 6px;
  border-bottom: 1px solid #e1e7f0;
  text-align: left;
}
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  border: 1px solid #d8e2ec;
  background: #ffffff;
}
.status-pill {
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #e3f9e5;
  color: #046c4e;
}


.btn-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.inline-form {
    display: inline-block;
}

.chat-window {
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
    border-radius: 12px;
}
/* ===== CHAT WINDOW ===== */
.chat-window {
    max-height: 70vh;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Elke rij waar een bubbel in zit */
.chat-row {
    display: flex;
    width: 100%;
}

/* Mijn berichten rechts */
.chat-row.me {
    justify-content: flex-end;
}

/* Ander zijn berichten links */
.chat-row.them {
    justify-content: flex-start;
}

/* De chatbubbel zelf */
.bubble {
    max-width: 70%;
    padding: 10px 14px;
    border-radius: 14px;
    position: relative;
    font-size: 15px;
    line-height: 1.4;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Mijn bubbel */
.chat-row.me .bubble {
    background: var(--primary-color, #4c8bf5);
    color: white;
    border-bottom-right-radius: 4px;
}

/* Hun bubbel */
.chat-row.them .bubble {
    background: var(--card-bg, #f1f1f1);
    color: var(--text-color, #333);
    border-bottom-left-radius: 4px;
}

/* Berichttekst */
.message-text {
    white-space: pre-wrap;
}

/* Tijdstip onder bericht */
.timestamp {
    font-size: 11px;
    opacity: 0.7;
    align-self: flex-end;
}

/* Donkere modus styling */
body.dark .chat-row.them .bubble {
    background: #333;
    color: #eee;
}

body.dark .chat-row.me .bubble {
    background: #0059ff;
}

body.dark .timestamp {
    color: #bbb;
}


/* ====== CHAT LIST STYLING ====== */
.omb-chat-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.omb-chat-item {
    display: flex;
    align-items: center;
    background: var(--card-bg, #f8f8f8);
    padding: 12px;
    border-radius: 12px;
    box-shadow: var(--shadow, 0px 2px 6px rgba(0,0,0,0.1));
    position: relative;
}

/* highlight bij ongelezen */
.omb-chat-item.unread {
    border-left: 4px solid var(--primary-color, #4c8bf5);
    background: rgba(76, 139, 245, 0.12);
}

/* Avatar-bolletje */
.omb-avatar {
    width: 42px;
    height: 42px;
    min-width: 42px;
    min-height: 42px;
    border-radius: 50%;
    background: var(--primary-color, #4c8bf5);
    color: white;
    font-weight: bold;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
}

/* Titel + preview */
.omb-chat-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.omb-chat-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.omb-chat-preview {
    font-size: 14px;
    opacity: 0.7;
}

/* Tijd + unread badge + reageerknop */
.omb-chat-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 6px;
    min-width: 80px;
}

/* Tijd */
.omb-chat-time {
    font-size: 12px;
    opacity: 0.6;
}

/* Ongelezen badge */
.omb-badge-unread {
    background: var(--primary-color, #4c8bf5);
    color: white;
    padding: 3px 7px;
    font-size: 12px;
    border-radius: 10px;
}

/* Reageer-knop */
.omb-reageer-btn {
    background: var(--primary-color, #4c8bf5);
    color: white;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 13px;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s;
}

.omb-reageer-btn:hover {
    background: var(--primary-dark, #3a6fd3);
}

/* Donkere modus */
body.dark .omb-chat-item {
    background: #333;
}

body.dark .omb-chat-item.unread {
    background: #3a3f55;
}

body.dark .omb-avatar {
    background: #0059ff;
}

body.dark .omb-chat-title {
    color: #fff;
}

body.dark .omb-chat-preview {
    color: #ccc;
}

body.dark .omb-chat-time {
    color: #bbb;
}

.chat-title-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.chat-icons .icon {
    width: 26px;
    height: 26px;
    fill: var(--primary-color);
    margin-left: 12px;
    cursor: pointer;
    opacity: .8;
    transition: .2s;
}

.chat-icons .icon:hover {
    opacity: 1;
    transform: scale(1.15);
}

.info-panel {
    display: none;
    background: var(--card-bg);
    color: var(--text-color);
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 15px;
    box-shadow: var(--shadow);
    animation: fadeSlide .25s ease;
}

@keyframes fadeSlide {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

body.dark .info-panel {
    background: #2f2f2f;
    color: #ddd;
}

/* Chat bubbles verbeteren */
.chat-row .bubble {
    border-radius: 14px;
    padding: 10px 14px;
    max-width: 80%;
    animation: popIn .25s ease;
}

@keyframes popIn {
    from { opacity: 0; transform: scale(.9); }
    to   { opacity: 1; transform: scale(1); }
}

.me .bubble {
    background: var(--primary-color);
    color: #fff;
}

.them .bubble {
    background: var(--card-bg);
    color: var(--text-color);
}

.chat-input-bar {
    position: sticky;
    bottom: 0;
    background: var(--bg);
    padding: 10px 0;
    border-top: 1px solid rgba(0,0,0,.1);
}

.info-panel {
    display: none;
    background: var(--card-bg);
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 14px;
    padding: 18px;
    margin: 14px 0;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    animation: panelFade .25s ease;
}

@keyframes panelFade {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.info-panel h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 17px;
    font-weight: 600;
    color: var(--primary-color);
}

.info-panel p {
    margin-bottom: 10px;
    line-height: 1.5;
}

.chat-icons .icon {
    width: 25px;
    height: 25px;
    color: var(--primary-color);
    cursor: pointer;
    margin-left: 12px;
    transition: .2s;
    opacity: .8;
}

.chat-icons .icon:hover {
    opacity: 1;
    transform: scale(1.15);
}

/* Dark mode */
body.dark .info-panel {
    background: #2d2d2d;
    border-color: rgba(255,255,255,0.1);
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}

body.dark .chat-icons .icon {
    color: #7ba5ff;
}

.timeout-banner {
    display: flex;
    align-items: flex-start;
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 16px;
    background: #fff7e6;
    border: 1px solid #ffd28a;
    box-shadow: 0 3px 10px rgba(0,0,0,0.06);
    animation: timeoutSlide .25s ease;
}

.timeout-banner.mine {
    border-left: 4px solid #4c8bf5;
    background: #eaf2ff;
}

.timeout-banner.theirs {
    border-left: 4px solid #ffa726;
}

.timeout-icon {
    font-size: 24px;
    margin-right: 12px;
    margin-top: 2px;
}

.timeout-content h3 {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 600;
}

.timeout-text {
    margin: 0 0 6px;
    font-size: 14px;
}

.timeout-hint {
    margin: 0 0 10px;
    font-size: 13px;
    opacity: 0.8;
}

.timeout-form .primary-btn {
    font-size: 13px;
    padding: 6px 12px;
}

@keyframes timeoutSlide {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Donkere modus */
body.dark .timeout-banner {
    background: #3a3a3a;
    border-color: #555;
    box-shadow: 0 3px 10px rgba(0,0,0,0.5);
}

body.dark .timeout-banner.mine {
    background: #2f3c52;
    border-left-color: #7ba5ff;
}

body.dark .timeout-banner.theirs {
    background: #4a3a24;
    border-left-color: #ffb74d;
}

body.dark .timeout-content h3,
body.dark .timeout-text,
body.dark .timeout-hint {
    color: #f1f1f1;
}

.icon {
    fill: currentColor !important;
}

/* Stemming-kleurcodes voor het brein-icoon */
.icon.mood-overprikkeld {
    color: #e53935 !important; /* rood */
}

.icon.mood-neutral {
    color: #4c8bf5 !important; /* blauw/neutraal */
}

.icon.mood-verbinding {
    color: #43a047 !important; /* groen */
}

/* Donker thema */
body.dark .icon.mood-neutral {
    color: #90c3ff !important;
}

body.dark .icon.mood-overprikkeld {
    color: #ff6b6b !important;
}

body.dark .icon.mood-verbinding {
    color: #66e18a !important;
}

.header-brain {
    width: 12px;
    height: 12px;
    margin-left: 10px;
    cursor: pointer;
    transition: transform .2s ease;
}

.header-brain:hover {
    transform: scale(1.15);
}

/* kleuren */
.header-brain.mood-overprikkeld {
    color: #e53935 !important;
}

.header-brain.mood-neutral {
    color: #4c8bf5 !important;
}

.header-brain.mood-verbinding {
    color: #43a047 !important;
}

/* donkere modus */
body.dark .header-brain.mood-neutral {
    color: #90c3ff !important;
}
body.dark .header-brain.mood-overprikkeld {
    color: #ff6b6b !important;
}
body.dark .header-brain.mood-verbinding {
    color: #66e18a !important;
}


