
  :root{
    --bg:#EEF3F6;
    --panel:#FFFFFF;
    --ink:#16222C;
    --ink-soft:#5B6B78;
    --ink-faint:#8B99A5;
    --line:#D7E1E8;
    --line-soft:#E6EDF2;
    --ice:#1E6E8C;
    --ice-deep:#123B4D;
    --ice-tint:#E4F1F6;
    --amber:#DB9A3C;
    --amber-deep:#A9701E;
    --amber-tint:#FBF0DD;
    --good:#3C8858;
    --good-tint:#E4F3E9;
    --warn:#C6533F;
    --warn-tint:#FBE7E3;
    --mid:#C98A2E;
    --mid-tint:#FBF0DD;
    --radius:8px;
    --shadow:0 1px 2px rgba(18,59,77,0.06), 0 4px 16px rgba(18,59,77,0.06);
  }
  .wep-scope *{box-sizing:border-box;}
  .wep-scope{
    background:var(--bg);
    color:var(--ink);
    font-family:'IBM Plex Sans', -apple-system, sans-serif;
    font-size:14px;
    line-height:1.5;
    -webkit-font-smoothing:antialiased;
    display:block;
  }
  .wep-scope h1,.wep-scope h2,.wep-scope h3{font-family:'Fraunces', Georgia, serif; margin:0; letter-spacing:-0.01em;}
  .wep-scope button{font-family:inherit; cursor:pointer;}
  .wep-scope input,.wep-scope select,.wep-scope textarea{font-family:inherit; font-size:13.5px; color:var(--ink);}
  .wep-scope ::selection{background:var(--ice-tint);}
  .wep-scope a{color:var(--ice-deep);}

  .wep-scope #app{max-width:1180px; margin:0 auto; padding:28px 24px 80px;}

  
  .wep-scope .topbar{display:flex; justify-content:space-between; align-items:flex-end; gap:20px; flex-wrap:wrap; margin-bottom:22px;}
  .wep-scope .brand h1{font-size:30px; font-weight:600; color:var(--ice-deep);}
  .wep-scope .brand .tag{margin:5px 0 0; color:var(--ink-soft); font-size:13.5px;}
  .wep-scope .topbar-actions{display:flex; gap:10px; align-items:center;}
  .wep-scope .btn{
    border:1px solid var(--line); background:var(--panel); color:var(--ink);
    padding:9px 14px; border-radius:var(--radius); font-size:13.5px; font-weight:500;
    transition:border-color .15s, background .15s;
  }
  .wep-scope .btn:hover{border-color:var(--ice); background:var(--ice-tint);}
  .wep-scope .btn-primary{background:var(--ice-deep); color:#fff; border-color:var(--ice-deep);}
  .wep-scope .btn-primary:hover{background:var(--ice); border-color:var(--ice);}
  .wep-scope .btn-danger{color:var(--warn); border-color:var(--line);}
  .wep-scope .btn-danger:hover{background:var(--warn-tint); border-color:var(--warn);}
  .wep-scope .btn-ghost{border-color:transparent; background:transparent; padding:9px 10px;}
  .wep-scope .btn-ghost:hover{background:var(--line-soft);}
  .wep-scope .btn-sm{padding:6px 10px; font-size:12.5px;}

  
  .wep-scope .stats{display:grid; grid-template-columns:repeat(auto-fit, minmax(160px,1fr)); gap:1px; background:var(--line); border:1px solid var(--line); border-radius:var(--radius); overflow:hidden; margin-bottom:20px;}
  .wep-scope .stat{background:var(--panel); padding:16px 18px;}
  .wep-scope .stat .num{font-family:'Fraunces', serif; font-size:26px; font-weight:600; color:var(--ice-deep); line-height:1;}
  .wep-scope .stat .lbl{color:var(--ink-soft); font-size:12.5px; margin-top:5px;}

  
  .wep-scope .toolbar{display:flex; flex-wrap:wrap; gap:10px; align-items:center; margin-bottom:18px;}
  .wep-scope .toolbar input[type=text], .wep-scope #searchInput{
    flex:1; min-width:220px; padding:9px 12px; border:1px solid var(--line); border-radius:var(--radius); background:var(--panel);
  }
  .wep-scope #searchInput:focus, .wep-scope input:focus, .wep-scope select:focus, .wep-scope textarea:focus{outline:2px solid var(--ice); outline-offset:1px;}
  .wep-scope .toolbar label.chk{display:flex; align-items:center; gap:6px; color:var(--ink-soft); font-size:13px; white-space:nowrap;}
  .wep-scope .export-buttons{display:flex; gap:8px; flex-wrap:wrap;}
  .wep-scope .import-label{position:relative; overflow:hidden;}

  
  .wep-scope .grid{display:flex; flex-direction:column; gap:10px;}
  .wep-scope .card{
    background:var(--panel); border:1px solid var(--line); border-radius:var(--radius);
    padding:14px 16px; display:flex; align-items:center; gap:16px; flex-wrap:wrap;
  }
  .wep-scope .card-date{min-width:92px;}
  .wep-scope .card-date .d{font-family:'Fraunces', serif; font-size:19px; font-weight:600; color:var(--ice-deep);}
  .wep-scope .card-date .w{color:var(--ink-faint); font-size:12px; text-transform:capitalize;}
  .wep-scope .card-main{flex:1; min-width:200px;}
  .wep-scope .card-main .naam{font-weight:600; font-size:14.5px;}
  .wep-scope .card-main .meta{color:var(--ink-soft); font-size:12.5px; margin-top:2px;}
  .wep-scope .card-comm{display:flex; gap:5px; align-items:center;}
  .wep-scope .dot{width:9px; height:9px; border-radius:50%; display:inline-block; background:var(--line);}
  .wep-scope .dot.good{background:var(--good);}
  .wep-scope .dot.mid{background:var(--mid);}
  .wep-scope .dot.bad{background:var(--ink-faint);}
  .wep-scope .card-tickets{font-size:12.5px; color:var(--ink-soft); min-width:150px;}
  .wep-scope .card-progress{display:flex; align-items:center; gap:8px; min-width:150px;}
  .wep-scope .bar{flex:1; height:7px; border-radius:4px; background:var(--line-soft); overflow:hidden;}
  .wep-scope .bar > span{display:block; height:100%; border-radius:4px;}
  .wep-scope .bar.good > span{background:var(--good);}
  .wep-scope .bar.mid > span{background:var(--mid);}
  .wep-scope .bar.bad > span{background:var(--warn);}
  .wep-scope .pct{font-size:12.5px; font-weight:600; color:var(--ink-soft); width:34px; text-align:right;}
  .wep-scope .card-actions{display:flex; gap:6px;}
  .wep-scope .empty-state{
    border:1px dashed var(--line); border-radius:var(--radius); padding:40px 20px; text-align:center; color:var(--ink-soft); background:var(--panel);
  }

  
  .wep-scope [hidden]{display:none !important;}
  .wep-scope .detail{
    background:var(--panel); border:1px solid var(--line); border-radius:12px; box-shadow:var(--shadow);
    display:flex; flex-direction:column;
  }
  .wep-scope .readonly-banner{
    background:var(--amber-tint, #FBF0DD); color:var(--amber-deep, #A9701E); padding:10px 22px;
    font-size:13px; display:flex; align-items:center; gap:14px; border-top-left-radius:12px; border-top-right-radius:12px;
  }
  .wep-scope .readonly-banner .btn{margin-left:auto;}
  .wep-scope .detail-head{
    padding:18px 22px; border-bottom:1px solid var(--line); display:grid;
    grid-template-columns:auto 1fr auto; align-items:center; gap:18px;
  }
  .wep-scope .detail-back{flex-shrink:0; white-space:nowrap;}
  .wep-scope .detail-title h2{font-size:19px; font-weight:600;}
  .wep-scope .detail-title .sub{color:var(--ink-soft); font-size:12.5px; margin-top:3px;}
  .wep-scope .detail-overall{display:flex; align-items:center; gap:10px; min-width:150px; justify-self:end;}
  .wep-scope .detail-overall .ring-pct{font-family:'Fraunces', serif; font-size:22px; font-weight:600;}
  .wep-scope .save-status{font-size:11.5px; color:var(--ink-faint); margin-top:4px;}
  .wep-scope .detail-body{display:flex; align-items:flex-start; gap:0;}
  .wep-scope .tabs-nav{
    display:flex; flex-direction:column; gap:1px; padding:14px 10px; min-width:220px; flex-shrink:0;
    border-right:1px solid var(--line); position:sticky; top:0; align-self:stretch;
  }
  .wep-scope .tab-btn{
    border:none; background:transparent; padding:9px 12px; border-radius:6px; font-size:13px; color:var(--ink-soft);
    display:flex; align-items:center; gap:9px; white-space:nowrap; text-align:left; width:100%;
  }
  .wep-scope .tab-btn:hover{background:var(--line-soft);}
  .wep-scope .tab-btn.active{color:var(--ice-deep); font-weight:600; background:var(--ice-tint);}
  .wep-scope .tab-btn .tdot{width:7px; height:7px; border-radius:50%; flex-shrink:0;}
  .wep-scope .modal-body{padding:20px 24px 26px; overflow-y:auto; flex:1; min-width:0;}
  .wep-scope .tab-panel{display:none;}
  .wep-scope .tab-panel.active{display:block;}
  .wep-scope .field-row{display:grid; grid-template-columns:repeat(auto-fit, minmax(160px,1fr)); gap:14px; margin-bottom:14px;}
  .wep-scope .field{display:flex; flex-direction:column; gap:5px;}
  .wep-scope .field label{font-size:12px; color:var(--ink-soft); font-weight:500;}
  .wep-scope .field input[type=text], .wep-scope .field input[type=time], .wep-scope .field input[type=date], .wep-scope .field input[type=number], .wep-scope .field select, .wep-scope .field textarea{
    padding:8px 10px; border:1px solid var(--line); border-radius:6px; background:#fbfcfd; width:100%;
  }
  .wep-scope .field textarea{resize:vertical; min-height:52px;}
  .wep-scope .checkgroup{display:flex; flex-wrap:wrap; gap:12px;}
  .wep-scope .checkgroup label{display:flex; align-items:center; gap:6px; font-size:13px; padding:6px 10px; border:1px solid var(--line); border-radius:6px; background:#fbfcfd;}
  .wep-scope .checkgroup label:has(input:checked){border-color:var(--ice); background:var(--ice-tint); color:var(--ice-deep);}
  .wep-scope .radio-row{display:flex; gap:14px;}
  .wep-scope .radio-row label{display:flex; align-items:center; gap:6px; font-size:13px;}
  .wep-scope h3.section-title{font-size:13.5px; font-weight:600; color:var(--ink); margin:22px 0 10px; padding-top:14px; border-top:1px solid var(--line-soft);}
  .wep-scope h3.section-title:first-child{margin-top:0; padding-top:0; border-top:none;}
  .wep-scope table.rows-table{width:100%; border-collapse:collapse; margin-bottom:8px;}
  .wep-scope table.rows-table th{text-align:left; font-size:11.5px; color:var(--ink-faint); font-weight:600; padding:0 8px 6px; text-transform:none;}
  .wep-scope table.rows-table td{padding:3px 8px 3px 0; vertical-align:middle;}
  .wep-scope table.rows-table td input, .wep-scope table.rows-table td select{padding:7px 9px; border:1px solid var(--line); border-radius:6px; background:#fbfcfd; width:100%;}
  .wep-scope table.rows-table .col-del{width:28px; padding-right:0;}
  .wep-scope .table-scroll{overflow-x:auto; margin-bottom:8px;}
  .wep-scope .table-scroll table.rows-table{min-width:640px;}
  .wep-scope .row-del{border:none; background:transparent; color:var(--ink-faint); font-size:13px; padding:4px 6px; border-radius:5px;}
  .wep-scope .row-del:hover{color:var(--warn); background:var(--warn-tint);}
  .wep-scope .row-add{border:1px dashed var(--line); background:transparent; color:var(--ice-deep); font-size:12.5px; padding:7px 12px; border-radius:6px; margin-top:2px;}
  .wep-scope .row-add:hover{background:var(--ice-tint); border-color:var(--ice);}
  .wep-scope .stringline{display:flex; align-items:center; gap:8px; margin-bottom:8px;}
  .wep-scope .stringline span{color:var(--ink-faint); font-size:12px; width:16px;}
  .wep-scope .comm-grid{display:grid; grid-template-columns:repeat(auto-fit, minmax(210px,1fr)); gap:12px;}
  .wep-scope .comm-card{border:1px solid var(--line); border-radius:8px; padding:12px 14px; background:#fbfcfd;}
  .wep-scope .comm-card h4{font-size:13.5px; margin:0 0 8px; font-weight:600;}
  .wep-scope .ticket-summary{display:grid; grid-template-columns:repeat(auto-fit, minmax(130px,1fr)); gap:1px; background:var(--line); border:1px solid var(--line); border-radius:8px; overflow:hidden; margin:10px 0 16px;}
  .wep-scope .ticket-summary div{background:var(--amber-tint); padding:10px 12px;}
  .wep-scope .ticket-summary .n{font-family:'Fraunces', serif; font-size:18px; font-weight:600; color:var(--amber-deep);}
  .wep-scope .ticket-summary .l{font-size:11.5px; color:var(--ink-soft); margin-top:2px;}
  .wep-scope .modal-foot{padding:14px 22px; border-top:1px solid var(--line); display:flex; justify-content:space-between; align-items:center;}
  .wep-scope .toast{
    position:fixed; bottom:22px; left:50%; transform:translateX(-50%) translateY(20px); background:var(--ice-deep); color:#fff;
    padding:10px 18px; border-radius:8px; font-size:13px; opacity:0; pointer-events:none; transition:opacity .2s, transform .2s; z-index:100;
  }
  .wep-scope .toast.show{opacity:1; transform:translateX(-50%) translateY(0);}
  .wep-scope .toast.err{background:var(--warn);}
  .wep-scope .hoogtepunt-card{border:1px dashed var(--ice); border-radius:8px; padding:14px 16px; margin-bottom:14px; background:var(--ice-tint);}
  .wep-scope .hoogtepunt-card h4{font-size:13.5px; margin:0 0 10px; font-weight:600; color:var(--ice-deep);}
  .wep-scope .hp-thumb-wrap{display:flex; flex-direction:column; align-items:flex-start; gap:6px;}
  .wep-scope .hp-thumb{max-width:180px; max-height:120px; border-radius:6px; display:block; object-fit:cover; border:1px solid var(--line);}
  @media (max-width:780px){
    .wep-scope .detail-head{grid-template-columns:1fr; justify-items:start;}
    .wep-scope .detail-overall{justify-self:start;}
    .wep-scope .detail-body{flex-direction:column; align-items:stretch;}
    .wep-scope .modal-body{max-width:100%;}
    /* Op een telefoon wordt de verticale tabs-lijst een horizontaal scrollbare rij "pillen" —
       zo blijft alle tabs binnen één tik bereikbaar (i.p.v. eerst een dropdown moeten openen)
       en zie je meteen dat er meer tabs zijn om naar te scrollen. */
    .wep-scope .tabs-nav{
      flex-direction:row; flex-wrap:nowrap; gap:8px; padding:12px 16px; min-width:0;
      border-right:none; border-bottom:1px solid var(--line); position:static;
      overflow-x:auto; -webkit-overflow-scrolling:touch; scrollbar-width:none; -ms-overflow-style:none;
    }
    .wep-scope .tabs-nav::-webkit-scrollbar{display:none; height:0;}
    .wep-scope .tab-btn{
      flex-shrink:0; width:auto; padding:8px 14px; border-radius:20px; border:1px solid var(--line);
      background:#fbfcfd;
    }
    .wep-scope .tab-btn.active{border-color:var(--ice-deep);}
  }
  @media (max-width:640px){
    .wep-scope #app{padding:18px 12px 60px;}
    .wep-scope .card{flex-direction:column; align-items:stretch;}
    .wep-scope .card-progress{min-width:0;}
    /* Import/export/CSV-knoppen zijn bureau-taken (bestanden kiezen/downloaden) — op een
       telefoon nemen ze alleen maar veel ruimte in zonder praktisch nut. */
    .wep-scope .export-buttons{display:none;}
    /* iOS Safari zoomt automatisch in op een invoerveld met font-size < 16px. */
    .wep-scope input, .wep-scope select, .wep-scope textarea{font-size:16px;}
  }
