/* =========================================================
   01. BASIS & VARIABELEN
   ========================================================= */

:root {
    --navy:#0b1729;
    --navy-2:#14243b;
    --blue:#2f63c7;
    --blue-dark:#214da5;
    --blue-soft:#e8f0ff;
    --ink:#172033;
    --muted:#64748b;
    --line:#d8e0eb;
    --surface:#fff;
    --background:#eef2f7;
    --green:#1e9b6c;
    --red:#bd3f4a;
    --shadow:0 10px 30px rgba(20,35,60,.08)
}

* {
    box-sizing:border-box
}

[hidden] {
    display:none!important
}

html,body {
    height:100%;
    margin:0
}

body {
    font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;
    color:var(--ink);
    background:var(--background);
    font-size:15px
}

button,input,select,textarea {
    font:inherit
}

button,a {
    transition:.16s ease
}

/* =========================================================
   02. HOOFDLAYOUT
   ========================================================= */

.app-shell {
    display:grid;
    grid-template-columns:245px minmax(0,1fr);
    min-height:100vh
}

/* =========================================================
   03. ZIJMENU & NAVIGATIE
   ========================================================= */

.main-nav {
    position:sticky;
    top:0;
    height:100vh;
    display:flex;
    flex-direction:column;
    padding:24px 16px;
    background:var(--navy);
    color:#fff
}

.brand {
    display:flex;
    align-items:center;
    gap:11px;
    padding:4px 7px 28px
}

.brand-mark,.assistant-avatar {
    display:grid;
    place-items:center;
    width:38px;
    height:38px;
    border-radius:11px;
    background:linear-gradient(145deg,#4c80e4,#285ab8);
    color:#fff;
    font-weight:800
}

.brand strong {
    display:block;
    font-size:16px
}

.brand small {
    display:block;
    margin-top:2px;
    color:#9fb0c7;
    font-size:12px
}

.main-nav nav {
    display:grid;
    gap:6px
}

.nav-item {
    display:flex;
    align-items:center;
    gap:12px;
    width:100%;
    padding:12px 13px;
    border:0;
    border-radius:9px;
    color:#b8c5d7;
    background:transparent;
    text-align:left;
    font-weight:650;
    cursor:pointer
}

.nav-item span {
    width:21px;
    font-size:20px;
    text-align:center
}

.nav-item b {
    margin-left:auto;
    min-width:24px;
    padding:2px 7px;
    border-radius:12px;
    background:#253650;
    color:#c9d5e6;
    font-size:11px;
    text-align:center
}

.nav-item:hover {
    color:#fff;
    background:#142640
}

.nav-item.active {
    color:#fff;
    background:#2859b1;
    box-shadow:0 6px 18px rgba(0,0,0,.18)
}

.nav-item.active b {
    background:rgba(255,255,255,.18);
    color:#fff
}

.nav-spacer {
    flex:1
}

.system-state {
    display:flex;
    align-items:center;
    gap:10px;
    padding:14px 10px;
    border-top:1px solid #26364d
}

.system-state i {
    width:9px;
    height:9px;
    border-radius:50%;
    background:#8da0b8;
    box-shadow:0 0 0 4px rgba(141,160,184,.1)
}

.system-state i.online {
    background:#43c48a;
    box-shadow:0 0 0 4px rgba(67,196,138,.12)
}

.system-state strong,.system-state small {
    display:block
}

.system-state strong {
    font-size:12px
}

.system-state small {
    margin-top:2px;
    color:#8fa1b9;
    font-size:11px
}

.main-content {
    min-width:0
}

/* =========================================================
   04. BOVENBALK & PAGINA'S
   ========================================================= */

.topbar {
    height:92px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:20px;
    padding:18px 30px;
    background:#fff;
    border-bottom:1px solid var(--line)
}

.topbar h1 {
    margin:0;
    font-size:25px;
    letter-spacing:-.5px
}

.topbar p {
    margin:4px 0 0;
    color:var(--muted)
}

.top-actions {
    display:flex;
    gap:9px
}

.button {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:40px;
    padding:0 15px;
    border:1px solid transparent;
    border-radius:8px;
    text-decoration:none;
    font-weight:700;
    cursor:pointer
}

.button.primary {
    color:#fff;
    background:var(--blue)
}

.button.primary:hover {
    background:var(--blue-dark)
}

.button.secondary {
    color:#314158;
    background:#fff;
    border-color:var(--line)
}

.button.secondary:hover {
    border-color:#9fb1ca;
    background:#f7f9fc
}

.button.full {
    width:100%;
    margin-top:13px
}

.app-page {
    display:none;
    padding:24px 30px
}

.app-page.active {
    display:block
}

.card,.chat-card,/* =========================================================
   06. BRONNEN & CONTEXTPANEEL
   ========================================================= */

.source-panel {
    background:var(--surface);
    border:1px solid var(--line);
    border-radius:13px;
    box-shadow:var(--shadow)
}

/* =========================================================
   05. VRAAG & ANTWOORD
   ========================================================= */

.chat-layout {
    display:grid;
    grid-template-columns:minmax(0,1fr) 310px;
    gap:20px;
    height:calc(100vh - 140px)
}

.chat-card {
    display:grid;
    grid-template-rows:minmax(0,1fr) auto;
    overflow:hidden
}

.conversation {
    overflow:auto;
    padding:30px 34px
}

.welcome {
    display:flex;
    gap:14px;
    max-width:820px;
    margin:16px auto
}

.welcome h2 {
    margin:2px 0 7px;
    font-size:21px
}

.welcome p {
    margin:0;
    color:var(--muted);
    line-height:1.55
}

.suggestions {
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    margin-top:17px
}

.suggestions button {
    padding:8px 12px;
    border:1px solid var(--line);
    border-radius:20px;
    color:#496078;
    background:#fff;
    cursor:pointer
}

.suggestions button:hover {
    border-color:#8ca8d6;
    background:#f5f8ff
}

.message {
    max-width:860px;
    margin:0 auto 18px;
    line-height:1.65
}

.message.user {
    width:max-content;
    max-width:min(80%,860px);
    margin-left:auto;
    padding:12px 16px;
    border-radius:13px 13px 3px 13px;
    background:var(--blue-soft)
}

.message.assistant {
    padding:2px 2px 12px
}

.message.waiting {
    color:var(--muted)
}

.message .message-sources {
    display:flex;
    flex-wrap:wrap;
    gap:7px;
    margin-top:13px
}

.source-button {
    display:flex;
    align-items:center;
    gap:7px;
    padding:7px 9px;
    border:1px solid var(--line);
    border-radius:7px;
    background:#f7f9fc;
    cursor:pointer
}

.source-button b {
    display:grid;
    place-items:center;
    width:20px;
    height:20px;
    border-radius:5px;
    color:#fff;
    background:var(--blue);
    font-size:11px
}

.source-button small {
    color:var(--muted)
}

.ask-box {
    padding:14px 18px 12px;
    border-top:1px solid var(--line);
    background:#fff
}

.ask-row {
    display:flex;
    align-items:flex-end;
    gap:10px
}

.ask-row textarea {
    flex:1;
    max-height:130px;
    padding:12px 5px;
    border:0;
    outline:0;
    resize:none;
    color:var(--ink)
}

.send-button {
    display:grid;
    place-items:center;
    width:43px;
    height:43px;
    border:0;
    border-radius:9px;
    color:#fff;
    background:var(--blue);
    cursor:pointer
}

.ask-box>small {
    display:block;
    margin-top:5px;
    color:#94a0b0;
    font-size:10px;
    text-align:center
}

.scope-chip {
    display:inline-flex;
    align-items:center;
    gap:7px;
    padding:5px 9px;
    border:1px solid #bfd0ec;
    border-radius:16px;
    color:#315993;
    background:#f0f5ff;
    font-size:11px;
    cursor:pointer
}

.source-panel {
    overflow:auto;
    padding:20px
}

.source-empty {
    margin-top:100px;
    text-align:center;
    color:var(--muted)
}

.source-empty>span {
    font-size:32px
}

.source-empty h3 {
    margin:9px 0 5px;
    color:var(--ink)
}

.source-card {
    padding:13px 0;
    border-bottom:1px solid var(--line);
    cursor:pointer
}

.source-card strong {
    display:block
}

.source-card small {
    display:block;
    margin-top:4px;
    color:var(--muted)
}

.library-toolbar {
    display:grid;
    grid-template-columns:minmax(280px,1fr) 150px 165px auto;
    gap:10px;
    padding:14px
}

.search-box {
    display:flex;
    align-items:center;
    gap:8px;
    padding:0 12px;
    border:1px solid var(--line);
    border-radius:8px;
    background:#f8fafc
}

.search-box span {
    color:#75869c;
    font-size:20px
}

.search-box input {
    width:100%;
    height:40px;
    border:0;
    outline:0;
    background:transparent
}

.library-toolbar select {
    height:42px;
    padding:0 10px;
    border:1px solid var(--line);
    border-radius:8px;
    color:#415269;
    background:#fff
}

.library-summary-row {
    display:flex;
    align-items:end;
    justify-content:space-between;
    margin:22px 2px 13px
}

.library-summary-row h2 {
    margin:0;
    font-size:20px
}

.library-summary-row p {
    margin:4px 0 0;
    color:var(--muted)
}

.library-hint {
    color:var(--muted);
    font-size:12px
}

.document-grid {
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(290px,1fr));
    gap:11px
}

