/* =====================================================================
   Boekhoudpakket dashboard — rebuild
   Design tokens afgeleid uit de live app (DigiBoox/Knab) via computed styles.
   ===================================================================== */

:root {
  /* Kleuren */
  --bg:            #eef3f8;   /* app-achtergrond            */
  --surface:       #ffffff;   /* cards, sidebar, topbar     */
  --navy:          #003b5a;   /* titels / donkere tekst     */
  --navy-2:        #004b72;   /* actieve tekst + icoon      */
  --text:          #555555;   /* lopende tekst              */
  --muted:         #98a3ac;   /* subtekst / placeholders    */
  --border:        #e6ecf2;   /* lijnen / scheidingen       */

  --teal:          #00a4a7;   /* primaire actie / KPI       */
  --teal-dark:     #00898c;   /* hover                      */
  --pink:          #e96782;   /* KPI kosten                 */
  --pink-2:        #e85875;   /* actieve nav-rand / hover   */
  --pink-text:     #e84583;   /* roze accenttekst           */
  --yellow:        #fbc037;   /* KPI winst                  */
  --light-teal:    #f5fcfc;   /* actieve nav-achtergrond    */
  --danger:        #e84583;

  /* Maatvoering */
  --radius:        12px;
  --radius-pill:   100px;
  --sidebar-w:     235px;
  --sidebar-w-collapsed: 64px;
  --topbar-h:      56px;
  --gap:           20px;
  --pad:           15px;

  --font: 'Nunito', Helvetica, Arial, sans-serif;
}

/* ------------------------------ Reset ------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
h1, h2, h3 { margin: 0; color: var(--navy); font-weight: 700; }  /* origineel: koppen ~600 (KnabTitles); 700 in Nunito komt visueel overeen */

/* ------------------------------ Layout ----------------------------- */
.app { min-height: 100vh; }

.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  z-index: 40;
  transition: width .2s ease, transform .25s ease;
  overflow: hidden;
}
.sidebar__logo {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  padding: 0 20px;
  flex: 0 0 auto;
}
.logo { font-weight: 900; font-size: 30px; color: var(--navy); letter-spacing: -1px; }
.logo__dot { color: var(--teal); }

.sidebar__nav { overflow-y: auto; flex: 1 1 auto; }
.sidebar__nav::-webkit-scrollbar { width: 8px; }
.sidebar__nav::-webkit-scrollbar-thumb { background: #d4dde6; border-radius: 8px; }

.nav-link {
  display: flex;
  align-items: center;
  height: 47px;
  padding: 10px;
  color: var(--navy);
  border-left: 4px solid transparent;   /* placeholder zodat tekst niet verspringt */
  white-space: nowrap;
  transition: background .15s ease, color .15s ease;
}
.nav-link i {
  width: 25px;
  margin-right: 12px;
  font-size: 20px;
  text-align: center;
  color: var(--navy);
  flex: 0 0 auto;
}
.nav-link:hover { background: var(--light-teal); }
.nav-link.active {
  background: var(--light-teal);
  color: var(--navy-2);
  border-left-color: var(--pink-2);
}
.nav-link.active i { color: var(--navy-2); }

/* Main kolom schuift naast de sidebar */
.main {
  margin-left: var(--sidebar-w);
  transition: margin-left .2s ease;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ------------------------------ Topbar ----------------------------- */
.topbar {
  position: sticky;
  top: 0;
  height: var(--topbar-h);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px 0 16px;
  z-index: 30;
}
.topbar__left, .topbar__right { display: flex; align-items: center; gap: 14px; }

.icon-btn {
  width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  color: var(--navy);
  font-size: 19px;
  position: relative;
  transition: background .15s ease;
}
.icon-btn:hover { background: var(--bg); }
.icon-btn--help {
  width: 30px; height: 30px;
  font-size: 14px;
  border: 2px solid var(--navy);
}
.icon-btn--badge .badge {
  position: absolute;
  top: -2px; right: -2px;
  min-width: 18px; height: 18px;
  padding: 0 4px;
  background: var(--pink-text);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
}

.topbar__collapse {
  color: #fff;
  background: var(--teal);
  width: 26px; height: 26px;
  font-size: 13px;
}
.topbar__collapse:hover { background: var(--teal-dark); }
.topbar__burger { display: none; font-size: 20px; }

.add-btn {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 15px;
  transition: background .15s ease;
}
.add-btn:hover { background: var(--teal-dark); }
.breadcrumb { color: var(--navy); font-weight: 600; }

.user { display: flex; align-items: center; gap: 8px; cursor: pointer; position: relative; padding: 4px; border-radius: 8px; }
.user:hover { background: var(--bg); }
.user__avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--bg);
  color: var(--navy);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 15px;
}
.user__name { color: var(--navy); font-weight: 600; }
.user__caret { font-size: 12px; color: var(--teal); }

