/* connectapi in de stijl "Grafiet": bijna zwart met een oranje accent, compact en
   symmetrisch (zie ontwerp/desktop.html en ontwerp/layout.html).
   Indeling van dit bestand:
     1. kleuren en basis
     2. bouwstenen (paneel, kop, regels, labels, knoppen)
     3. het dashboard op de pc (rail, bovenbalk, raster van 4×2)
     4. de telefoon (onder 900px: Vandaag/Gebieden en de onderbalk)
     5. instellingen (dialoog)
     6. de inlogpagina
     7. de Inbox-regels en het spreekscherm
     8. Claude op de pc (gesprek, toestemmingskaarten, stip bij nieuw antwoord) */

/* 1. kleuren en basis */
:root {
  --bg: #0e0f11; --vlak: #16181b; --vlak2: #1b1e22; --lijn: #2a2e34; --lijn2: #363b43;
  --tekst: #eceef1; --zacht: #8a919c; --dof: #5c636e;
  --accent: #f59e0b; --accent2: #f97316; --goed: #34d399; --let: #fbbf24; --fout: #ef4444;
  --gloed: rgba(245, 158, 11, .45);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0; min-height: 100dvh; color: var(--tekst);
  font-family: "Inter", "Segoe UI", system-ui, sans-serif; font-size: 14px;
  background: radial-gradient(1200px 500px at 70% -10%, #2a2216 0%, var(--bg) 55%) fixed var(--bg);
}
svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
button, input { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
.getal { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }

/* 2. bouwstenen */
.paneel { background: linear-gradient(180deg, var(--vlak2), var(--vlak)); border: 1px solid var(--lijn); border-radius: 10px; }
.logo { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; font-weight: 800; font-size: 15px; color: var(--bg);
        background: linear-gradient(135deg, var(--accent), var(--accent2)); box-shadow: 0 0 16px var(--gloed); }
.kop { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-bottom: 1px solid var(--lijn); font-size: 12px; font-weight: 600;
       letter-spacing: .06em; text-transform: uppercase; color: #cfd3da; }
.kop svg { color: var(--accent); }
.kop .rechts { margin-left: auto; font-weight: 500; color: var(--zacht); letter-spacing: 0; text-transform: none; }
.inh { padding: 6px 12px 10px; display: flex; flex-direction: column; min-height: 0; flex: 1; }
.r { display: grid; grid-template-columns: 42px 18px 1fr auto; align-items: center; gap: 8px; padding: 6px 0;
     border-bottom: 1px solid rgba(42, 46, 52, .7); font-size: 13px; }
.r:last-child { border-bottom: none; }
.r .t { color: var(--zacht); font-size: 11.5px; }
.r svg { color: var(--zacht); width: 15px; height: 15px; }
.r .w { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.r .x { font-size: 11px; color: var(--dof); }
.r.voorbij .t, .r.voorbij .w { color: var(--dof); }
.r.nu { position: relative; }
.r.nu::after { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 1px; background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.label { font-size: 10.5px; padding: 1px 6px; border-radius: 4px; background: rgba(245, 158, 11, .12); color: var(--accent); }
.meter { height: 4px; border-radius: 2px; background: var(--lijn); overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent2)); }
kbd { font: inherit; font-size: 11px; border: 1px solid var(--lijn2); border-radius: 5px; padding: 1px 6px; color: var(--dof); }
.mic { width: 38px; height: 38px; border-radius: 9px; display: grid; place-items: center; color: var(--bg);
       background: linear-gradient(135deg, var(--accent), var(--accent2)); box-shadow: 0 0 18px var(--gloed); }
.mic svg { width: 18px; height: 18px; }
.knopje { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 12px; border-radius: 9px;
          border: 1px solid var(--lijn2); background: var(--vlak2); font-size: 13px; text-decoration: none; color: var(--tekst); }
.knopje:hover { border-color: var(--accent); }
.knopje svg { color: var(--accent); }
.hoofdknop { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 12px; border-radius: 10px;
             font-weight: 600; color: var(--bg); background: linear-gradient(135deg, var(--accent), var(--accent2)); box-shadow: 0 0 18px var(--gloed); }
.hoofdknop:disabled { opacity: .6; cursor: wait; }
.fout { color: var(--fout); font-size: 13px; margin: 0; }
.melding { color: var(--zacht); font-size: 13px; margin: 0; }

/* 3. het dashboard op de pc */
.scherm { display: grid; grid-template-columns: 56px 1fr; height: 100dvh; }
.rail { border-right: 1px solid var(--lijn); display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 0; background: rgba(14, 15, 17, .6); }
.rail .logo { margin-bottom: 10px; }
.knop { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; color: var(--dof); position: relative; }
.knop:hover { color: var(--zacht); }
.knop.aan { color: var(--accent); background: rgba(245, 158, 11, .1); }
.knop.aan::before { content: ""; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 2px; border-radius: 2px; background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.rail .ruimte { flex: 1; }

.hoofd { display: grid; grid-template-rows: auto 1fr; gap: 10px; padding: 10px; min-width: 0; min-height: 0; }
.boven { display: grid; grid-template-columns: auto 1fr minmax(260px, 520px) auto; gap: 10px; align-items: stretch; }
.datum { padding: 8px 14px; display: flex; flex-direction: column; justify-content: center; }
.datum b { font-size: 18px; letter-spacing: -.01em; white-space: nowrap; }
.datum span { font-size: 11px; color: var(--zacht); letter-spacing: .08em; text-transform: uppercase; }
.kpis { display: grid; grid-template-columns: repeat(5, 1fr); }
.kpi { padding: 8px 14px; border-left: 1px solid var(--lijn); display: flex; flex-direction: column; justify-content: center; gap: 2px; min-width: 0; }
.kpi:first-child { border-left: none; }
.kpi small { font-size: 10.5px; color: var(--zacht); letter-spacing: .08em; text-transform: uppercase; display: flex; align-items: center; gap: 6px; }
.kpi small svg { width: 12px; height: 12px; }
.kpi b { font-size: 18px; }
.vraag { display: flex; align-items: center; gap: 10px; padding: 0 6px 0 14px; color: var(--zacht); }
.vraag input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; font-size: 13.5px; color: var(--tekst); }
.vraag input::placeholder { color: var(--zacht); }
.vraag:focus-within { border-color: var(--lijn2); }
.klein { width: 44px; display: grid; place-items: center; color: var(--zacht); }
.instel-tel { display: none; }

.raster { display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: 1fr 1fr; gap: 10px; min-height: 0; }
.vak { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.vak .inh { overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--lijn2) transparent; }
.vak.hoog { grid-row: span 2; }
.tegels, .balk { display: none; }

/* 4. de telefoon */
@media (max-width: 899px) {
  .scherm { display: block; height: auto; }
  .rail { display: none; }
  .hoofd { display: flex; flex-direction: column; gap: 8px; padding: max(14px, env(safe-area-inset-top)) 12px calc(100px + env(safe-area-inset-bottom)); }
  .boven { grid-template-columns: 1fr auto auto; gap: 8px; }
  .boven .datum { background: none; border: 0; padding: 0 4px; }
  .datum b { font-size: 20px; }
  .klein, .instel-tel { display: grid; width: 36px; height: 36px; border-radius: 10px; }
  .kpis { grid-column: 1 / -1; grid-row: 2; grid-template-columns: repeat(4, 1fr); }
  .kpi { padding: 8px 10px; }
  .kpi small { font-size: 9.5px; gap: 4px; }
  .kpi b { font-size: 16px; }
  .kpi.alleen-pc { display: none; }
  .vraag { grid-column: 1 / -1; grid-row: 3; padding: 0 6px 0 12px; height: 46px; }
  .vraag kbd, .vraag .mic { display: none; }
  .raster { display: flex; flex-direction: column; gap: 8px; }
  .vak { display: none; }
  .vak.hoog { display: flex; min-height: 40dvh; }
  .vak.inbox.gevuld { display: flex; }
  .kop { font-size: 11px; padding: 8px 11px; }

  body[data-scherm="vandaag"] .vraag { display: none; }
  body[data-scherm="gebieden"] .kpis, body[data-scherm="gebieden"] .raster { display: none; }
  body[data-scherm="gebieden"] .tegels { display: grid; }

  .tegels { grid-template-columns: 1fr 1fr; gap: 8px; }
  .tegel { padding: 11px; display: flex; flex-direction: column; gap: 10px; }
  .tegel .naam { display: flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: #cfd3da; }
  .tegel .naam svg { color: var(--accent); width: 14px; height: 14px; }
  .tegel b { font-size: 22px; }

  .balk { display: flex; position: fixed; left: 0; right: 0; bottom: 0; height: calc(76px + env(safe-area-inset-bottom));
          padding: 0 14px env(safe-area-inset-bottom); align-items: center; justify-content: space-around;
          background: rgba(14, 15, 17, .92); border-top: 1px solid var(--lijn); backdrop-filter: blur(8px); }
  .tab { color: var(--dof); width: 44px; height: 44px; display: grid; place-items: center; }
  .tab svg { width: 20px; height: 20px; }
  .tab.aan { color: var(--accent); }
  .balk .mic { width: 60px; height: 60px; border-radius: 18px; margin-top: -26px; }
  .balk .mic svg { width: 26px; height: 26px; }
}

/* 5. instellingen */
dialog { width: min(440px, calc(100vw - 24px)); padding: 0; color: var(--tekst); }
dialog::backdrop { background: rgba(0, 0, 0, .6); }
dialog .kop button { margin-left: auto; color: var(--zacht); display: grid; }
dialog .inh { gap: 10px; padding: 10px 12px 14px; }
dialog .knoppen { display: flex; gap: 8px; flex-wrap: wrap; }
dialog .kopieer { display: flex; gap: 8px; }
dialog .kopieer input { flex: 1; min-width: 0; padding: 8px 10px; border-radius: 9px; border: 1px solid var(--lijn2); background: var(--bg); font-size: 12px; }
.r.passkey { grid-template-columns: 18px 1fr auto; }

/* 6. de inlogpagina */
.inlog { min-height: 100dvh; display: grid; place-items: center; padding: 16px; }
.kaart { width: min(360px, 100%); padding: 28px 22px 22px; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.kaart .logo { width: 52px; height: 52px; border-radius: 14px; font-size: 26px; }
.kaart h1 { margin: 0 0 4px; font-size: 18px; letter-spacing: .02em; }
.kaart .knopje { width: 100%; }

/* 7. de Inbox-regels en het spreekscherm */
.r .acties { display: flex; align-items: center; gap: 2px; }
select.label { appearance: none; border: 0; font: inherit; font-size: 10.5px; cursor: pointer; }
select.label option { background: var(--vlak); color: var(--tekst); }
.weg { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 6px; color: var(--dof); }
.weg:hover { color: var(--fout); }
.r .weg svg { width: 12px; height: 12px; color: inherit; }

dialog.spreek { width: min(440px, calc(100vw - 24px)); padding: 28px 18px 22px; border: 1px solid var(--lijn); border-radius: 16px;
                color: var(--tekst); background: radial-gradient(500px 300px at 80% -10%, #2a2216 0%, var(--bg) 60%) var(--bg); }
dialog.spreek[open] { display: flex; flex-direction: column; align-items: center; gap: 20px; text-align: center; }
.golf { display: flex; gap: 5px; align-items: center; height: 70px; }
.golf i { width: 5px; height: 10px; border-radius: 3px; background: linear-gradient(var(--accent), var(--accent2)); box-shadow: 0 0 8px var(--gloed); }
[data-stand="luisteren"] .golf i { animation: golf 1.1s ease-in-out infinite; }
[data-stand="denken"] .golf i { animation: denken 1.2s ease-in-out infinite; height: 26px; }
.golf i:nth-child(2n) { animation-delay: -.35s; }
.golf i:nth-child(3n) { animation-delay: -.7s; animation-duration: .9s; }
.golf i:nth-child(5n) { animation-delay: -.2s; animation-duration: 1.4s; }
@keyframes golf { 0%, 100% { height: 10px; } 50% { height: 62px; } }
@keyframes denken { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
.zin { margin: 0; min-height: 1.45em; font-size: 19px; line-height: 1.45; }
.herkend { width: 100%; text-align: left; }
.spreek .melding { margin: 0; font-size: 15px; line-height: 1.45; color: var(--tekst); }
.stop { width: 76px; height: 76px; border-radius: 22px; display: grid; place-items: center; background: var(--vlak2);
        border: 1px solid var(--lijn2); box-shadow: 0 0 0 10px rgba(245, 158, 11, .06); }
.stop span { width: 22px; height: 22px; border-radius: 5px; background: var(--fout); }
[data-stand="denken"] .stop { opacity: .35; pointer-events: none; }
.spreek .knopje { min-width: 120px; }
@media (max-width: 899px) {
  dialog.spreek { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border: 0; border-radius: 0;
                  padding: max(28px, env(safe-area-inset-top)) 22px calc(28px + env(safe-area-inset-bottom)); }
  dialog.spreek[open] { justify-content: center; }
}

/* 8. Claude op de pc */
.knop .stip, .tab .stip { display: none; position: absolute; top: 6px; right: 6px; width: 7px; height: 7px; border-radius: 50%;
                          background: var(--accent); box-shadow: 0 0 6px var(--accent); }
.tab { position: relative; }
.nieuw .stip { display: block; }
.pc-scherm { display: none; flex-direction: column; min-height: 0; }
body[data-scherm="pc"] .raster, body[data-scherm="pc"] .tegels { display: none; }
body[data-scherm="pc"] .pc-scherm { display: flex; }
.status-stip { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: var(--dof); }
.online .status-stip { background: var(--goed); box-shadow: 0 0 6px var(--goed); }
.gesprek { flex: 1; min-height: 0; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.bericht { max-width: 80%; padding: 8px 11px; border-radius: 10px; font-size: 13.5px; line-height: 1.45;
           white-space: pre-wrap; overflow-wrap: anywhere; }
.van-sven { align-self: flex-end; background: rgba(245, 158, 11, .13); border: 1px solid rgba(245, 158, 11, .3); }
.van-claude { align-self: flex-start; background: var(--vlak2); border: 1px solid var(--lijn); }
.toestemming { align-self: stretch; max-width: none; display: flex; flex-direction: column; gap: 6px; white-space: normal;
               background: var(--vlak2); border: 1px solid rgba(251, 191, 36, .5); }
.toestemming b { color: var(--let); font-weight: 600; }
.toestemming pre { margin: 0; max-height: 160px; overflow: auto; padding: 6px 8px; border-radius: 6px; background: var(--bg);
                   font-size: 11.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.toestemming .knoppen { display: flex; gap: 8px; }
.toestemming .label { align-self: flex-start; }
.pc-invoer { display: flex; gap: 8px; align-items: center; padding: 10px; border-top: 1px solid var(--lijn); }
.pc-invoer input { flex: 1; min-width: 0; padding: 10px 12px; border-radius: 9px; border: 1px solid var(--lijn2); background: var(--bg); outline: 0; }
.pc-invoer input:focus { border-color: var(--accent); }
@media (max-width: 899px) {
  body[data-scherm="pc"] .kpis { display: none; }
  .pc-scherm { height: calc(100dvh - 170px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
  .pc-invoer .mic { display: none; }
}