.document-card {
    display:grid;
    grid-template-columns:44px minmax(0,1fr) auto;
    align-items:center;
    gap:11px;
    min-height:83px;
    padding:14px;
    border:1px solid var(--line);
    border-radius:10px;
    background:#fff;
    box-shadow:0 3px 12px rgba(20,35,60,.04);
    cursor:pointer
}

.document-card:hover {
    transform:translateY(-1px);
    border-color:#9db5dc;
    box-shadow:0 8px 22px rgba(20,35,60,.08)
}

.file-icon {
    display:grid;
    place-items:center;
    width:44px;
    height:48px;
    border-radius:9px;
    color:#315da8;
    background:#e8f0ff;
    font-size:11px;
    font-weight:850
}

.file-icon.pdf {
    color:#c54343;
    background:#fdeaea
}

.file-icon.xlsx,.file-icon.xls,.file-icon.csv {
    color:#218358;
    background:#e4f6ed
}

.file-icon.pptx,.file-icon.ppt {
    color:#c55c22;
    background:#fff0e6
}

.document-copy {
    min-width:0
}

.document-copy strong {
    display:block;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap
}

.document-copy small {
    display:block;
    margin-top:5px;
    color:var(--muted);
    font-size:12px
}

.status-dot {
    width:9px;
    height:9px;
    border-radius:50%;
    background:#8d9aab
}

.status-dot.indexed {
    background:var(--green)
}

.status-dot.processing,.status-dot.queued {
    background:#e6a329
}

.status-dot.error {
    background:var(--red)
}

.pager {
    display:flex;
    align-items:center;
    justify-content:center;
    gap:18px;
    margin:22px 0
}

.pager button {
    padding:8px 13px;
    border:1px solid var(--line);
    border-radius:7px;
    background:#fff;
    cursor:pointer
}

.pager button:disabled {
    opacity:.4;
    cursor:default
}

.pager span {
    color:var(--muted);
    font-size:13px
}

.import-grid {
    display:grid;
    grid-template-columns:minmax(420px,.9fr) minmax(430px,1.1fr);
    gap:20px
}

.import-card,.jobs-card {
    padding:21px
}

.section-heading,.dialog-heading {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:15px
}

.section-heading h2,.dialog-heading h2 {
    margin:2px 0 0;
    font-size:20px
}

.eyebrow {
    color:var(--blue);
    font-size:10px;
    font-weight:850;
    letter-spacing:1.5px;
    text-transform:uppercase
}

.count-badge {
    padding:5px 9px;
    border-radius:14px;
    color:#315da8;
    background:var(--blue-soft);
    font-size:11px;
    font-weight:750
}

.dropzone {
    display:grid;
    place-items:center;
    min-height:190px;
    margin-top:18px;
    padding:22px;
    border:2px dashed #b7c5d8;
    border-radius:11px;
    color:#53657c;
    background:#f8fafc;
    text-align:center;
    cursor:pointer
}

.dropzone:hover,.dropzone.dragover {
    border-color:var(--blue);
    background:#f0f5ff
}

.dropzone input {
    position:absolute;
    width:1px;
    height:1px;
    opacity:0
}

.dropzone strong {
    margin:9px 0 5px;
    color:var(--ink)
}

.dropzone small {
    max-width:430px;
    line-height:1.45
}

.upload-icon {
    display:grid;
    place-items:center;
    width:48px;
    height:48px;
    border-radius:13px;
    color:#fff;
    background:var(--blue);
    font-size:26px
}

.selected-files {
    max-height:180px;
    overflow:auto;
    margin-top:12px
}

.selected-files p {
    margin:8px 0;
    color:var(--muted);
    font-size:13px
}

.selected-file {
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    gap:9px;
    padding:8px 3px;
    border-bottom:1px solid #edf0f4
}

.selected-file strong {
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    font-size:12px
}

.selected-file span {
    color:var(--muted);
    font-size:11px
}

.selected-file.uploading span {
    color:#b17a10
}

.selected-file.done span {
    color:var(--green)
}

.selected-file.error span {
    color:var(--red)
}

.notice {
    min-height:19px;
    margin-top:9px;
    color:var(--muted);
    font-size:12px
}

.notice.error {
    color:var(--red)
}

.jobs-list {
    max-height:calc(100vh - 225px);
    overflow:auto;
    margin-top:12px
}

.job-row {
    padding:13px 2px;
    border-bottom:1px solid var(--line)
}

.job-top,.job-meta {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px
}

.job-top strong {
    display:block;
    max-width:70%;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    font-size:13px
}

.job-top span,.job-meta {
    color:var(--muted);
    font-size:11px
}

.job-progress {
    height:5px;
    margin:9px 0;
    border-radius:5px;
    background:#e6ebf2;
    overflow:hidden
}

.job-progress i {
    display:block;
    height:100%;
    background:var(--blue)
}

