/* ==========================================
   Vergezicht — Van der Aa SaaS-platform
   Merk: diep teal + goud, serif-display (Lora) + Open Sans
   ========================================== */
:root {
  --teal: #0e4d4a;
  --teal-700: #0b3f3c;
  --teal-900: #07302e;
  --teal-soft: #e7efed;
  --teal-ink: #1f3b39;

  --gold: #c19a5b;
  --gold-2: #ad8645;
  --gold-soft: #f3ebdb;
  --gold-ink: #7e6128;

  --paper: #f4f6f5;
  --white: #ffffff;
  --ink: #1f3b39;        /* koppen */
  --body: #4c5957;       /* lopende tekst */
  --muted: #828e8b;
  --border: #e4e8e6;

  --ok-bg: #e7f0ea;  --ok-ink: #2f6b4f;  --ok: #3f8163;
  --attn-bg: #f6ecd6; --attn-ink: #8a6a2f; --attn: var(--gold);

  --radius: 10px;
  --shadow: 0 1px 2px rgba(12,40,38,.05), 0 4px 14px rgba(12,40,38,.04);
  --font: 'Open Sans', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: 'Lora', Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--body);
  font-family: var(--font); font-size: 14px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
.serif { font-family: var(--serif); }

/* ===== App shell ===== */
.app { display: flex; min-height: 100vh; }

