/* Finass Smart Forms — werkomgeving 1.38.0
   Finass-huisstijl: Montserrat + Cormorant Garamond, inkt #1F1F4A, indigo #0000EB, geel #FFD200, lijn #ECEDEA.
   Eén bestand, van boven naar beneden: basis → schil → zijbalk → lijst → dossier → pagina's → AI → modals → mobiel. */

:root {
  --ff-ink: #1F1F4A;
  --ff-navy: #1F1F4A;
  --ff-indigo: #0000EB;
  --ff-blue: #0000EB;
  --ff-yellow: #FFD200;
  --ff-yellow-soft: #FFF6C4;
  --ff-hair: #ECEDEA;
  --ff-line: #E3E3E8;
  --ff-bg: #F7F7F5;
  --ff-panel: #FFFFFF;
  --ff-text: #1F1F4A;
  --ff-muted: #6B7080;
  --ff-soft: #F1F1EE;
  --ff-red: #C62828;
  --ff-green: #1B7F3B;
  --ff-orange: #B86A00;
  --ff-radius: 16px;
  --ff-pill: 999px;
  --ff-shadow: 0 8px 30px rgba(31, 31, 74, 0.08);
  --ff-shadow-sm: 0 2px 10px rgba(31, 31, 74, 0.06);
  --ff-font: Montserrat, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --ff-serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --ff-top: 60px;
  --ff-tabbar: 62px;
}

html, body { margin: 0; padding: 0; height: 100%; background: var(--ff-bg); }
body { font-family: var(--ff-font); font-weight: 400; color: var(--ff-text); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; }
.ff-ws-body { margin: 0; min-height: 100vh; min-height: 100dvh; background: var(--ff-bg); overflow-x: hidden; }

.ff-ws, .ff-ws * { box-sizing: border-box; }
.ff-ws [hidden] { display: none !important; }
.ff-ws { min-height: 100vh; font-family: var(--ff-font); color: var(--ff-text); }
.ff-ws h1, .ff-ws h2, .ff-ws h3, .ff-ws h4 { margin: 0; line-height: 1.2; font-weight: 600; letter-spacing: -0.01em; }
.ff-ws h1 { font-family: var(--ff-serif); font-weight: 500; letter-spacing: 0; }
.ff-ws strong, .ff-ws b { font-weight: 600; }
.ff-ws a { color: var(--ff-indigo); text-decoration: none; }
.ff-ws a:hover { text-decoration: underline; }
.ff-ws button { font-family: inherit; font-size: inherit; cursor: pointer; }
.ff-ws input, .ff-ws select, .ff-ws textarea { font-family: inherit; font-size: 14px; font-weight: 400; color: var(--ff-text); }
.ff-ws input, .ff-ws select, .ff-ws textarea { -webkit-appearance: none; appearance: none; }
.ff-ws select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236B7080' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 30px !important; }
.ff-ws input[type=checkbox], .ff-ws input[type=radio] { -webkit-appearance: auto; appearance: auto; accent-color: var(--ff-ink); }
.ff-ws input[type=date], .ff-ws input[type=datetime-local] { min-height: 40px; }
.ff-muted { color: var(--ff-muted); }
.ff-small { font-size: 12.5px; }
.ff-ws :focus-visible { outline: 2px solid var(--ff-indigo); outline-offset: 2px; }
.ff-ws input:focus-visible, .ff-ws textarea:focus-visible, .ff-ws select:focus-visible, .ff-composer textarea:focus { outline: none; }

/* ---------- laadscherm ---------- */
.ff-ws-boot { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100vh; gap: 12px; }
.ff-ws-boot-logo { font-weight: 700; letter-spacing: 0.2em; color: var(--ff-ink); font-size: 18px; }
.ff-ws-boot-logo::after { content: ''; display: block; height: 4px; width: 100%; background: var(--ff-yellow); margin-top: 6px; border-radius: 2px; }
.ff-ws-boot-text { color: var(--ff-muted); }
.ff-ws-noscript { padding: 40px; text-align: center; }