.job-meta button {
    border:0;
    color:var(--blue);
    background:transparent;
    cursor:pointer
}

.empty {
    padding:35px 10px;
    color:var(--muted);
    text-align:center
}

.error-text {
    color:var(--red)
}

.icon-button {
    display:grid;
    place-items:center;
    width:36px;
    height:36px;
    border:1px solid var(--line);
    border-radius:8px;
    color:#4b5e77;
    background:#fff;
    cursor:pointer
}

.document-dialog {
    width:min(960px,calc(100vw - 40px));
    height:min(820px,calc(100vh - 40px));
    padding:20px;
    border:0;
    border-radius:14px;
    color:var(--ink);
    box-shadow:0 28px 80px rgba(0,0,0,.3)
}

dialog::backdrop {
    background:rgba(6,15,29,.58);
    backdrop-filter:blur(2px)
}

.document-meta {
    display:flex;
    align-items:center;
    gap:12px;
    margin-top:18px;
    padding:13px;
    border:1px solid var(--line);
    border-radius:10px;
    background:#f8fafc
}

.document-meta strong,.document-meta small {
    display:block
}

.document-meta small {
    margin-top:4px;
    color:var(--muted)
}

.document-actions {
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    margin:13px 0
}

.preview-area {
    height:calc(100% - 220px);
    min-height:380px;
    border:1px solid var(--line);
    border-radius:10px;
    overflow:hidden;
    background:#eef2f6
}

.preview-area iframe {
    width:100%;
    height:100%;
    border:0;
    background:#fff
}

.preview-fallback {
    display:grid;
    place-content:center;
    height:100%;
    text-align:center;
    color:var(--muted)
}

.preview-fallback strong {
    color:var(--ink)
}

.danger-link {
    margin-top:12px;
    padding:5px 0;
    border:0;
    color:var(--red);
    background:transparent;
    cursor:pointer
}

.small-dialog {
    width:min(510px,calc(100vw - 30px));
    padding:20px;
    border:0;
    border-radius:13px;
    color:var(--ink);
    box-shadow:0 28px 80px rgba(0,0,0,.3)
}

.field-label {
    display:block;
    margin:18px 0 6px;
    font-size:12px;
    font-weight:750
}

.text-input {
    width:100%;
    height:43px;
    padding:0 11px;
    border:1px solid var(--line);
    border-radius:8px;
    outline:0
}

.text-input:focus {
    border-color:var(--blue);
    box-shadow:0 0 0 3px rgba(47,99,199,.12)
}

.help-text {
    margin:8px 0;
    color:var(--muted);
    font-size:12px
}

.dialog-buttons {
    display:flex;
    justify-content:flex-end;
    gap:8px;
    margin-top:18px
}

@media(max-width:1050px) {
    .app-shell {
        grid-template-columns:78px minmax(0,1fr)
    }
    .main-nav {
        padding:20px 10px
    }
    .brand {
        justify-content:center;
        padding:4px 0 25px
    }
    .brand div,.nav-item:not(.active) b,.nav-item {
        font-size:0
    }
    .nav-item {
        justify-content:center;
        padding:12px
    }
    .nav-item span {
        font-size:20px
    }
    .nav-item.active b {
        display:none
    }
    .system-state div {
        display:none
    }
    .system-state {
        justify-content:center
    }
    .chat-layout {
        grid-template-columns:minmax(0,1fr)
    }
    .source-panel {
        display:none
    }
    .import-grid {
        grid-template-columns:1fr
    }
    .library-toolbar {
        grid-template-columns:minmax(240px,1fr) 130px 150px
    }
    .library-toolbar .button {
        grid-column:1/-1
    }
    .jobs-list {
        max-height:500px
    }
}

@media(max-width:700px) {
    .app-shell {
        display:block
    }
    .main-nav {
        position:fixed;
        z-index:20;
        top:auto;
        bottom:0;
        left:0;
        right:0;
        width:100%;
        height:64px;
        display:block;
        padding:7px;
        background:var(--navy)
    }
    .brand,.nav-spacer,.system-state {
        display:none
    }
    .main-nav nav {
        display:grid;
        grid-template-columns:repeat(3,1fr);
        gap:4px
    }
    .nav-item,.nav-item:not(.active) {
        display:flex;
        flex-direction:column;
        gap:1px;
        justify-content:center;
        padding:5px;
        font-size:10px
    }
    .nav-item span {
        font-size:17px
    }
    .nav-item b {
        display:none
    }
    .topbar {
        height:auto;
        padding:14px 16px
    }
    .topbar h1 {
        font-size:20px
    }
    .topbar p {
        display:none
    }
    .top-actions .secondary {
        display:none
    }
    .app-page {
        padding:14px 12px 82px
    }
    .chat-layout {
        height:calc(100vh - 150px)
    }
    .conversation {
        padding:20px 16px
    }
    .library-toolbar {
        grid-template-columns:1fr 1fr
    }
    .search-box {
        grid-column:1/-1
    }
    .library-toolbar .button {
        grid-column:1/-1
    }
    .document-grid {
        grid-template-columns:1fr
    }
    .library-hint {
        display:none
    }
    .import-grid {
        display:block
    }
    .jobs-card {
        margin-top:14px
    }
    .document-dialog {
        width:100vw;
        height:100vh;
        max-width:none;
        max-height:none;
        border-radius:0
    }
    .document-actions .button {
        flex:1
    }
    .preview-area {
        height:calc(100% - 270px)
    }
}

/* Donker, contrastrijk kennisthema */
:root {
    --navy:#050d18;
    --navy-2:#0b1726;
    --blue:#2878e8;
    --blue-dark:#1765cf;
    --blue-soft:#112f58;
    --ink:#f2f6fb;
    --muted:#a9b7c8;
    --line:#26384b;
    --surface:#0d1a28;
    --background:#08131f;
    --green:#35c58b;
    --red:#f05a67;
    --shadow:0 12px 30px rgba(0,0,0,.22)
}

