/* Starting Point Cloud — vormtaal van FM Starting Point 24 Lite:
   lichtgrijze achtergrond, witte kaarten, gecentreerde navigatietabs met dikke
   blauwe onderstreping, velden met alleen een onderlijn, blauwe tegels. */
:root {
  --accent: #3F97DE; --accent-donker: #2F7EC0; --accent-licht: #EAF3FB;
  --inkt: #1D1D1F; --inkt-2: #4B4B4F; --inkt-3: #86868B;
  --lijn: #E3E3E6; --vlak: #EDEDEF; --wit: #FFFFFF;
  --groen: #37A93C; --groen-donker: #2E7D32; --groen-licht: #E8F5E9;
  --rood: #C62828; --rood-licht: #FDECEA;
  --amber: #B26A00; --amber-licht: #FFF3E0;
}
* { box-sizing: border-box; margin: 0; }
body { font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
       color: var(--inkt); background: var(--vlak); min-height: 100vh; }
a { color: var(--accent); text-decoration: none; cursor: pointer; }
h2 { font-size: 15px; }
.stil { color: var(--inkt-3); }
.rechts { text-align: right; }

.knop { border: 1px solid var(--lijn); background: var(--wit); color: var(--inkt);
        border-radius: 8px; padding: 8px 14px; font-size: 13.5px; font-weight: 550; cursor: pointer; }
