@import url('https://fonts.googleapis.com/css2?family=Kumbh+Sans:wght@400;500;600;700&display=swap');

:root {
    --ssh-ink: #020f5a;
    --ssh-ink-2: #101f70;
    --ssh-gold: #ffc107;
    --ssh-gold-soft: #fff7d6;
    --ssh-bg: #f3f4f6;
    --ssh-panel: #ffffff;
    --ssh-text: #222222;
    --ssh-muted: #626775;
    --ssh-line: #e1e3e9;
    --ssh-green-soft: #e8f3ec;
    --ssh-red: #a84f3b;
    --ssh-red-soft: #fff1ec;
    --ssh-shadow: 0 12px 35px rgba(2, 15, 90, .08);
}

* { box-sizing: border-box; }
html { font-size: 16px; }
body {
    margin: 0;
    font-family: "Kumbh Sans", "Segoe UI", Arial, sans-serif;
    color: var(--ssh-text);
    background: var(--ssh-bg);
    line-height: 1.55;
}
a { color: var(--ssh-ink-2); text-underline-offset: 3px; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 244px minmax(0,1fr); transition: grid-template-columns .2s ease; }
.app-shell.sidebar-collapsed { grid-template-columns: 76px minmax(0,1fr); }
.app-sidebar { position: sticky; top: 0; z-index: 30; height: 100vh; min-width: 0; display: grid; grid-template-rows: auto minmax(0,1fr) auto; overflow: hidden; border-right: 1px solid var(--ssh-line); border-top: 5px solid var(--ssh-gold); background: #fff; box-shadow: 5px 0 24px rgba(2,15,90,.05); }
.sidebar-brand { min-height: 96px; display: flex; align-items: center; gap: 8px; padding: 16px 13px; border-bottom: 1px solid var(--ssh-line); }
.sidebar-brand > a { min-width: 0; flex: 1; color: var(--ssh-ink); text-decoration: none; }
.sidebar-brand img { display: block; width: 158px; max-width: 100%; height: auto; }
.sidebar-brand a span { display: none; }
.sidebar-toggle { width: 34px; height: 34px; flex: 0 0 auto; border: 1px solid var(--ssh-line); border-radius: 8px; background: #fff; color: var(--ssh-ink); cursor: pointer; }
.sidebar-nav { min-height: 0; overflow-y: auto; padding: 18px 11px; }
.sidebar-nav > a { min-height: 45px; display: flex; align-items: center; gap: 13px; margin-bottom: 4px; padding: 9px 12px; border-radius: 9px; color: #30343c; text-decoration: none; font-size: .88rem; }
.sidebar-nav > a i { width: 23px; flex: 0 0 23px; color: var(--ssh-ink); font-size: 1.14rem; font-style: normal; text-align: center; }
.sidebar-nav > a:hover { background: #f2f3f7; }
.sidebar-nav > a.active { color: var(--ssh-ink); background: #fff7d6; font-weight: 700; box-shadow: inset 4px 0 var(--ssh-gold); }
.sidebar-separator { margin: 22px 11px 8px; color: var(--ssh-muted); font-size: .62rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.sidebar-account { padding: 12px; border-top: 1px solid var(--ssh-line); }
.sidebar-account > a { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; color: var(--ssh-text); text-decoration: none; }
.sidebar-account > a:hover,.sidebar-account > a.active { background: #f2f3f7; }
.account-initial { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; color: #fff; background: var(--ssh-ink); font-weight: 700; }
.sidebar-account strong,.sidebar-account small { display: block; white-space: nowrap; }
.sidebar-account strong { color: var(--ssh-ink); font-size: .78rem; }
.sidebar-account small { color: var(--ssh-muted); font-size: .65rem; }
.app-content { min-width: 0; }
.sidebar-mobile-open { display: none; }
.sidebar-collapsed .sidebar-brand { justify-content: center; padding-inline: 10px; }
.sidebar-collapsed .sidebar-brand > a { display: none; }
.sidebar-collapsed .sidebar-nav > a { justify-content: center; padding-inline: 8px; }
.sidebar-collapsed .sidebar-nav > a span,.sidebar-collapsed .sidebar-separator span,.sidebar-collapsed .sidebar-account a > span:last-child { display: none; }
.sidebar-collapsed .sidebar-separator { height: 1px; margin: 18px 7px 8px; background: var(--ssh-line); }
.sidebar-collapsed .sidebar-account > a { justify-content: center; padding: 8px 0; }

.topbar {
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding: 14px clamp(20px, 4vw, 54px);
    background: #fff;
    color: var(--ssh-text);
    border-top: 5px solid var(--ssh-gold);
    border-bottom: 1px solid var(--ssh-line);
    box-shadow: 0 5px 25px rgba(2, 15, 90, .08);
}
.brand { display: flex; align-items: center; gap: 18px; color: var(--ssh-ink); text-decoration: none; }
.brand img { display: block; width: 205px; height: auto; }
.nova-label { padding-left: 18px; border-left: 1px solid var(--ssh-line); }
.nova-label strong { display: block; color: var(--ssh-ink); font-size: 1.18rem; line-height: 1.1; font-weight: 700; }
.nova-label small { display: block; color: var(--ssh-muted); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; }
.topbar nav { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 5px 20px; }
.topbar nav a { color: var(--ssh-text); text-decoration: none; font-size: .9rem; }
.topbar nav a:hover { color: var(--ssh-ink); text-decoration: underline; text-decoration-color: var(--ssh-gold); text-decoration-thickness: 3px; }

.wrap { max-width: 1180px; margin: 34px auto 64px; padding: 0 24px; }
.page-wide .wrap { max-width: 1880px; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
h1 { margin: 0 0 5px; color: var(--ssh-ink); font-size: clamp(1.75rem, 3vw, 2.35rem); font-weight: 700; }
h2 { margin: 0 0 15px; color: var(--ssh-ink); font-size: 1.22rem; font-weight: 700; }
h3 { color: var(--ssh-ink); }
.subtitle { margin: 0 0 24px; color: var(--ssh-muted); }

.card {
    background: var(--ssh-panel);
    border: 1px solid var(--ssh-line);
    border-radius: 18px;
    padding: clamp(18px, 3vw, 27px);
    margin-bottom: 22px;
    box-shadow: var(--ssh-shadow);
}
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.stat-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; margin: 0 0 22px; }
.stat-card { min-height: 126px; padding: 19px 21px; border: 1px solid var(--ssh-line); border-top: 5px solid var(--ssh-gold); border-radius: 15px; background: #fff; box-shadow: var(--ssh-shadow); }
.stat-card span { display: block; color: var(--ssh-muted); font-size: .76rem; font-weight: 700; letter-spacing: .035em; text-transform: uppercase; }
.stat-card strong { display: block; margin-top: 7px; color: var(--ssh-ink); font-size: 2rem; line-height: 1.15; }
.stat-card small { display: block; margin-top: 5px; color: var(--ssh-muted); }
.stat-card-team strong { font-size: 1.08rem; line-height: 1.35; }
.insight-filter { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }
.insight-filter label { display: block; margin-bottom: 5px; color: var(--ssh-muted); font-size: .76rem; font-weight: 700; }
.insight-filter input, .insight-filter select { min-height: 42px; padding: 8px 10px; border: 1px solid #cbd4d0; border-radius: 9px; background: #fff; font: inherit; }
.insight-note { margin: -6px 0 22px; padding: 11px 15px; border-left: 4px solid var(--ssh-gold); color: var(--ssh-muted); background: #fff9e5; font-size: .84rem; }
.planner-status { margin: -10px 0 20px; color: var(--ssh-muted); font-size: .82rem; }
.planner-status.is-ok strong { color: #286044; }
.insight-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 22px; }
.insight-grid .card { min-width: 0; }
.chat-layout { display:grid; grid-template-columns:260px minmax(0,1fr); gap:22px; align-items:start; }
.chat-sidebar { position:sticky; top:18px; }
.chat-thread { display:block; padding:12px 3px; border-bottom:1px solid var(--ssh-line); text-decoration:none; }
.chat-thread strong,.chat-thread small { display:block; }
.chat-thread small { color:var(--ssh-muted); }
.chat-thread.active { color:var(--ssh-ink); border-left:4px solid var(--ssh-gold); padding-left:10px; }
.chat-window { min-height:360px; display:flex; flex-direction:column; gap:12px; }
.nova-welcome { margin:auto; max-width:620px; padding:24px; text-align:center; color:var(--ssh-muted); }
.nova-welcome strong { color:var(--ssh-ink); font-size:1.2rem; }
.chat-bubble { max-width:82%; padding:12px 15px; border-radius:15px; background:#eef0fa; }
.chat-bubble.gebruiker { align-self:flex-end; background:var(--ssh-ink); color:#fff; }
.chat-bubble.nova { align-self:flex-start; border-left:4px solid var(--ssh-gold); background:#fff9e5; }
.chat-bubble span,.chat-bubble small { display:block; font-size:.72rem; font-weight:700; opacity:.75; }
.chat-bubble small { margin-top:5px; text-align:right; }
.chat-confirm { padding:15px; border:1px solid #e2c763; border-radius:12px; background:#fff9e5; }
.chat-confirm p { white-space:pre-wrap; }
.chat-compose label { display:block; margin:10px 0 5px; color:var(--ssh-muted); font-size:.78rem; font-weight:700; }
.chat-compose select,.chat-compose textarea { width:100%; padding:10px; border:1px solid #cbd4d0; border-radius:9px; font:inherit; }
.chat-compose textarea { min-height:110px; resize:vertical; margin-bottom:12px; }
.escalation.hoog,.escalation.urgent { border-left:5px solid var(--ssh-red); }
.align-start { align-items: start; }
.table-scroll { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { padding: 11px 10px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--ssh-line); }
th { color: #fff; background: var(--ssh-ink); font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fafbf9; }

.badge { display: inline-block; padding: 4px 9px; border-radius: 7px; font-size: .75rem; font-weight: 600; }
.badge.actief, .badge.afgerond { background: var(--ssh-green-soft); color: #286044; }
.badge.deadline, .badge.stilstand { background: var(--ssh-red-soft); color: var(--ssh-red); }
.badge.actie_adviseur, .badge.actie_binnendienst { background: var(--ssh-gold-soft); color: #76511f; }
.badge.open { background: var(--ssh-gold-soft); color: #76511f; }
.badge.wachten { background: #eef0fa; color: var(--ssh-ink); }
.badge.gereed { background: var(--ssh-green-soft); color: #286044; }

.btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 42px; padding: 10px 17px; border: 1px solid var(--ssh-ink-2);
    border-radius: 28px; background: var(--ssh-ink); color: #fff;
    font: inherit; font-size: .9rem; cursor: pointer; text-decoration: none;
}
.btn:hover { background: var(--ssh-ink-2); }
.btn.secondary { color: var(--ssh-ink); background: var(--ssh-gold); border-color: var(--ssh-gold); }

form.stack label { display: block; margin: 15px 0 6px; color: #52615d; font-size: .86rem; font-weight: 600; }
form.stack input, form.stack select, form.stack textarea {
    width: 100%; min-height: 43px; padding: 10px 11px; border: 1px solid #cbd4d0;
    border-radius: 9px; background: #fff; color: var(--ssh-text); font: inherit;
}
form.stack textarea { min-height: 100px; resize: vertical; }
form.stack input:focus, form.stack select:focus, form.stack textarea:focus { outline: 3px solid rgba(255,193,7,.28); border-color: var(--ssh-gold); }
.single-check { display: flex !important; align-items: center; gap: 9px; padding: 11px 13px; border: 1px solid var(--ssh-line); border-radius: 9px; background: #fff; color: var(--ssh-text) !important; }
.single-check input { width: auto !important; min-height: auto !important; accent-color: #286044; }
.check-list { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 14px; margin: 18px 0; }
.check-list label { margin: 0 !important; font-weight: 400 !important; }
.check-list input { width: auto !important; min-height: auto !important; }

.login-wrap { max-width: 410px; margin: 80px auto; }
.login-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; }
.login-brand .brand-mark { color: var(--ssh-gold); background: var(--ssh-ink); }
.login-brand h1, .login-brand .subtitle { margin-bottom: 0; }
.error, .ok { padding: 13px 16px; border-radius: 11px; margin: 0 0 18px; }
.error { color: #843827; background: var(--ssh-red-soft); border: 1px solid #edc5b8; }
.ok { color: #285e43; background: var(--ssh-green-soft); border: 1px solid #c5dfcf; }
.muted { color: var(--ssh-muted); }
.small { font-size: .84rem; }
.mail-list { margin: 0; padding: 0; }
.mail-list li { list-style: none; padding: 13px 0; border-bottom: 1px solid var(--ssh-line); }
.mail-list li:last-child { border-bottom: 0; }
.mail-list .onderwerp { font-weight: 600; }
.mail-list .meta { margin-top: 4px; color: var(--ssh-muted); font-size: .8rem; }
.rule-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--ssh-line); }
.rule-row:last-child { border-bottom: 0; }
.page-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.filters { padding: 18px 20px; }
.filter-grid { display: grid; grid-template-columns: 1.5fr repeat(4, minmax(130px, 1fr)) auto; gap: 13px; align-items: end; }
.filters label { display: block; margin: 0 0 5px; color: var(--ssh-muted); font-size: .76rem; font-weight: 700; }
.filters input, .filters select { width: 100%; min-height: 42px; padding: 8px 10px; border: 1px solid #cbd4d0; border-radius: 9px; background: #fff; font: inherit; }
.filter-submit { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.list-summary { margin: 0 0 10px; color: var(--ssh-muted); font-size: .88rem; }
.dossier-table-card { padding: 0; overflow: hidden; }
.dossier-table th { position: sticky; top: 0; }
.dossier-workboard .dossier-table { min-width: 1640px; table-layout: fixed; }
.dossier-workboard th:nth-child(1) { width: 190px; }
.dossier-workboard th:nth-child(2) { width: 155px; }
.dossier-workboard th:nth-child(3) { width: 135px; }
.dossier-workboard th:nth-child(4) { width: 170px; }
.dossier-workboard th:nth-child(5) { width: 160px; }
.dossier-workboard th:nth-child(6) { width: 185px; }
.dossier-workboard th:nth-child(7), .dossier-workboard th:nth-child(8) { width: 245px; }
.dossier-workboard th:nth-child(9) { width: 150px; }
.cell-input, .cell-textarea, .finish-dialog select, .finish-dialog input, .finish-dialog textarea { width: 100%; border: 1px solid #cbd4d0; border-radius: 7px; padding: 7px 8px; background: #fff; color: var(--ssh-text); font: inherit; font-size: .78rem; }
.cell-input { min-height: 36px; }
.cell-textarea { min-height: 82px; resize: vertical; }
.nova-trigger { border-left: 4px solid var(--ssh-gold); background: #fffdf4; }
.protected-date[hidden] { display: none !important; }
.protected-date.is-editing { color: var(--ssh-text); background: #fff; border-color: var(--ssh-gold); box-shadow: 0 0 0 3px rgba(255,193,7,.16); }
.protected-choice[hidden] { display: none !important; }
.protected-choice.is-editing { border-color: var(--ssh-gold); box-shadow: 0 0 0 3px rgba(255,193,7,.16); }
.choice-readonly { min-height: 48px; color: var(--ssh-text); font-size: .82rem; line-height: 1.35; }
.choice-readonly strong { display: block; font-weight: 600; }
.choice-readonly .cell-label:not(:first-child) { margin-top: 7px; }
.choice-single { min-height: 24px; padding-top: 5px; }
.date-readonly-value { min-height: 24px; color: var(--ssh-text); font-size: .82rem; font-weight: 600; line-height: 1.35; }
.date-readonly-primary { color: var(--ssh-ink); font-size: .88rem; }
.edit-date-button { display: inline-flex; align-items: center; margin-top: 5px; padding: 0; border: 0; border-bottom: 1px solid currentColor; background: transparent; color: var(--ssh-muted); font: inherit; font-size: .67rem; font-weight: 600; cursor: pointer; }
.edit-date-button:hover { color: var(--ssh-ink); }
.edit-date-button:disabled { border: 0; color: var(--ssh-muted); cursor: default; opacity: .75; }
.action-done-check { display: flex; align-items: center; gap: 6px; margin-top: 7px; color: #285e43; font-size: .76rem; font-weight: 700; }
.action-done-check input { width: auto; accent-color: #286044; }
.notary-check { margin-top: 12px; color: var(--ssh-text); font-size: .7rem; line-height: 1.3; }
.cell-second { margin-top: 7px; }
.cell-label { display: block; margin: 0 0 3px; color: var(--ssh-muted); font-size: .66rem; font-weight: 700; }
.cell-label:not(:first-child) { margin-top: 7px; }
.save-row { width: 100%; margin-top: 8px; }
.row-open { display: block; margin-top: 7px; text-align: center; }
.finish-dialog { width: min(520px, calc(100% - 30px)); border: 0; border-radius: 18px; padding: 25px; box-shadow: 0 25px 80px rgba(2,15,90,.25); }
.finish-dialog::backdrop { background: rgba(2,15,90,.55); }
.finish-dialog label { display: block; margin: 13px 0 5px; color: var(--ssh-ink); font-size: .82rem; font-weight: 700; }
.finish-dialog textarea { min-height: 90px; resize: vertical; }
.insurance-dialog { width: min(680px, calc(100% - 30px)); max-height: calc(100vh - 40px); overflow: auto; }
.insurance-question, .insurance-sub { margin-top: 14px; padding: 14px; border-radius: 10px; background: #f5f6fa; }
.insurance-question label, .insurance-sub label { display: inline-flex; width: auto; align-items: center; gap: 6px; margin: 10px 18px 0 0; }
.insurance-question input, .insurance-sub input, .insurance-options input { width: auto; }
.insurance-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 4px 14px; margin: 6px 0 14px; }
.insurance-options label { display: flex; width: auto; align-items: flex-start; gap: 7px; margin: 0; padding: 5px 0; font-weight: 500; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 22px; }
.customer-link { color: var(--ssh-ink); font-weight: 700; }
.dossier-number { margin-bottom: 3px; color: var(--ssh-muted); font-size: .66rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.dossier-number-detail { margin-bottom: 5px; color: var(--ssh-ink-2); }
.dossier-management form { margin: 0; }
.delete-dossier { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--ssh-line); }
.delete-dossier summary { color: var(--ssh-red); font-size: .82rem; font-weight: 700; cursor: pointer; }
.btn.danger { margin-top: 12px; border-color: var(--ssh-red); background: var(--ssh-red); }
.btn.danger:hover { background: #873d2d; }
.phase-pill { display: inline-block; margin-bottom: 4px; padding: 4px 8px; border-radius: 999px; color: var(--ssh-ink); background: #eef0fa; font-size: .75rem; font-weight: 600; }
.deadline-soon { color: var(--ssh-red); font-weight: 700; }
.action-item { padding: 13px 0; border-bottom: 1px solid var(--ssh-line); }
.action-item:last-of-type { border-bottom: 0; }
.action-item.gereed { opacity: .62; }
.action-item .meta { margin-top: 5px; color: var(--ssh-muted); font-size: .78rem; }
.action-feedback { margin-top: 9px; padding: 10px 12px; border-left: 4px solid #3d8a63; border-radius: 7px; background: var(--ssh-green-soft); font-size: .82rem; }
.action-complete { margin-top: 9px; }
.action-complete summary { color: #285e43; font-size: .8rem; font-weight: 700; cursor: pointer; }
.inline-form { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.btn.compact { min-height: 32px; padding: 5px 11px; font-size: .76rem; }
.action-add { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--ssh-line); }
.action-add summary { color: var(--ssh-ink); font-weight: 700; cursor: pointer; }
.action-edit { margin-top: 8px; }
.action-edit summary { color: var(--ssh-muted); font-size: .78rem; cursor: pointer; }
.history-list { display: grid; gap: 10px; }
.history-note { padding: 12px 14px; border: 1px solid var(--ssh-line); border-left: 4px solid var(--ssh-gold); border-radius: 9px; background: #fffdf6; }
.history-note.history-done { border-left-color: #3d8a63; background: var(--ssh-green-soft); }
.history-meta { margin-bottom: 5px; color: var(--ssh-muted); font-size: .76rem; }
.detail-facts { font-size: .88rem; }
.detail-facts th {
    width: 42%; padding: 10px 12px 10px 0; color: var(--ssh-muted); background: transparent;
    font-size: .7rem; font-weight: 700; letter-spacing: .035em;
}
.detail-facts td { padding: 10px 0; color: var(--ssh-text); font-weight: 600; }
.detail-facts tbody tr:hover th, .detail-facts tbody tr:hover td { background: #fafaf8; }
.form-section { margin-top: 24px; padding: 20px; border: 1px solid var(--ssh-line); border-radius: 14px; background: #fafbfc; }
.form-section h2 { margin-bottom: 8px; }
.grid-3-wide { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.compact-fields { gap: 10px; }
.mail-search { display: flex; gap: 10px; max-width: 760px; margin: 14px 0; }
.mail-search input { flex: 1; }

/* Doorlopende Nova-chat */
.nova-chatbox { height: calc(100vh - 145px); min-height: 610px; max-width: 1120px; margin: 0 auto; display: grid; grid-template-rows: auto auto minmax(0,1fr) auto; overflow: hidden; border: 1px solid var(--ssh-line); border-radius: 20px; background: #fff; box-shadow: var(--ssh-shadow); }
.nova-chatbox-head { display: flex; align-items: center; gap: 14px; padding: 15px 20px; border-bottom: 1px solid var(--ssh-line); background: #fff; }
.nova-chatbox-head h1 { margin: 0; font-size: 1.25rem; }
.nova-chatbox-head p { margin: 1px 0 0; color: var(--ssh-muted); font-size: .78rem; }
.nova-avatar, .chat-mini-avatar { display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; background: var(--ssh-ink); color: var(--ssh-gold); font-weight: 700; }
.nova-avatar { width: 43px; height: 43px; font-size: 1.2rem; }
.chat-mini-avatar { width: 30px; height: 30px; margin-top: 3px; font-size: .78rem; }
.online-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #319064; }
.chat-error { margin: 10px 14px 0; }
.nova-chatlog { min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; padding: 22px clamp(15px,4vw,42px); background: linear-gradient(180deg,#f6f7f9,#f2f3f6); scroll-behavior: smooth; }
.chat-row { display: flex; align-items: flex-start; gap: 9px; }
.chat-row.gebruiker { justify-content: flex-end; }
.nova-chatlog .chat-bubble { max-width: min(76%,720px); box-shadow: 0 3px 10px rgba(2,15,90,.06); }
.nova-chatlog .chat-bubble.gebruiker { border-bottom-right-radius: 4px; }
.nova-chatlog .chat-bubble.nova { border-bottom-left-radius: 4px; background: #fff; }
.nova-chatlog .chat-confirm { align-self: center; width: min(680px,92%); background: #fffaf0; }
.nova-chat-input { padding: 12px 16px 10px; border-top: 1px solid var(--ssh-line); background: #fff; }
.nova-chat-input select { width: min(430px,100%); margin-bottom: 8px; padding: 7px 9px; border: 1px solid var(--ssh-line); border-radius: 8px; color: var(--ssh-muted); background: #fafafa; font: inherit; font-size: .78rem; }
.chat-type-row { display: flex; align-items: flex-end; gap: 9px; padding: 7px 8px 7px 14px; border: 1px solid #cbd4d0; border-radius: 18px; background: #fff; }
.chat-type-row:focus-within { border-color: var(--ssh-gold); box-shadow: 0 0 0 3px rgba(255,193,7,.2); }
.chat-type-row textarea { flex: 1; min-height: 27px; max-height: 140px; padding: 3px 0; resize: none; border: 0; outline: 0; color: var(--ssh-text); background: transparent; font: inherit; line-height: 1.45; }
.chat-send { width: 39px; height: 39px; flex: 0 0 auto; border: 0; border-radius: 50%; color: #fff; background: var(--ssh-ink); cursor: pointer; font-size: 1rem; }
.nova-chat-input > small { display: block; margin: 5px 8px 0; color: var(--ssh-muted); font-size: .68rem; }

/* Outlook-achtige drieluikmailbox */
.outlook-shell { height: calc(100vh - 145px); min-height: 650px; display: grid; grid-template-columns: 220px minmax(290px,390px) minmax(430px,1fr); overflow: hidden; border: 1px solid var(--ssh-line); border-radius: 16px; background: #fff; box-shadow: var(--ssh-shadow); }
.mail-folders { padding: 18px 12px; border-right: 1px solid var(--ssh-line); background: #f7f8fa; }
.mail-account { padding: 0 10px 16px; }
.mail-account strong,.mail-account small { display: block; }
.mail-account strong { color: var(--ssh-ink); font-size: 1.05rem; }
.mail-account small { color: var(--ssh-muted); font-size: .7rem; overflow-wrap: anywhere; }
.mail-compose-button { width: 100%; margin-bottom: 18px; }
.mail-folders nav { display: grid; gap: 3px; }
.mail-folders nav a { display: flex; justify-content: space-between; gap: 8px; padding: 10px 11px; border-radius: 8px; color: var(--ssh-text); text-decoration: none; font-size: .83rem; }
.mail-folders nav a:hover,.mail-folders nav a.active { color: var(--ssh-ink); background: #e8ebf5; }
.mail-folders nav a.active { font-weight: 700; border-left: 4px solid var(--ssh-gold); }
.mail-folders nav b { font-size: .72rem; }
.mail-sync { display: block; margin: 24px 10px 7px; font-size: .78rem; }
.mail-sync-time { display: block; margin: 0 10px; color: var(--ssh-muted); font-size: .65rem; line-height: 1.5; }
.mail-column { min-width: 0; display: grid; grid-template-rows: auto auto minmax(0,1fr); border-right: 1px solid var(--ssh-line); }
.mail-list-head { padding: 14px 14px 11px; border-bottom: 1px solid var(--ssh-line); }
.mail-list-head h1 { font-size: 1.25rem; }
.mail-list-head form { display: flex; margin-top: 10px; border: 1px solid #cbd4d0; border-radius: 8px; overflow: hidden; }
.mail-list-head input { min-width: 0; flex: 1; padding: 8px 10px; border: 0; outline: 0; font: inherit; }
.mail-list-head button { width: 38px; border: 0; background: #fff; cursor: pointer; }
.mail-notice { margin: 8px 10px 0; padding: 8px 10px; font-size: .72rem; }
.outlook-message-list { min-height: 0; overflow-y: auto; }
.outlook-message { display: block; padding: 12px 14px; border-bottom: 1px solid var(--ssh-line); color: var(--ssh-text); text-decoration: none; }
.outlook-message:hover { background: #f7f8fb; }
.outlook-message.selected { background: #edf0fa; border-left: 4px solid var(--ssh-gold); padding-left: 10px; }
.outlook-message.unread { background: #fffdf3; }
.outlook-message > div { display: flex; justify-content: space-between; gap: 8px; }
.outlook-message strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .8rem; }
.outlook-message time { flex: 0 0 auto; color: var(--ssh-muted); font-size: .65rem; }
.outlook-message span,.outlook-message small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.outlook-message span { margin-top: 2px; color: var(--ssh-ink); font-size: .78rem; font-weight: 600; }
.outlook-message small { margin-top: 3px; color: var(--ssh-muted); font-size: .7rem; }
.mail-empty,.mail-preview-empty { padding: 35px 20px; color: var(--ssh-muted); text-align: center; }
.mail-preview { min-width: 0; overflow-y: auto; padding: clamp(20px,3vw,36px); }
.mail-preview > header { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding-bottom: 18px; border-bottom: 1px solid var(--ssh-line); }
.mail-preview h2 { font-size: 1.35rem; }
.mail-preview-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px 13px; }
.mail-preview-actions a { font-size: .75rem; white-space: nowrap; }
.mail-addresses { padding: 17px 0; font-size: .78rem; }
.mail-addresses strong,.mail-addresses small { display: block; }
.mail-addresses time { float: right; color: var(--ssh-muted); }
.mail-addresses small { margin-top: 4px; color: var(--ssh-muted); }
.mail-nova-note { display: grid; gap: 3px; margin-bottom: 18px; padding: 11px 13px; border-left: 4px solid var(--ssh-gold); background: #fff9e5; font-size: .76rem; }
.mail-body { min-height: 260px; padding: 6px 0 30px; overflow-wrap: anywhere; font-family: "Segoe UI",Arial,sans-serif; font-size: .9rem; line-height: 1.65; }
.mail-process-form { padding-top: 16px; border-top: 1px solid var(--ssh-line); }
.mail-bottom-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; padding-top: 16px; border-top: 1px solid var(--ssh-line); }
.mail-bottom-actions form { margin: 0; }
.mail-bottom-actions .btn.danger { margin-top: 0; }
.mail-rules { margin-top: 20px; }
.mail-rules summary { color: var(--ssh-ink); font-weight: 700; cursor: pointer; }
.account-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
.account-grid .card { margin: 0; }
.account-grid form .btn { margin-top: 18px; }
.account-logout { border-color: var(--ssh-red); background: var(--ssh-red); }
.account-role dl { display: grid; grid-template-columns: 135px 1fr; margin: 0; }
.account-role dt,.account-role dd { margin: 0; padding: 10px 0; border-bottom: 1px solid var(--ssh-line); }
.account-role dt { color: var(--ssh-muted); font-size: .78rem; }
.account-role dd { color: var(--ssh-ink); font-weight: 700; }
.owner-tools { display: grid; align-content: start; gap: 9px; }
.owner-tools > a { display: block; padding: 13px 14px; border: 1px solid var(--ssh-line); border-radius: 10px; text-decoration: none; }
.owner-tools > a:hover { border-color: var(--ssh-gold); background: #fffdf5; }
.owner-tools strong,.owner-tools small { display: block; }
.owner-tools small { margin-top: 2px; color: var(--ssh-muted); }
.status-tabs { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 20px; }
.status-tabs a { padding: 7px 12px; border-radius: 999px; color: var(--ssh-muted); background: #fff; text-decoration: none; font-size: .78rem; }
.status-tabs a.active { color: #fff; background: var(--ssh-ink); }
.nova-learning-form details { margin: 15px 0; padding: 14px; border: 1px solid var(--ssh-line); border-radius: 10px; background: #fafbfc; }
.nova-learning-form summary { color: var(--ssh-ink); font-weight: 700; cursor: pointer; }
.nova-feedback-saved { margin-top: 15px; padding: 13px 15px; border-left: 4px solid #319064; background: var(--ssh-green-soft); }
.nova-feedback-saved p { margin: 5px 0; }

@media (max-width: 860px) {
    .topbar { align-items: flex-start; flex-direction: column; gap: 12px; }
    .topbar nav { justify-content: flex-start; }
    .filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dossier-table-card { overflow: visible; border: 0; background: transparent; box-shadow: none; }
    .dossier-workboard .table-scroll { overflow: visible; }
    .dossier-workboard .dossier-table { display: block; min-width: 0; }
    .dossier-workboard .dossier-table thead { display: none; }
    .dossier-workboard .dossier-table tbody { display: grid; gap: 16px; }
    .dossier-workboard .dossier-table tr { display: block; overflow: hidden; border: 1px solid var(--ssh-line); border-radius: 15px; background: #fff; box-shadow: 0 8px 24px rgba(2,15,90,.07); }
    .dossier-workboard .dossier-table td { display: block; width: 100%; padding: 12px 14px; border-bottom: 1px solid #eceef3; }
    .dossier-workboard .dossier-table td::before { display: block; content: attr(data-label); margin-bottom: 7px; color: var(--ssh-muted); font-size: .7rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; }
    .dossier-workboard .dossier-table td:first-child { display: block; padding: 16px; border-bottom: 3px solid var(--ssh-gold); background: #fbfbfd; }
    .dossier-workboard .dossier-table td:first-child::before { display: none; }
    .dossier-workboard .cell-input, .dossier-workboard .cell-textarea { min-width: 0; font-size: .9rem; }
    .dossier-workboard .cell-textarea { min-height: 92px; }
    .dossier-workboard .save-row { max-width: 220px; }
    .dossier-workboard .row-open { max-width: 220px; text-align: left; }
    .outlook-shell { height: auto; min-height: 0; grid-template-columns: 150px minmax(240px,1fr); }
    .mail-preview { grid-column: 1 / -1; min-height: 420px; border-top: 1px solid var(--ssh-line); }
}
@media (max-width: 700px) {
    .app-shell,.app-shell.sidebar-collapsed { display: block; }
    .app-sidebar { position: fixed; left: 0; top: 0; width: 244px; transform: translateX(-105%); transition: transform .2s ease; }
    .sidebar-mobile-visible .app-sidebar { transform: translateX(0); }
    .sidebar-mobile-open { position: fixed; z-index: 25; left: 12px; bottom: 14px; width: 46px; height: 46px; display: block; border: 0; border-radius: 50%; color: #fff; background: var(--ssh-ink); box-shadow: 0 8px 25px rgba(2,15,90,.25); }
    .sidebar-collapsed .sidebar-brand > a { display: block; }
    .sidebar-collapsed .sidebar-nav > a { justify-content: flex-start; padding-inline: 12px; }
    .sidebar-collapsed .sidebar-nav > a span,.sidebar-collapsed .sidebar-separator span,.sidebar-collapsed .sidebar-account a > span:last-child { display: block; }
    .wrap { padding: 0 15px; margin-top: 24px; }
    .grid-2 { grid-template-columns: 1fr; }
    .stat-grid, .insight-grid { grid-template-columns: 1fr; }
    .chat-layout { grid-template-columns:1fr; }
    .chat-sidebar { position:static; }
    .chat-bubble { max-width:94%; }
    .card { border-radius: 14px; }
    .check-list { grid-template-columns: 1fr; }
    .page-heading { align-items: flex-start; flex-direction: column; }
    .page-actions { justify-content: flex-start; }
    .filter-grid { grid-template-columns: 1fr; }
    .grid-3-wide { grid-template-columns: 1fr; }
    .detail-facts th { width: 46%; }
    .insurance-options { grid-template-columns: 1fr; }
    .mail-search { display: block; }
    .mail-search input, .mail-search button { width: 100%; margin-bottom: 8px; }
    .nova-chatbox { height: calc(100vh - 185px); min-height: 520px; border-radius: 12px; }
    .nova-chatlog { padding: 16px 11px; }
    .nova-chatlog .chat-bubble { max-width: 88%; }
    .nova-chat-input { padding: 9px; }
    .outlook-shell { display: block; border-radius: 12px; }
    .mail-folders { border-right: 0; border-bottom: 1px solid var(--ssh-line); }
    .mail-folders nav { grid-template-columns: repeat(2,1fr); }
    .mail-folders nav a { display: block; text-align: center; }
    .mail-folders nav a span,.mail-folders nav a b { display: block; }
    .mail-sync,.mail-sync-time { display: inline-block; }
    .mail-column { height: 470px; border-right: 0; }
    .mail-preview { min-height: 480px; padding: 20px 15px; }
    .mail-preview > header { display: block; }
    .mail-preview-actions { justify-content: flex-start; margin-top: 12px; }
    .account-grid { grid-template-columns: 1fr; }
}
