* { box-sizing: border-box; margin: 0; padding: 0; }

    :root {
      --c-header: #1E3A6E;
      --c-accent: #2E6DB4;
      --c-bg: #EEF3FA;
      --c-bg2: #E6EEF8;
      --c-border: #D0DCF0;
      --c-dim: #4A6A90;
    }

    body {
      font-family: 'Segoe UI', Arial, sans-serif;
      background: var(--c-bg);
      color: #1A2A3A;
      min-height: 100vh;
      font-size: 15px;
    }

    /* ── Login overlay ── */
    #login-overlay {
      position: fixed; inset: 0;
      background: #EEF3FA;
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 999;
    }

    .login-box {
      background: white;
      border-radius: 16px;
      padding: 36px 32px;
      width: 100%;
      max-width: 380px;
      box-shadow: 0 4px 24px rgba(30,58,110,0.12);
    }

    .login-box h1 {
      font-size: 1.4rem;
      font-weight: 700;
      color: var(--c-header);
      margin-bottom: 6px;
    }

    .login-box p {
      font-size: 0.85rem;
      color: #888;
      margin-bottom: 24px;
    }

    .login-tabs {
      display: flex;
      border-bottom: 2px solid var(--c-border);
      margin-bottom: 20px;
    }

    .login-tab {
      flex: 1;
      padding: 8px;
      text-align: center;
      cursor: pointer;
      font-size: 0.9rem;
      font-weight: 600;
      color: #888;
      border-bottom: 3px solid transparent;
      margin-bottom: -2px;
      transition: all 0.15s;
    }

    .login-tab.actief {
      color: var(--c-accent);
      border-bottom-color: var(--c-accent);
    }

    .login-veld {
      margin-bottom: 14px;
    }

    .login-veld label {
      display: block;
      font-size: 0.78rem;
      font-weight: 700;
      color: #888;
      text-transform: uppercase;
      letter-spacing: 0.4px;
      margin-bottom: 5px;
    }

    .login-veld input {
      width: 100%;
      border: 2px solid var(--c-border);
      border-radius: 8px;
      padding: 10px 12px;
      font-size: 0.95rem;
      font-family: inherit;
      color: #1A2A3A;
      background: #FAFCFF;
      transition: border-color 0.15s;
    }

    .login-veld input:focus {
      outline: none;
      border-color: var(--c-accent);
      background: white;
    }

    .login-fout {
      background: #FDECEA;
      color: #B03A2E;
      border-radius: 8px;
      padding: 10px 12px;
      font-size: 0.85rem;
      margin-bottom: 14px;
      display: none;
    }

    .btn-login {
      width: 100%;
      background: var(--c-accent);
      color: white;
      border: none;
      border-radius: 8px;
      padding: 12px;
      font-size: 1rem;
      font-weight: 600;
      cursor: pointer;
      font-family: inherit;
      transition: opacity 0.15s;
    }

    .btn-login:hover { opacity: 0.88; }
    .btn-login:disabled { opacity: 0.5; cursor: default; }

    /* ── Header ── */
    header {
      background: var(--c-header);
      color: white;
      padding: 14px 20px;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    header h1 { font-size: 1.1rem; font-weight: 600; }
    header p  { font-size: 0.8rem; opacity: 0.7; margin-top: 2px; }

    .btn-uitloggen {
      background: rgba(255,255,255,0.15);
      color: white;
      border: none;
      border-radius: 6px;
      padding: 7px 14px;
      font-size: 0.82rem;
      font-weight: 600;
      cursor: pointer;
      font-family: inherit;
      transition: background 0.15s;
      white-space: nowrap;
    }

    .btn-uitloggen:hover { background: rgba(255,255,255,0.25); }

    /* ── Tabs ── */
    .tabs {
      background: var(--c-header);
      display: flex;
      gap: 2px;
      padding: 0 20px;
    }

    .tab {
      padding: 10px 20px;
      color: rgba(255,255,255,0.6);
      cursor: pointer;
      font-size: 0.9rem;
      font-weight: 600;
      border-bottom: 3px solid transparent;
      transition: all 0.15s;
    }

    .tab.actief { color: white; border-bottom-color: white; }

    .panel { display: none; }
    .panel.actief { display: block; }

    .container {
      max-width: 700px;
      margin: 0 auto;
      padding: 22px 16px;
    }

    /* ── Kaart ── */
    .kaart {
      background: white;
      border-radius: 12px;
      padding: 20px;
      margin-bottom: 20px;
      box-shadow: 0 1px 8px rgba(30,58,110,0.08);
    }

    .kaart h2 {
      font-size: 1rem;
      font-weight: 700;
      color: var(--c-accent);
      margin-bottom: 16px;
      padding-bottom: 10px;
      border-bottom: 2px solid var(--c-border);
    }

    /* ── Formulier ── */
    .veld-rij { display: flex; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
    .veld { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 130px; }
    .veld.breed { flex: 2; }

    label {
      font-size: 0.75rem;
      font-weight: 700;
      color: #888;
      text-transform: uppercase;
      letter-spacing: 0.4px;
    }

    input[type="date"],
    input[type="time"],
    input[type="text"],
    select {
      border: 2px solid var(--c-border);
      border-radius: 8px;
      padding: 9px 11px;
      font-size: 0.95rem;
      color: #1A2A3A;
      background: #FAFCFF;
      font-family: inherit;
      width: 100%;
      transition: border-color 0.15s;
    }

    input:focus, select:focus {
      outline: none;
      border-color: var(--c-accent);
      background: white;
    }

    .knop-rij {
      display: flex;
      gap: 8px;
      justify-content: flex-end;
      margin-top: 4px;
    }

    button {
      border: none;
      border-radius: 8px;
      padding: 10px 20px;
      font-size: 0.9rem;
      font-weight: 600;
      cursor: pointer;
      transition: opacity 0.15s, transform 0.1s;
      font-family: inherit;
    }

    button:hover { opacity: 0.85; }
    button:active { transform: scale(0.97); }

    .btn-primair   { background: var(--c-accent); color: white; }
    .btn-secundair { background: #EAECEF; color: #444; }
    .btn-danger    { background: #FDECEA; color: #B03A2E; }
    .btn-sm        { padding: 6px 14px; font-size: 0.82rem; }

    /* ── Sectie label ── */
    .sectie-label {
      font-size: 0.78rem;
      font-weight: 700;
      color: #999;
      text-transform: uppercase;
      letter-spacing: 0.8px;
      margin-bottom: 8px;
      margin-top: 4px;
    }

    /* ── Afspraken lijst ── */
    .afspraak-item {
      background: white;
      border-radius: 10px;
      padding: 12px 14px;
      margin-bottom: 8px;
      box-shadow: 0 1px 4px rgba(30,58,110,0.07);
      display: flex;
      align-items: center;
      gap: 12px;
      border-left: 4px solid var(--c-accent);
    }

    .afspraak-item.verleden  { opacity: 0.45; border-left-color: #CCC; }
    .afspraak-item.herhaling { border-left-style: dashed; }

    .contact-foto-klein {
      width: 38px; height: 38px;
      border-radius: 50%; object-fit: cover;
      flex-shrink: 0; border: 2px solid var(--c-border);
    }

    .contact-initiaal {
      width: 38px; height: 38px;
      border-radius: 50%;
      background: var(--c-bg2); color: var(--c-dim);
      display: flex; align-items: center; justify-content: center;
      font-weight: 700; font-size: 1rem; flex-shrink: 0;
    }

    .afspraak-datum-tijd { min-width: 90px; }
    .afspraak-datum-tijd strong {
      display: block; font-size: 1rem;
      color: var(--c-accent); font-weight: 700;
    }

    .afspraak-datum-txt { font-size: 0.78rem; color: #888; }

    .herhaling-badge {
      font-size: 0.7rem;
      background: var(--c-bg2); color: var(--c-dim);
      padding: 1px 6px; border-radius: 4px;
      display: inline-block; margin-top: 2px;
    }

    .afspraak-naam { flex: 1; font-size: 0.95rem; font-weight: 600; }
    .afspraak-contact-naam { font-size: 0.78rem; color: #888; margin-top: 2px; }
    .acties { display: flex; gap: 6px; flex-shrink: 0; }

    /* ── Contacten ── */
    .contact-kaart {
      display: flex; align-items: center; gap: 14px;
      background: white; border-radius: 10px;
      padding: 12px 14px; margin-bottom: 8px;
      box-shadow: 0 1px 4px rgba(30,58,110,0.07);
    }

    .contact-foto {
      width: 52px; height: 52px;
      border-radius: 50%; object-fit: cover;
      border: 2px solid var(--c-border);
    }

    .contact-initiaal-groot {
      width: 52px; height: 52px; border-radius: 50%;
      background: var(--c-bg2); color: var(--c-dim);
      display: flex; align-items: center; justify-content: center;
      font-weight: 700; font-size: 1.3rem; flex-shrink: 0;
    }

    .contact-naam { flex: 1; font-size: 1rem; font-weight: 600; }

    #foto-preview {
      width: 70px; height: 70px; border-radius: 50%;
      object-fit: cover; display: none;
      border: 3px solid var(--c-border); margin-bottom: 10px;
    }

    /* ── Instellingen ── */
    .instelling-sectie { margin-bottom: 24px; }

    /* Schermcode animaties */
    #schermcode-display, #schermcode-actief {
      transition: opacity 0.4s, transform 0.4s;
    }
    @keyframes scherm-actief-in {
      from { opacity: 0; transform: scale(0.95); }
      to   { opacity: 1; transform: scale(1); }
    }
    #schermcode-actief.zichtbaar {
      animation: scherm-actief-in 0.5s cubic-bezier(0.34,1.56,0.64,1);
    }
    .instelling-sectie h3 {
      font-size: 0.85rem; font-weight: 700; color: #888;
      text-transform: uppercase; letter-spacing: 0.6px; margin-bottom: 12px;
    }

    .thema-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }

    .thema-knop {
      border: 2px solid var(--c-border); border-radius: 10px;
      padding: 14px 12px; cursor: pointer; background: white;
      display: flex; align-items: center; gap: 10px;
      font-family: inherit; font-size: 0.9rem; font-weight: 600;
      color: #333; transition: all 0.15s;
    }

    .thema-knop.geselecteerd { border-color: var(--c-accent); background: var(--c-bg2); }
    .thema-dot { width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0; }

    .grootte-rij { display: flex; gap: 8px; flex-wrap: wrap; }

    .grootte-knop {
      border: 2px solid var(--c-border); border-radius: 8px;
      padding: 10px 16px; cursor: pointer; background: white;
      font-family: inherit; font-weight: 600; color: #333; transition: all 0.15s;
    }

    .grootte-knop.geselecteerd { border-color: var(--c-accent); background: var(--c-bg2); color: var(--c-accent); }

    .leeg-melding {
      text-align: center; color: #AAA;
      font-style: italic; padding: 20px; font-size: 0.9rem;
    }

    /* ── Mobiel ── */
    @media (max-width: 640px) {
      body { font-size: 14px; }

      /* Header */
      header { padding: 10px 14px; gap: 8px; }
      header h1 { font-size: 0.95rem; }
      header p  { font-size: 0.72rem; }
      .btn-uitloggen { padding: 6px 10px; font-size: 0.75rem; }

      /* Tabs scrollbaar */
      .tabs { overflow-x: auto; padding: 0 10px; gap: 0; -webkit-overflow-scrolling: touch; }
      .tab  { white-space: nowrap; padding: 10px 14px; font-size: 0.82rem; flex-shrink: 0; }

      /* Container */
      .container { padding: 14px 10px; }

      /* Formulier: alles onder elkaar */
      .veld-rij { flex-direction: column; gap: 8px; }
      .veld { min-width: 0; }
      .knop-rij { flex-wrap: wrap; }
      .knop-rij button { flex: 1; min-width: 120px; }

      /* Afspraak items */
      .afspraak-item { flex-wrap: wrap; gap: 8px; }
      .afspraak-datum-tijd { min-width: 0; width: 100%; border-bottom: 1px solid var(--c-border); padding-bottom: 6px; }
      .acties { margin-left: auto; }

      /* Contact kaarten */
      .contact-kaart { flex-wrap: wrap; }

      /* Thema grid: 1 kolom op heel smal */
      .thema-grid { grid-template-columns: 1fr 1fr; }

      /* Login */
      .login-box { padding: 28px 20px; }
    }

    /* ── Bevestigingsmodal ── */
    #bevestig-overlay {
      display: none; position: fixed; inset: 0;
      background: rgba(0,0,0,0.45); z-index: 500;
      align-items: center; justify-content: center;
    }
    #bevestig-overlay.open { display: flex; }
    #bevestig-box {
      background: white; border-radius: 16px;
      padding: 28px 24px; width: 90%; max-width: 340px;
      text-align: center; box-shadow: 0 8px 40px rgba(0,0,0,0.22);
    }
    #bevestig-tekst { font-size: 1rem; font-weight: 600; color: #1A2A3A; margin-bottom: 20px; }
    #bevestig-knoppen { display: flex; gap: 10px; }
    #bevestig-knoppen button { flex: 1; }

    /* ── Kloktype knoppen ── */
    .kloktype-rij { display: flex; gap: 8px; flex-wrap: wrap; }
    .kloktype-knop {
      border: 2px solid var(--c-border); border-radius: 8px;
      padding: 10px 16px; cursor: pointer; background: white;
      font-family: inherit; font-size: 0.9rem; font-weight: 600;
      color: #333; transition: all 0.15s;
    }
    .kloktype-knop.geselecteerd { border-color: var(--c-accent); background: var(--c-bg2); color: var(--c-accent); }

    /* ── Verborgen veld ── */
    .veld.verborgen { display: none; }

    /* ── Toast ── */
    #toast {
      position: fixed; bottom: 20px; left: 50%;
      transform: translateX(-50%) translateY(70px);
      background: #1A2A3A; color: white;
      padding: 11px 22px; border-radius: 30px;
      font-size: 0.88rem; font-weight: 500;
      transition: transform 0.25s ease; z-index: 998; pointer-events: none;
    }

    #toast.zichtbaar { transform: translateX(-50%) translateY(0); }