/* ---------- knoppen ---------- */
.ff-ws-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--ff-line); background: #fff; color: var(--ff-ink); padding: 9px 18px; border-radius: var(--ff-pill); font-weight: 500; font-size: 13.5px; line-height: 1.2; min-height: 38px; transition: background .15s, border-color .15s, box-shadow .15s, transform .05s; white-space: nowrap; }
.ff-ws-btn:hover { background: var(--ff-soft); border-color: #D6D6DC; text-decoration: none; }
.ff-ws-btn:active { transform: translateY(1px); }
.ff-ws-btn:disabled { opacity: .5; cursor: default; }
.ff-ws-btn-primary { background: var(--ff-yellow); border-color: var(--ff-yellow); color: var(--ff-ink); font-weight: 600; }
.ff-ws-btn-primary:hover { background: #F2C700; border-color: #F2C700; }
.ff-ws-btn-navy { background: var(--ff-ink); border-color: var(--ff-ink); color: #fff; }
.ff-ws-btn-navy:hover { background: #2B2B63; border-color: #2B2B63; }
.ff-ws-btn-secondary { background: #fff; }
.ff-ws-btn-ghost { border-color: transparent; background: transparent; }
.ff-ws-btn-ghost:hover { background: var(--ff-soft); border-color: transparent; }
.ff-ws-btn-danger { color: var(--ff-red); }
.ff-ws-btn-sm { padding: 6px 13px; font-size: 13px; min-height: 32px; }
.ff-ws-btn-xs { padding: 3px 10px; font-size: 12px; min-height: 26px; }
.ff-ws-btn-icon { width: 36px; height: 36px; min-height: 0; padding: 0; border-radius: 50%; }
.ff-ws-btn svg { width: 16px; height: 16px; flex: none; }

/* ---------- login ---------- */
.ff-ws-login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; min-height: 100dvh; padding: 24px; background: radial-gradient(1200px 600px at 10% -10%, #FFF6C4 0%, transparent 55%), linear-gradient(160deg, #F7F7F5 0%, #ECEDEA 100%); }
.ff-ws-login-card { width: 100%; max-width: 440px; background: #fff; border-radius: 24px; box-shadow: var(--ff-shadow); padding: 36px 36px 24px; border: 1px solid var(--ff-hair); }
.ff-ws-login-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; font-size: 12px; color: var(--ff-ink); margin-bottom: 26px; }
.ff-ws-login-mark { width: 14px; height: 14px; border-radius: 4px; background: var(--ff-yellow); display: inline-block; }
.ff-ws-login-card h1 { font-size: 38px; margin-bottom: 8px; }
.ff-ws-login-card p { line-height: 1.55; }
.ff-ws-login-intro { color: var(--ff-muted); margin: 0 0 22px; font-size: 14px; }
.ff-ws-login-form label { display: block; margin-bottom: 14px; }
.ff-ws-login-form label > span { display: block; font-size: 12.5px; color: var(--ff-muted); margin-bottom: 6px; font-weight: 500; }
.ff-ws-login-form input[type=text], .ff-ws-login-form input[type=password] { width: 100%; padding: 12px 14px; border: 1px solid var(--ff-line); border-radius: 12px; background: #FBFBFA; outline: none; font-size: 15px; }
.ff-ws-login-form input:focus { border-color: var(--ff-ink); background: #fff; box-shadow: 0 0 0 3px rgba(31, 31, 74, .08); }
.ff-ws-login-remember { display: flex !important; align-items: flex-start; gap: 9px; font-size: 13px; color: var(--ff-muted); line-height: 1.4; }
.ff-ws-login-remember input { margin-top: 2px; }
.ff-ws-login-form .ff-ws-btn { width: 100%; margin-top: 8px; padding: 13px; font-size: 15px; min-height: 48px; }
.ff-ws-login-foot { margin-top: 22px; font-size: 11.5px; color: #A0A3AE; text-align: center; }
.ff-ws-alert { padding: 10px 14px; border-radius: 12px; margin-bottom: 14px; font-size: 13.5px; background: var(--ff-soft); }
.ff-ws-alert-error, .ff-ws-alert-warning { background: #FDECEC; color: #8A1C1C; }
.ff-ws-alert-message, .ff-ws-alert-info { background: #EDEDFF; color: var(--ff-indigo); }
.ff-ws-flashes { position: fixed; top: calc(var(--ff-top) + 10px); left: 50%; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 6px; max-width: 92vw; cursor: pointer; }
.ff-ws-flash { background: var(--ff-ink); color: #fff; padding: 9px 14px; border-radius: 12px; font-size: 13.5px; box-shadow: var(--ff-shadow); }
.ff-ws-flash-error, .ff-ws-flash-warning { background: var(--ff-red); }

/* ---------- app-schil ---------- */
.ff-app { display: grid; grid-template-rows: var(--ff-top) 1fr; grid-template-columns: minmax(0, 1fr); height: 100vh; height: 100dvh; overflow: hidden; }
.ff-app > * { min-width: 0; }
.ff-top { display: flex; align-items: center; gap: 12px; padding: 0 18px; background: #fff; color: var(--ff-ink); border-bottom: 1px solid var(--ff-hair); position: relative; z-index: 30; }
.ff-top-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .18em; font-size: 12px; text-transform: uppercase; margin-right: 10px; white-space: nowrap; }
.ff-top-brand .ff-ws-login-mark { width: 12px; height: 12px; }
.ff-top-nav { display: flex; gap: 2px; }
.ff-top-nav button { background: transparent; border: 0; color: var(--ff-muted); padding: 8px 14px; border-radius: var(--ff-pill); font-weight: 500; font-size: 13.5px; display: inline-flex; align-items: center; gap: 7px; }
.ff-top-nav button:hover { color: var(--ff-ink); background: var(--ff-soft); }
.ff-top-nav button svg { width: 16px; height: 16px; }
.ff-top-nav button.is-active { background: var(--ff-ink); color: #fff; }
.ff-top-nav .ff-count { background: var(--ff-yellow); color: var(--ff-ink); font-weight: 600; font-size: 11px; min-width: 20px; padding: 1px 6px; border-radius: 10px; text-align: center; line-height: 1.5; }
.ff-top-nav .ff-count.is-zero { background: var(--ff-soft); color: var(--ff-muted); }
.ff-top-nav button.is-active .ff-count.is-zero { background: rgba(255,255,255,.18); color: #fff; }
.ff-top-nav .ff-count.is-red { background: var(--ff-red); color: #fff; }
.ff-top-search { flex: 1; display: flex; justify-content: center; }
.ff-top-search input { width: 100%; max-width: 460px; padding: 9px 14px 9px 38px; border-radius: var(--ff-pill); border: 1px solid var(--ff-line); background: #FBFBFA; color: var(--ff-ink); outline: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%236B7080' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: 13px center; font-size: 13.5px; }
.ff-top-search input::placeholder { color: #9A9EAD; }
.ff-top-search input:focus { background-color: #fff; border-color: var(--ff-ink); box-shadow: 0 0 0 3px rgba(31, 31, 74, .06); }
.ff-top-user { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.ff-top-user .ff-avatar { background: var(--ff-yellow); color: var(--ff-ink); }
.ff-top-user a { color: var(--ff-muted); display: inline-flex; }
.ff-top-user a:hover { color: var(--ff-ink); }
.ff-top-user a svg { width: 18px; height: 18px; }
.ff-top-userbtn { background: transparent; border: 0; color: inherit; font: inherit; cursor: pointer; padding: 0; font-weight: 500; }
.ff-top-userbtn.ff-label { border-bottom: 1px dotted #B9BCC8; }
.ff-top-menu-btn { display: none; }
.ff-top-menu-btn svg { width: 22px; height: 22px; }

.ff-main { display: grid; grid-template-columns: 240px 410px 1fr; height: calc(100vh - var(--ff-top)); height: calc(100dvh - var(--ff-top)); overflow: hidden; }
.ff-main > * { min-width: 0; }
.ff-side { border-right: 1px solid var(--ff-hair); background: #fff; overflow-y: auto; padding: 16px 14px; }
.ff-list { border-right: 1px solid var(--ff-hair); background: #fff; overflow-y: auto; display: flex; flex-direction: column; }
.ff-detail { overflow-y: auto; overflow-x: hidden; background: var(--ff-bg); }
.ff-page { overflow-y: auto; background: var(--ff-bg); grid-column: 2 / 4; }
.ff-main.is-full { grid-template-columns: 240px 1fr; }
.ff-main.is-full .ff-page { grid-column: 2; }
.ff-side-bg { display: none; }

/* ---------- zijbalk ---------- */
.ff-side h4 { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--ff-muted); font-weight: 600; margin: 20px 8px 8px; }
.ff-side h4:first-child { margin-top: 4px; }
.ff-chip { display: flex; align-items: center; gap: 9px; width: 100%; padding: 9px 11px; border: 0; background: transparent; border-radius: 12px; text-align: left; color: var(--ff-text); font-weight: 400; font-size: 13.5px; }
.ff-chip:hover { background: var(--ff-soft); }
.ff-chip.is-active { background: var(--ff-ink); color: #fff; font-weight: 500; }
.ff-chip .ff-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.ff-chip .ff-chip-n { margin-left: auto; font-size: 12px; color: var(--ff-muted); background: var(--ff-soft); padding: 1px 7px; border-radius: 10px; min-width: 22px; text-align: center; }
.ff-chip.is-active .ff-chip-n { background: rgba(255,255,255,.18); color: #fff; }
.ff-side select { width: 100%; padding: 9px 11px; border-radius: 12px; border: 1px solid var(--ff-line); background-color: #fff; margin-bottom: 8px; font-size: 13.5px; }
.ff-side-foot { margin-top: 24px; font-size: 11.5px; color: #A0A3AE; padding: 0 8px; line-height: 1.5; }
.ff-side-foot kbd { font-family: inherit; background: var(--ff-soft); border: 1px solid var(--ff-hair); border-radius: 4px; padding: 0 5px; font-size: 11px; color: var(--ff-muted); }
.ff-chip-chat { justify-content: space-between; font-size: 13px; padding-right: 6px; }
.ff-chip-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.ff-chip-ops { display: inline-flex; gap: 2px; flex: none; opacity: .55; }
.ff-chip:hover .ff-chip-ops, .ff-chip.is-active .ff-chip-ops { opacity: 1; }
.ff-chat-topr { display: flex; align-items: center; gap: 6px; min-width: 0; }
.ff-chat-title { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; color: var(--ff-muted); font-weight: 400; }
@media (max-width: 640px) { .ff-chat-title { display: none; } }
.ff-chip-del { color: var(--ff-muted); padding: 0 6px; font-size: 16px; line-height: 1; border-radius: 6px; }
.ff-chip-del:hover { color: var(--ff-red); background: rgba(0,0,0,.05); }
.ff-chip.is-active .ff-chip-del { color: rgba(255,255,255,.7); }

/* ---------- lijst ---------- */
.ff-list-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--ff-hair); position: sticky; top: 0; background: #fff; z-index: 2; }
.ff-list-head h2 { font-size: 17px; font-weight: 600; }
.ff-list-head .ff-muted { font-size: 12.5px; margin-top: 1px; }
.ff-list-head select { border: 0; background-color: transparent; font-size: 12.5px; color: var(--ff-muted); padding: 4px; max-width: 170px; }
.ff-rows { flex: 1; }
.ff-row { display: grid; grid-template-columns: 38px 1fr auto; gap: 12px; padding: 13px 18px; border-bottom: 1px solid var(--ff-hair); cursor: pointer; background: #fff; transition: background .1s; }
.ff-row:hover { background: #FBFBFA; }
.ff-row.is-active { background: #FFFBE6; box-shadow: inset 3px 0 0 var(--ff-yellow); }
.ff-row.is-new .ff-row-name { font-weight: 600; }
.ff-avatar { width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; background: var(--ff-soft); color: var(--ff-muted); flex: none; letter-spacing: .02em; }
.ff-avatar.is-set { background: var(--ff-ink); color: #fff; }
.ff-avatar.is-me { background: var(--ff-indigo); color: #fff; }
.ff-row-main { min-width: 0; }
.ff-row-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14.5px; font-weight: 500; }
.ff-row-name .ff-muted { font-weight: 400; }
.ff-row-sub { font-size: 12.5px; color: var(--ff-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.ff-row-meta { display: flex; gap: 6px; align-items: center; margin-top: 7px; flex-wrap: wrap; }
.ff-row-side { text-align: right; font-size: 12px; color: var(--ff-muted); display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.ff-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 10px; white-space: nowrap; line-height: 1.4; letter-spacing: .01em; }
.ff-tag { display: inline-flex; align-items: center; font-size: 11px; padding: 2px 8px; border-radius: 8px; background: var(--ff-soft); color: var(--ff-muted); white-space: nowrap; font-weight: 500; }
.ff-tag.ff-tag-site { background: #EDEDFF; color: var(--ff-indigo); text-transform: capitalize; }
.ff-tag.is-red { background: #FDECEC; color: var(--ff-red); }
.ff-tag.is-orange { background: #FFF1DC; color: var(--ff-orange); }
.ff-tag.ff-tag-zw.is-licht { background: #E9F7EE; color: var(--ff-green); }
.ff-tag.ff-tag-zw.is-zwaar { background: #FFF1DC; color: var(--ff-orange); }
.ff-tag.is-eis { background: var(--ff-yellow-soft); color: #6B5400; }
.ff-tag.is-clausule { background: #E4E4F3; color: var(--ff-ink); }
.ff-tag.is-aandacht { background: #EDEDFF; color: var(--ff-indigo); }
.ff-tag svg { width: 12px; height: 12px; margin-right: 4px; }
.ff-empty { padding: 48px 24px; text-align: center; color: var(--ff-muted); line-height: 1.5; }
.ff-empty strong { display: block; font-size: 18px; margin-bottom: 4px; color: var(--ff-text); font-weight: 600; }
.ff-list-more { padding: 14px; text-align: center; }

/* ---------- dossier ---------- */
.ff-dossier { padding: 24px 28px 60px; max-width: 1100px; }
.ff-dossier-placeholder { height: 100%; display: flex; align-items: center; justify-content: center; color: var(--ff-muted); text-align: center; padding: 40px; line-height: 1.6; }
.ff-dossier-placeholder .ff-ws-login-mark { display: block; margin: 0 auto 14px; width: 18px; height: 18px; }
.ff-d-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.ff-d-title { min-width: 0; }
.ff-d-title h1 { font-size: 36px; line-height: 1.1; }
.ff-d-title .ff-d-company { font-size: 15px; color: var(--ff-muted); margin-top: 4px; }
.ff-d-title .ff-d-line { display: flex; gap: 8px 12px; flex-wrap: wrap; align-items: center; margin-top: 10px; font-size: 13px; color: var(--ff-muted); }
.ff-d-line a { color: var(--ff-indigo); }
.ff-d-line .ff-ref { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; background: #fff; border: 1px solid var(--ff-line); border-radius: 6px; padding: 1px 7px; cursor: copy; color: var(--ff-ink); }
.ff-d-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ff-back { display: none; }

.ff-status-bar { display: flex; gap: 6px; flex-wrap: wrap; margin: 20px 0 14px; }
.ff-status-btn { flex: none; white-space: nowrap; border: 1px solid var(--ff-line); background: #fff; padding: 7px 14px; border-radius: var(--ff-pill); font-size: 13px; display: inline-flex; align-items: center; gap: 7px; color: var(--ff-text); font-weight: 500; min-height: 34px; }
.ff-status-btn .ff-dot { width: 9px; height: 9px; border-radius: 50%; }
.ff-status-btn:hover { background: var(--ff-soft); }
.ff-status-btn.is-active { border-color: transparent; font-weight: 600; }
.ff-status-btn.is-active .ff-dot { background: currentColor !important; opacity: .6; }

.ff-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; }
.ff-card { background: #fff; border: 1px solid var(--ff-hair); border-radius: var(--ff-radius); padding: 16px 18px; box-shadow: var(--ff-shadow-sm); }
.ff-card h3 { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--ff-muted); font-weight: 600; margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; gap: 6px; flex-wrap: wrap; }
.ff-card h3 .ff-ws-btn { text-transform: none; letter-spacing: 0; }
.ff-kv { display: grid; grid-template-columns: 130px 1fr; gap: 6px 14px; font-size: 13.5px; }
.ff-kv dt { color: var(--ff-muted); margin: 0; }
.ff-kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.ff-quote-big { font-family: var(--ff-serif); font-size: 34px; font-weight: 500; letter-spacing: 0; line-height: 1; }
.ff-quote-big small { font-family: var(--ff-font); font-size: 12.5px; color: var(--ff-muted); margin-left: 6px; }
.ff-card select { width: 100%; padding: 9px 12px; border: 1px solid var(--ff-line); border-radius: 12px; background-color: #fff; }
.ff-card-empty { color: var(--ff-muted); font-size: 13.5px; }
.ff-card .ff-quote-warn { color: var(--ff-orange); font-size: 13px; margin-top: 6px; }
.ff-card .ff-quote-expired { color: var(--ff-red); font-size: 13px; margin-top: 6px; }

.ff-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--ff-hair); margin: 6px 0 16px; }
.ff-tabs button { background: transparent; border: 0; padding: 10px 14px; color: var(--ff-muted); border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; gap: 7px; align-items: center; font-weight: 500; font-size: 13.5px; }
.ff-tabs button.is-active { color: var(--ff-ink); border-bottom-color: var(--ff-yellow); font-weight: 600; }
.ff-tabs .ff-count { font-size: 11px; background: var(--ff-soft); padding: 0 7px; border-radius: 10px; color: var(--ff-muted); }

.ff-section { background: #fff; border: 1px solid var(--ff-hair); border-radius: var(--ff-radius); margin-bottom: 12px; overflow: hidden; }
.ff-section-h { padding: 11px 18px; font-weight: 600; font-size: 13.5px; background: #FBFBFA; border-bottom: 1px solid var(--ff-hair); }
.ff-advies .ff-section-h, .ff-vw-result .ff-section-h { background: transparent; border: 0; padding: 14px 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--ff-muted); }
.ff-section .ff-kv { padding: 14px 18px; grid-template-columns: 220px 1fr; }
.ff-section .ff-kv dd { white-space: pre-wrap; word-break: break-word; }

.ff-compose { background: #fff; border: 1px solid var(--ff-hair); border-radius: var(--ff-radius); padding: 12px 14px; margin-bottom: 16px; }
.ff-compose textarea { width: 100%; border: 0; resize: vertical; min-height: 64px; outline: none; padding: 4px 2px; line-height: 1.5; }
.ff-compose-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 6px; font-size: 12px; color: var(--ff-muted); }

.ff-timeline { position: relative; padding-left: 26px; }
.ff-timeline::before { content: ''; position: absolute; left: 8px; top: 8px; bottom: 8px; width: 2px; background: var(--ff-hair); }
.ff-tl { position: relative; margin-bottom: 16px; }
.ff-tl::before { content: ''; position: absolute; left: -23px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 2px solid var(--ff-hair); }
.ff-tl.t-status::before { border-color: var(--ff-indigo); }
.ff-tl.t-quote::before { border-color: var(--ff-yellow); background: var(--ff-yellow); }
.ff-tl.t-note::before { border-color: var(--ff-ink); }
.ff-tl.t-task::before { border-color: var(--ff-green); }
.ff-tl.t-mail::before { border-color: var(--ff-ink); background: var(--ff-ink); }
.ff-tl.t-created::before { border-color: var(--ff-muted); background: var(--ff-muted); }
.ff-tl-head { font-size: 12.5px; color: var(--ff-muted); display: flex; gap: 8px; flex-wrap: wrap; }
.ff-tl-head strong { color: var(--ff-text); }
.ff-tl.t-mail .ff-tl-head span:nth-child(2) { font-weight: 600; }
.ff-tl-title { font-size: 14px; margin-top: 2px; font-weight: 500; }
.ff-tl-body { background: #fff; border: 1px solid var(--ff-hair); border-radius: 12px; padding: 10px 14px; margin-top: 6px; white-space: pre-wrap; word-break: break-word; font-size: 13.5px; line-height: 1.55; }
.ff-tl-body.is-mail { background: #FBFBFA; }

.ff-task-form { display: grid; grid-template-columns: 1fr 150px 160px auto; gap: 8px; margin-bottom: 14px; }
.ff-task-form input, .ff-task-form select { padding: 9px 12px; border: 1px solid var(--ff-line); border-radius: 12px; background-color: #fff; min-width: 0; }
.ff-task { display: flex; align-items: flex-start; gap: 12px; background: #fff; border: 1px solid var(--ff-hair); border-radius: 14px; padding: 11px 14px; margin-bottom: 8px; }
.ff-task.is-done { opacity: .55; }
.ff-task.is-done .ff-task-title { text-decoration: line-through; }
.ff-task input[type=checkbox] { width: 20px; height: 20px; margin-top: 2px; flex: none; }
.ff-task-main { flex: 1; min-width: 0; }
.ff-task-title { font-size: 14px; font-weight: 500; }
.ff-task-sub { font-size: 12.5px; color: var(--ff-muted); margin-top: 3px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ff-task-sub a { color: var(--ff-indigo); }
.ff-task .ff-ws-btn { align-self: center; }

.ff-file { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--ff-hair); border-radius: 14px; padding: 10px 14px; margin-bottom: 8px; flex-wrap: wrap; }
.ff-file-ico { width: 36px; height: 36px; border-radius: 10px; background: var(--ff-soft); display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; color: var(--ff-muted); text-transform: uppercase; flex: none; }
.ff-file-main { flex: 1; min-width: 160px; }
.ff-file-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.ff-file-sub { font-size: 12px; color: var(--ff-muted); }
.ff-devices .ff-file { margin-bottom: 8px; }

/* Klantmail / review / concept */
.ff-review { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; padding: 11px 14px; border-radius: 14px; background: #FFF8D6; border: 1px solid #F4E3A0; font-size: 13.5px; line-height: 1.45; }
.ff-review > span { color: #E0B400; font-size: 18px; flex: none; }
.ff-review > div { flex: 1; min-width: 0; }
.ff-review.is-ok { background: #E9F7EE; border-color: #BFE3CC; }
.ff-review.is-ok > span { color: var(--ff-green); }
.ff-review.ff-concept { background: #EDEDFF; border-color: #C9C9FF; }
.ff-review.ff-concept > span { color: var(--ff-indigo); display: inline-flex; }
.ff-review.ff-concept > span svg { width: 18px; height: 18px; }

/* ---------- advies ---------- */
.ff-advies-intro { font-size: 13.5px; color: var(--ff-muted); margin: 0 0 12px; line-height: 1.55; }
.ff-advies-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 18px; }
.ff-adv-product { font-weight: 700; font-size: 12.5px; color: var(--ff-ink); margin: 14px 0 6px; letter-spacing: .02em; }
.ff-adv-item { display: flex; gap: 10px; align-items: flex-start; padding: 11px 13px; border: 1px solid var(--ff-hair); border-radius: 14px; margin-bottom: 8px; background: #fff; cursor: pointer; }
.ff-adv-item input { margin-top: 3px; width: auto; flex: none; }
.ff-adv-title { font-weight: 600; font-size: 13.5px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ff-adv-text { font-size: 13.5px; color: var(--ff-text); line-height: 1.5; margin-top: 3px; }
.ff-ai-preview { white-space: pre-wrap; font: 12px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; background: #FBFBFA; border: 1px solid var(--ff-hair); border-radius: 12px; padding: 10px 12px; margin: 8px 0 0; max-height: 260px; overflow: auto; color: var(--ff-text); }
.ff-lib { margin-top: 4px; }
.ff-lib .ff-check { margin-bottom: 8px; }
.ff-lib-more { margin: 6px 0 10px; font-size: 13.5px; }
.ff-lib-more summary { cursor: pointer; color: var(--ff-indigo); margin-bottom: 8px; }
.ff-lib-folder { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--ff-muted); margin: 8px 0 4px; }
.ff-sd-search { display: grid; grid-template-columns: 1fr 1.4fr auto; gap: 8px; margin: 0 0 10px; }
.ff-sd-search select, .ff-sd-search input { padding: 9px 12px; border: 1px solid var(--ff-line); border-radius: 12px; background-color: #FBFBFA; outline: none; min-width: 0; }
.ff-sd-list { max-height: 260px; overflow: auto; padding-right: 4px; }
.ff-sd-list .ff-check a { color: var(--ff-indigo); margin-left: 4px; }

/* ---------- pagina's: taken, dashboard ---------- */
.ff-page-inner { padding: 26px 30px 60px; max-width: 1180px; }
.ff-page-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.ff-page-head h1 { font-size: 34px; }
.ff-seg { display: inline-flex; border: 1px solid var(--ff-line); border-radius: var(--ff-pill); background: #fff; padding: 3px; }
.ff-seg button { border: 0; background: transparent; padding: 6px 14px; border-radius: var(--ff-pill); font-size: 13px; color: var(--ff-muted); font-weight: 500; white-space: nowrap; }
.ff-seg button.is-active { background: var(--ff-ink); color: #fff; }
.ff-group-h { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--ff-muted); font-weight: 600; margin: 20px 0 8px; }
.ff-group-h.is-red { color: var(--ff-red); }

.ff-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.ff-kpi { background: #fff; border: 1px solid var(--ff-hair); border-radius: var(--ff-radius); padding: 14px 16px; box-shadow: var(--ff-shadow-sm); }
.ff-kpi-label { font-size: 12px; color: var(--ff-muted); font-weight: 500; }
.ff-kpi-value { font-family: var(--ff-serif); font-size: 34px; font-weight: 500; letter-spacing: 0; margin-top: 2px; line-height: 1.1; }
.ff-kpi-value small { font-family: var(--ff-font); font-size: 12.5px; color: var(--ff-muted); margin-left: 4px; }
.ff-kpi.is-accent { background: var(--ff-ink); color: #fff; border-color: var(--ff-ink); }
.ff-kpi.is-accent .ff-kpi-label { color: rgba(255,255,255,.7); }
.ff-kpi.is-accent .ff-kpi-value small { color: rgba(255,255,255,.7); }

.ff-chart-card { background: #fff; border: 1px solid var(--ff-hair); border-radius: var(--ff-radius); padding: 16px 18px; margin-bottom: 14px; box-shadow: var(--ff-shadow-sm); }
.ff-chart-card h3, .ff-table-card h3 { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--ff-muted); font-weight: 600; margin-bottom: 10px; }
.ff-chart svg { width: 100%; height: auto; display: block; }
.ff-chart-legend { display: flex; gap: 16px; font-size: 12px; color: var(--ff-muted); margin-top: 8px; flex-wrap: wrap; }
.ff-chart-legend span::before { content: ''; display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; background: var(--c); vertical-align: -1px; }
.ff-grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.ff-table-card { background: #fff; border: 1px solid var(--ff-hair); border-radius: var(--ff-radius); padding: 16px 18px; margin-bottom: 14px; overflow-x: auto; box-shadow: var(--ff-shadow-sm); }
.ff-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.ff-table th { text-align: left; font-size: 11px; color: var(--ff-muted); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--ff-hair); white-space: nowrap; }
.ff-table td { padding: 8px; border-bottom: 1px solid var(--ff-hair); }
.ff-table td.n, .ff-table th.n { text-align: right; font-variant-numeric: tabular-nums; }
.ff-table tr:last-child td { border-bottom: 0; }
.ff-bar { height: 6px; background: var(--ff-soft); border-radius: 3px; overflow: hidden; min-width: 50px; }
.ff-bar i { display: block; height: 100%; background: var(--ff-yellow); }

/* ---------- AI: tekst verbeteren ---------- */
.ff-tplbar { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; }
.ff-tpl { border: 1px solid var(--ff-line); background: #fff; border-radius: var(--ff-pill); padding: 7px 13px; font-size: 13px; color: var(--ff-text); cursor: pointer; font-weight: 500; }
.ff-tpl:hover { border-color: var(--ff-ink); }
.ff-tpl.is-active { background: var(--ff-ink); border-color: var(--ff-ink); color: #fff; }
.ff-schrijf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.ff-schrijf textarea { font-family: inherit; line-height: 1.55; }
.ff-schrijf .ff-tplbar { margin-bottom: 14px; }
.ff-ai-row { display: flex; gap: 8px; margin: -4px 0 14px; }
.ff-ai-row input { flex: 1; padding: 10px 12px; border: 1px solid var(--ff-line); border-radius: 12px; background: #FBFBFA; outline: none; min-width: 0; }
.ff-ai-row input:focus { border-color: var(--ff-ink); background: #fff; }
.ff-ai-row .ff-ws-btn { white-space: nowrap; }

/* ---------- Blogs (1.37.0) ---------- */
.ff-blog-new h3 { margin-bottom: 8px; }
.ff-blog-new-row { display: grid; grid-template-columns: 1fr 190px auto; gap: 8px; }
.ff-blog-new-row input, .ff-blog-new-row select { padding: 10px 12px; border: 1px solid var(--ff-line); border-radius: 12px; background-color: #FBFBFA; min-width: 0; }
.ff-blogcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; margin-top: 16px; }
.ff-blogcard { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--ff-hair); border-radius: var(--ff-radius); overflow: hidden; cursor: pointer; box-shadow: var(--ff-shadow-sm); transition: transform .1s, box-shadow .15s; }
.ff-blogcard:hover { transform: translateY(-2px); box-shadow: var(--ff-shadow); }
.ff-blogcard-img { aspect-ratio: 3 / 2; background: var(--ff-soft); display: flex; align-items: center; justify-content: center; color: #B9BCC8; }
.ff-blogcard-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ff-blogcard-img svg { width: 28px; height: 28px; }
.ff-blogcard-main { padding: 14px 16px 16px; }
.ff-blogcard-title { font-weight: 600; font-size: 15px; line-height: 1.35; }
.ff-blogcard-sub { font-size: 13px; color: var(--ff-muted); margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ff-blog-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); gap: 16px; }
.ff-blog-grid .ff-card { margin-bottom: 14px; }
.ff-blog-html { border: 1px solid var(--ff-line); border-radius: 12px; padding: 14px 16px; background: #FBFBFA; min-height: 200px; font-size: 14.5px; line-height: 1.65; outline: none; }
.ff-blog-html:focus { background: #fff; border-color: var(--ff-ink); }
.ff-blog-html h2 { font-size: 19px; font-weight: 600; margin: 18px 0 6px; } .ff-blog-html h3 { font-size: 16px; font-weight: 600; margin: 14px 0 4px; } .ff-blog-html p { margin: 0 0 10px; } .ff-blog-html ul { margin: 4px 0 10px 20px; }
.ff-blog-img { width: 100%; border-radius: 12px; display: block; }
.ff-blog-social { border-top: 1px solid var(--ff-hair); padding: 10px 0 4px; }
.ff-blog-social:first-of-type { border-top: 0; }
.ff-blog-social-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.ff-blog-social-h .ff-small { flex: 1; }
.ff-blog-social textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--ff-line); border-radius: 10px; background: #FBFBFA; font-size: 13.5px; line-height: 1.5; resize: vertical; }
@media (max-width: 960px) { .ff-blog-grid { grid-template-columns: 1fr; } .ff-blog-new-row { grid-template-columns: 1fr; } }

/* ---------- AI: RisicoVerkenner ---------- */
.ff-risico-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 22px; margin-bottom: 18px; }
.ff-risico .ff-field > span { font-weight: 600; color: var(--ff-ink); }
.ff-r-hits { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.ff-r-hits .ff-tpl { text-align: left; border-radius: 10px; }
.ff-r-linked { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 12px; background: var(--ff-yellow-soft); border: 1px solid #F4E3A0; font-weight: 500; }
.ff-risico-result { margin-top: 6px; }
.ff-risico-md { font-size: 14px; line-height: 1.6; }
.ff-card .ff-risico-md h3 { font-size: 22px; font-family: var(--ff-serif); font-weight: 600; margin: 22px 0 8px; text-transform: none; letter-spacing: 0; color: var(--ff-ink); display: block; }
.ff-risico-md h4 { font-size: 15px; margin: 16px 0 6px; }
.ff-risico-md h5 { font-size: 14px; margin: 12px 0 4px; }
@media (max-width: 960px) { .ff-risico-grid { grid-template-columns: 1fr; gap: 10px; } }

/* ---------- AI: gespreksscherm ---------- */
.ff-chatpage { display: flex; flex-direction: column; height: calc(100vh - var(--ff-top)); height: calc(100dvh - var(--ff-top)); min-height: 0; }
.ff-chat-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 24px 8px; max-width: 880px; width: 100%; margin: 0 auto; }
.ff-chat-top .ff-chat-side-btn { display: none; }
.ff-thread { flex: 1; overflow: auto; padding: 8px 24px 16px; -webkit-overflow-scrolling: touch; }
.ff-thread-inner { max-width: 880px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
.ff-chat-hero { text-align: center; padding: 40px 12px 20px; }
.ff-chat-hero-mark { width: 54px; height: 54px; border-radius: 18px; background: var(--ff-ink); color: var(--ff-yellow); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.ff-chat-hero-mark svg { width: 26px; height: 26px; }
.ff-chat-hero h2 { font-family: var(--ff-serif); font-size: 36px; font-weight: 500; margin: 0 0 6px; letter-spacing: 0; }
.ff-chat-hero p { color: var(--ff-muted); margin: 0 0 24px; font-size: 14px; }
.ff-chat-suggest { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; text-align: left; }
.ff-chat-suggest button { border: 1px solid var(--ff-hair); background: #fff; border-radius: 14px; padding: 12px 14px; font-size: 13.5px; color: var(--ff-text); text-align: left; line-height: 1.45; cursor: pointer; box-shadow: var(--ff-shadow-sm); }
.ff-chat-suggest button:hover { border-color: var(--ff-ink); background: #FFFDF3; }
.ff-msg { display: flex; gap: 12px; max-width: 100%; }
.ff-msg.is-user { justify-content: flex-end; }
.ff-msg.is-user .ff-msg-body { max-width: 78%; background: var(--ff-ink); color: #fff; border-radius: 18px 18px 4px 18px; padding: 12px 16px; white-space: pre-wrap; line-height: 1.5; font-size: 14px; overflow-wrap: anywhere; }
.ff-msg-avatar { flex: none; width: 30px; height: 30px; border-radius: 10px; background: var(--ff-ink); color: var(--ff-yellow); display: inline-flex; align-items: center; justify-content: center; margin-top: 2px; }
.ff-msg-avatar svg { width: 15px; height: 15px; }
.ff-msg-main { min-width: 0; flex: 1; }
.ff-msg.is-ai .ff-msg-body { background: transparent; border: 0; padding: 3px 0 0; white-space: normal; font-size: 14.5px; line-height: 1.65; overflow-wrap: anywhere; }
.ff-msg-tools { display: flex; gap: 6px; align-items: center; margin-top: 8px; flex-wrap: wrap; }
.ff-msg-tools .ff-ws-btn { color: var(--ff-muted); }
.ff-msg-tools .ff-ws-btn:hover { color: var(--ff-ink); }
.ff-msg-tools .ff-ws-btn svg { width: 14px; height: 14px; }
.ff-msg-sources { font-size: 12px; color: var(--ff-muted); margin: 8px 0 0; line-height: 1.6; }
.ff-msg-sources a { color: var(--ff-indigo); }
.ff-msg-file { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; padding: 8px 12px; border: 1px solid var(--ff-line); border-radius: 12px; background: #fff; color: var(--ff-ink); font-weight: 500; font-size: 13.5px; }
.ff-msg-file svg { width: 16px; height: 16px; color: var(--ff-indigo); }
.ff-md p { margin: 0 0 10px; } .ff-md p:last-child { margin-bottom: 0; }
.ff-md h3, .ff-md h4, .ff-md h5 { font-weight: 600; margin: 16px 0 6px; font-size: 15px; letter-spacing: 0; }
.ff-md h3:first-child, .ff-md h4:first-child { margin-top: 2px; }
.ff-md ul, .ff-md ol { margin: 4px 0 10px 20px; padding: 0; } .ff-md li { margin: 3px 0; }
.ff-md code { background: var(--ff-soft); padding: 1px 5px; border-radius: 5px; font-size: 13px; }
.ff-md a { color: var(--ff-indigo); }
.ff-md-wrap { overflow-x: auto; margin: 8px 0 12px; -webkit-overflow-scrolling: touch; }
.ff-md-table { border-collapse: collapse; width: 100%; font-size: 13.5px; min-width: 320px; }
.ff-md-table th, .ff-md-table td { border: 1px solid var(--ff-hair); padding: 7px 10px; text-align: left; vertical-align: top; }
.ff-md-table th { background: var(--ff-soft); font-weight: 600; }
.ff-typing span { display: inline-block; width: 7px; height: 7px; margin-right: 4px; border-radius: 50%; background: var(--ff-muted); animation: ff-typing 1.2s infinite; }
.ff-typing span:nth-child(2) { animation-delay: .2s; } .ff-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes ff-typing { 0%, 60%, 100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
.ff-composer-wrap { padding: 8px 24px 16px; background: linear-gradient(to top, var(--ff-bg) 70%, transparent); }
.ff-composer { max-width: 880px; margin: 0 auto; background: #fff; border: 1px solid var(--ff-line); border-radius: 24px; box-shadow: 0 10px 30px rgba(31,31,74,.08); padding: 10px 12px 8px; }
.ff-composer:focus-within { border-color: var(--ff-ink); box-shadow: 0 10px 30px rgba(31,31,74,.12); }
.ff-doc-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.ff-composer .ff-doc-chips { padding: 2px 4px 8px; }
.ff-doc-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--ff-line); border-radius: var(--ff-pill); font-size: 13px; background: #FBFBFA; max-width: 100%; }
.ff-doc-chip svg { width: 13px; height: 13px; flex: none; }
.ff-doc-chip button { border: 0; background: transparent; font-size: 16px; line-height: 1; cursor: pointer; color: var(--ff-muted); padding: 0 2px; }
.ff-chat-actions { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 4px 8px; }
.ff-chat-actions .ff-tpl { padding: 5px 11px; font-size: 12.5px; }
.ff-composer-row { display: flex; align-items: flex-end; gap: 8px; }
.ff-composer-attach { flex: none; width: 38px; height: 38px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; color: var(--ff-muted); cursor: pointer; }
.ff-composer-attach:hover { background: var(--ff-soft); color: var(--ff-ink); }
.ff-composer-attach svg { width: 18px; height: 18px; }
.ff-composer textarea { flex: 1; border: 0; outline: none; resize: none; font-family: inherit; font-size: 15px; line-height: 1.5; padding: 8px 4px; max-height: 220px; background: transparent; min-width: 0; }
.ff-composer-send { flex: none; width: 38px; height: 38px; border-radius: 12px; border: 0; background: var(--ff-ink); color: var(--ff-yellow); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.ff-composer-send:hover { background: #2B2B63; }
.ff-composer-send:disabled { opacity: .5; }
.ff-composer-send svg { width: 18px; height: 18px; }
.ff-composer-hint { font-size: 11.5px; color: var(--ff-muted); padding: 5px 6px 0; }

/* ---------- modal ---------- */
.ff-modal-bg { position: fixed; inset: 0; background: rgba(31,31,74,.45); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 20px; }
.ff-modal { background: #fff; border-radius: 22px; width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,.25); -webkit-overflow-scrolling: touch; }
.ff-modal-bg.is-mail .ff-modal { max-width: 800px; }
.ff-modal-h { padding: 20px 24px 0; display: flex; justify-content: space-between; align-items: center; gap: 10px; position: sticky; top: 0; background: #fff; z-index: 2; padding-bottom: 8px; }
.ff-modal-h h2 { font-family: var(--ff-serif); font-size: 28px; font-weight: 500; letter-spacing: 0; }
.ff-modal-b { padding: 8px 24px 16px; }
.ff-modal-f { padding: 0 24px 22px; display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.ff-field { display: block; margin-bottom: 14px; }
.ff-field > span { display: block; font-size: 12.5px; color: var(--ff-muted); margin-bottom: 5px; font-weight: 500; }
.ff-field input, .ff-field select, .ff-field textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--ff-line); border-radius: 12px; background-color: #FBFBFA; outline: none; }
.ff-field input:focus, .ff-field select:focus, .ff-field textarea:focus { border-color: var(--ff-ink); background-color: #fff; box-shadow: 0 0 0 3px rgba(31,31,74,.06); }
.ff-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ff-field-hint { font-size: 12px; color: var(--ff-muted); margin-top: 4px; line-height: 1.5; }
.ff-drop { border: 1.5px dashed var(--ff-line); border-radius: 14px; padding: 18px; text-align: center; color: var(--ff-muted); font-size: 13.5px; cursor: pointer; background: #FBFBFA; display: block; }
.ff-drop.is-over { border-color: var(--ff-indigo); background: #EDEDFF; }
.ff-drop.has-file { border-style: solid; border-color: var(--ff-green); color: var(--ff-text); background: #F0FAF5; }
.ff-drop input { display: none; }
.ff-drop-sm { padding: 10px 12px; font-size: 13px; }
.ff-reasons { display: grid; gap: 6px; }
.ff-reasons label { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--ff-line); border-radius: 12px; cursor: pointer; }
.ff-reasons label:hover { background: var(--ff-soft); }
.ff-mail-meta { font-size: 13.5px; line-height: 1.5; padding: 9px 12px; border: 1px dashed var(--ff-line); border-radius: 12px; background: #FBFBFA; }
.ff-mail textarea[name=body] { font-family: inherit; line-height: 1.55; min-height: 220px; }
.ff-mail-att { align-items: center; }
.ff-cc-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.ff-cc-chips .ff-tpl { padding: 4px 10px; font-size: 12.5px; }
.ff-check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; margin-bottom: 12px; }
.ff-check input { width: auto; }

/* ---------- toast, laden ---------- */
.ff-toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 60; pointer-events: none; max-width: 92vw; }
.ff-toast { background: var(--ff-ink); color: #fff; padding: 10px 18px; border-radius: var(--ff-pill); font-size: 13.5px; box-shadow: var(--ff-shadow); animation: ff-in .18s ease-out; text-align: center; }
.ff-toast.is-error { background: var(--ff-red); }
.ff-toast.is-ok { background: var(--ff-green); }
@keyframes ff-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.ff-spin { display: inline-block; width: 16px; height: 16px; border: 2px solid var(--ff-hair); border-top-color: var(--ff-ink); border-radius: 50%; animation: ff-spin .7s linear infinite; vertical-align: middle; }
@keyframes ff-spin { to { transform: rotate(360deg); } }
.ff-loading { padding: 40px; text-align: center; color: var(--ff-muted); }

/* ---------- responsive: laptop ---------- */
@media (max-width: 1240px) {
  .ff-main { grid-template-columns: 216px 360px 1fr; }
  .ff-main.is-full { grid-template-columns: 216px 1fr; }
  .ff-cards { grid-template-columns: 1fr; }
}

/* ---------- responsive: tablet en telefoon ---------- */
@media (max-width: 960px) {
  .ff-top { position: sticky; top: 0; min-height: var(--ff-top); gap: 8px; padding: 0 12px; }
  .ff-top-brand { margin-right: 0; }
  .ff-top-menu-btn { display: inline-flex; background: transparent; border: 0; color: var(--ff-ink); padding: 6px; border-radius: 10px; }
  .ff-top-menu-btn:hover { background: var(--ff-soft); }
  .ff-top-nav { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .ff-top-nav button { white-space: nowrap; padding: 8px 10px; }
  .ff-top-nav button span.ff-label, .ff-top-user .ff-label { display: none; }
  .ff-top-search { display: none; }
  .ff-top.is-searching .ff-top-search { display: flex; position: absolute; left: 0; right: 0; top: 100%; padding: 8px 12px; background: #fff; border-bottom: 1px solid var(--ff-hair); z-index: 31; }
  .ff-top.is-searching .ff-top-search input { max-width: none; }
  .ff-main { grid-template-columns: 1fr; }
  .ff-main.is-full { grid-template-columns: 1fr; }
  .ff-page, .ff-main.is-full .ff-page { grid-column: 1; }
  .ff-side { display: none; position: fixed; top: var(--ff-top); left: 0; bottom: 0; width: min(300px, 84vw); z-index: 45; box-shadow: 0 0 40px rgba(31,31,74,.25); padding-bottom: 24px; }
  .ff-side.is-open { display: block; }
  .ff-side-bg { position: fixed; inset: 0; top: var(--ff-top); background: rgba(31,31,74,.35); z-index: 44; }
  .ff-side-bg.is-open { display: block; }
  .ff-list { display: flex; }
  .ff-detail { display: none; }
  .ff-main.has-detail .ff-list { display: none; }
  .ff-main.has-detail .ff-detail { display: block; }
  .ff-back { display: inline-flex; margin: -4px 0 8px -10px; }
  .ff-dossier { padding: 14px 16px 60px; }
  .ff-d-head { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 12px; }
  .ff-d-title { max-width: 100%; }
  .ff-d-title h1 { font-size: 28px; }
  .ff-d-actions { display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 6px; margin: 0 -16px; padding: 2px 16px 6px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .ff-d-actions::-webkit-scrollbar { display: none; }
  .ff-d-actions .ff-ws-btn { flex: none; padding: 8px 14px; font-size: 13px; }
  .ff-status-bar { flex-wrap: nowrap; overflow-x: auto; padding: 2px 16px 6px; margin: 12px -16px 10px; scrollbar-width: none; }
  .ff-status-bar::-webkit-scrollbar { display: none; }
  .ff-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 4px -16px 14px; padding: 0 16px; scrollbar-width: none; }
  .ff-tabs::-webkit-scrollbar { display: none; }
  .ff-tabs button { white-space: nowrap; padding: 10px 12px; }
  .ff-section .ff-kv { grid-template-columns: 1fr; gap: 2px 0; padding: 12px 16px; }
  .ff-section .ff-kv dt { margin-top: 8px; font-size: 12px; }
  .ff-section .ff-kv dt:first-child { margin-top: 0; }
  .ff-task-form { grid-template-columns: 1fr 1fr; }
  .ff-task-form input[name=title] { grid-column: 1 / -1; }
  .ff-grid-2 { grid-template-columns: 1fr; }
  .ff-page-inner { padding: 16px; }
  .ff-page-head h1 { font-size: 28px; }
  .ff-modal-bg { padding: 0; align-items: flex-end; }
  .ff-modal { max-width: none; border-radius: 20px 20px 0 0; max-height: 94vh; max-height: 94dvh; }
  .ff-modal-bg.is-mail .ff-modal { max-width: none; }
  .ff-modal-h { padding: 16px 18px 8px; }
  .ff-modal-h h2 { font-size: 24px; }
  .ff-modal-b { padding: 6px 18px 14px; }
  .ff-modal-f { padding: 0 18px 18px; padding-bottom: calc(18px + env(safe-area-inset-bottom)); position: sticky; bottom: 0; background: #fff; padding-top: 10px; border-top: 1px solid var(--ff-hair); }
  .ff-modal-f .ff-ws-btn { flex: 1; min-height: 44px; }
  .ff-field-row { grid-template-columns: 1fr; }
  .ff-advies-actions { flex-direction: column; align-items: stretch; }
  .ff-advies-actions .ff-ws-btn { justify-content: center; min-height: 44px; }
  .ff-review { flex-wrap: wrap; }
  .ff-review .ff-ws-btn { width: 100%; justify-content: center; min-height: 40px; }
  .ff-ai-row, .ff-sd-search { grid-template-columns: 1fr; flex-direction: column; }
  .ff-schrijf-grid { grid-template-columns: 1fr; }
  .ff-chat-top { padding: 10px 14px 6px; }
  .ff-chat-top .ff-seg { flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
  .ff-chat-top .ff-seg::-webkit-scrollbar { display: none; }
  .ff-chat-top [data-act="c-new"] .ff-label { display: none; }
  .ff-chat-top [data-act="c-new"] { padding: 6px 10px; }
  .ff-chat-top .ff-chat-side-btn { display: inline-flex; }
  .ff-thread, .ff-composer-wrap { padding-left: 14px; padding-right: 14px; }
  .ff-chat-suggest { grid-template-columns: 1fr; }
  .ff-chat-hero { padding-top: 22px; }
  .ff-chat-hero h2 { font-size: 30px; }
  .ff-msg.is-user .ff-msg-body { max-width: 88%; }
  .ff-ws-btn { min-height: 40px; }
  .ff-ws-btn-sm { min-height: 34px; }
  .ff-ws-btn-xs { min-height: 28px; }
  .ff-ws input, .ff-ws select, .ff-ws textarea { font-size: 16px; } /* geen inzoomen op iOS */
  .ff-composer textarea { font-size: 16px; }
}

/* ---------- telefoon: tabbalk onderaan ---------- */
@media (max-width: 640px) {
  :root { --ff-top: 56px; }
  .ff-top-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; background: #fff; border-top: 1px solid var(--ff-hair); display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); overflow: visible; box-shadow: 0 -6px 20px rgba(31,31,74,.06); }
  .ff-top-nav button { position: relative; flex-direction: column; gap: 3px; padding: 6px 2px 4px; border-radius: 12px; font-size: 10.5px; font-weight: 500; color: var(--ff-muted); white-space: nowrap; }
  .ff-top-nav button svg { width: 20px; height: 20px; }
  .ff-top-nav button span.ff-label { display: inline; }
  .ff-top-nav button.is-active { background: transparent; color: var(--ff-ink); }
  .ff-top-nav button.is-active::after { content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 22px; height: 3px; border-radius: 2px; background: var(--ff-yellow); }
  .ff-top-nav button .ff-count { position: absolute; top: 2px; left: calc(50% + 6px); font-size: 10px; padding: 0 5px; min-width: 18px; }
  .ff-top-nav button .ff-count.is-zero { display: none; }
  .ff-top-brand { flex: 1; }
  .ff-top-brand .ff-label { display: inline; }
  .ff-main { height: calc(100dvh - var(--ff-top) - var(--ff-tabbar)); }
  .ff-side { bottom: var(--ff-tabbar); }
  .ff-side-bg { bottom: var(--ff-tabbar); }
  .ff-modal-bg { padding-bottom: 0; }
  .ff-ws-flashes { top: auto; bottom: calc(var(--ff-tabbar) + 10px); }
  .ff-toasts { bottom: calc(var(--ff-tabbar) + 12px); }
  .ff-chatpage { height: calc(100dvh - var(--ff-top) - var(--ff-tabbar)); }
  .ff-composer-wrap { padding: 6px 10px 10px; }
  .ff-composer { border-radius: 20px; padding: 8px 8px 6px; }
  .ff-composer-hint { display: none; }
  .ff-thread { padding-left: 10px; padding-right: 10px; }
  .ff-dossier { padding: 12px 14px 40px; }
  .ff-d-actions, .ff-status-bar, .ff-tabs { margin-left: -14px; margin-right: -14px; padding-left: 14px; padding-right: 14px; }
  .ff-d-title h1 { font-size: 26px; }
  .ff-page-inner { padding: 14px; }
  .ff-page-head h1 { font-size: 26px; }
  .ff-row { padding: 12px 14px; gap: 10px; grid-template-columns: 34px 1fr auto; }
  .ff-list-head { padding: 12px 14px; }
  .ff-kpis { grid-template-columns: 1fr 1fr; gap: 8px; }
  .ff-kpi { padding: 12px 14px; }
  .ff-kpi-value { font-size: 28px; }
  .ff-card { padding: 14px; }
  .ff-kv { grid-template-columns: 110px 1fr; }
  .ff-task-form { grid-template-columns: 1fr; }
  .ff-task-form .ff-ws-btn { width: 100%; }
}
@media (max-width: 380px) {
  .ff-top-brand .ff-label { display: none; }
}
