/* Scope Compass - Mijn account (ontwerp Dennis 19 okt: 2a desktop, 2b telefoon).
   Desktop: submenu links, het gekozen onderwerp rechts. Telefoon (tot 640px): eerst de lijst met
   onderwerpen, dan één onderwerp per scherm met een terugknop. Eén opmaak uit beheer.js
   (renderAccount); deze regels kiezen per breekpunt wat zichtbaar is. De AI-verbindingen
   (ai-verbindingen.js) en de tweestapsverificatie (tweestap.js) staan hier ook, voor zover ze in
   deze pagina anders ogen dan op zichzelf. */

.acc { max-width: 1080px; }
.acc-kop { margin: 8px 0 24px; }
.acc-kop .settings-h2 { font-size: 26px; letter-spacing: -.02em; margin: 0 0 4px; }
.acc-sub { margin: 0; color: var(--text-2); font-size: 14px; }
.acc-zonder { margin-bottom: 16px; }
.acc-raster { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 28px; align-items: start; }

/* ---- submenu (desktop) en lijst (telefoon) ---- */
.acc-nav { position: sticky; top: 76px; }
.acc-nav-lijst { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.acc-nav-item { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 6px 12px; border-radius: var(--r);
  color: var(--text-2); font-size: 14px; font-weight: 500; text-decoration: none; }
.acc-nav-item:hover { background: var(--sunken); color: var(--text); text-decoration: none; }
.acc-nav-item.is-actief { background: var(--pri-soft); color: var(--pri-text); }
.acc-nav-item:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring); }
.acc-nav-ic { display: inline-flex; flex: none; font-size: 16px; }
.acc-nav-tekst { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.acc-nav-sub, .acc-nav .tag, .acc-nav-pijl, .acc-nav .acc-wie-lijst, .acc-nav .acc-uitlog { display: none; }

/* ---- de inhoud ---- */
.acc-inhoud { min-width: 0; }
/* Op de desktop zegt het submenu waar je bent; de kop blijft de naam van de sectie (aria-labelledby). */
.acc-terug-rij { display: none; }
.acc-titel { margin: 0; }
.acc-kaart { margin-bottom: 16px; }
.acc-kaart-in { padding: 16px; }
.acc-kaart-voet { padding: 0 16px 14px; margin: 0; }
.acc-hulp { margin: 4px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--text-2); }
.acc-label { display: block; margin: 0 0 6px; font-size: 12.5px; font-weight: 600; color: var(--text-2); }

/* Wie je bent (Profiel) */
.acc-wie { display: flex; align-items: center; gap: 14px; padding: 16px 20px; }
.acc-avatar { width: 40px; height: 40px; font-size: 14px; }
.acc-wie-tekst { min-width: 0; flex: 1; }
.acc-wie-naam { font-size: 16px; font-weight: 600; }
.acc-wie-mail { font-size: 13px; color: var(--text-2); overflow-wrap: anywhere; }
.acc-wie-tags { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

/* Persoonlijke gegevens: label links, veld rechts */
.acc-veldrij { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 12px 24px; padding: 16px 20px; border-top: 1px solid var(--border); }
.panel-head + .acc-veldrij { border-top: 0; }
.acc-veld-l { padding-top: 9px; font-size: 14px; font-weight: 500; color: var(--text); }
.acc-veld { max-width: 380px; min-width: 0; }
.acc-veld .input, .acc-veld .select { width: 100%; }
.acc-vast { display: flex; align-items: center; gap: 8px; margin: 9px 0 0; font-size: 14px; overflow-wrap: anywhere; }
.acc-vast .ic { color: var(--text-3); flex: none; }
.acc-voet { display: flex; justify-content: flex-end; gap: 10px; padding: 12px 20px; border-top: 1px solid var(--border); background: var(--surface-2); }

/* Regels met een schakelaar of keuzelijst rechts */
.acc-rij { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-top: 1px solid var(--border); }
.acc-kaart > .acc-rij:first-child, .panel-head + .acc-rij { border-top: 0; }
.acc-rij-tekst { flex: 1; min-width: 0; }
.acc-rij-titel { font-size: 14px; font-weight: 600; }
.acc-rij-bed { flex: none; display: flex; align-items: center; }
.acc-keuze { min-width: 200px; }
.acc-upd-reden { display: block; margin-top: 4px; }

/* Wachtwoord */
.acc-pw { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 300px); grid-template-areas: "velden eisen" "acties eisen"; gap: 0 24px; padding: 18px 20px 20px; }
.acc-pw-velden { grid-area: velden; }
.acc-pw-eisen { grid-area: eisen; }
.acc-pw-acties { grid-area: acties; }
.acc-pw-velden .pw-wrap { margin-bottom: 14px; }
.acc-schakel { display: flex; align-items: flex-start; gap: 10px; margin: 4px 0 16px; font-size: 14px; }
.acc-schakel .toggle { margin-top: 1px; }
.acc-schakel .acc-hulp { display: block; margin-top: 2px; }
.acc-eisen { padding: 12px 14px; border: 1px solid var(--border-2); border-radius: var(--r); background: var(--surface-2); }
.acc-eisen-kop { margin: 0 0 8px; font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.acc-eisen ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; }
.acc-eisen li { display: flex; align-items: flex-start; gap: 8px; color: var(--text-2); }
.acc-eis-bol { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; margin-top: 2px;
  border: 1.5px solid var(--border-3); border-radius: 50%; color: transparent; font-size: 11px; }
