/* Digital Here! Custom Creations — gedeelde stijl voor portaal en beheer */
:root {
  --accent: #6D4AFF;
  --accent-dark: #5636E6;
  --accent-licht: #EFEBFF;
  --navy: #14152B;
  --tekst: #23243D;
  --muted: #6E7191;
  --bg: #F6F5FB;
  --kaart: #fff;
  --rand: rgba(20, 21, 43, 0.1);
  --ok: #047857; --ok-bg: #D1FAE5;
  --let: #B45309; --let-bg: #FEF3C7;
  --fout: #B91C1C; --fout-bg: #FEE2E2;
  --info: #1D4ED8; --info-bg: #DBEAFE;
  --radius: 14px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; background: var(--bg); color: var(--tekst); min-height: 100vh; line-height: 1.5; }
a { color: var(--accent); }
button { font: inherit; }
[hidden] { display: none !important; }

/* Inloggen */
.login-scherm { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1rem;
  background: radial-gradient(circle at 20% 20%, #2B1F6B 0%, var(--navy) 60%); }
.login-kaart { background: #fff; border-radius: 22px; padding: 2.5rem; width: 100%; max-width: 420px; box-shadow: 0 24px 60px rgba(0,0,0,.25); }
.logo { font-weight: 900; font-size: 1.05rem; color: var(--navy); letter-spacing: -.01em; }
.logo span { color: var(--accent); }
.login-kaart h1 { font-size: 1.35rem; margin: 1.2rem 0 .3rem; }
.login-kaart p { color: var(--muted); font-size: .92rem; margin-bottom: 1.2rem; }

/* Formulieren */
label { display: block; font-size: .82rem; font-weight: 600; color: var(--muted); margin: .8rem 0 .3rem; }
input[type=text], input[type=email], input[type=password], input[type=date], select, textarea {
  width: 100%; padding: .7rem .85rem; border: 1.5px solid var(--rand); border-radius: 10px; font: inherit; font-size: .95rem; background: #fff; color: var(--tekst); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
textarea { min-height: 90px; resize: vertical; }
.knop { display: inline-flex; align-items: center; gap: .4rem; padding: .62rem 1.15rem; border-radius: 100px; border: none; cursor: pointer;
  background: var(--accent); color: #fff; font-weight: 700; font-size: .9rem; text-decoration: none; white-space: nowrap; }
.knop:hover { background: var(--accent-dark); }
.knop:disabled { opacity: .55; cursor: default; }
.knop.breed { width: 100%; justify-content: center; margin-top: 1rem; padding: .85rem; }
.knop.licht { background: var(--accent-licht); color: var(--accent-dark); }
.knop.licht:hover { background: #E2DAFF; }
.knop.rand { background: transparent; border: 1.5px solid var(--rand); color: var(--tekst); }
.knop.rand:hover { border-color: var(--accent); color: var(--accent); }
.knop.ok { background: var(--ok); } .knop.gevaar { background: var(--fout); }
.knop.klein { padding: .35rem .8rem; font-size: .8rem; }
.melding { margin-top: 1rem; padding: .7rem .9rem; border-radius: 10px; font-size: .9rem; }
.melding.ok { background: var(--ok-bg); color: var(--ok); }
.melding.fout { background: var(--fout-bg); color: var(--fout); }
.melding.info { background: var(--info-bg); color: var(--info); }
.rij { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; }
.rij > .groei { flex: 1; min-width: 180px; }
.raster2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
@media (max-width: 640px) { .raster2 { grid-template-columns: 1fr; } }

/* Indeling */
.balk { background: #fff; border-bottom: 1px solid var(--rand); height: 60px; padding: 0 1.5rem; display: flex; align-items: center;
  justify-content: space-between; position: sticky; top: 0; z-index: 50; }
.balk .gebruiker { display: flex; align-items: center; gap: .8rem; font-size: .88rem; color: var(--muted); }
@media (max-width: 600px) { .balk { padding: 0 1rem; } .balk .gebruiker > span { display: none; } .logo { font-size: .95rem; } }
.inhoud { max-width: 1080px; margin: 0 auto; padding: 1.6rem 1rem 4rem; }
.kop { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.kop h1 { font-size: 1.45rem; } .kop .sub { color: var(--muted); font-size: .88rem; }
.terug { background: none; border: none; color: var(--muted); cursor: pointer; font-size: .88rem; margin-bottom: .6rem; padding: 0; }
.terug:hover { color: var(--accent); }
.kaart { background: var(--kaart); border-radius: var(--radius); border: 1px solid var(--rand); padding: 1.3rem; margin-bottom: 1rem; }
.kaart h2 { font-size: 1.02rem; margin-bottom: .8rem; }
.kaart h3 { font-size: .92rem; margin: 1rem 0 .5rem; }
.leeg { color: var(--muted); font-size: .9rem; padding: .6rem 0; }
.klein-grijs { color: var(--muted); font-size: .8rem; }

/* Tabs */
.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--rand); margin-bottom: 1.2rem; overflow-x: auto; }
.tabs button { background: none; border: none; padding: .7rem 1rem; cursor: pointer; color: var(--muted); font-weight: 600; font-size: .9rem;
  border-bottom: 2.5px solid transparent; white-space: nowrap; }
.tabs button.actief { color: var(--accent); border-bottom-color: var(--accent); }
.tabs .teller { display: inline-block; background: var(--accent); color: #fff; border-radius: 100px; font-size: .7rem; padding: 0 .45rem; margin-left: .3rem; }

/* Lijsten en badges */
.projectlijst { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1rem; }
.projectkaart { background: #fff; border: 1px solid var(--rand); border-radius: var(--radius); padding: 1.2rem; cursor: pointer; transition: border-color .15s, transform .15s; text-align: left; font: inherit; color: inherit; }
.projectkaart:hover { border-color: var(--accent); transform: translateY(-2px); }
.projectkaart .nr { font-size: .75rem; color: var(--muted); }
.projectkaart h3 { font-size: 1.02rem; margin: .2rem 0 .6rem; }
.voortgang { height: 6px; background: #ECEAF5; border-radius: 6px; overflow: hidden; margin-top: .8rem; }
.voortgang > div { height: 100%; background: var(--accent); }
.badge { display: inline-block; padding: .18rem .65rem; border-radius: 100px; font-size: .72rem; font-weight: 700; background: #EEF0F4; color: #374151; white-space: nowrap; }
.badge.paars { background: var(--accent-licht); color: var(--accent-dark); }
.badge.groen { background: var(--ok-bg); color: var(--ok); }
.badge.geel { background: var(--let-bg); color: var(--let); }
.badge.rood { background: var(--fout-bg); color: var(--fout); }
.badge.blauw { background: var(--info-bg); color: var(--info); }
table.lijst { width: 100%; border-collapse: collapse; font-size: .88rem; }
table.lijst th { text-align: left; color: var(--muted); font-weight: 600; font-size: .78rem; padding: .5rem; border-bottom: 1px solid var(--rand); }
table.lijst td { padding: .6rem .5rem; border-bottom: 1px solid var(--rand); vertical-align: middle; }
table.lijst tr:last-child td { border-bottom: none; }
.lijst-acties { text-align: right; white-space: nowrap; }

/* Mijlpalen */
.mijlpaal { display: flex; gap: .9rem; padding: .85rem 0; border-bottom: 1px solid var(--rand); }
.mijlpaal:last-child { border-bottom: none; }
.mijlpaal .stip { width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; font-size: .8rem; font-weight: 800;
  background: #ECEAF5; color: var(--muted); }
.mijlpaal.akkoord .stip { background: var(--ok); color: #fff; }
.mijlpaal.bezig .stip, .mijlpaal.ter_akkoord .stip { background: var(--accent); color: #fff; }
.mijlpaal.afgewezen .stip { background: var(--fout); color: #fff; }
.mijlpaal .titel { font-weight: 700; }

/* Chat */
.chat { display: flex; flex-direction: column; height: min(68vh, 640px); }
.chat-kanalen { display: flex; gap: .4rem; margin-bottom: .8rem; flex-wrap: wrap; }
.chat-kanalen button { border: 1.5px solid var(--rand); background: #fff; border-radius: 100px; padding: .35rem .9rem; cursor: pointer; font-size: .82rem; font-weight: 600; color: var(--muted); }
.chat-kanalen button.actief { border-color: var(--accent); color: var(--accent); background: var(--accent-licht); }
.chat-berichten { flex: 1; overflow-y: auto; padding: .5rem; background: #FAFAFD; border: 1px solid var(--rand); border-radius: 12px; }
.bericht { max-width: 78%; margin: .5rem 0; padding: .65rem .85rem; border-radius: 14px; background: #fff; border: 1px solid var(--rand); }
.bericht.eigen { margin-left: auto; background: var(--accent-licht); border-color: transparent; }
.bericht.systeem { max-width: 100%; text-align: center; background: transparent; border: none; color: var(--muted); font-size: .82rem; }
.bericht .meta { font-size: .72rem; color: var(--muted); margin-bottom: .2rem; }
.bericht .tekst { white-space: pre-wrap; word-wrap: break-word; font-size: .92rem; }
.bijlage { display: inline-flex; gap: .3rem; align-items: center; font-size: .8rem; margin: .35rem .35rem 0 0; padding: .2rem .55rem; background: #fff; border: 1px solid var(--rand); border-radius: 8px; text-decoration: none; color: var(--tekst); }
.chat-invoer { margin-top: .7rem; }
.chat-invoer textarea { min-height: 64px; }
.chips { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .4rem; }
.chip { font-size: .78rem; background: var(--accent-licht); color: var(--accent-dark); padding: .15rem .55rem; border-radius: 100px; }
.intern-label { background: var(--let-bg); color: var(--let); font-size: .78rem; padding: .4rem .7rem; border-radius: 8px; margin-bottom: .6rem; }

/* Uploads */
.dropzone { border: 2px dashed var(--rand); border-radius: 12px; padding: 1.2rem; text-align: center; color: var(--muted); font-size: .9rem; cursor: pointer; transition: border-color .15s, background .15s; }
.dropzone.over, .dropzone:hover { border-color: var(--accent); background: var(--accent-licht); }
.balkje { height: 6px; background: #ECEAF5; border-radius: 6px; overflow: hidden; margin-top: .6rem; }
.balkje > div { height: 100%; width: 0; background: var(--accent); transition: width .2s; }

/* Staging */
.staging-raam { border: 1px solid var(--rand); border-radius: 12px; overflow: hidden; background: #fff; }
.staging-raam .adres { display: flex; gap: .5rem; align-items: center; padding: .5rem .7rem; background: #F1F0F7; border-bottom: 1px solid var(--rand); flex-wrap: wrap; }
.staging-raam .adres select { width: auto; min-width: 180px; padding: .35rem .6rem; font-size: .85rem; }
.staging-raam iframe { width: 100%; height: 70vh; border: none; display: block; background: #fff; }
.apparaat button { background: none; border: 1px solid var(--rand); border-radius: 8px; padding: .25rem .55rem; cursor: pointer; font-size: .78rem; color: var(--muted); }
.apparaat button.actief { border-color: var(--accent); color: var(--accent); }
.feedback { padding: .7rem 0; border-bottom: 1px solid var(--rand); font-size: .9rem; }
.feedback:last-child { border-bottom: none; }
.feedback.opgelost .tekst { color: var(--muted); text-decoration: line-through; }
.raster-staging { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1rem; align-items: start; }
@media (max-width: 900px) { .raster-staging { grid-template-columns: 1fr; } }

/* Teksten */
.tekstblok { border: 1px solid var(--rand); border-radius: 12px; padding: 1rem; margin-bottom: .8rem; background: #fff; }
.tekstblok .inhoud { white-space: pre-wrap; margin: .6rem 0; font-size: .95rem; line-height: 1.65; }
.tekstblok .opmerking { background: var(--let-bg); color: var(--let); padding: .5rem .7rem; border-radius: 8px; font-size: .85rem; margin-top: .5rem; white-space: pre-wrap; }
.paginakop { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 1.2rem 0 .5rem; font-weight: 700; }

/* Dialoog */
dialog { border: none; border-radius: 18px; padding: 1.5rem; width: min(520px, 92vw); box-shadow: 0 24px 60px rgba(0,0,0,.25); }
dialog::backdrop { background: rgba(20, 21, 43, .45); }
dialog h2 { font-size: 1.1rem; margin-bottom: .5rem; }
dialog .acties { display: flex; justify-content: flex-end; gap: .5rem; margin-top: 1.2rem; }
.toast { position: fixed; bottom: 1.2rem; left: 50%; transform: translateX(-50%); background: var(--navy); color: #fff; padding: .7rem 1.2rem; border-radius: 100px; font-size: .88rem; z-index: 999; box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.toast.fout { background: var(--fout); }
