:root{--green:#234d3c;--green2:#3f725c;--sage:#e5ede4;--cream:#f7f4ed;--paper:#fff;--ink:#1d2a24;--muted:#68736d;--line:#dfe5df;--sand:#d9bd8b;--red:#b9524d;--red-soft:#f7e7e5;--shadow:0 14px 38px rgba(26,55,44,.08)}*{box-sizing:border-box}html,body{margin:0;min-height:100%;font-family:'DM Sans',sans-serif;color:var(--ink);background:var(--cream)}button,input,select,textarea{font:inherit}button{cursor:pointer}h1,h2,h3,p{margin-top:0}h1,h2,h3,.brand strong{font-family:'Playfair Display',serif}.hidden{display:none!important}.eyebrow{text-transform:uppercase;letter-spacing:.14em;font-size:.7rem;font-weight:700;color:var(--green2);margin-bottom:8px}.muted{color:var(--muted)}code{background:#eef2ee;padding:2px 6px;border-radius:4px}.center-screen{min-height:100vh;display:grid;place-items:center;padding:20px}.auth-layout{min-height:100vh;display:grid;grid-template-columns:1.1fr .9fr;background:white}.auth-visual{background:linear-gradient(180deg,rgba(19,54,41,.22),rgba(19,54,41,.77)),url('https://images.unsplash.com/photo-1441974231531-c6227db76b6e?auto=format&fit=crop&w=1600&q=85') center/cover;display:flex;align-items:flex-end;padding:68px}.auth-overlay{max-width:640px;color:#fff}.auth-overlay h1{font-size:clamp(2.8rem,5vw,5rem);line-height:1.03;margin-bottom:20px}.auth-overlay p:last-child{max-width:560px;color:#e1ebe5;line-height:1.7}.auth-card{align-self:center;padding:64px;display:flex;flex-direction:column;gap:18px;max-width:560px;width:100%;margin:auto}.auth-card.wide{background:#fff;border:1px solid var(--line);border-radius:18px;box-shadow:var(--shadow)}.auth-card h1,.auth-card h2{font-size:2.5rem;margin-bottom:0}.brand{display:flex;gap:12px;align-items:center}.brand-icon{display:grid;place-items:center;width:42px;height:42px;border-radius:50%;background:var(--green);color:#fff;font-family:'Playfair Display';font-size:1.35rem}.brand strong{display:block;font-size:1.2rem}.brand small{display:block;color:var(--muted);font-size:.73rem}.brand.light strong{color:#fff}.brand.light small{color:#bcd0c7}.brand.light .brand-icon{background:#fff;color:var(--green)}.mobile-brand{display:none}.auth-card label,.panel label,.modal label{display:flex;flex-direction:column;gap:7px;font-size:.85rem;font-weight:700}.auth-card input,.panel input,.panel select,.modal input,.modal select,.modal textarea,.filters input,.filters select,.top-actions select{border:1px solid var(--line);background:#fff;border-radius:10px;padding:12px 13px;color:var(--ink);outline:none}.auth-card input:focus,.panel input:focus,.panel select:focus,.modal input:focus,.modal select:focus,.modal textarea:focus,.filters input:focus,.filters select:focus,.top-actions select:focus{border-color:var(--green2);box-shadow:0 0 0 3px rgba(63,114,92,.12)}.btn{border:0;border-radius:10px;padding:12px 18px;font-weight:700}.btn.primary{background:var(--green);color:#fff}.btn.secondary{background:#edf1ed;color:var(--green)}.btn.danger{background:var(--red);color:#fff}.btn.full{width:100%}.error{color:var(--red);min-height:20px;margin:0;font-size:.85rem}.notice{background:var(--sage);border-radius:12px;padding:16px;line-height:1.6}.app{min-height:100vh;display:grid;grid-template-columns:255px minmax(0,1fr)}.sidebar{position:sticky;top:0;height:100vh;background:var(--green);padding:28px 20px;color:#fff;display:flex;flex-direction:column}.sidebar nav{display:flex;flex-direction:column;gap:5px;margin-top:44px}.nav-item{border:0;background:transparent;color:#dce8e2;padding:12px 14px;border-radius:10px;text-align:left;display:flex;gap:12px;align-items:center;width:100%}.nav-item:hover,.nav-item.active{background:rgba(255,255,255,.12);color:#fff}.nav-icon{width:22px;text-align:center}.logout{margin-top:auto}.main{min-width:0;padding:34px 42px 70px}.topbar{display:flex;justify-content:space-between;align-items:center;margin-bottom:28px}.topbar h1{font-size:2.55rem;margin-bottom:0}.top-actions{display:flex;gap:10px}.top-actions select{min-width:112px}.view{display:none}.view.active{display:block}.hero{background:var(--green);color:#fff;border-radius:18px;padding:34px 38px;display:flex;justify-content:space-between;align-items:center;margin-bottom:16px;background-image:radial-gradient(circle at 85% 15%,rgba(255,255,255,.14),transparent 34%)}.hero h2{font-size:2.15rem;margin-bottom:8px}.hero p:not(.eyebrow){color:#d5e2dc;margin-bottom:0}.hero-result{text-align:right}.hero-result span,.hero-result small{display:block;color:#bfd0c8}.hero-result strong{display:block;font-size:2.4rem;margin:8px 0}.kpi-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:16px}.kpi,.finance-card,.panel{background:#fff;border:1px solid var(--line);border-radius:15px;box-shadow:0 7px 25px rgba(23,63,53,.04)}.kpi{padding:21px}.kpi>span{font-size:.79rem;color:var(--muted)}.kpi strong{display:block;font-size:1.55rem;margin:10px 0 4px}.kpi small{color:var(--muted)}.vat-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-bottom:16px}.finance-card{padding:22px}.finance-card.result-card{background:var(--sage);border-color:#cddbcf}.finance-head{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:16px}.finance-head h3{font-size:1.25rem;margin-bottom:0}.badge,.pill{display:inline-flex;border-radius:999px;padding:5px 9px;font-size:.68rem;font-weight:700}.badge.positive{background:var(--sage);color:var(--green)}.badge.negative{background:var(--red-soft);color:var(--red)}.badge.neutral{background:#e8ece9;color:var(--muted)}.money-row{display:flex;justify-content:space-between;gap:12px;padding:11px 0;border-top:1px solid var(--line);font-size:.86rem}.money-row strong{font-size:1.05rem}.money-row.primary-row{border-top:0;background:#f6f8f5;margin:0 -10px;padding:14px 10px;border-radius:10px}.money-row.primary-row strong{font-size:1.35rem}.money-row.muted-row{color:var(--muted)}.dashboard-grid{display:grid;grid-template-columns:2fr 1fr;gap:16px;margin-bottom:16px}.panel{padding:24px}.panel-head,.section-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}.panel h3{font-size:1.45rem}.section-head p{margin:0;color:var(--muted)}.bar-chart{height:260px;display:flex;align-items:end;gap:10px;border-bottom:1px solid var(--line);padding:20px 4px 0}.bar-group{flex:1;height:100%;display:flex;align-items:end;justify-content:center;gap:3px;position:relative}.bar{width:32%;min-width:6px;border-radius:4px 4px 0 0}.bar.revenue{background:var(--green2)}.bar.cost{background:var(--sand)}.bar-label{position:absolute;bottom:-26px;font-size:.66rem;color:var(--muted)}.legend{display:flex;justify-content:center;gap:18px;padding-top:34px;font-size:.78rem}.legend i{display:inline-block;width:9px;height:9px;border-radius:50%;margin-right:5px}.legend-revenue{background:var(--green2)}.legend-cost{background:var(--sand)}.donut-wrap{display:grid;place-items:center;padding:10px}.donut{width:180px;height:180px;border-radius:50%;display:grid;place-items:center;background:conic-gradient(var(--green2) 0%,#e8ece8 0)}.donut>div{width:120px;height:120px;border-radius:50%;background:#fff;display:grid;place-content:center;text-align:center}.donut strong{font-size:2rem}.donut span{font-size:.78rem;color:var(--muted)}.mini-row{display:flex;justify-content:space-between;padding:11px 0;border-top:1px solid var(--line);font-size:.85rem}.text-btn{border:0;background:none;color:var(--green2);font-weight:700}.recent-row{display:grid;grid-template-columns:1.2fr 1fr .7fr .8fr;gap:14px;padding:14px 0;border-top:1px solid var(--line);align-items:center}.recent-row:first-child{border-top:0}.recent-row span,.recent-row small{color:var(--muted)}.filters{display:flex;gap:10px;margin-bottom:14px}.filters input{flex:1}.table-panel{padding:0;overflow:hidden}.table-scroll{overflow:auto}table{width:100%;border-collapse:collapse;min-width:960px}th,td{text-align:left;padding:14px 16px;border-bottom:1px solid var(--line);font-size:.83rem}th{background:#f3f6f2;text-transform:uppercase;letter-spacing:.05em;color:var(--muted);font-size:.7rem}td strong{font-weight:700}.pill.auto{background:var(--sage);color:var(--green)}.pill.manual{background:#f0eee8;color:#6d604c}.pill.no{background:#efefec;color:var(--muted)}.row-actions{display:flex;gap:5px}.icon-btn{border:0;background:#edf2ee;border-radius:8px;width:34px;height:34px}.empty{text-align:center;padding:44px;color:var(--muted)}.settings-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-bottom:16px}.settings-form{display:flex;flex-direction:column;gap:14px}.inline-form{display:flex;gap:8px}.inline-form input{flex:1}.year-list{display:flex;flex-direction:column;gap:8px}.year-item{display:flex;justify-content:space-between;align-items:center;padding:11px 12px;background:#f3f6f2;border-radius:10px}.year-item.active{background:var(--sage)}.year-actions{display:flex;gap:6px}.export-panel{max-width:760px}.modal{border:0;border-radius:18px;padding:0;width:min(760px,calc(100vw - 28px));box-shadow:0 35px 95px rgba(0,0,0,.28)}.small-modal{width:min(520px,calc(100vw - 28px))}.modal::backdrop{background:rgba(12,31,24,.68);backdrop-filter:blur(4px)}.modal form{padding:28px;display:flex;flex-direction:column;gap:15px}.modal-head{display:flex;justify-content:space-between;align-items:flex-start}.modal-head h2{margin-bottom:0}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.check-line{flex-direction:row!important;align-items:center;background:var(--sage);padding:13px;border-radius:10px}.check-line input{width:18px;height:18px}.preview{background:#f4f6f3;border-radius:10px;padding:14px;display:grid;grid-template-columns:repeat(3,1fr);gap:10px;font-size:.78rem}.preview strong{display:block;font-size:1rem;margin-top:4px}.modal-actions{display:flex;justify-content:flex-end;gap:9px}.delete-phrase{background:var(--red-soft);color:var(--red);font-weight:700;border-radius:9px;padding:12px;text-align:center}.toast{position:fixed;right:24px;bottom:24px;background:var(--green);color:#fff;padding:13px 18px;border-radius:10px;opacity:0;transform:translateY(10px);pointer-events:none;transition:.2s;z-index:20}.toast.show{opacity:1;transform:none}@media(max-width:1100px){.app{grid-template-columns:82px 1fr}.sidebar{padding:22px 14px}.sidebar .brand div,.nav-item span:not(.nav-icon){display:none}.sidebar .brand{justify-content:center}.nav-item{justify-content:center}.main{padding:28px}.kpi-grid,.vat-grid{grid-template-columns:1fr 1fr}.result-card{grid-column:span 2}}@media(max-width:760px){.auth-layout{grid-template-columns:1fr}.auth-visual{display:none}.auth-card{padding:32px 22px}.mobile-brand{display:flex}.app{display:block}.sidebar{position:fixed;z-index:10;bottom:0;top:auto;width:100%;height:70px;padding:7px;display:block}.sidebar>.brand,.logout{display:none}.sidebar nav{margin:0;display:grid;grid-template-columns:repeat(5,1fr)}.nav-item{padding:10px}.main{padding:22px 14px 94px}.topbar{align-items:flex-start}.topbar h1{font-size:2rem}.top-actions{flex-direction:column}.hero{display:block;padding:26px}.hero-result{text-align:left;margin-top:22px}.kpi-grid,.vat-grid,.settings-grid,.dashboard-grid,.form-grid{grid-template-columns:1fr}.result-card{grid-column:auto}.preview{grid-template-columns:1fr}.section-head{align-items:flex-start;gap:12px}.recent-row{grid-template-columns:1fr 1fr}.recent-row>*:nth-child(3){display:none}}

/* Snellere, duidelijkere boekingsinvoer */
.vat-badge,
.field-badge {
  display: inline-flex;
  align-items: center;
  margin-left: .4rem;
  padding: .18rem .5rem;
  border-radius: 999px;
  background: #e9f0ea;
  color: #245b45;
  font-size: .72em;
  font-weight: 800;
  vertical-align: middle;
  white-space: nowrap;
}
.field-badge { background: #f1f3ef; color: #4b5b51; }

/* Gegroepeerde uitgaven en snelle invoer */
.expense-groups{display:flex;flex-direction:column;gap:12px}
.expense-group{background:#fff;border:1px solid var(--line);border-radius:15px;box-shadow:0 7px 25px rgba(23,63,53,.04);overflow:hidden}
.expense-group summary{list-style:none;display:flex;justify-content:space-between;align-items:center;gap:20px;padding:20px 22px;cursor:pointer}
.expense-group summary::-webkit-details-marker{display:none}
.expense-group summary h3{margin:7px 0 2px;font-size:1.25rem}
.expense-group summary small{color:var(--muted)}
.expense-group[open] summary{border-bottom:1px solid var(--line);background:#fbfcfa}
.expense-group-totals{display:flex;align-items:center;gap:28px;text-align:right}
.expense-group-totals span{display:flex;flex-direction:column;color:var(--muted);font-size:.72rem}
.expense-group-totals strong{color:var(--ink);font-size:1rem;margin-top:3px}
.chevron{font-size:1.35rem;transition:transform .2s}
.expense-group[open] .chevron{transform:rotate(180deg)}
.vat-rate-pill{display:inline-flex;padding:4px 8px;border-radius:999px;background:var(--sage);color:var(--green);font-weight:700;font-size:.72rem}
.expense-modal{width:min(980px,calc(100vw - 28px))}
.expense-subject-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.expense-lines-head{display:flex;align-items:center;justify-content:space-between;gap:16px;padding-top:4px}
.expense-lines-head small{display:block;color:var(--muted);margin-top:3px}
.expense-lines{display:flex;flex-direction:column;gap:10px}
.expense-line{display:grid;grid-template-columns:145px minmax(220px,1fr) 155px 105px 38px;gap:10px;align-items:end;padding:13px;background:#f6f8f5;border:1px solid var(--line);border-radius:12px}
.expense-line label{font-size:.76rem}
.expense-line .icon-btn{margin-bottom:1px}
@media(max-width:900px){.expense-line{grid-template-columns:1fr 1fr}.expense-line .line-description-label{grid-column:1/-1}.expense-line .icon-btn{align-self:end}.expense-group summary{align-items:flex-start}.expense-group-totals{gap:14px;flex-wrap:wrap;justify-content:flex-end}}
@media(max-width:620px){.expense-subject-grid,.expense-line{grid-template-columns:1fr}.expense-line .line-description-label{grid-column:auto}.expense-group summary{display:block}.expense-group-totals{margin-top:16px;justify-content:space-between;text-align:left}.expense-lines-head{align-items:flex-start}.expense-lines-head .btn{white-space:nowrap}}