/* ------------------------------ Dropdowns -------------------------- */
.dropdown {
  position: absolute;
  background: var(--surface);
  border-radius: 10px;
  box-shadow: 0 8px 30px rgba(0, 59, 90, .15);
  padding: 6px;
  min-width: 200px;
  z-index: 50;
}
.user__menu { top: 110%; right: 0; }
.dropdown__item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--navy);
  font-size: 15px;
}
.dropdown__item:hover { background: var(--light-teal); }
.dropdown__item--danger { color: var(--danger); }
.dropdown__divider { height: 1px; background: var(--border); margin: 6px 4px; }

/* ------------------------------ Content ---------------------------- */
.content { padding: 24px; flex: 1 1 auto; }

.page-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.page-header__title { display: flex; align-items: center; gap: 14px; }
.page-header h1 { font-size: 22px; }  /* origineel: 22px (gelijk aan widgettitels) */

.period-select { position: relative; }
.period-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--text);
  font-size: 14px;
}
.period-pill i { color: var(--teal); font-size: 12px; }
.period-menu { top: 120%; left: 0; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 16px;
  border-radius: var(--radius-pill);
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  transition: background .15s ease, transform .05s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--teal); }
.btn--primary:hover { background: var(--teal-dark); }

/* ------------------------------ Widgets ---------------------------- */
.widget {
  background: var(--surface);
  border-radius: var(--radius);
  padding: var(--pad);
}
.widget__header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.widget__title { font-size: 22px; }
.widget__period { color: var(--muted); font-size: 16px; }
.widget__amount-sm { color: var(--navy); font-weight: 800; font-size: 15px; }

/* KPI-grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gap);
  margin-bottom: var(--gap);
}
.widget--color {
  position: relative;
  overflow: hidden;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #fff;
  padding: 15px;
}
.widget--teal   { background: var(--teal); }
.widget--pink   { background: var(--pink); }
.widget--yellow { background: var(--yellow); }
.widget--navy   { background: var(--navy); }

.widget__watermark {
  position: absolute;
  left: -10px; top: 50%;
  transform: translateY(-50%) rotate(-12deg);
  font-size: 92px;
  color: rgba(255, 255, 255, .12);
  pointer-events: none;
}
.widget__top { text-align: right; position: relative; z-index: 1; }
.widget__amount { font-size: 36px; font-weight: 700; line-height: 1.1; }
.widget__label { font-size: 16px; opacity: .95; margin-top: 2px; }
.widget__foot {
  display: flex; align-items: center; justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, .25);
  padding-top: 10px;
  margin-top: 12px;
  font-size: 15px;
  position: relative;
  z-index: 1;
}
.widget__action {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .25);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px;
  transition: background .15s ease;
}
.widget__action:hover { background: rgba(255, 255, 255, .4); }
.widget__foot-icon { font-size: 18px; opacity: .9; }

/* Algemene grids */
.grid { display: grid; gap: var(--gap); margin-bottom: var(--gap); }
.grid--2-1 { grid-template-columns: 2fr 1fr; }
.grid--3   { grid-template-columns: repeat(3, 1fr); }
.grid--2   { grid-template-columns: repeat(2, 1fr); }

.chart-wrap { position: relative; height: 300px; }
.chart-wrap--sm { height: 230px; }