.sidebar {
  width: 264px; flex: none; background: var(--teal); color: #d7e4e1;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.sidebar__logo { display: flex; align-items: center; gap: 12px; padding: 22px 22px 18px; }
.logo-svg { width: 46px; height: auto; color: var(--gold); flex: none; }
.sidebar__brand { display: flex; flex-direction: column; line-height: 1.15; }
.sidebar__brand b { font-family: var(--serif); font-size: 19px; font-weight: 700; color: #fff; }
.sidebar__brand small { font-size: 11px; color: var(--gold); letter-spacing: .03em; }

.nav { flex: 1; padding: 8px 14px; overflow-y: auto; }
.nav__label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; color: #7fa6a1; margin: 16px 10px 8px; }
.nav__item {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 8px;
  color: #cdddd9; font-size: 13.5px; margin-bottom: 2px; transition: background .15s, color .15s;
}
.nav__item i { font-size: 18px; color: #8fb4af; }
.nav__item:hover { background: var(--teal-700); color: #fff; }
.nav__item.is-active { background: var(--teal-900); color: #fff; }
.nav__item.is-active i { color: var(--gold); }
.nav__item.is-active::before {
  content: ''; position: absolute; left: 0; width: 3px; height: 22px; background: var(--gold); border-radius: 0 3px 3px 0;
}
.nav__client { position: relative; }
.nav__client .meta { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.nav__client .meta small { font-size: 11px; color: #84a8a3; }
.nav__dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.nav__dot--ok { background: #6fc79c; }
.nav__dot--attn { background: var(--gold); }

.sidebar__foot { padding: 14px 18px; border-top: 1px solid rgba(255,255,255,.08); display: flex; align-items: center; gap: 11px; }
.sidebar__foot .avatar { width: 38px; height: 38px; background: var(--gold-soft); color: var(--gold-ink); }
.sidebar__foot .meta { line-height: 1.25; }
.sidebar__foot .meta b { color: #fff; font-size: 13px; font-weight: 600; }
.sidebar__foot .meta small { color: #84a8a3; font-size: 11px; }

/* ===== Main ===== */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.appbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 32px; background: var(--white); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 20;
}
.appbar__title h1 { font-family: var(--serif); font-size: 22px; font-weight: 700; color: var(--ink); margin: 0; }
.appbar__title .sub { font-size: 12.5px; color: var(--muted); }
.appbar__right { display: flex; align-items: center; gap: 16px; }
.greet { font-size: 13px; color: var(--body); }
.roleswitch { display: flex; align-items: center; gap: 6px; background: var(--paper); border: 1px solid var(--border); border-radius: 22px; padding: 3px; }
.pill { padding: 6px 14px; border-radius: 20px; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.pill--on { background: var(--teal); color: #fff; }

.content { padding: 28px 32px 40px; max-width: 1280px; width: 100%; }
.flash {
  display: flex; align-items: center; gap: 9px; background: var(--ok-bg); color: var(--ok-ink);
  border: 1px solid #cfe2d6; border-radius: var(--radius); padding: 12px 16px; font-size: 13px; margin-bottom: 22px;
}
.footnote { font-size: 11px; color: var(--muted); margin: 26px 0 0; }

/* ===== Hero (klant) ===== */
.hero {
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-700) 100%);
  color: #fff; border-radius: 14px; padding: 34px 36px; margin-bottom: 22px; position: relative; overflow: hidden;
}
.hero--attn { background: linear-gradient(135deg, #6e5526 0%, #8a6a2f 100%); }
.hero__eyebrow { font-family: var(--serif); font-style: italic; color: var(--gold); font-size: 15px; margin-bottom: 10px; }
.hero--attn .hero__eyebrow { color: #f0dcb6; }
.hero__row { display: flex; align-items: flex-start; gap: 18px; }
.hero__icon { font-size: 40px; color: var(--gold); line-height: 1; }
.hero--attn .hero__icon { color: #f0dcb6; }
.hero__title { font-family: var(--serif); font-size: 34px; font-weight: 700; line-height: 1.1; margin: 0 0 8px; }
.hero__text { font-size: 15px; opacity: .92; max-width: 640px; }
.hero__sub { font-size: 12.5px; opacity: .75; margin-top: 12px; }

/* ===== Grid ===== */
.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 18px; }
.col-12 { grid-column: span 12; }
.col-8 { grid-column: span 8; }
.col-7 { grid-column: span 7; }
.col-6 { grid-column: span 6; }
.col-5 { grid-column: span 5; }
.col-4 { grid-column: span 4; }

/* ===== Cards / panels ===== */
.panel { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.panel--pad0 { padding: 0; overflow: hidden; }
.panel__title { font-family: var(--serif); font-size: 17px; font-weight: 700; color: var(--ink); margin-bottom: 4px; }
.panel__label { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 14px; }
.muted-sm { font-size: 12px; color: var(--muted); line-height: 1.55; }
.mb { margin-bottom: 14px; display: block; }
.mt { margin-top: 12px; }

/* Advisor message */
.advisor-card__head { display: flex; align-items: center; gap: 13px; margin-bottom: 14px; }
.avatar { width: 50px; height: 50px; border-radius: 50%; background: var(--teal-soft); color: var(--teal); display: grid; place-items: center; font-size: 16px; font-weight: 700; flex: none; }
.advisor-card__name { font-size: 15px; font-weight: 700; color: var(--ink); }
.voice { font-family: var(--serif); font-size: 18px; font-style: italic; line-height: 1.6; color: var(--ink); margin: 0 0 16px; padding-left: 16px; border-left: 3px solid var(--gold); }
.voice--sm { font-size: 15px; margin: 4px 0 0; }
.row-gap { display: flex; gap: 10px; flex-wrap: wrap; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  background: var(--white); border: 1px solid var(--border); border-radius: 8px; padding: 10px 17px; color: var(--ink); transition: all .15s; }
.btn:hover { border-color: var(--teal); color: var(--teal); background: var(--teal-soft); }
.btn i { font-size: 16px; }
.btn--accent { background: var(--teal); color: #fff; border-color: var(--teal); }
.btn--accent:hover { background: var(--teal-700); color: #fff; border-color: var(--teal-700); }
.btn--gold { background: var(--gold); color: #fff; border-color: var(--gold); }
.btn--gold:hover { background: var(--gold-2); color: #fff; border-color: var(--gold-2); }
.btn--sm { padding: 8px 14px; font-size: 12px; }

/* Qualitative status */
.statuslist { display: flex; flex-direction: column; gap: 11px; }
.status-chip { display: flex; align-items: center; gap: 11px; font-size: 13.5px; color: var(--ink); }
.status-chip .ic { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--ok-bg); color: var(--ok); font-size: 17px; }
.status-chip--attn .ic { background: var(--attn-bg); color: var(--attn-ink); }

/* Figures */
.figs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 6px 0 4px; }
.fig { background: var(--paper); border: 1px solid var(--border); border-radius: 10px; padding: 16px; }
.fig__val { font-family: var(--serif); font-size: 24px; font-weight: 700; color: var(--ink); }
.fig__val--pos { color: var(--ok); }
.fig__lbl { font-size: 11.5px; color: var(--muted); margin-top: 4px; }

.goal { margin-top: 16px; }
.goal__head { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; margin-bottom: 8px; }
.bar { height: 10px; background: var(--paper); border: 1px solid var(--border); border-radius: 20px; overflow: hidden; }
.bar__fill { height: 100%; background: linear-gradient(90deg, var(--teal), var(--ok)); border-radius: 20px; }

/* File lists */
.filelist { display: flex; flex-direction: column; gap: 9px; }
.filerow { display: flex; align-items: center; gap: 13px; padding: 13px 15px; background: var(--paper); border: 1px solid var(--border); border-radius: 10px; transition: border-color .15s; }
.filerow:hover { border-color: var(--teal); }
.filerow__ico { font-size: 21px; color: var(--gold); }
.filerow__main { flex: 1; min-width: 0; }
.filerow__title { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.linkbtn { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--teal); }
.linkbtn:hover { color: var(--gold-2); }
.linkbtn i { font-size: 16px; }
.tag { font-size: 11px; padding: 4px 11px; border-radius: 20px; font-weight: 600; background: var(--paper); border: 1px solid var(--border); color: var(--muted); }
.tag--ok { background: var(--ok-bg); color: var(--ok-ink); border-color: #cfe2d6; }
.tag--attn { background: var(--attn-bg); color: var(--attn-ink); border-color: #ecdcbb; }

/* Watch (two-tier) */
.watch { display: flex; gap: 13px; margin-top: 16px; }
.watch:first-of-type { margin-top: 6px; }
.watch__ico { font-size: 22px; margin-top: 1px; }
.watch__ico--ok { color: var(--ok); }
.watch__ico--accent { color: var(--gold); }
.watch__title { font-size: 13.5px; font-weight: 600; color: var(--ink); }

/* Advisor working blocks */
.detail__head { display: flex; align-items: center; gap: 12px; }
.statusbadge { font-size: 11.5px; padding: 5px 12px; border-radius: 20px; font-weight: 600; }
.statusbadge--ok { background: var(--ok-bg); color: var(--ok-ink); }
.statusbadge--attn { background: var(--attn-bg); color: var(--attn-ink); }
.block__row { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }

.costcheck { display: flex; align-items: center; gap: 10px; margin-top: 16px; font-size: 12.5px; padding: 12px 14px; border-radius: 10px; }
.costcheck i { font-size: 18px; }
.costcheck--ok { background: var(--ok-bg); color: var(--ok-ink); }
.costcheck--warn { background: var(--attn-bg); color: var(--attn-ink); }

.check { display: flex; align-items: center; gap: 10px; font-size: 13.5px; margin: 10px 0; cursor: pointer; color: var(--ink); }
.check input { accent-color: var(--teal); width: 16px; height: 16px; }
.textarea { width: 100%; font-family: var(--font); font-size: 13.5px; padding: 13px; border: 1px solid var(--border); border-radius: 10px; background: var(--white); color: var(--body); resize: vertical; line-height: 1.6; }
.textarea:focus { outline: none; border-color: var(--teal); }
.preview { margin-top: 12px; padding: 14px 16px; background: var(--paper); border: 1px solid var(--border); border-radius: 10px; }

/* Timeline */
.timeline { display: flex; flex-direction: column; gap: 15px; }
.tl { display: flex; gap: 13px; }
.tl__dot { width: 11px; height: 11px; border-radius: 50%; margin-top: 5px; flex: none; }
.tl__dot--ok { background: var(--ok); }
.tl__dot--accent { background: var(--gold); }
.tl__title { font-size: 13.5px; font-weight: 600; color: var(--ink); }

/* Modal + toast */
.modal { position: fixed; inset: 0; background: rgba(7,48,46,.45); display: grid; place-items: center; padding: 16px; z-index: 50; }
.modal[hidden] { display: none; }
.modal__box { background: var(--white); border-radius: 14px; padding: 24px; width: 100%; max-width: 440px; box-shadow: 0 20px 50px rgba(7,48,46,.3); }
.modal__title { font-family: var(--serif); font-size: 18px; font-weight: 700; color: var(--ink); }
.modal__hint { font-size: 12.5px; color: var(--muted); margin: 6px 0 14px; }
.modal__field { width: 100%; font-family: var(--font); font-size: 13.5px; padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--white); color: var(--body); resize: vertical; }
.modal__field:focus { outline: none; border-color: var(--teal); }
.modal__actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 16px; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: var(--teal); color: #fff; padding: 13px 20px; border-radius: 10px; font-size: 13px; font-weight: 600; z-index: 60; box-shadow: 0 10px 30px rgba(7,48,46,.3); }

/* ===== Chat (berichten) ===== */
.avatar--sm { width: 36px; height: 36px; font-size: 13px; }
.chat { display: flex; flex-direction: column; gap: 14px; margin-bottom: 18px; }
.bubble-row { display: flex; align-items: flex-end; gap: 10px; max-width: 80%; }
.bubble-row--me { margin-left: auto; flex-direction: row-reverse; }
.bubble { background: var(--paper); border: 1px solid var(--border); border-radius: 14px; border-bottom-left-radius: 4px; padding: 12px 15px; }
.bubble--me { background: var(--teal); border-color: var(--teal); color: #fff; border-radius: 14px; border-bottom-right-radius: 4px; }
.bubble__body { font-size: 13.5px; line-height: 1.5; }
.bubble__meta { font-size: 11px; color: var(--muted); margin-top: 6px; }
.bubble--me .bubble__meta { color: rgba(255,255,255,.7); }
.chat-form { border-top: 1px solid var(--border); padding-top: 16px; }

/* ===== Table (dashboard) ===== */
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table thead th { text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.table tbody td { padding: 14px 16px; border-bottom: 1px solid var(--border); color: var(--body); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: var(--paper); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table th.num { text-align: right; }
.tlink { font-weight: 600; color: var(--ink); }
.tlink:hover { color: var(--teal); }

/* ===== Dromen & doelen ===== */
.cat-head { display: flex; align-items: center; gap: 11px; margin-bottom: 14px; }
.cat-ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; font-size: 19px; flex: none; }
.cat-name { font-family: var(--serif); font-size: 16px; font-weight: 700; color: var(--ink); }

.dreamlist { display: flex; flex-direction: column; gap: 9px; }
.dream { display: flex; align-items: center; gap: 13px; padding: 13px 15px; background: var(--paper); border: 1px solid var(--border); border-radius: 10px; }
.dream__bar { width: 4px; align-self: stretch; border-radius: 4px; flex: none; }
.dream__main { flex: 1; min-width: 0; }
.dream__title { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.dream__right { text-align: right; }
.dream__cost { font-family: var(--serif); font-size: 15px; font-weight: 700; color: var(--ink); white-space: nowrap; }

/* segment-knoppen (adviseur markeert dromen) */
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; flex: none; }
.seg__btn { border: none; background: var(--white); color: var(--muted); font-family: inherit; font-size: 11.5px; font-weight: 600; padding: 7px 11px; cursor: pointer; border-left: 1px solid var(--border); }
.seg form:first-child .seg__btn { border-left: none; }
.seg__btn:hover { background: var(--paper); color: var(--ink); }
.seg__btn--on { background: var(--teal); color: #fff; }

.dream-teaser { display: flex; align-items: center; gap: 14px; text-decoration: none; transition: border-color .15s; }
.dream-teaser:hover { border-color: var(--gold); }
.dream-teaser__main { flex: 1; min-width: 0; }

@media (max-width: 640px) {
  .dream { flex-wrap: wrap; }
  .seg { width: 100%; }
  .seg form { flex: 1; }
  .seg__btn { width: 100%; }
}

/* ===== Life events ===== */
.field-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 8px; }
.event-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.event-opt { cursor: pointer; }
.event-opt input { position: absolute; opacity: 0; pointer-events: none; }
.event-opt__box { display: flex; align-items: center; gap: 9px; padding: 11px 13px; border: 1px solid var(--border); border-radius: 10px; font-size: 13px; color: var(--ink); background: var(--white); transition: all .15s; }
.event-opt__box i { font-size: 18px; color: var(--gold); }
.event-opt:hover .event-opt__box { border-color: var(--teal); }
.event-opt input:checked + .event-opt__box { border-color: var(--teal); background: var(--teal-soft); }
.nav__badge { margin-left: auto; background: var(--gold); color: #fff; font-size: 10.5px; font-weight: 700; min-width: 18px; height: 18px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; padding: 0 5px; }

@media (max-width: 1080px) { .col-7, .col-5 { grid-column: span 12; } }
@media (max-width: 640px) { .event-pick { grid-template-columns: 1fr; } }

/* ===== Peildatum ===== */
.peildatum { display: flex; align-items: center; gap: 8px; }
.peildatum__lbl { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--muted); }
.peildatum__lbl i { font-size: 15px; }
.peildatum__input { font-family: var(--font); font-size: 13px; padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--white); color: var(--ink); }
.peildatum__input:focus { outline: none; border-color: var(--teal); }
.peildatum__note { margin-top: 12px; font-size: 12.5px; color: var(--body); background: var(--paper); border: 1px solid var(--border); border-radius: 8px; padding: 9px 13px; }

/* ===== Doelstellingen (financieel inzicht) ===== */
.goalrow { padding: 14px 15px; background: var(--paper); border: 1px solid var(--border); border-radius: 10px; }
.goalrow__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }

/* ===== Stukkenlijst (aan te leveren documenten) ===== */
.stuklist { display: flex; flex-direction: column; }
.stuk { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 2px; border-bottom: 1px solid var(--border); cursor: pointer; }
.stuk:last-child { border-bottom: none; }
.stuk__left { display: flex; align-items: center; gap: 11px; }
.stuk__left input { accent-color: var(--teal); width: 16px; height: 16px; }
.stuk__label { font-size: 13.5px; color: var(--ink); }

/* ===== Responsive ===== */
@media (max-width: 1080px) {
  .col-8 { grid-column: span 12; }
  .col-4 { grid-column: span 12; }
  .col-6 { grid-column: span 12; }
}
@media (max-width: 900px) {
  .app { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: relative; flex-direction: column; }
  .nav { display: flex; flex-wrap: wrap; gap: 4px; }
  .nav__label { width: 100%; }
  .content { padding: 20px 18px 32px; }
  .appbar { padding: 14px 18px; }
  .figs { grid-template-columns: 1fr; }
  .hero { padding: 26px 22px; }
  .hero__title { font-size: 27px; }
}