.acc-eisen li.is-ok { color: var(--text); }
.acc-eisen li.is-ok .acc-eis-bol { border-color: var(--green-strong); background: var(--green-soft); color: var(--green-strong); }
.acc-pw-eisen > .acc-hulp { margin-top: 12px; }

/* Tweestapsverificatie als kaart */
.acc-kaart .panel-title .tag { margin-left: 8px; }
.tweestap--kaart .tweestap-vera { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.tweestap--kaart .tweestap-vera p { margin: 0; font-size: 14px; line-height: 1.5; }
.tweestap--kaart .tweestap-lijst { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.tweestap--kaart .tweestap-app { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--border-2); border-radius: var(--r); }
.tweestap--kaart .tweestap-app-tekst { flex: 1; min-width: 0; }
.tweestap--kaart .list-add { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; align-items: center; }
.tweestap--kaart .list-add .tweestap-label { grid-column: 1 / -1; margin: 0; font-size: 12.5px; font-weight: 600; color: var(--text-2); }

/* Meldingen: tabel met twee schakelaars per onderwerp */
.acc-mld-wrap { overflow-x: auto; }
.acc-mld-tabel { width: 100%; border-collapse: collapse; font-size: 14px; }
.acc-mld-tabel th, .acc-mld-tabel td { padding: 10px 16px; border-top: 1px solid var(--border); text-align: left; }
.acc-mld-tabel thead th { border-top: 0; background: var(--surface-2); font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.acc-mld-tabel tbody th { font-weight: 400; }
.acc-mld-tabel th[scope="col"]:not(:first-child), .acc-mld-tabel td { width: 96px; text-align: center; }
.acc-mld-tabel td .toggle { vertical-align: middle; }
.acc-mld-prog { padding: 12px 16px 0; border-top: 1px solid var(--border); }
.acc-mld-kop { margin: 0 0 4px; font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.acc-kaart-tabel > .acc-kaart-voet { padding-top: 12px; }

/* ---- AI-verbindingen in deze pagina ---- */
.ai-v > p { margin: 0 0 12px; }
.ai-v-intro { display: flex; align-items: center; gap: 18px; padding: 16px 20px; margin-bottom: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--sh); }
.ai-v-vera { width: 88px; height: 88px; flex: none; }
.ai-v-intro-tekst { flex: 1; min-width: 0; }
.ai-v-intro-tekst h3 { margin: 0 0 4px; font-size: 15px; }
/* De handleidingen per AI-tool (src/gids.js), als tekstlinks onder de uitleg. */
.ai-v-gids { display: flex; flex-wrap: wrap; gap: 0 12px; margin: 6px 0 0 -4px; }
.ai-v-intro-tekst p { margin: 0; font-size: 13.5px; color: var(--text-2); }
.ai-v-nieuw-knop { flex: none; }
.ai-v-kaart { margin-bottom: 16px; padding: 16px 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--sh); }
.ai-v-kaart-kop { display: flex; align-items: flex-start; gap: 16px; }
.ai-v-kaart-tekst { flex: 1; min-width: 0; }
.ai-v-kaart-titel { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; }
.ai-v-kaart-titel h4 { margin: 0; font-size: 16px; }
.ai-v-kaart-titel .ai-v-naam { order: 9; flex-basis: 100%; font-size: 12px; }
.ai-v .ai-v-meta { margin: 4px 0 0; font-size: 13px; color: var(--text-2); }
.ai-v .ai-v-meta-2 { margin-top: 2px; font-size: 12.5px; }
.ai-v .ai-v-kaart-titel .ai-v-naam { margin: 2px 0 0; }
.ai-v-kaart-acties { display: flex; gap: 8px; flex: none; }
.ai-v-let { margin: 12px 0 0; padding: 10px 12px; background: var(--amber-soft); border-radius: var(--r); color: var(--amber-strong); font-size: 13px; }
.ai-v-let p { margin: 0 0 8px; }
.ai-v-confirm { margin-top: 12px; padding: 12px 14px; border: 1px solid var(--red-soft); border-radius: var(--r); background: var(--surface-2); }
.ai-v-confirm p { margin: 0 0 10px; font-size: 13.5px; }
.ai-v-rechten { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.ai-v-project { margin: 6px 0 8px; font-size: 13.5px; }
.ai-v-kolommen { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.ai-v-kolom { border: 1px solid var(--border-2); border-radius: var(--r); overflow: hidden; }
.ai-v-kolom-kop { display: flex; justify-content: space-between; gap: 8px; padding: 8px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); font-size: 13px; font-weight: 600; }
.ai-v-kolom-tel { font-weight: 400; color: var(--text-2); }
.ai-v-kolom ul { list-style: none; margin: 0; padding: 0; }
.ai-v-kolom li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 14px; border-top: 1px solid var(--border); font-size: 13.5px; }
.ai-v-kolom li:first-child { border-top: 0; }
.ai-v-kolom li.is-uit { color: var(--text-2); }
.ai-v-stand { flex: none; display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; }
.ai-v-kolom li.is-aan .ai-v-stand { color: var(--green-strong); font-weight: 600; }
.ai-v-rechten .ai-v-details { margin-top: 8px; }
.ai-v-leeg { padding: 16px 20px; background: var(--surface); border: 1px dashed var(--border-3); border-radius: var(--r-lg); color: var(--text-2); font-size: 13.5px; }
.ai-v-archief { margin: 4px 0 16px; }
.ai-v-archief summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; color: var(--text-2); font-weight: 600; font-size: 13.5px; }
.ai-v-archief ul { list-style: none; margin: 0; padding: 0; }
.ai-v-archief li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 0; border-top: 1px solid var(--border); font-size: 13.5px; }
.ai-v-archief-naam { font-weight: 500; }
.ai-v-voet { display: flex; gap: 10px; flex-wrap: wrap; }
.ai-v-nieuw-onder { display: none; }
.ai-v-nieuw { margin-bottom: 16px; }
.ai-v-nieuw .panel-head .icontile { margin-left: auto; }
.ai-v-nieuw-inhoud { padding: 16px 20px 18px; }
.ai-v-veld-l { margin-bottom: 8px; font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.ai-v-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.ai-v-chip { min-height: 40px; padding: 8px 16px; border: 1px solid var(--border-2); border-radius: var(--r); background: var(--surface); color: var(--text); font: inherit; font-size: 14px; cursor: pointer; }
.ai-v-chip:hover { background: var(--sunken); }
.ai-v-chip.is-gekozen { border-color: var(--pri); background: var(--pri-soft); color: var(--pri-text); font-weight: 600; }
.ai-v-chip:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring); }
.ai-v-stappen-kop { margin: 0 0 8px; font-weight: 600; }
.ai-v-stappen { margin: 0 0 12px; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.ai-v-url { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.ai-v-url code { padding: 6px 10px; border: 1px solid var(--border-2); border-radius: var(--r-sm); background: var(--sunken); font-size: 13px; overflow-wrap: anywhere; }
/* Eén weg (20 okt): projecten en rechten kies je bij het inloggen; de zin staat onder de stappen. */
.ai-v-kies { margin: 0 0 12px; font-size: 14px; }
/* Werk je in Claude Code? Ingeklapt kader, alleen bij de chip Claude. */
.ai-v-code { margin: 0 0 12px; padding: 0 14px; border: 1px solid var(--border-2); border-radius: var(--r); background: var(--surface-2); }
.ai-v .ai-v-code summary { min-height: 44px; font-weight: 600; font-size: 13.5px; }
.ai-v .ai-v-code p { margin: 0 0 8px; font-size: 13.5px; color: var(--text-2); }
.ai-v-code .ai-v-url { margin: 0 0 14px; }

/* ---- telefoon: eerst de lijst, dan één onderwerp per scherm ---- */
/* 0367: Rechten beheren en Nieuwe verbinding. Een echte checkbox als schakelaar in een label: de hele regel is klikbaar en Tab vindt hem. */
.ai-v-schakel { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 28px; cursor: pointer; }
.ai-v-schakel input { appearance: none; -webkit-appearance: none; position: relative; flex: none; box-sizing: border-box; width: 40px; height: 24px; margin: 0; border: 1.5px solid var(--border-3); border-radius: 999px; background: var(--sunken); cursor: pointer; transition: background .15s, border-color .15s; }
.ai-v-schakel input::before { content: ""; position: absolute; top: 2.5px; left: 2.5px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 2px rgba(16,24,40,.25); transition: transform .15s; }
.ai-v-schakel input:checked { background: var(--pri); border-color: var(--pri); }
.ai-v-schakel input:checked::before { transform: translateX(16px); }
.ai-v-schakel input:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring); }
.ai-v-schakel input:disabled { opacity: .45; cursor: default; }
.ai-v-schakel:has(input:disabled) { cursor: default; }
/* Alles aan of uit, in de kop van elke kolom (20 okt). De kop blijft één regel: titel met telling links, de schakelaar rechts. */
.ai-v-kolom-kop { align-items: center; }
.ai-v-kolom-kop:has(.ai-v-kolom-alles) { padding-top: 4px; padding-bottom: 4px; }
.ai-v-kolom-titel { min-width: 0; }
.ai-v-kolom-kop .ai-v-kolom-alles { width: auto; flex: none; gap: 8px; font-weight: 400; font-size: 12.5px; color: var(--text-2); }
.ai-v-bewerk .ai-v-actions, .ai-v-nieuw-inhoud .ai-v-actions { display: flex; justify-content: flex-end; gap: 8px; margin: 12px 0 0; }
.ai-v-bewerk .ai-v-confirm .ai-v-actions { justify-content: flex-start; margin: 0; }
.ai-v-klaar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 12px; padding: 10px 14px; border: 1px solid var(--border-2); border-left: 3px solid var(--pri); border-radius: var(--r); background: var(--surface-2); font-size: 13.5px; }
.ai-v-klaar p { margin: 0; }
@media (max-width: 640px) {
  .acc-kop { display: none; }
  .acc-raster { display: block; }
  .acc-raster.acc--lijst .acc-inhoud { display: none; }
  .acc-raster:not(.acc--lijst) .acc-nav { display: none; }
  .acc-nav { position: static; }
  .acc-nav .acc-wie-lijst { display: flex; padding: 4px 2px 16px; }
  .acc-nav-lijst { gap: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--sh); overflow: hidden; }
  .acc-nav-lijst li + li { border-top: 1px solid var(--border); }
  .acc-nav-item, .acc-nav-item.is-actief { min-height: 68px; padding: 12px 14px; border-radius: 0; gap: 12px; background: var(--surface); color: var(--text); }
  .acc-nav-ic { width: 32px; height: 32px; align-items: center; justify-content: center; border-radius: var(--r); font-size: 17px; }
  .acc-ic-profiel { background: var(--pri-soft); color: var(--pri-text); }
  .acc-ic-beveiliging { background: var(--green-soft); color: var(--green-strong); }
  .acc-ic-meldingen { background: var(--blue-soft); color: var(--blue-text); }
  .acc-ic-ai-verbindingen { background: var(--violet-soft); color: var(--violet-text); }
  .acc-nav-titel { font-size: 16px; font-weight: 600; }
  .acc-nav-sub { display: block; font-size: 13px; color: var(--text-2); font-weight: 400; }
  .acc-nav .tag { display: inline-flex; flex: none; }
  .acc-nav-pijl { display: inline-flex; color: var(--text-3); flex: none; }
  .acc-nav .acc-uitlog { display: flex; width: 100%; justify-content: center; min-height: 48px; margin-top: 16px; }

  .acc-terug-rij { display: flex; align-items: center; gap: 4px; margin: -4px 0 12px -10px; }
  .acc-terug { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: var(--r); color: var(--text-2); font-size: 20px; }
  .acc-terug:hover { background: var(--sunken); text-decoration: none; }
  .acc-titel { font-size: 20px; }

  .acc-wie { padding: 14px 16px; flex-wrap: wrap; }
  .acc-wie-tags { justify-content: flex-start; flex-basis: 100%; padding-left: 54px; }
  .acc-veldrij { grid-template-columns: 1fr; gap: 6px; padding: 14px 16px; }
  .acc-veld-l { padding-top: 0; }
  .acc-veld { max-width: none; }
  .acc-voet { padding: 12px 16px; }
  .acc-voet .btn { flex: 1; justify-content: center; min-height: 44px; }
  .acc-pw { grid-template-columns: 1fr; grid-template-areas: "velden" "eisen" "acties"; gap: 14px; padding: 16px; }
  .acc-pw-knop { width: 100%; justify-content: center; min-height: 48px; }
  .acc-rij { flex-wrap: wrap; }
  .acc-keuze { min-width: 0; width: 100%; min-height: 44px; }
  .acc-rij-bed:has(.acc-keuze) { flex-basis: 100%; }
  .acc-mld-tabel th, .acc-mld-tabel td { padding: 10px 12px; }
  .acc-mld-tabel th[scope="col"]:not(:first-child), .acc-mld-tabel td { width: 64px; }
  .tweestap--kaart .list-add { grid-template-columns: 1fr; }
  .tweestap--kaart .list-add .btn { min-height: 44px; justify-content: center; }

  .ai-v-intro { padding: 14px 16px; gap: 12px; }
  .ai-v-vera { width: 64px; height: 64px; }
  .ai-v-intro-tekst h3 { display: none; }
  .ai-v-nieuw-knop { display: none; }
  .ai-v-kaart { padding: 14px 16px; }
  .ai-v-kaart-kop { flex-direction: column; gap: 12px; }
  .ai-v-kaart-acties { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ai-v-kaart-acties .btn { justify-content: center; min-height: 44px; }
  .ai-v-kolommen { grid-template-columns: 1fr; }
  .ai-v-schakel { min-height: 44px; }
  .ai-v-chip { min-height: 44px; }
  .ai-v-bewerk .ai-v-actions, .ai-v-nieuw-inhoud .ai-v-actions { flex-direction: column-reverse; }
  .ai-v-bewerk .ai-v-actions .btn, .ai-v-nieuw-inhoud .ai-v-actions .btn { width: 100%; justify-content: center; min-height: 48px; }
  .ai-v-klaar { flex-direction: column; align-items: stretch; }
  .ai-v-klaar .btn { min-height: 44px; justify-content: center; }
  .ai-v-voet { flex-direction: column-reverse; }
  .ai-v-voet .btn { width: 100%; justify-content: center; min-height: 48px; }
  .ai-v-nieuw-onder { display: flex; }
  .ai-v-nieuw-inhoud { padding: 14px 16px; }
}
