/* Transmissible Boekhoud — Ficsbook-geëmuleerde lay-out, Transmissible-huisstijl. */

/* Rubik (variabele font, latin) — lokaal gehost, geen externe afhankelijkheid. */
@font-face {
    font-family: 'Rubik';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('/assets/fonts/rubik.woff2') format('woff2');
}

:root {
    /* Transmissible-huisstijl */
    --merk:        #2780ad;   /* primair blauw */
    --merk-donker: #1f6a90;
    --merk-licht:  #4aa7cf;
    --merk-zeer-licht: #e6f7ff;
    --accent:        #62c465; /* groen accent */
    --accent-donker: #4fae54;
    --accent-licht:  #c6ebbe;
    --tekst:   #2a2d34;
    --zacht:   #70747a;
    --lijn:    #e3e6ea;
    --bg:      #eef2f5;
    --paneel:  #ffffff;
    --positief:#2e8b40;
    --negatief:#c0392b;
    --radius: 6px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    /* Body: Avenir (huisstijl) met nette systeem-fallbacks. */
    font-family: "Avenir Next", "Avenir", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
    color: var(--tekst); background: var(--bg); font-size: 14px; line-height: 1.5;
}
/* Koppen & merkelementen: Rubik (huisstijl). */
h1, h2, .merk, .actieknop, .dash-kop, .module-kop, .tabbar {
    font-family: "Rubik", "Avenir Next", "Segoe UI", system-ui, sans-serif;
}
a { color: var(--merk-donker); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.35rem; margin: 0 0 1rem; }
h2 { font-size: 1.05rem; margin: 0 0 .75rem; color: var(--tekst); }

