/* SafeFlight theme 2026-11 – gedeelde look (ook bruikbaar voor PreFlight en CrewPilot).
   Laad NA app.css.  Iconen: templates/_icons.html (Lucide, ISC-licentie, inline SVG).  Login-wachtwoordoog: static/login.js */
/* ===== Redesign 2026-11 (login met foto, navy zijbalk met iconen, witte topbalk, KPI-badges) ===== */
:root{--side:#1F2226;--side2:#2A2E33;--pillbg:#3A3F46;--accent:#4C8DF6}
body{font-family:"Segoe UI",Inter,Roboto,Arial,"Liberation Sans",Helvetica,sans-serif}
.ico{width:20px;height:20px;flex:0 0 20px;display:block}
/* zijbalk: donkergrijs, witte tekst en iconen, actief item lichtere grijze pil met merkblauw icoon */
.sidebar{width:248px;flex:0 0 248px;background-color:var(--side);background-image:linear-gradient(180deg,#26292E 0%,#1F2226 45%,#1A1C20 100%);border-right:0;padding:0 12px 14px;box-shadow:inset -1px 0 0 rgba(255,255,255,.04)}
.sidebar .brand{display:flex;align-items:center;height:64px;padding:0 8px 0 20px;margin:0 -12px 12px;border-bottom:1px solid rgba(255,255,255,.07)}
.sidebar .logo{height:34px}
.sidebar .nav{gap:3px}
.sidebar .nav a{position:relative;display:flex;align-items:center;gap:12px;font-size:14.5px;font-weight:600;padding:9px 12px;border-radius:10px;color:#fff;transition:background .15s,transform .15s}
.sidebar .nav a .ico{color:#fff;opacity:.92}
.sidebar .nav a:hover{background:rgba(255,255,255,.07)}
.sidebar .nav a:hover .ico{opacity:1}
.sidebar .nav a.on{background:var(--pillbg);box-shadow:0 1px 0 rgba(255,255,255,.06) inset,0 4px 14px rgba(0,0,0,.25)}
.sidebar .nav a.on::before{content:"";position:absolute;left:-12px;top:8px;bottom:8px;width:4px;border-radius:0 4px 4px 0;background:var(--accent)}
.sidebar .nav a.on .ico{color:#5B9BFF;opacity:1}
.sidebar .me{border-top:1px solid rgba(255,255,255,.08);padding:12px 4px 0;gap:6px}
.sidebar .me a,.sidebar .me button{display:flex;align-items:center;gap:10px;font-size:13.5px;padding:7px 8px;border-radius:8px;text-align:left;color:#fff}
.sidebar .me a:hover,.sidebar .me button:hover{background:rgba(255,255,255,.07)}
.sidebar .me button{border:0;background:transparent;font-weight:600}
.sidebar .me .ico{width:18px;height:18px;flex-basis:18px;color:#fff;opacity:.85}
/* topbalk */
.mobar{display:none!important}
.topbar{position:sticky;top:0;z-index:20;height:64px;display:flex;align-items:center;gap:14px;padding:0 22px;background:#fff;border-bottom:1px solid #E3E8F0;box-shadow:0 1px 3px rgba(20,32,79,.04)}
.tb-brand{display:flex;align-items:center;gap:14px;min-width:0;text-decoration:none}
.tb-brand .tb-sf{display:none;height:30px;width:auto}
.tb-brand .tb-pc{height:34px;width:auto;display:block}
.tb-search{margin-left:auto;position:relative;width:min(340px,34vw)}
.tb-search .ico{position:absolute;left:13px;top:50%;transform:translateY(-50%);width:17px;height:17px;color:#8A93A6;pointer-events:none}
.tb-search input{border-radius:999px;background:#F3F5F9;border:1px solid #E3E8F0;padding:9px 14px 9px 38px;font-size:14px}
.tb-search input:focus{background:#fff}
.tb-icon{position:relative;display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:50%;color:#4A5468}
.tb-icon:hover{background:#F1F4F9;color:var(--navy)}
.tb-bell .dot{position:absolute;top:8px;right:9px;width:9px;height:9px;border-radius:50%;background:var(--accent);box-shadow:0 0 0 2px #fff}
.tb-avatar{display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;border-radius:50%;background:var(--navy);color:#fff;font-weight:700;font-size:14px;text-decoration:none;letter-spacing:.02em}
.tb-avatar:hover{background:var(--accent)}
.hamburger{display:none}
.hamburger span{background:var(--navy)}
.hamburger:hover{background:#F1F4F9}
@media(max-width:900px){
  .topbar{padding:0 10px;gap:8px;height:58px}
  .hamburger{display:inline-flex}
  .tb-brand .tb-sf{display:block;height:26px}
  .tb-brand .tb-pc{display:none}
  .tb-search{width:auto;flex:1;min-width:0;margin-left:4px}
  .tb-search input{padding-left:34px}
  .sidebar{width:264px;flex-basis:264px}
}
@media(max-width:480px){.tb-search input::placeholder{color:transparent}.tb-avatar{width:34px;height:34px;font-size:13px}.tb-icon{width:36px;height:36px}}
/* KPI-kaarten met ronde pastel-badges */
.card{border-radius:14px;border-color:#E3E8F0;box-shadow:0 1px 3px rgba(20,32,79,.05)}
.kpi{display:flex;align-items:center;gap:14px;border-left:1px solid #E3E8F0;transition:box-shadow .15s,transform .15s}
.kpi:hover{box-shadow:0 6px 18px rgba(20,32,79,.09);transform:translateY(-1px)}
.kpi.bad,.kpi.warn,.kpi.ok{border-left-color:#E3E8F0}
.kpi .badge{flex:0 0 48px;width:48px;height:48px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:#E8F0FE;color:#2F6FE0}
.kpi .badge .ico{width:23px;height:23px}
.kpi.ok .badge{background:#E3F5EA;color:#1E9A55}.kpi.warn .badge{background:#FFF0DD;color:#E07B00}.kpi.bad .badge{background:#FDE7E7;color:#D12C2C}
.kpi .badge.blue{background:#E8F0FE;color:#2F6FE0}
.kpi .n{font-size:28px}.kpi .kt{min-width:0}
/* zoekresultaten */
.sres h2{display:flex;align-items:center;gap:8px}.sres h2 .ico{color:var(--navy)}
/* login */
.login{min-height:100vh;display:block;background-color:#1B2A63;
 background-image:linear-gradient(180deg,rgba(247,250,255,.97) 0%,rgba(236,243,253,.9) 13%,rgba(120,150,205,.45) 20%,rgba(18,30,72,.45) 27%,rgba(18,30,72,.28) 50%,rgba(14,20,51,.62) 100%),url("/static/img/login-bg.jpg");
 background-image:linear-gradient(180deg,rgba(247,250,255,.97) 0%,rgba(236,243,253,.9) 13%,rgba(120,150,205,.45) 20%,rgba(18,30,72,.45) 27%,rgba(18,30,72,.28) 50%,rgba(14,20,51,.62) 100%),image-set(url("/static/img/login-bg.webp") type("image/webp"),url("/static/img/login-bg.jpg") type("image/jpeg"));
 background-size:cover;background-position:center 40%;background-repeat:no-repeat;background-attachment:fixed}
.loginwrap{min-height:100vh;display:flex;flex-direction:column;align-items:center;padding:34px 16px 18px;box-sizing:border-box}
.loginhero{text-align:center;margin:0 0 22px}
.pchero{display:block;width:min(440px,78vw);height:auto;margin:0 auto 26px}
.loginhero .welcome{color:#fff;font-size:34px;font-weight:700;margin:0;line-height:1.15;text-shadow:0 2px 14px rgba(10,18,50,.55),0 1px 2px rgba(10,18,50,.5)}
.loginhero .tagline{color:#fff;font-size:17px;margin:6px 0 0;font-weight:600;letter-spacing:.02em;text-shadow:0 1px 10px rgba(10,18,50,.6)}
.loginbox{width:min(420px,92vw);border-radius:18px;padding:26px 28px 22px;box-shadow:0 24px 60px rgba(8,14,40,.35);background:rgba(255,255,255,.98)}
.loginbox.wide{width:min(500px,94vw)}
.loginbrand{display:flex;justify-content:center;margin:0 0 14px}
.loginbrand img{height:36px;width:auto;display:block}
.loginbox h1{text-align:center}.loginbox>.sub{text-align:center}
.loginbox input{padding:11px 12px;border-radius:10px}
.pwfield{position:relative}.pwfield input{padding-right:46px}
.pweye{position:absolute;right:4px;top:50%;transform:translateY(-50%);width:38px;height:38px;border:0;background:transparent;border-radius:8px;color:#6B7486;cursor:pointer;display:flex;align-items:center;justify-content:center}
.pweye:hover{background:#F1F4F9;color:var(--navy)}
.pweye .i-hide{display:none}.pweye.shown .i-hide{display:block}.pweye.shown .i-show{display:none}
.loginbox .btn{padding:12px 14px;border-radius:10px;font-size:15px}
.btn-login{background:#2F6FE0}.btn-login:hover{background:#2459B8}
.loginfoot{margin:auto 0 0;padding-top:22px;color:#fff;font-size:12.5px;text-shadow:0 1px 6px rgba(0,0,0,.6)}
@media(max-width:600px){
 .login{background-image:linear-gradient(180deg,rgba(247,250,255,.97) 0%,rgba(236,243,253,.9) 10%,rgba(120,150,205,.45) 15%,rgba(18,30,72,.5) 21%,rgba(18,30,72,.3) 45%,rgba(14,20,51,.68) 100%),url("/static/img/login-bg-mobile.webp");background-attachment:scroll;background-position:center top}
 .loginwrap{padding-top:24px}
 .pchero{width:min(300px,76vw);margin-bottom:18px}
 .loginhero .welcome{font-size:26px}.loginhero .tagline{font-size:15px}
 .loginbox{padding:22px 20px 18px}
}
.loginbox p.small{text-align:center}
.grid:has(> .kpi){grid-template-columns:repeat(auto-fill,minmax(290px,1fr))}
.kpi .l{font-size:13.5px;line-height:1.35}
h1{letter-spacing:-.01em}
.grid > .kpi{margin:0}
@media(max-width:600px){.grid:has(> .kpi){grid-template-columns:1fr 1fr;gap:10px}.kpi{flex-direction:column;align-items:flex-start;gap:8px;padding:14px}.kpi .badge{width:40px;height:40px;flex-basis:40px}.kpi .n{font-size:24px}.kpi .l{font-size:12.5px}}
/* VCA-logo (PC-woordmerk + schild + tagline) */
.tb-brand .tb-pc{height:50px;width:auto}
.pchero{width:min(460px,80vw);height:auto;margin:0 auto 22px}
@media(max-width:600px){.pchero{width:min(320px,80vw);margin-bottom:16px}}
/* achtergrond in de app: dezelfde foto als het loginscherm, zeer licht en ontverzadigd */
body:not(.login){background-color:#F4F6FA;background-image:none}
body:not(.login)::before{content:"";position:fixed;inset:0;z-index:-1;pointer-events:none;
 background:url("/static/img/login-bg.jpg") center 40%/cover no-repeat;
 background-image:image-set(url("/static/img/login-bg.webp") type("image/webp"),url("/static/img/login-bg.jpg") type("image/jpeg"));
 opacity:.12;filter:saturate(.55)}
@media(max-width:600px){body:not(.login)::before{background-image:url("/static/img/login-bg-mobile.webp");background-position:center top}}
/* achtergrond v2: foto duidelijker zichtbaar; tekst direct op de achtergrond krijgt een zachte halo */
body:not(.login)::before{opacity:.26;filter:saturate(.85)}
.wrap > h1,.wrap > .sub,.wrap > p,.wrap > .tabs + p{text-shadow:0 0 6px rgba(255,255,255,.95),0 0 14px rgba(255,255,255,.85)}
.wrap > h1{text-shadow:0 0 8px #fff,0 0 18px rgba(255,255,255,.9)}
.wrap > .sub{color:#4A5260}
footer{color:#4A5260;text-shadow:0 0 6px #fff}
/* achtergrond v3: nog zichtbaarder */
body:not(.login)::before{opacity:.40;filter:none}

/* Klantdossier (verplaatst uit inline <style>, dat door de CSP geblokkeerd werd) */
.kd-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
@media(max-width:800px){.kd-grid{grid-template-columns:1fr}}
.kd-item{display:flex;gap:10px;align-items:flex-start;padding:6px 0;border-bottom:1px solid var(--line)}
.kd-item.bad{background:#FDF2F2}.kd-item.warn{background:#FDF6EB}
.kd-item label{flex:1;margin:0;font-weight:500}
.kd-note{display:block;font-size:12px;color:var(--grey);font-weight:400}
.kd-head{display:flex;justify-content:space-between;align-items:center;gap:8px}
details.card>summary{cursor:pointer;font-weight:700}
.alert{background:#FDF2F2;border:1px solid #F0C4C4;border-radius:10px;padding:10px 12px;margin:0 0 12px}
.warnbox{background:#FDF6EB;border:1px solid #F0D7A8;border-radius:10px;padding:10px 12px;margin:0 0 12px}
.kd-status{margin-left:2px}.kd-status.err{color:var(--red)}
#kd-form[aria-busy] #kd-docs{opacity:.55;transition:opacity .15s}
#kd-refresh[hidden],.kd-status[hidden]{display:none!important}
.kd-inline{display:inline;margin:0 0 0 4px}
tr.kd-open td{background:#EEF4FF}
.kd-current{margin-bottom:12px}

/* weekplan crewpilot */
.weekplan td{vertical-align:top}.weekplan .wkp{margin:3px 0;display:flex;flex-wrap:wrap;align-items:center;gap:6px}