.empty-state { color: var(--text); padding: 6px 2px; }

/* Bank/kas-lijst */
.accounts { display: flex; flex-direction: column; }
.account {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.account:last-child { border-bottom: none; }
.account__name { color: var(--pink-text); font-weight: 700; display: block; }
.account__name:hover { text-decoration: underline; }
.account__sub { color: var(--muted); font-size: 13px; }
.account__value { color: var(--text); font-weight: 600; }

/* Balans-tabel */
.balance { width: 100%; border-collapse: collapse; }
.balance td { padding: 9px 0; color: var(--text); }
.balance td.num { text-align: right; font-weight: 600; color: var(--navy); }
.balance td.neg { color: var(--pink-text); }
.balance td.link { color: var(--teal); }
.balance__line td { border-bottom: 1px solid #c9d3dc; }
.balance__total td { font-weight: 800; color: var(--navy); }

/* Debiteuren/Crediteuren (brede rij) */
.widget--row {
  display: flex; align-items: center; justify-content: space-between;
}
.widget--row .widget__amount-sm { font-size: 16px; }

/* Decoratieve blob */
.blob { display: flex; justify-content: center; padding: 30px 0 10px; opacity: .9; }

/* ------------------------------ Modal ------------------------------ */
.modal {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, .5);
  display: none;
  align-items: center; justify-content: center;
  z-index: 60;
  padding: 20px;
}
.modal.open { display: flex; }
.modal__dialog {
  background: var(--surface);
  border-radius: var(--radius);
  width: 640px; max-width: 100%;
  max-height: 88vh;
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: pop .2s ease;
}
@keyframes pop { from { transform: scale(.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal__header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 26px 10px;
}
.modal__header h2 { font-size: 24px; }
.modal__close { font-size: 20px; }
.modal__body { padding: 8px 26px; overflow-y: auto; }
.modal__footer { padding: 14px 26px 22px; text-align: right; }

.steps { display: flex; flex-direction: column; gap: 10px; }
.step {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 16px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--border);
}
.step--done { background: var(--light-teal); border-color: transparent; }
.step__icon {
  width: 40px; height: 40px; flex: 0 0 auto;
  border-radius: 8px;
  background: #eaf0f5;
  color: var(--navy);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.step--done .step__icon { background: #cfeceb; color: var(--teal); }
.step__icon--pink { background: #fbe0e7; color: var(--pink-text); }
.step__icon--yellow { background: #fdf0d3; color: #d79a16; }
.step__text { flex: 1 1 auto; display: flex; flex-direction: column; }
.step__text strong { color: var(--navy); font-size: 17px; font-weight: 700; }
.step__text span { color: var(--text); font-size: 14px; }
.step__check {
  width: 26px; height: 26px; flex: 0 0 auto;
  border-radius: 50%;
  border: 2px solid #cdd7e0;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--teal);
  font-size: 22px;
}
.step--done .step__check { border: none; color: var(--teal); }
.step:not(.step--done) .step__check { background: #fff; }

.link-btn { color: var(--text); font-size: 15px; font-weight: 600; }
.link-btn--danger { color: var(--danger); }
.link-btn:hover { text-decoration: underline; }

/* ------------------------------ Overlay / toast -------------------- */
.overlay {
  position: fixed; inset: 0;
  background: rgba(0, 59, 90, .4);
  z-index: 35;
  display: none;
}
.overlay.show { display: block; }

.toast {
  position: fixed;
  bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--navy);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  box-shadow: 0 8px 30px rgba(0, 59, 90, .3);
  opacity: 0;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 70;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* =====================================================================
   Responsive
   ===================================================================== */

/* Ingeklapte sidebar (desktop, via toggle) */
.app.sidebar-collapsed .sidebar { width: var(--sidebar-w-collapsed); }
.app.sidebar-collapsed .sidebar .nav-link span,
.app.sidebar-collapsed .sidebar__logo .logo { opacity: 0; }
.app.sidebar-collapsed .main { margin-left: var(--sidebar-w-collapsed); }
.app.sidebar-collapsed .topbar__collapse i { transform: rotate(180deg); }

/* Tablet */
@media (max-width: 1100px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .grid--2-1 { grid-template-columns: 1fr; }
  .grid--3 { grid-template-columns: 1fr; }
}

/* Mobiel: sidebar off-canvas */
@media (max-width: 992px) {
  .sidebar { transform: translateX(-100%); width: var(--sidebar-w); box-shadow: 0 0 40px rgba(0,0,0,.2); }
  .app.menu-open .sidebar { transform: translateX(0); }
  .main { margin-left: 0; }
  .topbar__burger { display: inline-flex; }
  .topbar__collapse { display: none; }
  /* op mobiel negeren we de desktop-collapse */
  .app.sidebar-collapsed .sidebar { width: var(--sidebar-w); }
  .app.sidebar-collapsed .sidebar .nav-link span,
  .app.sidebar-collapsed .sidebar__logo .logo { opacity: 1; }
}

@media (max-width: 680px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .grid--2 { grid-template-columns: 1fr; }
  .content { padding: 16px; }
  .page-header, .page-toolbar { flex-direction: column; align-items: flex-start; }
  .user__name, .user-chip__email { display: none; }
  .breadcrumb { display: none; }
  .page-header h1, .page-toolbar h1 { font-size: 20px; }
  .field-row { grid-template-columns: 1fr; }
  .modal__dialog--form, .modal__dialog--auth { width: 100%; }
  .data-table th:nth-child(3), .data-table td:nth-child(3) { display: none; } /* verberg minder belangrijke kolom op mobiel */
}

/* =====================================================================
   Aanvullende componenten: auth, formulieren, tabellen, pagina's
   ===================================================================== */

/* Logo-accent (rebrand Besluitpartners) */
.logo { font-size: 21px; letter-spacing: -0.5px; }
.logo__accent { color: var(--teal); }

/* Auth-zone in de topbar */
.auth-zone { display: flex; align-items: center; gap: 10px; }
.demo-pill {
  background: #fff3d6; color: #9a6b00; font-size: 12px; font-weight: 800;
  padding: 4px 11px; border-radius: 100px;
}
.login-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: 100px;
  background: var(--teal); color: #fff; font-weight: 700; font-size: 14px;
}
.login-btn:hover { background: var(--teal-dark); }

.user-chip { display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 4px 6px; border-radius: 8px; position: relative; }
.user-chip:hover { background: var(--bg); }
.user-chip__avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--teal); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; }
.user-chip__email { color: var(--navy); font-weight: 600; font-size: 14px; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip__caret { font-size: 12px; color: var(--teal); }

/* Demo-banner */
.demo-banner {
  display: flex; align-items: center; gap: 10px;
  background: #fff7e6; border: 1px solid #ffe2a8; color: #8a5a00;
  padding: 10px 16px; border-radius: 10px; margin-bottom: 20px; font-size: 14px;
}
.demo-banner i { color: #d99b1c; }
.demo-banner a { color: var(--teal); font-weight: 700; text-decoration: underline; cursor: pointer; }

/* Pagina-toolbar */
.page-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-toolbar h1 { font-size: 22px; }  /* origineel: 22px */

/* Knoppen */
.btn--ghost { background: var(--bg); color: var(--navy); }
.btn--ghost:hover { background: #e2e9f0; }
.btn--sm { padding: 9px 15px; font-size: 14px; }

/* Datatabellen */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); font-weight: 800; padding: 10px 14px; border-bottom: 2px solid var(--border); }
.data-table td { padding: 12px 14px; border-bottom: 1px solid var(--border); color: var(--text); }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: var(--light-teal); }
.data-table .num { text-align: right; font-weight: 700; color: var(--navy); }
.data-table .cell-strong { color: var(--navy); font-weight: 700; }

/* Status-badges */
.badge-status { display: inline-block; padding: 3px 10px; border-radius: 100px; font-size: 12px; font-weight: 700; }
.badge-betaald { background: #d6f3ec; color: #0a8a6a; }
.badge-verzonden { background: #dbeafe; color: #1d6fd6; }
.badge-concept { background: #eceff2; color: #6b7785; }
.badge-te_laat { background: #fcdfe6; color: #d12c54; }
.badge-open { background: #fff0d6; color: #9a6b00; }

/* Lege tabel */
.table-empty { text-align: center; color: var(--muted); padding: 44px 20px; }
.table-empty i { font-size: 34px; display: block; margin-bottom: 12px; color: #cdd7e0; }

/* Formuliervelden */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > span { font-size: 14px; font-weight: 700; color: var(--navy); }
.field input, .field select, .field textarea {
  font-family: inherit; font-size: 15px; color: var(--text);
  padding: 10px 12px; border: 1px solid #cdd7e0; border-radius: 8px; background: #fff; width: 100%;
}
.field textarea { resize: vertical; min-height: 70px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(0,164,167,.15); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.modal__dialog--form, .modal__dialog--auth { width: 520px; }
.modal__footer--split { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.auth-intro { color: var(--text); margin: 0 0 16px; }
.auth-error { color: var(--danger); font-size: 14px; margin: 10px 0 0; background: #fcdfe6; padding: 8px 12px; border-radius: 8px; }

/* Stub-pagina */
.stub { background: #fff; border-radius: var(--radius); padding: 60px 30px; text-align: center; }
.stub i { font-size: 48px; color: var(--teal); margin-bottom: 18px; }
.stub h2 { font-size: 24px; margin-bottom: 8px; }
.stub p { color: var(--text); }

/* =====================================================================
   Editors (factuur/offerte/bon), klant-modal, regels, lijst-tools
   ===================================================================== */

/* Inline veld: label links, invoer rechts */
.field-inline { display: grid; grid-template-columns: 130px 1fr; align-items: center; gap: 12px; margin-bottom: 12px; }
.field-inline > span { font-size: 14px; font-weight: 700; color: var(--navy); }
.field-inline input, .field-inline select { padding: 10px 12px; border: 1px solid #cdd7e0; border-radius: 8px; font-family: inherit; font-size: 15px; width: 100%; background: #fff; }
.field-inline input:focus, .field-inline select:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(0,164,167,.15); }
.field-inline.mt { margin-top: 4px; }

/* Zoek-invoer met icoon */
.input-search { position: relative; }
.input-search input { width: 100%; padding: 10px 38px 10px 12px; border: 1px solid #cdd7e0; border-radius: 8px; font-family: inherit; font-size: 15px; }
.input-search i { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--teal); }

/* Segmented toggle (Bedrijf/Particulier) */
.segmented { display: inline-flex; background: var(--bg); border-radius: 100px; padding: 3px; }
.seg { padding: 8px 20px; border-radius: 100px; font-weight: 700; color: var(--navy); font-size: 14px; }
.seg.active { background: var(--navy); color: #fff; }

/* Klant-modal */
.modal__dialog--klant { width: 860px; max-width: 100%; }
.cust-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }

/* Editor-layout: hoofdkolom + rechter actiekolom */
.editor { display: grid; grid-template-columns: 1fr 280px; gap: 24px; align-items: start; }
.editor__title { font-size: 28px; font-weight: 700; color: var(--navy); margin-bottom: 18px; }
.editor__head { background: #fff; border-radius: var(--radius); padding: 18px; margin-bottom: 20px; }
.editor__head .field-inline { grid-template-columns: 150px 1fr; max-width: 560px; }
.editor__side { position: sticky; top: 78px; display: flex; flex-direction: column; gap: 12px; }
.editor__save, .editor__back { width: 100%; justify-content: center; }
.editor__back { background: #fff; border: 1px solid var(--border); color: var(--navy); }
.editor__back:hover { background: var(--bg); }
.upload-btn { width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 16px; border-radius: var(--radius-pill); border: 1px dashed var(--pink-2); color: var(--pink-text); background: #fff; font-weight: 600; }
.upload-btn:hover { background: #fff5f7; }

/* Klant-keuze in de editor */
.cust-select { position: relative; }
.cust-select__btn { width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border: 1px solid #cdd7e0; border-radius: 8px; background: #fff; color: var(--text); }
.cust-select__btn i { color: var(--teal); }
.cust-panel { position: absolute; top: 105%; left: 0; right: 0; background: #fff; border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 8px 30px rgba(0,59,90,.15); z-index: 20; padding: 8px; }
.cust-list { max-height: 200px; overflow-y: auto; margin: 8px 0; }
.cust-item { display: block; width: 100%; text-align: left; padding: 9px 12px; border-radius: 8px; color: var(--navy); }
.cust-item:hover { background: var(--light-teal); }
.cust-empty { padding: 12px; color: var(--muted); text-align: center; }
.cust-create { width: 100%; padding: 10px; border: 1px solid var(--teal); border-radius: 8px; color: var(--teal); font-weight: 700; background: #fff; }
.cust-create:hover { background: var(--light-teal); }

/* Regels-tabel */
.lines { width: 100%; border-collapse: collapse; }
.lines th { text-align: left; font-size: 13px; color: var(--muted); font-weight: 700; padding: 8px; border-bottom: 1px solid var(--border); }
.lines th.lines__num { text-align: right; }
.lines td { padding: 6px 8px; vertical-align: middle; }
.lines td.lines__num { width: 150px; }
.lines input, .lines select { width: 100%; padding: 8px 10px; border: 1px solid #cdd7e0; border-radius: 8px; font-family: inherit; font-size: 14px; }
.lines .l-aantal { text-align: right; }
.line__del { color: var(--muted); width: 34px; height: 34px; border-radius: 8px; }
.line__del:hover { color: var(--danger); background: #fcdfe6; }

/* Totalen */
.totals { margin-top: 18px; margin-left: auto; width: 280px; }
.totals > div { display: flex; justify-content: space-between; padding: 6px 0; color: var(--text); }
.totals strong { color: var(--navy); font-weight: 700; }
.totals__grand { border-top: 2px solid var(--border); margin-top: 6px; padding-top: 10px; font-size: 18px; }
.totals__grand strong { font-weight: 800; }

/* Dropzone (bon-upload) */
.dropzone { border: 2px dashed #cdd7e0; border-radius: 10px; padding: 44px; text-align: center; color: var(--muted); cursor: pointer; margin-bottom: 18px; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.drag { border-color: var(--teal); background: var(--light-teal); }
.dropzone i { font-size: 40px; color: var(--pink-text); display: block; margin-bottom: 10px; }
.dropzone p { font-size: 18px; color: var(--navy); font-weight: 700; margin: 0; }
.dropzone__name { display: block; margin-top: 8px; color: var(--teal); font-weight: 600; }
.bon-pdf { display: flex; align-items: center; gap: 10px; padding: 16px; background: var(--bg); border-radius: 10px; color: var(--navy); font-weight: 600; }
.bon-pdf i { color: var(--pink-text); font-size: 22px; }

/* =====================================================================
   Auth-gate — schermvullend inlogscherm dat de hele app afschermt
   ===================================================================== */
.gate {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background: linear-gradient(135deg, #003b5a 0%, #00657f 55%, #00a4a7 100%);
}
.gate[hidden] { display: none; }
.gate__card {
  width: 400px; max-width: 100%;
  background: #fff; border-radius: 16px;
  padding: 38px 34px;
  box-shadow: 0 24px 70px rgba(0, 30, 50, .35);
  text-align: center;
  animation: pop .25s ease;
}
.gate__logo { font-weight: 900; font-size: 26px; color: var(--navy); letter-spacing: -.5px; margin-bottom: 4px; }
.gate__title { font-size: 20px; color: var(--navy); font-weight: 700; margin: 0; }
.gate__sub { color: var(--text); margin: 6px 0 22px; font-size: 15px; }
.gate__form { text-align: left; }
.gate__form .field { margin-bottom: 14px; }
.gate__btn { width: 100%; justify-content: center; margin-top: 6px; }
.gate__note { color: var(--muted); font-size: 12.5px; margin: 18px 0 0; }
.gate__note::before { content: "\f023"; font-family: "Font Awesome 6 Free"; font-weight: 900; margin-right: 6px; color: var(--teal); }

@media (max-width: 480px) { .gate__card { padding: 30px 22px; } }

/* Tip-banner */
.tip-banner { background: #e7f1fb; border-radius: 10px; padding: 12px 16px; color: #1d6fd6; margin-bottom: 18px; font-size: 14px; }
.tip-banner i { margin-right: 6px; }

/* Lijst-tools (zoeken/archief/export) + paginatie */
.list-tools { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.list-search { flex: 1; min-width: 200px; }
.check { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 14px; cursor: pointer; white-space: nowrap; }
.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; }
.pager__info { color: var(--muted); font-size: 14px; }
.pager__btns { display: flex; gap: 6px; }
.pager__btn { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--border); color: var(--navy); font-weight: 700; background: #fff; }
.pager__btn.active { background: var(--teal); color: #fff; border-color: var(--teal); }

/* Editor responsive */
@media (max-width: 900px) {
  .editor { grid-template-columns: 1fr; }
  .editor__side { position: static; flex-direction: row; flex-wrap: wrap; }
  .editor__side .btn, .upload-btn { width: auto; flex: 1 1 auto; }
  .cust-grid { grid-template-columns: 1fr; gap: 0; }
  .totals { width: 100%; }
  .editor__head .field-inline, .field-inline { grid-template-columns: 110px 1fr; }
}

/* =====================================================================
   Uren (urencriterium), Btw-tabs, Inkomstenbelasting
   ===================================================================== */
.toolbar-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.muted { color: var(--muted); }

/* Urencriterium-tracker */
.crit-big { font-size: 30px; font-weight: 800; color: var(--navy); }
.crit-big span { font-size: 15px; font-weight: 600; color: var(--muted); }
.crit-bar { height: 14px; background: var(--bg); border-radius: 100px; overflow: hidden; margin: 14px 0 8px; }
.crit-bar__fill { height: 100%; background: linear-gradient(90deg, var(--teal), #19b0b3); border-radius: 100px; transition: width .4s ease; }
.crit-meta { display: flex; justify-content: space-between; font-size: 14px; color: var(--text); }
.crit-note { margin: 12px 0 0; font-weight: 700; color: var(--navy); }

/* Uren weekoverzicht */
.uren-monthnav { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.uren-month { font-weight: 800; color: var(--navy); padding: 6px 16px; border: 1px solid var(--border); border-radius: 100px; }
.navbtn { width: 34px; height: 34px; border-radius: 50%; color: var(--pink-text); border: 1px solid var(--border); background: #fff; }
.navbtn:hover { background: var(--light-teal); }
.week-table { width: 100%; border-collapse: collapse; }
.week-table th { text-align: center; font-size: 14px; color: var(--navy); font-weight: 700; padding: 10px 6px; }
.week-table th:first-child { text-align: left; }
.week-table td { text-align: center; padding: 14px 6px; color: var(--muted); border-top: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.week-table td.wk { text-align: left; color: var(--navy); font-weight: 600; }
.week-table td.has { color: var(--navy); font-weight: 700; background: var(--light-teal); }
.week-table td.out { color: #cdd7e0; }
.week-table td.wtot { font-weight: 800; color: var(--navy); }

/* Btw-tabs */
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--border); margin-bottom: 20px; flex-wrap: wrap; }
.tab { padding: 12px 18px; color: var(--text); font-weight: 700; border-bottom: 3px solid transparent; margin-bottom: -2px; cursor: pointer; }
.tab i { margin-right: 6px; color: var(--teal); }
.tab.active { color: var(--navy); border-bottom-color: var(--teal); }

/* Inkomstenbelasting-kaarten */
.ib-cards { display: flex; align-items: stretch; gap: 14px; flex-wrap: wrap; }
.ib-card { flex: 1; min-width: 160px; border-radius: var(--radius); padding: 22px; color: #fff; text-align: center; }
.ib-card strong { display: block; font-size: 20px; margin-bottom: 6px; }
.ib-card span { font-size: 14px; opacity: .9; }
.ib-card--teal { background: var(--teal); }
.ib-card--pink { background: var(--pink); }
.ib-card--navy { background: var(--navy); }
.ib-op { display: flex; align-items: center; font-size: 26px; font-weight: 800; color: var(--navy); }

@media (max-width: 680px) {
  .ib-cards { flex-direction: column; }
  .ib-op { justify-content: center; }
  .week-table { font-size: 13px; }
  .week-table td, .week-table th { padding: 8px 3px; }
}

/* =====================================================================
   Bank/kas-rekeningkaarten, Inbox, bedrag-accenten
   ===================================================================== */
.acc-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); margin-bottom: var(--gap); }
.acc-card { background: #fff; border-radius: var(--radius); padding: 16px 18px; }
.acc-card__top { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; font-weight: 700; margin-bottom: 8px; }
.acc-card__top i { color: var(--teal); }
.acc-card strong { font-size: 22px; color: var(--navy); }
.acc-card--total { background: var(--navy); }
.acc-card--total .acc-card__top, .acc-card--total .acc-card__top i, .acc-card--total strong { color: #fff; }

.data-table .num.pos { color: #0a8a6a; }
.data-table .num.neg { color: var(--pink-text); }

.inbox-list { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.inbox-item { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; }
.inbox-item > i { font-size: 24px; color: var(--pink-text); }
.inbox-item__info { flex: 1; display: flex; flex-direction: column; }
.inbox-item__info strong { color: var(--navy); }
.inbox-item__info span { color: var(--muted); font-size: 13px; }

.crit-link { color: var(--teal); font-weight: 700; white-space: nowrap; }

/* Verwijderen */
.btn--danger { background: var(--danger); color: #fff; }
.btn--danger:hover { background: #c93a70; }
.th-act { width: 50px; }
.row-actions { text-align: right; width: 50px; }
.row-del { width: 32px; height: 32px; border-radius: 8px; color: var(--muted); }
.row-del:hover { color: var(--danger); background: #fcdfe6; }
.inbox-item .row-del { flex: 0 0 auto; }

/* Bon scannen (OCR) */
.bon-preview { margin-bottom: 16px; }
.bon-preview img { max-width: 100%; max-height: 320px; border: 1px solid var(--border); border-radius: 10px; display: block; }
.scan-status { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-radius: 10px; margin-bottom: 18px; font-size: 14px; font-weight: 600; background: var(--bg); color: var(--navy); }
.scan-status.scanning { background: #fbe9f0; color: var(--pink-text); }
.scan-status.done { background: #d6f3ec; color: #0a8a6a; }
.scan-status i { font-size: 16px; }
.scan-status.scanning i { animation: spin 1.2s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* =====================================================================
   Instellingen-hub, Btw-detail, info-banner
   ===================================================================== */
.set-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.set-col__title { font-size: 18px; color: var(--navy); margin-bottom: 14px; }
.set-card { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 16px 18px; margin-bottom: 12px; border: 1px solid var(--border); border-radius: 12px; background: #fff; color: var(--navy); font-weight: 600; font-size: 15px; }
.set-card i { color: var(--teal); font-size: 18px; width: 22px; text-align: center; }
.set-card:hover { background: var(--light-teal); border-color: var(--teal); }

.info-banner { background: #fdf6e3; border: 1px solid #f5e3b3; color: #8a6d3b; padding: 14px 18px; border-radius: 10px; margin-bottom: 18px; }
.data-table tr.clickable { cursor: pointer; }
.data-table tr.clickable:hover { background: var(--light-teal); }

.cat-list { display: flex; flex-direction: column; gap: 6px; }
.cat-item { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; color: var(--navy); }

.inline-2 { display: flex; gap: 8px; }
.inline-2 input { flex: 1; }

@media (max-width: 900px) { .set-grid { grid-template-columns: 1fr; } }

@media (max-width: 900px) { .acc-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .acc-cards { grid-template-columns: 1fr; } .inbox-item { flex-wrap: wrap; } }