/* ---------- Topbalk ---------- */
.ficsbar {
    display: flex; align-items: center; justify-content: space-between;
    background: var(--paneel); border-bottom: 1px solid var(--lijn);
    padding: .6rem 1.25rem; gap: 1rem;
}
.merk a { font-size: 1.5rem; font-weight: 800; letter-spacing: -.5px; text-decoration: none; }
.merk-a { color: var(--merk); }
.merk-b { color: #9aa0a6; margin-left: .3rem; }
.topright { display: flex; align-items: center; gap: 1rem; font-size: .85rem; }
.topright > a { color: var(--zacht); }
.laatste-login { color: #9aa0a6; font-size: .78rem; }
.uitlog { margin: 0; }
.uitlog button {
    background: none; border: none; color: var(--zacht); cursor: pointer;
    font: inherit; padding: 0;
}
.uitlog button:hover { color: var(--merk-donker); text-decoration: underline; }

/* ---------- Actieknoppen ---------- */
.actiebalk {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem; max-width: 1180px; margin: 1.1rem auto 0; padding: 0 1.25rem;
}
.actieknop {
    display: flex; align-items: center; justify-content: space-between;
    background: linear-gradient(135deg, var(--merk-licht), var(--merk));
    color: #fff; text-decoration: none; border-radius: 10px;
    padding: 1rem 1.4rem; font-size: 1.35rem; font-weight: 700;
    box-shadow: 0 2px 5px rgba(31,78,121,.25); transition: filter .12s;
}
.actieknop:hover { filter: brightness(1.08); text-decoration: none; }
.actie-label { line-height: 1.1; }
.actie-icoon { width: 46px; height: 46px; color: rgba(255,255,255,.92); }

/* ---------- App-lay-out ---------- */
.app {
    display: grid; grid-template-columns: 1fr 220px; gap: 1.25rem;
    max-width: 1180px; margin: 1.1rem auto; padding: 0 1.25rem; align-items: start;
}
@media (max-width: 860px) { .app { grid-template-columns: 1fr; } }

/* ---------- Tabbalk ---------- */
.tabbar {
    display: flex; gap: 3px; background: var(--merk); border-radius: 8px 8px 0 0;
    padding: 6px 6px 0; overflow-x: auto;
}
.tabbar a {
    padding: .55rem 1rem; color: #fff; font-weight: 600; text-decoration: none;
    border-radius: 6px 6px 0 0; white-space: nowrap;
}
.tabbar a:hover { background: rgba(255,255,255,.18); text-decoration: none; }
.tabbar a.actief { background: var(--paneel); color: var(--merk-donker); }
.tabinhoud {
    background: var(--paneel); border: 1px solid var(--lijn); border-top: none;
    border-radius: 0 0 8px 8px; padding: 1.25rem 1.4rem; min-height: 320px;
}

/* ---------- Rechter modulebalk ---------- */
.zijbalk { display: flex; flex-direction: column; gap: 1rem; }
.module-groep { background: var(--paneel); border: 1px solid var(--lijn); border-radius: 8px; overflow: hidden; }
.module-kop { background: #f6f7f8; padding: .5rem .85rem; font-weight: 700; color: var(--zacht); font-size: .82rem; border-bottom: 1px solid var(--lijn); }
.module { display: block; padding: .6rem .85rem; color: var(--tekst); border-bottom: 1px solid var(--lijn); }
.module:last-child { border-bottom: none; }
.module:hover { background: var(--merk-zeer-licht); text-decoration: none; }
.module.actief { color: var(--merk-donker); font-weight: 600; }
.module-info { padding: .6rem .85rem; }
.module-info .rol { color: var(--zacht); font-size: .8rem; }

/* ---------- Flash ---------- */
.flash { padding: .6rem .9rem; border-radius: var(--radius); margin-bottom: 1rem; border: 1px solid transparent; }
.flash-succes { background: #e6f4ea; border-color: #b7e0c2; color: var(--positief); }
.flash-fout   { background: #fdecea; border-color: #f5c2bd; color: var(--negatief); }
.flash-info   { background: var(--merk-zeer-licht); border-color: #bcd4ec; color: var(--merk-donker); }

/* ---------- Dashboard ---------- */
.dash-boven { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
@media (max-width: 720px) { .dash-boven { grid-template-columns: 1fr; } }
.dash-kop { display: flex; align-items: center; gap: .4rem; color: var(--tekst); font-weight: 700; margin-bottom: .75rem; }

/* Openstaande facturen */
.post { display: flex; gap: .8rem; padding: .65rem 0; border-bottom: 1px solid var(--lijn); }
.post-links { display: flex; flex-direction: column; align-items: center; width: 42px; flex: none; }
.post-uitroep { width: 26px; height: 26px; border-radius: 50%; background: var(--merk); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; }
.post-uitroep.uit { background: var(--negatief); }
.post-dagen { color: var(--merk-donker); font-size: .78rem; margin-top: .2rem; }
.post-body { flex: 1; }
.post-titel { font-weight: 600; }
.post-meta { color: var(--zacht); font-size: .85rem; margin-top: .15rem; display: flex; gap: .8rem; flex-wrap: wrap; }
.post-bedrag { text-align: right; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.post-totaal { display: flex; justify-content: space-between; padding-top: .7rem; font-weight: 700; }

/* Saldo rekeningen */
.saldo-rij { display: flex; justify-content: space-between; padding: .4rem 0; border-bottom: 1px solid var(--lijn); }
.saldo-rij:last-child { border-bottom: none; }
.saldo-rij.totaal { font-weight: 700; border-top: 2px solid var(--lijn); border-bottom: none; margin-top: .3rem; padding-top: .5rem; }
.saldo-bedrag { font-variant-numeric: tabular-nums; }
.pos { color: var(--positief); }
.neg { color: var(--negatief); }
.inactief .saldo-naam { color: var(--zacht); }

/* Maandgrafiek */
.grafiek-wrap { margin-top: 1.75rem; }
.grafiek { width: 100%; height: auto; }
.legenda { display: flex; gap: 1.25rem; justify-content: center; margin-top: .5rem; font-size: .8rem; color: var(--zacht); }
.legenda span { display: inline-flex; align-items: center; gap: .35rem; }
.legenda i { width: 12px; height: 12px; border-radius: 2px; display: inline-block; }

.notitie { color: var(--zacht); font-size: .82rem; }
.leeg { color: var(--zacht); padding: .75rem 0; }

/* ---------- Relaties: jaartabs / toolbar / knoppen ---------- */
.jaartabs { display: flex; flex-wrap: wrap; gap: .35rem; margin: .25rem 0 1rem; }
.jaartab { padding: .3rem .7rem; border-radius: 999px; background: #eef2f5; color: var(--zacht); font-size: .82rem; font-weight: 600; }
.jaartab:hover { background: var(--merk-zeer-licht); text-decoration: none; }
.jaartab.actief { background: var(--merk); color: #fff; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .75rem; flex-wrap: wrap; }
.toolbar-info { color: var(--zacht); font-size: .85rem; }
.toolbar-acties { display: flex; gap: .5rem; }
.knop { display: inline-block; padding: .5rem .9rem; border: 1px solid var(--lijn); border-radius: var(--radius); background: #fff; color: var(--tekst); font-weight: 600; }
.knop:hover { background: #f4f6f8; text-decoration: none; }
a.knop-primair { display: inline-block; text-decoration: none; }

.mini-badge { display: inline-block; font-size: .68rem; padding: 0 .35rem; border-radius: 4px; margin-left: .3rem; vertical-align: middle; }
.mini-badge.klant { background: var(--merk-zeer-licht); color: var(--merk-donker); }
.mini-badge.lev { background: var(--accent-licht); color: #2f6d33; }

.acties { white-space: nowrap; text-align: right; }
.acties a { margin-right: .5rem; }
.inline-form { display: inline; margin: 0; }
.link-rood { background: none; border: none; color: var(--negatief); cursor: pointer; font: inherit; font-weight: 700; padding: 0; }
.link-rood:hover { text-decoration: underline; }
.totaal-rij td { font-weight: 700; border-top: 2px solid var(--lijn); }
.tabel-wrap { overflow-x: auto; }

/* ---------- Formulieren (breed) ---------- */
.form-breed { max-width: 720px; }
.veld-rij { display: flex; gap: .9rem; }
.veld-rij label { flex: 1; }
.veld-rij label.groot { flex: 2; }
@media (max-width: 620px) { .veld-rij { flex-direction: column; } }
.checks { gap: 1.5rem; }
.check { flex-direction: row !important; align-items: center; gap: .4rem !important; font-weight: 600; }
.check input { width: auto; }
.form-acties { display: flex; gap: .6rem; align-items: center; margin-top: .5rem; }

/* ---------- Mutaties: submenu / filters / paginering ---------- */
.submenu { display: flex; align-items: center; gap: .5rem; margin-bottom: 1rem; border-bottom: 2px solid var(--lijn); padding-bottom: .5rem; }
.submenu > a { padding: .4rem .9rem; border-radius: 6px; color: var(--zacht); font-weight: 700; }
.submenu > a:hover { background: var(--merk-zeer-licht); text-decoration: none; }
.submenu > a.actief { background: var(--merk); color: #fff; }
.submenu-actie { margin-left: auto; }

.filterbalk { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; align-items: center; }
.filterbalk select, .filterbalk input[type=text] { padding: .45rem .55rem; border: 1px solid var(--lijn); border-radius: var(--radius); font: inherit; background: #fff; }
.filterbalk input[type=text] { min-width: 200px; flex: 1; }

.mutaties td, .mutaties th { padding: .45rem .55rem; font-size: .9rem; }
.nowrap { white-space: nowrap; }
.rij-concept { background: #fbfbf0; }
.mini-badge.concept { background: var(--accent-licht); color: #2f6d33; }
.voldaan { color: var(--accent-donker); }

.paginering { display: flex; align-items: center; gap: 1rem; justify-content: center; margin-top: 1rem; color: var(--zacht); }

/* bedragen-rij in het formulier */
.bedragen label { flex: 1; }
.bedragen label.smal { flex: .6; }

/* ---------- Tabellen ---------- */
.tabel { width: 100%; border-collapse: collapse; }
.tabel th, .tabel td { text-align: left; padding: .5rem .6rem; border-bottom: 1px solid var(--lijn); }
.tabel th { color: var(--zacht); font-weight: 600; font-size: .82rem; }
.rechts { text-align: right; }
.badge-fase { display: inline-block; background: var(--merk); color: #fff; border-radius: 4px; padding: .15rem .5rem; font-size: .78rem; font-weight: 600; }

/* ---------- Login ---------- */
.kaal { max-width: 360px; margin: 5rem auto; padding: 0 1rem; }
.login-kader { background: var(--paneel); border: 1px solid var(--lijn); border-radius: 10px; padding: 1.75rem; box-shadow: 0 4px 14px rgba(0,0,0,.06); }
.login-kader h1 { margin-top: 0; color: var(--merk-donker); }
.formulier { display: flex; flex-direction: column; gap: .9rem; }
.formulier label { display: flex; flex-direction: column; gap: .3rem; font-weight: 500; }
.formulier input, .formulier select, .formulier textarea { padding: .55rem .6rem; border: 1px solid var(--lijn); border-radius: var(--radius); font: inherit; }
.formulier input:focus { outline: 2px solid var(--merk-licht); border-color: var(--merk); }
.knop-primair { background: linear-gradient(135deg, var(--merk-licht), var(--merk)); color: #fff; border: none; border-radius: var(--radius); padding: .6rem 1rem; font: inherit; font-weight: 700; cursor: pointer; }
.knop-primair:hover { filter: brightness(1.08); }