.knop:hover { border-color: var(--accent); color: var(--accent); }
.knop.primair { background: var(--accent); border-color: var(--accent); color: #fff; }
.knop.primair:hover { background: var(--accent-donker); color: #fff; }
.knop.gevaar:hover { border-color: var(--rood); color: var(--rood); }
.knop.klein { padding: 4px 10px; font-size: 12.5px; border-radius: 7px; }

/* velden: klein grijs label boven, waarde met alléén een onderlijn (FM-stijl) */
input, select, textarea {
  border: none; border-bottom: 1px solid var(--lijn); border-radius: 0;
  padding: 5px 2px; font-size: 14px; width: 100%; font-family: inherit;
  background: transparent; color: var(--inkt);
}
select { cursor: pointer; }
input:focus, select:focus, textarea:focus { outline: none; border-bottom: 2px solid var(--accent); }
input[type="checkbox"], input[type="radio"] { width: auto; border: none; }
input[type="search"] { border: 1px solid var(--lijn); border-radius: 8px; padding: 7px 11px; background: var(--wit); }
input[type="search"]:focus { border: 1px solid var(--accent); outline: 2px solid #BBD8F0; }
label { font-size: 11.5px; font-weight: 600; color: var(--inkt-3); display: block; margin-bottom: 1px; }
.veld { margin-bottom: 13px; }
textarea { resize: vertical; min-height: 64px; }
dialog input:not([type="checkbox"]):not([type="radio"]), dialog select, dialog textarea {
  border: 1px solid var(--lijn); border-radius: 8px; padding: 8px 10px; background: var(--wit);
}
dialog input:focus, dialog select:focus, dialog textarea:focus { outline: 2px solid #BBD8F0; border-color: var(--accent); }

/* statusbalk zoals FileMakers "Active | Inactive | Disregard" */
.segment { display: flex; border: 1.5px solid var(--accent); border-radius: 8px; overflow: hidden; margin-top: 3px; }
.segment button { flex: 1; border: none; background: var(--wit); color: var(--accent);
                  padding: 6px 4px; font-size: 13px; font-weight: 600; cursor: pointer;
                  border-right: 1px solid var(--accent); font-family: inherit; }
.segment button:last-child { border-right: none; }
.segment button.actief { background: var(--accent); color: #fff; }

.kaart { background: var(--wit); border: 1px solid var(--lijn); border-radius: 12px; padding: 18px;
         box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.badge { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 11.5px;
         font-weight: 600; background: var(--vlak); color: var(--inkt-2); white-space: nowrap; }
.badge.blauw { background: var(--accent-licht); color: var(--accent-donker); }
.badge.groen { background: var(--groen-licht); color: var(--groen-donker); }
.badge.rood  { background: var(--rood-licht); color: var(--rood); }
.badge.amber { background: var(--amber-licht); color: var(--amber); }
.fout { background: var(--rood-licht); color: var(--rood); border-radius: 8px; padding: 10px 12px;
        font-size: 13px; margin-bottom: 14px; }

/* loginscherm */
.login-omhulsel { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-kaart { width: 380px; max-width: 94vw; background: var(--wit); border: 1px solid var(--lijn);
               border-radius: 14px; padding: 30px; }
.login-kaart input { border: 1px solid var(--lijn); border-radius: 8px; padding: 9px 11px; background: var(--wit); }
.login-kaart input:focus { outline: 2px solid #BBD8F0; border-color: var(--accent); }
.merk { display: flex; align-items: center; gap: 9px; }
.merk-blok { width: 34px; height: 34px; border-radius: 9px; background: var(--accent); color: #fff;
             display: grid; place-items: center; font-weight: 700; font-size: 15px; flex: none; }
.merk-naam { font-size: 15px; font-weight: 700; white-space: nowrap; line-height: 1.15; }
.merk-naam em { font-style: normal; color: var(--accent); }
.intro { color: var(--inkt-3); font-size: 13px; margin: 8px 0 18px; }
.hint { color: var(--inkt-3); font-size: 12px; margin-top: 14px; }

/* kop: HELLO <NAAM> links, merk rechts (zoals het origineel) */
.app-kop { background: var(--wit); border-bottom: 1px solid var(--lijn); padding: 12px 24px;
           display: flex; align-items: center; gap: 12px; }
.app-kop .vulling { flex: 1; }
.groet { font-weight: 800; font-size: 16px; letter-spacing: .01em; }
.groet .datum { color: var(--inkt-3); font-weight: 400; }

/* navigatiebalk: ronde icoonknoppen links, tabs gecentreerd, context rechts */
.hoofdnav { background: var(--wit); border-bottom: 1px solid var(--lijn); padding: 0 18px;
            display: flex; align-items: stretch; gap: 4px; position: sticky; top: 0; z-index: 20; }
.nav-iconen { display: flex; align-items: center; gap: 8px; padding: 8px 0; }
.icoon-knop { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--lijn);
              background: var(--wit); display: grid; place-items: center; cursor: pointer; color: var(--inkt-2); }
.icoon-knop:hover { border-color: var(--accent); color: var(--accent); }
.icoon-knop.actief { background: var(--vlak); border-color: var(--inkt-3); color: var(--inkt); }
.icoon-knop svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.nav-titel { align-self: center; font-weight: 800; font-size: 15px; letter-spacing: .06em;
             margin-left: 14px; white-space: nowrap; }
.nav-tabs { flex: 1; display: flex; justify-content: center; gap: 6px; overflow-x: auto; }
.nav-tabs a { color: #9A9AA0; font-weight: 600; font-size: 15px; padding: 15px 15px 11px;
              border-bottom: 4px solid transparent; white-space: nowrap; }
.nav-tabs a:hover { color: var(--inkt); }
.nav-tabs a.actief { color: var(--inkt); border-bottom-color: var(--accent); }
.nav-context { align-self: center; font-weight: 700; font-size: 15px; color: var(--accent);
               white-space: nowrap; margin-right: 4px; }
.nav-context .st { color: var(--accent); }
.nav-context .scheider { color: var(--inkt-3); font-weight: 400; padding: 0 6px; }

.inhoud { max-width: 1360px; margin: 18px auto; padding: 0 18px; }

/* home-tegels */
.tegels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.tegel { background: var(--accent); color: #fff; border-radius: 10px; aspect-ratio: 1;
         display: flex; flex-direction: column; align-items: center; justify-content: center;
         gap: 8px; font-weight: 600; font-size: 12.5px; cursor: pointer;
         box-shadow: 0 1px 2px rgba(0,0,0,.10); transition: transform .08s, background .12s; }
.tegel:hover { background: var(--accent-donker); transform: translateY(-1px); color: #fff; }
.tegel svg { width: 32px; height: 32px; fill: none; stroke: #fff; stroke-width: 1.7; }
.tegel.nieuw-rij { grid-column-start: 1; }   /* Tasks + Calendar samen op de laatste rij */
.tegel.wit { background: var(--wit); color: var(--inkt); border: 1px solid var(--lijn); }
.tegel.wit:hover { background: var(--vlak); }
.tegel.wit svg { stroke: var(--inkt); }
.home-raster { display: grid; grid-template-columns: 400px 1fr; gap: 16px; align-items: start; }
@media (max-width: 900px) { .home-raster { grid-template-columns: 1fr; } }

/* statistiek/dashboard */
.stat-rij { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 14px; }
.stat { background: var(--wit); border: 1px solid var(--lijn); border-radius: 12px; padding: 14px 16px; }
.stat .waarde { font-size: 20px; font-weight: 700; }
.stat .label { font-size: 12px; color: var(--inkt-3); }
.staafjes { display: flex; align-items: flex-end; gap: 6px; height: 120px; margin-top: 10px; }
.staaf { background: linear-gradient(180deg, #A7CE49, var(--groen)); border-radius: 4px 4px 0 0;
         min-height: 2px; position: relative; }
.staaf .tip { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%);
              font-size: 10px; color: var(--inkt-3); white-space: nowrap; padding-bottom: 2px; }
.staaf-label { font-size: 10px; color: var(--inkt-3); text-align: center; margin-top: 4px; }

/* lijstweergave: gecentreerde titel zoals "2 ACCOUNTS (Sorted)" */
.lijst-kop { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px;
             margin-bottom: 12px; }
.lijst-titel { grid-column: 2; text-align: center; }
.lijst-titel h1 { font-size: 17px; letter-spacing: .04em; font-weight: 800; }
.lijst-titel .tel { display: block; font-size: 11.5px; color: var(--inkt-3); font-weight: 400; }
.lijst-acties { grid-column: 3; display: flex; gap: 8px; justify-content: flex-end; align-items: center; }
.lijst-acties select { border: 1px solid var(--lijn); border-radius: 8px; padding: 7px 8px;
                       width: auto; background: var(--wit); }
table { border-collapse: collapse; width: 100%; }
th { text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em;
     color: var(--inkt-3); padding: 8px 10px; border-bottom: 1px solid var(--lijn); white-space: nowrap; }
td { padding: 9px 10px; border-bottom: 1px solid var(--lijn); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tbody tr.klik { cursor: pointer; }
tbody tr.klik:hover { background: var(--accent-licht); }
/* statuskleur als randje links op de rij (zoals de lijstweergaven in FM) */
tbody tr.rand-groen td:first-child { box-shadow: inset 4px 0 0 var(--groen); }
tbody tr.rand-blauw td:first-child { box-shadow: inset 4px 0 0 var(--accent); }
tbody tr.rand-amber td:first-child { box-shadow: inset 4px 0 0 #E8A33D; }
tbody tr.rand-rood td:first-child  { box-shadow: inset 4px 0 0 var(--rood); }
.tel { font-size: 12.5px; color: var(--inkt-3); }

/* detailweergave: recordzijbalk | formulier | gerelateerd */
.detail-raster { display: grid; grid-template-columns: 225px 395px 1fr; gap: 14px; align-items: start; }
@media (max-width: 1180px) { .detail-raster { grid-template-columns: 395px 1fr; } .zijlijst { display: none; } }
@media (max-width: 900px) { .detail-raster { grid-template-columns: 1fr; } }
.detail-kop { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.detail-kop h1 { font-size: 18px; }
.detail-kop .vulling { flex: 1; }
.formulier-raster { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.formulier-raster .breed { grid-column: 1 / -1; }

/* recordzijbalk met status-strook (het groene "Active"-randje) */
.zijlijst { display: flex; flex-direction: column; gap: 9px; max-height: 78vh; overflow-y: auto;
            padding-right: 2px; }
.zijkaart { position: relative; background: var(--wit); border: 1px solid var(--lijn);
            border-radius: 10px; padding: 9px 10px 9px 26px; cursor: pointer;
            box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.zijkaart:hover { border-color: var(--accent); }
.zijkaart.actief { border-color: var(--accent); outline: 1.5px solid var(--accent); }
.zijkaart .strook { position: absolute; left: 0; top: 0; bottom: 0; width: 17px;
                    border-radius: 9px 0 0 9px; background: var(--groen);
                    display: grid; place-items: center; }
.zijkaart .strook span { writing-mode: vertical-rl; transform: rotate(180deg);
                         color: #fff; font-size: 8.5px; font-weight: 700; letter-spacing: .08em;
                         text-transform: uppercase; }
.zijkaart .strook.blauw { background: var(--accent); }
.zijkaart .strook.amber { background: #E8A33D; }
.zijkaart .strook.rood { background: var(--rood); }
.zijkaart .strook.grijs { background: #B4B4BA; }
.zijkaart .kop { font-weight: 700; font-size: 13px; display: flex; justify-content: space-between; gap: 6px; }
.zijkaart .kop .bedrag { color: var(--accent); font-weight: 600; white-space: nowrap; }
.zijkaart .sub { color: var(--accent); font-size: 12px; }
.zijkaart .sub2 { color: var(--inkt-3); font-size: 12px; }

/* voetregel op detailkaarten (Created By / Date Created) */
.voetregel { border-top: 1px solid var(--lijn); margin-top: 14px; padding-top: 9px;
             display: flex; gap: 22px; flex-wrap: wrap; font-size: 12px; color: var(--inkt-3); }
.voetregel strong { color: var(--inkt-2); font-weight: 600; }

/* tabbladen (gerelateerde lijsten) */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--lijn); margin-bottom: 12px;
        overflow-x: auto; justify-content: space-around; }
.tabs a { padding: 6px 13px 9px; font-weight: 650; font-size: 14px; color: var(--inkt-3);
          border-bottom: 2.5px solid transparent; white-space: nowrap; }
.tabs a.actief { color: var(--accent); border-bottom-color: var(--accent); }
.tabs a .tel { font-size: 11px; }
.mini-tabel td, .mini-tabel th { padding: 6px 8px; font-size: 13px; }

/* regels-editor (offerte-/factuurregels) */
.regels th, .regels td { padding: 6px 8px; }
.regels input, .regels select { padding: 5px 4px; font-size: 13px; }
.regels .num { width: 84px; text-align: right; }
.totalen { display: flex; gap: 26px; justify-content: flex-end; margin-top: 14px; flex-wrap: wrap; }
.totalen .tot { text-align: right; }
.totalen .tot .label { font-size: 11.5px; color: var(--inkt-3); }
.totalen .tot .waarde { font-size: 17px; font-weight: 700; color: var(--accent); }
.totalen .tot .waarde.rood { color: var(--rood); }

/* kalender */
.kal-kop { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.kal-kop h1 { font-size: 19px; flex: 1; text-align: center; }
.kalender { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px;
            background: var(--lijn); border: 1px solid var(--lijn); border-radius: 10px; overflow: hidden; }
.kal-dagnaam { background: var(--wit); padding: 7px; font-size: 11.5px; font-weight: 700;
               text-transform: uppercase; color: var(--inkt-3); text-align: center; }
.kal-dag { background: var(--wit); min-height: 96px; padding: 5px 6px; cursor: pointer; }
.kal-dag:hover { background: var(--accent-licht); }
.kal-dag .nr { font-size: 12px; color: var(--inkt-2); }
.kal-dag.buiten { background: var(--vlak); }
.kal-dag.vandaag .nr { background: var(--accent); color: #fff; border-radius: 50%;
                        display: inline-grid; place-items: center; width: 22px; height: 22px; }
.kal-item { display: block; background: var(--accent-licht); color: var(--accent-donker);
            border-radius: 5px; padding: 1px 6px; font-size: 11.5px; margin-top: 3px;
            overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kal-item.klaar { text-decoration: line-through; opacity: .6; }

dialog { border: none; border-radius: 12px; padding: 22px; width: 430px; max-width: 92vw;
         box-shadow: 0 24px 60px rgba(0,0,0,.25); }
dialog::backdrop { background: rgba(20,20,22,.45); }
dialog h2 { margin-bottom: 12px; }

#toost { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
         background: var(--inkt); color: #fff; border-radius: 10px; padding: 11px 20px;
         font-size: 13.5px; opacity: 0; transition: opacity .25s; pointer-events: none; z-index: 99; }
#toost.zichtbaar { opacity: 1; }
#toost.fout-t { background: var(--rood); }