body {
    font-size:15px;
    background:radial-gradient(circle at 70% 0,#0d2135 0,#08131f 42%,#06101b 100%)
}

.main-nav {
    background:linear-gradient(180deg,#050d18,#071422);
    border-right:1px solid #1e3043
}

.brand small,.system-state small {
    color:#93a6bc
}

.nav-item {
    color:#b8c6d6
}

.nav-item:hover {
    background:#10243c
}

.nav-item.active {
    background:linear-gradient(135deg,#17427d,#205db1);
    box-shadow:0 7px 20px rgba(0,65,155,.28)
}

.topbar {
    background:rgba(7,18,30,.94);
    border-color:var(--line);
    backdrop-filter:blur(12px)
}

.topbar h1,.library-summary-row h2,.section-heading h2,.dialog-heading h2,.welcome h2,.source-empty h3 {
    color:var(--ink)
}

.app-page {
    background:transparent
}

.card,.chat-card,.source-panel,.document-card {
    background:linear-gradient(145deg,#0e1c2b,#0b1724);
    border-color:var(--line);
    box-shadow:var(--shadow)
}

.button.secondary,.icon-button,.pager button {
    color:#d6e1ed;
    background:#102033;
    border-color:#30465d
}

.button.secondary:hover,.icon-button:hover,.pager button:hover:not(:disabled) {
    color:#fff;
    background:#172b42;
    border-color:#4d6b8b
}

.search-box,.library-toolbar select,.text-input {
    color:var(--ink);
    background:#0a1724;
    border-color:#2a4056
}

.search-box input,.text-input {
    color:var(--ink)
}

.search-box input::placeholder,.ask-row textarea::placeholder {
    color:#8295aa
}

.library-toolbar select option {
    color:var(--ink);
    background:#0d1a28
}

.conversation,.ask-box {
    background:#0b1825
}

.ask-box {
    border-color:var(--line)
}

.ask-row textarea {
    color:var(--ink);
    background:transparent
}

.suggestions button,.source-button {
    color:#c7d6e7;
    background:#102033;
    border-color:#2d4359
}

.suggestions button:hover,.source-button:hover {
    background:#16304d;
    border-color:#3976bd
}

.message.user {
    color:#e8f2ff;
    background:linear-gradient(135deg,#12365f,#16477e)
}

.scope-chip {
    color:#bcd8ff;
    background:#102d50;
    border-color:#295887
}

.source-card {
    border-color:var(--line)
}

.source-card:hover {
    color:#fff
}

.source-empty {
    color:var(--muted)
}

.document-grid {
    grid-template-columns:repeat(auto-fill,minmax(260px,1fr));
    gap:8px
}

.document-card {
    grid-template-columns:36px minmax(0,1fr) auto;
    gap:9px;
    min-height:62px;
    padding:9px 11px;
    border-radius:8px;
    color:var(--ink);
    box-shadow:0 4px 13px rgba(0,0,0,.16)
}

.document-card:hover {
    border-color:#4075ad;
    background:#102238;
    box-shadow:0 8px 20px rgba(0,0,0,.24)
}

.document-card .file-icon {
    width:36px;
    height:40px;
    border-radius:7px;
    font-size:9px
}

.document-copy strong {
    font-size:13px;
    line-height:1.25
}

.document-copy small {
    margin-top:3px;
    color:#9fb0c2;
    font-size:10px
}

.status-dot {
    width:8px;
    height:8px
}

.file-icon {
    color:#83b7ff;
    background:#102f58
}

.file-icon.pdf {
    color:#ff858a;
    background:#3a1e28
}

.file-icon.xlsx,.file-icon.xls,.file-icon.csv {
    color:#69dca8;
    background:#123529
}

.file-icon.pptx,.file-icon.ppt {
    color:#ffad75;
    background:#3d291d
}

.dropzone {
    min-height:160px;
    margin-top:13px;
    color:#a9b8c8;
    background:#091724;
    border-color:#385169
}

.dropzone:hover,.dropzone.dragover {
    background:#0e2540;
    border-color:#3d8bf2
}

.selected-file,.job-row {
    border-color:#203347
}

.import-card,.jobs-card {
    padding:16px
}

.jobs-list {
    margin-top:7px
}

.job-row {
    padding:8px 2px
}

.job-top .job-title {
    display:block;
    max-width:75%;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    color:#f2f6fb;
    font-size:12px;
    font-weight:400
}

.job-top>span:not(.job-title),.job-meta {
    font-size:10px
}

.job-progress {
    height:3px;
    margin:6px 0
}

.section-heading h2 {
    font-size:18px
}

.section-heading .eyebrow {
    font-size:9px
}

.count-badge {
    color:#a8ceff;
    background:#12345c
}

.document-dialog,.small-dialog {
    color:var(--ink);
    background:#0c1926;
    border:1px solid #2a4055
}

.document-meta {
    background:#091724;
    border-color:var(--line)
}

.preview-area {
    background:#07131e;
    border-color:var(--line)
}

.help-text,.document-meta small {
    color:var(--muted)
}

.notice,.empty,.library-summary-row p,.library-hint,.pager span {
    color:var(--muted)
}

.notice.error,.error-text {
    color:#ff7c86
}

/* Importfeedback: geldige sleepselectie, knopstatus en zichtbare verwerking */
.dropzone.has-files {
    border-color:#3d8bf2;
    background:#0e2540
}

.button:disabled {
    opacity:.48;
    cursor:not-allowed
}

.job-progress.active i {
    animation:import-progress 1.2s ease-in-out infinite
}

@keyframes import-progress {
    0% {
        transform:translateX(-45%)
    }
    50% {
        transform:translateX(145%)
    }
    100% {
        transform:translateX(-45%)
    }
}

/* Compacte chatvolgorde en inklapbare bronnen */
.message.user {
    width:fit-content;
    max-width:min(82%,860px);
    margin-left:0;
    margin-right:auto;
    border-radius:3px 13px 13px 13px
}

.conversation {
    scroll-behavior:smooth;
    overflow-anchor:none
}

.source-details {
    margin-top:12px;
    border:1px solid #2b4158;
    border-radius:8px;
    background:#0c1b2a
}

.source-details summary,.panel-source-details summary {
    padding:9px 11px;
    color:#c9d7e7;
    font-size:12px;
    font-weight:600;
    cursor:pointer;
    list-style:none
}

.source-details summary::-webkit-details-marker,.panel-source-details summary::-webkit-details-marker {
    display:none
}

.source-details summary::after,.panel-source-details summary::after {
    content:'▾';
    float:right;
    color:#7f94aa;
    transition:transform .15s ease
}

.source-details[open] summary::after,.panel-source-details[open] summary::after {
    transform:rotate(180deg)
}

.source-details .message-sources {
    margin:0;
    padding:0 10px 10px
}

.panel-source-details {
    margin-top:14px;
    border:1px solid #2b4158;
    border-radius:8px;
    background:#0a1724
}

.panel-source-details>div {
    padding:0 10px 5px
}

.job-actions {
    display:flex;
    gap:9px;
    margin-left:auto
}

.job-actions .remove-job {
    color:#ff7c86
}

/* Bronnenpaneel in dezelfde compacte stijl als de importwachtrij */
.panel-source-details .source-card {
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:center;
    gap:10px;
    width:100%;
    padding:9px 2px;
    border:0;
    border-bottom:1px solid #203347;
    border-radius:0;
    color:var(--ink);
    background:transparent;
    text-align:left;
    cursor:pointer
}

.panel-source-details .source-card:hover {
    color:#fff;
    background:#102238
}

.panel-source-details .source-title {
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    color:#f2f6fb;
    font-size:12px;
    font-weight:400
}

.panel-source-details .source-card small {
    color:#9fb0c2;
    font-size:10px;
    white-space:nowrap
}

/* Compactere Vraag & Antwoord-weergave */
.chat-layout {
    gap:14px
}

.conversation {
    padding:18px 24px
}

.message {
    max-width:100%;
    margin:0 0 11px;
    font-size:14px;
    line-height:1.5
}

.message.user {
    max-width:min(78%,760px);
    padding:8px 12px
}

.message.assistant {
    padding:0 0 5px
}

.source-details {
    margin-top:7px
}

.source-details summary,.panel-source-details summary {
    padding:7px 10px
}

.source-details .message-sources {
    padding:0 8px 8px;
    gap:5px
}

.source-button {
    padding:5px 7px;
    font-size:11px
}

.source-button b {
    width:18px;
    height:18px
}

.ask-box {
    padding:10px 14px 8px
}

.ask-row textarea {
    padding:9px 4px
}

.send-button {
    width:39px;
    height:39px
}

.source-panel {
    padding:15px
}

.welcome {
    margin:8px auto
}

.welcome h2 {
    font-size:19px
}

.suggestions {
    margin-top:12px
}

/* Kennisruimtes en compacte bibliotheek */
.top-actions {
    display:flex;
    align-items:center;
    gap:9px
}

.space-switch {
    display:flex;
    align-items:center;
    gap:3px;
    padding:3px;
    border:1px solid #29445f;
    border-radius:9px;
    background:#091724
}

.space-switch>span {
    display:none
}

.space-option {
    padding:7px 11px;
    border:0;
    border-radius:6px;
    color:#9fb0c2;
    background:transparent;
    cursor:pointer
}

.space-option.active {
    color:#fff;
    background:#235fac;
    box-shadow:0 2px 8px rgba(35,95,172,.3)
}

.space-option[data-space="geloof"].active {
    background:#7041c7;
    box-shadow:0 2px 8px rgba(112,65,199,.3)
}

.space-option[data-space="coaching"].active {
    background:#168d62;
    box-shadow:0 2px 8px rgba(22,141,98,.3)
}

.document-grid {
    grid-template-columns:1fr;
    gap:4px
}

.document-card {
    grid-template-columns:34px minmax(0,1fr) 12px;
    min-height:50px;
    padding:6px 10px;
    gap:10px;
    border-radius:7px
}

.document-card .file-icon {
    width:32px;
    height:36px;
    border-radius:6px;
    font-size:8px
}

.document-copy {
    display:grid;
    grid-template-columns:minmax(0,1fr) 64px 112px;
    align-items:baseline;
    column-gap:18px;
    min-width:0;
    text-align:left;
    white-space:nowrap
}

.document-copy .document-title {
    display:block;
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    color:#e6edf5;
    font-size:12px;
    font-weight:400;
    line-height:1.25
}

.document-copy small {
    display:block;
    margin:0;
    font-size:10px
}

.document-copy .document-type,.document-copy .document-pages {
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap
}

.job-meta>span {
    line-height:1.45
}

.job-top .job-title {
    font-weight:400
}

@media(max-width:700px) {
    .top-actions {
        gap:5px
    }
    .space-option {
        padding:7px 8px
    }
    .top-actions .button.primary {
        display:none
    }
    .document-copy {
        grid-template-columns:minmax(0,1fr) 42px 82px;
        column-gap:7px
    }
}

/* Mock-up 2026-07-17: vaste navigatie, werkgebieden en contextpaneel */
.app-shell {
    grid-template-columns:280px minmax(0,1fr)
}

.main-nav {
    padding:20px 15px 14px
}

.brand {
    padding:3px 8px 20px
}

.brand-mark {
    color:#58a2ff;
    background:#102c50;
    border:1px solid #285d99
}

.brand strong {
    font-size:17px
}

.brand small {
    font-size:10px
}

.primary-nav {
    gap:4px!important
}

.nav-item {
    min-height:39px;
    padding:9px 11px;
    font-size:12px;
    font-weight:600
}

.nav-item span {
    font-size:16px
}

.nav-item em {
    margin-left:auto;
    color:#71859a;
    font-size:9px;
    font-style:normal
}

.nav-item.future {
    opacity:.58
}

.nav-divider {
    height:1px;
    margin:14px 9px 13px;
    background:#1e3043
}

.nav-label {
    margin:0 10px 8px;
    color:#71859a;
    font-size:9px;
    font-weight:800;
    letter-spacing:1px;
    text-transform:uppercase
}

.workspace-nav {
    display:grid;
    gap:5px
}

.workspace-nav .space-option {
    display:grid;
    grid-template-columns:34px minmax(0,1fr);
    align-items:center;
    gap:10px;
    width:100%;
    padding:8px;
    border:1px solid transparent;
    border-radius:9px;
    text-align:left
}

.workspace-nav .space-option i {
    display:grid;
    place-items:center;
    width:32px;
    height:32px;
    border-radius:8px;
    color:#fff;
    background:#276ed4;
    font-size:16px;
    font-style:normal
}

.workspace-nav .space-option[data-space="geloof"] i {
    background:#7041c7
}

.workspace-nav .space-option[data-space="coaching"] i {
    background:#168d62
}

.workspace-nav .space-option span {
    min-width:0
}

.workspace-nav .space-option strong,.workspace-nav .space-option small {
    display:block
}

.workspace-nav .space-option strong {
    color:#dce7f3;
    font-size:12px
}

.workspace-nav .space-option small {
    margin-top:2px;
    color:#7f93a8;
    font-size:9px;
    line-height:1.3
}

.workspace-nav .space-option.active {
    background:#10243a;
    border-color:#274866;
    box-shadow:none
}

.workspace-nav .space-option[data-space="geloof"].active {
    background:#21183b
}

.workspace-nav .space-option[data-space="coaching"].active {
    background:#102d27
}

.settings-link {
    display:flex;
    align-items:center;
    gap:10px;
    width:100%;
    padding:10px;
    border:0;
    border-top:1px solid #1e3043;
    color:#aebed0;
    background:transparent;
    font-size:12px;
    text-align:left
}

.settings-link b {
    margin-left:auto
}

.profile-card {
    display:flex;
    align-items:center;
    gap:9px;
    padding:10px 8px
}

.profile-card>span {
    display:grid;
    place-items:center;
    width:31px;
    height:31px;
    border-radius:50%;
    color:#fff;
    background:#276ed4;
    font-size:10px;
    font-weight:800
}

.profile-card strong,.profile-card small {
    display:block
}

.profile-card strong {
    font-size:11px
}

.profile-card small {
    color:#71859a;
    font-size:9px
}

.system-state {
    padding:9px 8px
}

.system-state strong {
    font-size:10px
}

.system-state small {
    font-size:9px
}

.topbar {
    height:82px;
    padding:14px 24px
}

.topbar h1 {
    font-size:22px
}

.topbar p {
    font-size:12px
}

.top-actions {
    flex-wrap:wrap
}

.active-space-badge {
    padding:6px 9px;
    border:1px solid #29445f;
    border-radius:15px;
    color:#9fc9ff;
    background:#0c2137;
    font-size:10px
}

.top-icon {
    width:34px;
    height:34px;
    border:1px solid transparent;
    border-radius:8px;
    color:#b7c7d8;
    background:transparent;
    cursor:pointer
}

.top-icon:hover {
    border-color:#2b4560;
    background:#10243a
}

.top-actions .button {
    min-height:36px;
    padding:0 12px;
    font-size:11px
}

.app-page {
    padding:18px 22px
}

.chat-layout {
    grid-template-columns:minmax(0,1fr) 340px;
    gap:12px;
    height:calc(100vh - 118px)
}

.chat-card {
    grid-template-rows:minmax(0,1fr) auto auto
}

.conversation {
    padding:24px
}

.hero-welcome {
    display:block;
    max-width:720px;
    margin:18px auto;
    text-align:center
}

.hero-welcome .assistant-avatar {
    margin:0 auto 13px;
    width:52px;
    height:52px;
    border-radius:50%;
    font-size:22px
}

.hero-welcome h2 {
    margin:6px 0 7px;
    font-size:24px
}

.hero-welcome p {
    max-width:620px;
    margin:0 auto;
    color:#91a4b9
}

.hero-welcome .suggestions {
    justify-content:center;
    margin-top:20px
}

.hero-welcome .suggestions button {
    border-radius:8px;
    font-size:11px
}

.ask-box {
    margin:0 18px 12px;
    padding:10px 12px;
    border:1px solid #34516f;
    border-radius:10px;
    background:#0a1724
}

.ask-row textarea {
    min-height:55px
}

.answer-guide {
    display:grid;
    grid-template-columns:1.4fr repeat(3,1fr);
    gap:8px;
    padding:11px 18px;
    border-top:1px solid #203347;
    color:#91a4b9;
    font-size:10px
}

.answer-guide strong {
    color:#dbe7f3
}

.answer-guide span {
    padding-left:9px;
    border-left:1px solid #263c52
}

.source-panel {
    padding:15px
}

.context-heading {
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:10px
}

.context-heading h2 {
    margin:3px 0 0;
    font-size:16px
}

.context-heading small {
    color:#71859a;
    font-size:9px
}

.context-tabs {
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:3px;
    margin:13px 0 4px;
    border-bottom:1px solid #26384b
}

.context-tabs button {
    padding:8px 4px;
    border:0;
    border-bottom:2px solid transparent;
    color:#8194a8;
    background:transparent;
    font-size:10px
}

.context-tabs button.active {
    color:#64a8ff;
    border-color:#2878e8
}

.source-empty {
    margin:45px 0 28px
}

.context-placeholder {
    margin-top:auto;
    padding-top:13px;
    border-top:1px solid #26384b
}

.context-placeholder strong {
    font-size:11px
}

.context-placeholder div {
    display:flex;
    flex-wrap:wrap;
    gap:5px;
    margin-top:9px
}

.context-placeholder span {
    padding:5px 8px;
    border-radius:12px;
    color:#9fc9ff;
    background:#102a47;
    font-size:9px
}

.page-intro {
    display:flex;
    align-items:end;
    justify-content:space-between;
    margin:4px 0 13px
}

.page-intro h2 {
    margin:4px 0 3px;
    font-size:20px
}

.page-intro p {
    margin:0;
    color:var(--muted);
    font-size:11px
}

.library-toolbar {
    grid-template-columns:minmax(260px,1fr) 140px 145px auto;
    padding:10px
}

.document-grid {
    gap:3px
}

.document-card {
    grid-template-columns:30px minmax(0,1fr) 10px;
    min-height:45px;
    padding:5px 9px
}

.document-card .file-icon {
    width:28px;
    height:31px
}

.document-copy .document-title {
    font-size:11px
}

.document-copy small {
    font-size:9px
}

.queue-explainer {
    margin:8px 0 0;
    color:#8397ab;
    font-size:10px;
    line-height:1.45
}

@media(max-width:1120px) {
    .app-shell {
        grid-template-columns:78px minmax(0,1fr)
    }
    .main-nav {
        padding:16px 9px
    }
    .brand {
        justify-content:center
    }
    .brand div,.nav-label,.nav-divider,.workspace-nav .space-option span,.profile-card div,.settings-link:not(:focus) b {
        display:none
    }
    .workspace-nav .space-option {
        display:grid;
        grid-template-columns:1fr;
        justify-items:center;
        padding:6px
    }
    .settings-link {
        justify-content:center
    }
    .profile-card {
        justify-content:center
    }
    .chat-layout {
        grid-template-columns:minmax(0,1fr)
    }
    .source-panel {
        display:none
    }
}

@media(max-width:700px) {
    .app-shell {
        display:block
    }
    .main-nav {
        height:64px
    }
    .primary-nav {
        grid-template-columns:repeat(3,1fr)!important
    }
    .primary-nav .future,.workspace-nav,.settings-link,.profile-card {
        display:none
    }
    .topbar {
        padding:12px 14px
    }
    .active-space-badge,.top-icon {
        display:none
    }
    .answer-guide {
        display:none
    }
    .chat-layout {
        height:calc(100vh - 145px)
    }
    .chat-card {
        grid-template-rows:minmax(0,1fr) auto
    }
    .hero-welcome {
        margin:4px auto
    }
    .hero-welcome h2 {
        font-size:20px
    }
    .hero-welcome .suggestions {
        display:grid
    }
    .ask-box {
        margin:0 8px 8px
    }
    .page-intro {
        display:block
    }
    .library-toolbar {
        grid-template-columns:1fr 1fr
    }
}

/* Iets grotere, beter leesbare interfacetekst */
.brand small {
    font-size:11px
}

.nav-item {
    font-size:13px
}

.nav-label {
    font-size:10px
}

.workspace-nav .space-option strong {
    font-size:13px
}

.workspace-nav .space-option small {
    font-size:11px
}

.settings-link {
    font-size:13px
}

.profile-card strong {
    font-size:12px
}

.profile-card small {
    font-size:10px
}

.topbar p {
    font-size:13px
}

.top-actions .button {
    font-size:12px
}

.active-space-badge {
    font-size:11px
}

.hero-welcome p {
    font-size:13px
}

.hero-welcome .suggestions button {
    font-size:12px
}

.answer-guide {
    font-size:11px
}

.context-heading small,.context-placeholder span {
    font-size:10px
}

.context-tabs button {
    font-size:11px
}

.document-copy .document-title {
    font-size:12px
}

.document-copy small {
    font-size:10px
}

.queue-explainer {
    font-size:11px
}

.portal-button,.logout-button {
    display:flex;
    align-items:center;
    gap:10px;
    width:100%;
    padding:9px 10px;
    border:0;
    color:#aebed0;
    background:transparent;
    font-size:12px;
    text-align:left;
    cursor:pointer;
    text-decoration:none
}

.portal-button {
    border-top:1px solid #1e3043;
    color:#8fc1ff
}

.logout-button {
    border-top:1px solid #1e3043
}

.portal-button:hover,.logout-button:hover {
    color:#fff;
    background:#10243a
}

.portal-button span,.logout-button span {
    font-size:16px
}

.context-list {
    display:grid;
    gap:7px;
    padding:10px 0
}

.context-intro {
    margin:0 0 3px;
    color:#8194a8;
    font-size:10px
}

.context-action {
    display:grid;
    gap:3px;
    width:100%;
    padding:10px;
    border:1px solid #26384b;
    border-radius:8px;
    color:#dce7f3;
    background:#0a1724;
    text-align:left;
    cursor:pointer
}

.context-action:hover {
    border-color:#3c6fa6;
    background:#10243a
}

.context-action strong {
    font-size:11px
}

.context-action small {
    overflow:hidden;
    color:#8297ad;
    font-size:9px;
    text-overflow:ellipsis;
    white-space:nowrap
}

.note-context small {
    white-space:normal;
    line-height:1.35
}

.text-action {
    margin-top:8px;
    border:0;
    color:#69aaff;
    background:transparent;
    cursor:pointer
}

.context-tabs button {
    cursor:pointer
}

/* Functionele instellingen, bewust zonder Integraties */
/* =========================================================
   10. INSTELLINGEN
   ========================================================= */

.settings-layout {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:14px;
    max-width:1050px
}

.settings-card {
    padding:18px
}

.settings-wide {
    grid-column:1/-1
}

.settings-icon {
    display:grid;
    place-items:center;
    width:36px;
    height:36px;
    border-radius:9px;
    color:#8dc0ff;
    background:#102f58
}

.settings-select {
    width:100%;
    height:43px;
    padding:0 11px;
    border:1px solid #2a4056;
    border-radius:8px;
    color:var(--ink);
    background:#0a1724
}

.toggle-row {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    margin-top:16px;
    padding-top:14px;
    border-top:1px solid #26384b
}

.toggle-row strong,.toggle-row small {
    display:block
}

.toggle-row strong {
    font-size:13px
}

.toggle-row small {
    margin-top:3px;
    color:var(--muted);
    font-size:11px
}

.toggle-row input {
    width:19px;
    height:19px;
    accent-color:var(--blue)
}

.settings-status {
    display:flex;
    flex-wrap:wrap;
    gap:7px;
    margin-top:17px
}

.settings-status>* {
    padding:7px 9px;
    border-radius:7px;
    color:#adc9e8;
    background:#0a1724;
    font-size:11px
}

.privacy-grid {
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:10px;
    margin-top:16px
}

.privacy-grid>span {
    display:grid;
    grid-template-columns:25px 1fr;
    column-gap:8px;
    padding:12px;
    border:1px solid #26384b;
    border-radius:9px;
    background:#0a1724
}

.privacy-grid b {
    grid-row:1/3;
    display:grid;
    place-items:center;
    width:23px;
    height:23px;
    border-radius:50%;
    color:#55d6a0;
    background:#123529
}

.privacy-grid strong,.privacy-grid small {
    display:block
}

.privacy-grid strong {
    font-size:12px
}

.privacy-grid small {
    margin-top:3px;
    color:var(--muted);
    font-size:10px
}

.settings-actions {
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:14px
}

.settings-actions .notice {
    margin:0
}

html[data-font-size="normal"] body {
    font-size:14px
}

html[data-font-size="large"] body {
    font-size:16px
}

html[data-font-size="extra-large"] body {
    font-size:18px
}

html:not(.compact-library) .document-card {
    min-height:62px;
    padding:10px 12px
}

html:not(.compact-library) .document-card .file-icon {
    width:36px;
    height:40px
}

html:not(.compact-library) .document-copy .document-title {
    font-size:14px
}

html:not(.compact-library) .document-copy small {
    font-size:11px
}

@media(max-width:760px) {
    .settings-layout {
        grid-template-columns:1fr
    }
    .settings-wide {
        grid-column:auto
    }
    .privacy-grid {
        grid-template-columns:1fr
    }
    .portal-button,.logout-button {
        display:none
    }
}

/* Accounts, notities, tags, thema en meldingen */
.content-split {
    display:grid;
    grid-template-columns:minmax(300px,.7fr) minmax(420px,1.3fr);
    gap:14px
}

.editor-card,.list-card {
    padding:18px
}

.note-textarea {
    width:100%;
    min-height:210px;
    padding:11px;
    border:1px solid #2a4056;
    border-radius:8px;
    resize:vertical;
    color:var(--ink);
    background:#0a1724
}

.notes-list,.tags-list,.users-list {
    display:grid;
    gap:7px;
    margin-top:14px
}

.note-item,.tag-item,.user-item {
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    gap:10px;
    padding:11px;
    border:1px solid #26384b;
    border-radius:8px;
    background:#0a1724
}

.note-item strong,.note-item small,.user-item strong,.user-item small {
    display:block
}

.note-item p {
    margin:7px 0 0;
    color:#a9b7c8;
    white-space:pre-wrap
}

.note-item small,.user-item small {
    margin-top:3px;
    color:#7f93a8
}

.delete-small {
    align-self:start;
    padding:5px 8px;
    border:0;
    color:#ff7c86;
    background:transparent;
    cursor:pointer
}

.tag-pill {
    display:inline-flex;
    align-items:center;
    gap:7px;
    width:max-content;
    padding:7px 10px;
    border-radius:14px;
    color:#dcecff;
    background:#12345c
}

.tag-pill.purple {
    background:#33205b
}

.tag-pill.green {
    background:#123c31
}

.tag-pill.orange {
    background:#4a2c18
}

.user-management>form {
    display:grid;
    grid-template-columns:1fr 1fr 150px auto;
    align-items:end;
    gap:9px;
    margin-top:14px
}

.user-management label {
    display:grid;
    gap:5px;
    color:#a9b7c8;
    font-size:11px
}

.notification-wrap {
    position:relative
}

.notifications-panel {
    position:absolute;
    z-index:40;
    top:42px;
    right:0;
    width:320px;
    padding:13px;
    border:1px solid #30465d;
    border-radius:10px;
    background:#0c1926;
    box-shadow:0 18px 50px #000a
}

.notifications-panel>strong {
    display:block;
    margin-bottom:8px
}

.notification-item {
    padding:9px 0;
    border-top:1px solid #203347
}

.notification-item strong,.notification-item small {
    display:block
}

.notification-item small {
    margin-top:3px;
    color:#8fa3b8
}

.top-icon b {
    position:absolute;
    margin:-5px 0 0 -3px;
    min-width:16px;
    padding:2px 4px;
    border-radius:9px;
    color:#fff;
    background:#f05a67;
    font-size:8px
}

/* =========================================================
   13. LOGIN
   ========================================================= */

.login-page {
    min-height:100vh;
    display:grid;
    place-items:center;
    padding:20px
}

.login-card {
    width:min(420px,100%);
    padding:30px;
    border:1px solid #29445f;
    border-radius:15px;
    background:#0d1a28;
    box-shadow:0 25px 70px #0009
}

.login-card h1 {
    margin:7px 0
}

.login-card>p {
    color:#a9b7c8
}

.login-logo {
    display:grid;
    place-items:center;
    width:55px;
    height:55px;
    border-radius:14px;
    color:#72b1ff;
    background:#102f58;
    font-size:27px
}

.login-card form {
    display:grid;
    gap:14px;
    margin-top:20px
}

.login-card label {
    display:grid;
    gap:6px;
    color:#bdcada;
    font-size:12px
}

.login-card input {
    width:100%;
    height:44px;
    padding:0 11px;
    border:1px solid #2a4056;
    border-radius:8px;
    color:#f2f6fb;
    background:#091724
}

.password-field {
    display:flex
}

.password-field input {
    border-radius:8px 0 0 8px
}

.password-field button {
    width:45px;
    border:1px solid #2a4056;
    border-left:0;
    border-radius:0 8px 8px 0;
    color:#bcd8ff;
    background:#102033
}

.login-error {
    min-height:18px;
    margin:0!important;
    color:#ff7c86!important
}

html[data-theme="light"] {
    --ink:#142235;
    --muted:#617086;
    --line:#ccd6e2;
    --surface:#fff;
    --background:#eef3f8;
    --shadow:0 10px 25px rgba(34,55,80,.1)
}

html[data-theme="light"] body {
    background:#eef3f8
}

html[data-theme="light"] .topbar,html[data-theme="light"] .card,html[data-theme="light"] .chat-card,html[data-theme="light"] .source-panel,html[data-theme="light"] .document-card {
    color:#142235;
    background:#fff
}

html[data-theme="light"] .conversation,html[data-theme="light"] .ask-box {
    background:#fff
}

html[data-theme="light"] input,html[data-theme="light"] textarea,html[data-theme="light"] select,html[data-theme="light"] .search-box,html[data-theme="light"] .note-item,html[data-theme="light"] .tag-item,html[data-theme="light"] .user-item {
    color:#142235;
    background:#f7f9fc
}

html[data-theme="light"] .topbar h1,html[data-theme="light"] .page-intro h2,html[data-theme="light"] .section-heading h2 {
    color:#142235
}

@media(max-width:900px) {
    .content-split {
        grid-template-columns:1fr
    }
    .user-management>form {
        grid-template-columns:1fr 1fr
    }
    .notifications-panel {
        right:-70px
    }
}

@media(max-width:600px) {
    .user-management>form {
        grid-template-columns:1fr
    }
    .notifications-panel {
        position:fixed;
        top:70px;
        left:12px;
        right:12px;
        width:auto
    }
}

.index-maintenance-actions {
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    margin-top:13px
}

.settings-status .index-ok {
    color:#7be2af;
    background:#10372a
}

.settings-status .index-warning {
    color:#ffd38a;
    background:#3a2b12
}

.button:disabled {
    opacity:.58;
    cursor:wait
}

/* Visuele voortgang tijdens vraagverwerking */
.progress-message {
    padding:10px 0 14px!important;
    color:var(--muted)
}

.progress-title {
    display:flex;
    align-items:center;
    gap:9px;
    color:#dbe7f3;
    font-size:13px
}

.progress-spinner {
    display:inline-block;
    width:13px;
    height:13px;
    border:2px solid #385878;
    border-top-color:#64a8ff;
    border-radius:50%;
    animation:progress-spin .8s linear infinite
}

.progress-steps {
    display:flex;
    flex-wrap:wrap;
    gap:7px;
    margin-top:11px
}

.progress-steps span {
    display:inline-flex;
    align-items:center;
    gap:5px;
    padding:5px 8px;
    border:1px solid #263f59;
    border-radius:12px;
    color:#7189a3;
    font-size:10px
}

.progress-steps span.active {
    border-color:#2878e8;
    color:#9fc9ff;
    background:#102a47
}

.progress-steps span.done {
    border-color:#286b56;
    color:#79d7b0;
    background:#0d2d27
}

.progress-steps i {
    font-style:normal;
    font-weight:800
}

@keyframes progress-spin {
    to {
        transform:rotate(360deg)
    }
}

.library-selection-bar {
    display:flex;
    align-items:center;
    gap:16px;
    margin:12px 0;
    padding:10px 14px;
}

.library-selection-bar label {
    display:flex;
    align-items:center;
    gap:8px;
}

.library-selection-bar span {
    margin-right:auto;
    color:var(--muted-text, #9db0c9);
}

.library-selection-bar .danger {
    background:#8f2935;
    color:#fff;
}

.document-card {
    position:relative;
}

.document-select {
    position:absolute;
    top:10px;
    right:10px;
    z-index:2;
}

.document-open {
    width:100%;
    height:100%;
    text-align:left;
}

/* Library cards: keep the selection control out of the document layout. */
.document-card {
    display:block;
    min-height:62px;
    padding:10px 44px 10px 12px;
    position:relative;
}

.document-open {
    display:grid;
    grid-template-columns:38px minmax(0,1fr) auto;
    align-items:center;
    gap:10px;
    width:100%;
    min-width:0;
    min-height:40px;
    padding:0;
    border:0;
    color:inherit;
    background:transparent;
    cursor:pointer;
}

.document-select {
    position:absolute;
    top:50%;
    right:12px;
    z-index:2;
    transform:translateY(-50%);
}

.document-copy {
    display:grid;
    grid-template-columns:minmax(0,1fr) 64px 112px;
    align-items:baseline;
    column-gap:18px;
    min-width:0;
    text-align:left;
}

.document-copy .document-title {
    display:block;
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    color:var(--ink);
}

.document-copy .document-type,.document-copy .document-pages {
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}

/* Keep structured answers readable: IDs and lists must remain on separate lines. */
.message.assistant {
    white-space: pre-wrap;
}

/* Sermon controls use the existing theme and remain compact on narrow screens. */
.task-mode-label {display:block;font-weight:600;margin-bottom:6px;}
#task-mode,.sermon-options input:not([type=checkbox]),.sermon-options select {width:100%;padding:9px 10px;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--ink);font:inherit;}
#task-mode {margin-bottom:10px;}
.sermon-options {display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:8px 0 14px;padding:12px;border:1px solid var(--line);border-radius:10px;}
.sermon-options[hidden] {display:none;}
.sermon-options label {display:flex;flex-direction:column;gap:5px;font-size:13px;}
.sermon-options legend {font-weight:600;padding:0 6px;}
.sermon-wide {grid-column:1/-1;}
.sermon-options .sermon-prayer {flex-direction:row;align-items:center;gap:8px;}
.sermon-options p {margin:0;font-size:12px;line-height:1.5;opacity:.8;}
@media(max-width:650px) {.sermon-options {grid-template-columns:1fr;}}

#sermon-options summary {cursor:pointer;font-weight:600;margin:8px 0;}
#ask-form {max-height:65vh;overflow-y:auto;}

/* Study helpers: inline, keyboard accessible, and sized for narrow screens. */
.study-guide{margin:0 20px 12px;padding:14px;border:1px solid var(--border,#294052);border-radius:12px;}
.study-guide summary{cursor:pointer;font-weight:600;}
.study-guide p{font-size:.9rem;line-height:1.5;}
.study-guide label{display:block;margin:10px 0 6px;}
.study-guide input{width:100%;max-width:100%;box-sizing:border-box;padding:10px;border-radius:8px;border:1px solid var(--border,#294052);background:inherit;color:inherit;}
.study-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px;}
.study-actions button{white-space:normal;text-align:left;}
#study-feedback:empty{display:none;}

.chat-card{grid-template-rows:minmax(120px,1fr) auto auto auto;}
.study-guide[open]{max-height:32vh;overflow:auto;}
@media(max-width:760px){.chat-card{grid-template-rows:minmax(120px,1fr) auto auto;}.study-guide{margin:0 8px 8px;}.study-guide[open]{max-height:28vh;}}

/* Source credits must stay readable in both themes. */
.source-attribution{font-size:.85rem;line-height:1.5;padding:0 4px;overflow-wrap:anywhere}
.source-attribution a{color:inherit;text-decoration:underline;text-underline-offset:3px}
.source-attribution a:focus-visible{outline:2px solid currentColor;outline-offset:3px}
