/* FIMMIT V6 — optie 05 branding */
:root{--navy:#06101d;--line:#dce7f2;--text:#132337;--muted:#708198;--blue:#087cff;--cyan:#18c9ff;--good:#17b56a;--warn:#ff9d21;--bad:#f23d4f;--purple:#6957e8}
*{box-sizing:border-box}html{scroll-behavior:smooth}
body.portal-body{margin:0;background:#f4f7fb;color:var(--text);font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",Arial,sans-serif}
a{color:inherit}
.portal-head{min-height:76px;padding:12px 28px;background:linear-gradient(105deg,#06111e,#071a2e 58%,#062241);display:flex;align-items:center;justify-content:space-between;gap:20px;position:sticky;top:0;z-index:50;box-shadow:0 5px 24px rgba(3,15,29,.16);border-bottom:1px solid rgba(255,255,255,.08)}
.portal-head .portal-logo{width:164px;height:auto;display:block}
.portal-nav{display:flex;gap:3px;align-items:center;flex-wrap:wrap;justify-content:flex-end}
.portal-nav a{color:#b9c8d9;text-decoration:none;padding:9px 11px;border-radius:9px;font-size:13px;white-space:nowrap}
.portal-nav a:hover,.portal-nav a.active{color:#fff;background:rgba(0,142,255,.18)}
.nav-count{background:#ff394d;color:#fff;border-radius:99px;padding:2px 6px;font-size:9px;font-weight:900}
.portal-main{max-width:1460px;margin:auto;padding:42px 34px 80px}
.eyebrow{font-size:10px;letter-spacing:.18em;font-weight:900;color:var(--blue);text-transform:uppercase}
.portal-main h1{font-size:clamp(30px,3.5vw,46px);line-height:1.05;margin:8px 0 10px;color:#102136}
.portal-main h2{font-size:20px;margin:6px 0 18px;color:#15283d}.muted{color:var(--muted)}
.grid{display:grid;gap:18px}.grid-4{grid-template-columns:repeat(4,1fr)}.grid-3{grid-template-columns:repeat(3,1fr)}.grid-2{grid-template-columns:repeat(2,1fr)}
.panel,.metric{background:#fff;border:1px solid var(--line);border-radius:16px;padding:22px;box-shadow:0 8px 28px rgba(19,43,67,.06)}
.metric{min-height:126px;position:relative;overflow:hidden}.metric:after{content:"";position:absolute;width:100px;height:100px;right:-40px;top:-45px;background:linear-gradient(135deg,rgba(8,124,255,.13),rgba(24,201,255,.02));border-radius:50%}
.metric strong{display:block;font-size:31px;margin:8px 0;color:#12283f}.metric span{color:var(--muted);font-size:12px;font-weight:650}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:1px solid #d6e2ee;border-radius:9px;padding:10px 14px;color:#18304a;background:#fff;text-decoration:none;cursor:pointer;font-weight:700;font-size:13px}
.btn:hover{box-shadow:0 6px 18px rgba(8,124,255,.12);border-color:#b8d0e5}.btn.primary{background:linear-gradient(135deg,#0793ff,#086ce7);border:0;color:#fff;box-shadow:0 8px 20px rgba(8,124,255,.2)}
.toolbar{display:flex;justify-content:space-between;align-items:center;gap:15px;flex-wrap:wrap}
.flash,.notice{padding:13px 15px;border-radius:11px;background:#edf8ff;border:1px solid #ccecff;margin:15px 0}
.flash.ok{background:#ecfbf4;border-color:#c6f1d9;color:#087a47}.flash.error{background:#fff0f2;border-color:#ffd0d6;color:#c6293b}
.table-wrap{overflow:auto}.table{width:100%;border-collapse:collapse}.table th,.table td{padding:14px 10px;border-bottom:1px solid #e7eef5;text-align:left;vertical-align:top}.table th{color:#76869a;font-size:10px;text-transform:uppercase;letter-spacing:.08em}
.pill{display:inline-flex;padding:5px 9px;border-radius:99px;background:#eef3f8;font-size:10px;font-weight:900}.pill.good{color:#07804b;background:#eaf9f2}.pill.warn{color:#b86500;background:#fff4e5}.pill.bad{color:#c6293b;background:#fff0f2}.pill.accent{color:#0867c9;background:#eaf4ff}
.field{margin:15px 0}.field label{display:block;font-size:12px;font-weight:800;margin-bottom:7px;color:#31445b}.field input,.field textarea,.field select{width:100%;padding:12px;border:1px solid #d7e2ed;border-radius:9px;background:#fff;color:#172b40;outline:none}.field input:focus,.field textarea:focus,.field select:focus{border-color:#70b9ff;box-shadow:0 0 0 3px rgba(8,124,255,.09)}.field textarea{min-height:150px;resize:vertical}
.ticket-list{display:grid;gap:10px}.ticket-row{display:grid;grid-template-columns:1fr auto;gap:18px;padding:16px;border:1px solid #e0e9f2;border-radius:12px;background:#fff;text-decoration:none}.ticket-row:hover{border-color:#9dccf2;box-shadow:0 6px 18px rgba(15,54,88,.07)}
.timeline{display:grid;gap:14px}.timeline-item{border-left:3px solid #b7e9ff;padding:2px 0 2px 17px}.timeline-item.internal{border-color:#ffd17d}.timeline-meta{font-size:11px;color:var(--muted);margin-bottom:5px}.comment{white-space:pre-wrap;line-height:1.65}
.sla-row{display:grid;grid-template-columns:105px 1fr 110px;gap:12px;align-items:center;margin:13px 0}.bar,.statbar{height:9px;border-radius:99px;background:#edf2f7;overflow:hidden}.bar i,.statbar>i{display:block;height:100%;background:linear-gradient(90deg,#0b8fff,#18c9ff)}
.mini{font-size:11px;color:var(--muted)}.empty{padding:30px;text-align:center;color:var(--muted)}.kpi-good{color:var(--good)}.kpi-warn{color:var(--warn)}.kpi-bad{color:var(--bad)}
.attach{display:flex;justify-content:space-between;gap:15px;align-items:center;padding:12px;border:1px solid #dce6ef;border-radius:10px;background:#fff}
@media(max-width:1100px){.grid-4{grid-template-columns:repeat(2,1fr)}.grid-3{grid-template-columns:1fr 1fr}}
@media(max-width:720px){.portal-head{padding:12px 16px;align-items:flex-start;flex-direction:column}.portal-head .portal-logo{width:150px}.portal-nav{justify-content:flex-start;overflow:auto;width:100%}.portal-main{padding:30px 16px 60px}.grid-4,.grid-3,.grid-2{grid-template-columns:1fr}.ticket-row{grid-template-columns:1fr}.sla-row{grid-template-columns:78px 1fr 62px}.panel,.metric{padding:17px}}

/* V52 overzichtelijk admin menu */
.portal-nav-grouped{align-items:flex-start;flex-wrap:wrap;gap:10px 14px;padding:10px 12px}
.portal-nav-group{display:flex;flex-direction:column;gap:3px}
.portal-nav-label{font-size:10px;text-transform:uppercase;letter-spacing:.08em;font-weight:800;opacity:.55;padding:0 7px}
.portal-nav-links{display:flex;align-items:center;gap:3px}
.portal-nav-links a{white-space:nowrap}
.portal-nav-group .active{font-weight:800}
.logout-link{margin-left:auto}
@media(max-width:1100px){
 .portal-nav-grouped{overflow-x:auto;flex-wrap:nowrap;align-items:flex-start}
 .portal-nav-group{flex:none}
 .logout-link{margin-left:0}
}
@media(max-width:760px){
 .portal-nav-grouped{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));overflow:visible}
 .portal-nav-group{min-width:0}
 .portal-nav-links{flex-wrap:wrap}
 .portal-nav-links a{font-size:12px}
}

/* V54 admin navigation: clear separation and readable group labels */
.portal-nav-grouped{background:rgba(255,255,255,.025);border-radius:14px}
.portal-nav-group{padding:0 7px;border-left:1px solid rgba(255,255,255,.10)}
.portal-nav-group:first-child{border-left:0}
.portal-nav-label{color:#dbe7f4!important;opacity:1!important;font-size:10px;letter-spacing:.11em;font-weight:850}
.portal-nav-links a{color:#c4d2e1!important}
.portal-nav-links a:hover,.portal-nav-links a.active{color:#fff!important}
.portal-nav-links a.active{background:rgba(0,142,255,.20)}
@media(max-width:1100px){.portal-nav-group{border-left:0;border-right:1px solid rgba(255,255,255,.10);padding-right:12px}}
/* customer dropdown */
.portal-brand{display:flex;align-items:center;gap:12px;text-decoration:none;min-width:max-content}.portal-brand-title{color:#dbe8f5;font-size:13px;font-weight:800;border-left:1px solid rgba(255,255,255,.18);padding-left:12px}.portal-customer-nav-group{position:relative}.portal-customer-nav-group summary{list-style:none;color:#b9c8d9;padding:9px 11px;border-radius:9px;font-size:13px;white-space:nowrap;cursor:pointer}.portal-customer-nav-group summary::-webkit-details-marker{display:none}.portal-customer-nav-group[open] summary,.portal-customer-nav-group summary:hover{color:#fff;background:rgba(0,142,255,.18)}.portal-customer-nav-dropdown{position:absolute;right:0;top:calc(100% + 7px);min-width:220px;padding:7px;background:#071a2e;border:1px solid rgba(255,255,255,.14);border-radius:12px;box-shadow:0 18px 45px rgba(3,15,29,.35);z-index:100}.portal-customer-nav-dropdown a{display:block!important;color:#c8d6e5!important;padding:10px 11px!important;border-radius:8px!important}.portal-customer-nav-dropdown a:hover,.portal-customer-nav-dropdown a.active{background:rgba(0,142,255,.18)!important;color:#fff!important}@media(max-width:720px){.portal-brand-title{display:none}.portal-nav{overflow:visible!important;flex-wrap:wrap}.portal-customer-nav-group{display:block}.portal-customer-nav-dropdown{left:0;right:auto;top:calc(100% + 5px)}}.portal-body .customer-bottom-nav,.portal-body .mobile-bottom-nav,.portal-body .portal-bottom-nav,.portal-body .bottom-nav{display:none!important}


/* FIMMIT ADMIN HEADER — clean responsive layout */
.portal-head{
  min-height:76px;
  padding:12px 24px;
  display:flex;
  align-items:center;
  gap:22px;
  box-sizing:border-box;
}
.portal-head > a{
  flex:0 0 auto;
}
.portal-head .portal-logo{
  width:164px;
}
.portal-head .portal-nav-grouped{
  flex:1 1 auto;
  min-width:0;
  display:flex;
  align-items:flex-start;
  justify-content:flex-end;
  flex-wrap:wrap;
  gap:8px 12px;
  padding:8px 10px;
  overflow:visible;
}
.portal-head .portal-nav-group{
  flex:0 1 auto;
  min-width:0;
  padding:0 7px;
  border-left:1px solid rgba(255,255,255,.10);
}
.portal-head .portal-nav-group:first-child{
  border-left:0;
}
.portal-head .portal-nav-label{
  display:block;
  height:15px;
  line-height:15px;
  white-space:nowrap;
  margin-bottom:2px;
}
.portal-head .portal-nav-links{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  flex-wrap:wrap;
  gap:3px;
}
.portal-head .portal-nav-links a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:34px;
  box-sizing:border-box;
  white-space:nowrap;
  font-weight:700 !important;
}
.portal-head .logout-link{
  flex:0 0 auto;
  white-space:nowrap;
  margin-left:4px;
}

/* Tablet: let the navigation occupy a second clean row instead of scrolling. */
@media (max-width:1200px){
  .portal-head{
    align-items:flex-start;
    flex-wrap:wrap;
  }
  .portal-head > a{
    margin-top:4px;
  }
  .portal-head .portal-nav-grouped{
    flex:1 1 calc(100% - 190px);
    justify-content:flex-start;
  }
}

/* Smaller screens: logo on its own row and navigation becomes a normal grid. */
@media (max-width:760px){
  .portal-head{
    padding:12px 16px;
    gap:10px;
  }
  .portal-head > a{
    width:100%;
  }
  .portal-head .portal-logo{
    width:145px;
  }
  .portal-head .portal-nav-grouped{
    width:100%;
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:12px 10px;
    padding:4px 0;
  }
  .portal-head .portal-nav-group{
    border-left:0;
    padding:0;
    min-width:0;
  }
  .portal-head .portal-nav-links{
    flex-wrap:wrap;
  }
  .portal-head .portal-nav-links a{
    font-size:12px;
    padding:8px 9px;
  }
  .portal-head .logout-link{
    margin:0;
  }
}

@media (max-width:430px){
  .portal-head .portal-nav-grouped{
    grid-template-columns:1fr;
  }
}

/* FIMMIT CUSTOMER HEADER — final overrides after the admin header rules. */
.portal-head-customer .portal-brand{min-width:0}
.portal-head-customer .portal-nav-customer{background:rgba(255,255,255,.025);border-radius:14px}
.portal-head-customer .portal-nav-customer > a{align-self:end;justify-self:end;color:#c4d2e1;text-decoration:none;padding:9px 11px;border-radius:9px;font-size:13px;font-weight:700;white-space:nowrap}
.portal-head-customer .portal-nav-customer > a:hover{color:#fff;background:rgba(0,142,255,.18)}
.portal-head-customer .portal-nav-group.active-group .portal-nav-label{color:#fff!important}
@media (min-width:1201px){
  .portal-head-customer{grid-template-columns:220px minmax(0,1fr)}
  .portal-head-customer .portal-nav-customer{grid-template-columns:1fr 1.2fr 2fr 1fr 1.15fr auto}
}
@media (min-width:761px) and (max-width:1200px){
  .portal-head-customer{grid-template-columns:220px minmax(0,1fr)}
  .portal-head-customer .portal-nav-customer{grid-template-columns:repeat(2,minmax(0,1fr))}
  .portal-head-customer .portal-nav-customer > a{justify-self:start;align-self:start}
}
@media (max-width:760px){
  .portal-head-customer .portal-brand{display:flex;align-items:center;gap:12px;width:100%}
  .portal-head-customer .portal-brand-title{display:inline-block}
  .portal-head-customer .portal-nav-customer{grid-template-columns:repeat(2,minmax(0,1fr))}
  .portal-head-customer .portal-nav-customer > a{justify-self:start;align-self:start;margin:0}
}
@media (max-width:430px){
  .portal-head-customer .portal-nav-customer{grid-template-columns:1fr}
}

/* FIMMIT CUSTOMER HEADER — compact final version. */
.portal-head-customer{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:20px!important;
  min-height:76px!important;
  padding:12px 24px!important;
}
.portal-head-customer .portal-brand{
  flex:0 0 auto!important;
  width:auto!important;
  margin:0!important;
}
.portal-head-customer .portal-nav-customer{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  flex-wrap:wrap!important;
  gap:4px!important;
  width:auto!important;
  min-width:0!important;
  padding:0!important;
  background:transparent!important;
  border-radius:0!important;
}
.portal-head-customer .portal-nav-customer > a,
.portal-head-customer .portal-customer-nav-group summary{
  display:inline-flex!important;
  align-items:center!important;
  min-height:36px!important;
  box-sizing:border-box!important;
  color:#c4d2e1!important;
  text-decoration:none!important;
  padding:9px 11px!important;
  border-radius:9px!important;
  font-size:13px!important;
  font-weight:700!important;
  white-space:nowrap!important;
}
.portal-head-customer .portal-nav-customer > a:hover,
.portal-head-customer .portal-nav-customer > a.active,
.portal-head-customer .portal-customer-nav-group[open] summary,
.portal-head-customer .portal-customer-nav-group summary:hover{
  color:#fff!important;
  background:rgba(0,142,255,.18)!important;
}
.portal-head-customer .portal-customer-nav-group{
  position:relative!important;
  display:inline-flex!important;
}
.portal-head-customer .portal-customer-nav-dropdown{
  position:absolute!important;
  right:0!important;
  top:calc(100% + 7px)!important;
  min-width:220px!important;
  padding:7px!important;
  background:#071a2e!important;
  border:1px solid rgba(255,255,255,.14)!important;
  border-radius:12px!important;
  box-shadow:0 18px 45px rgba(3,15,29,.35)!important;
  z-index:100!important;
}
.portal-head-customer .portal-customer-nav-dropdown a{
  display:block!important;
  color:#c8d6e5!important;
  padding:10px 11px!important;
  border-radius:8px!important;
  text-decoration:none!important;
}
.portal-head-customer .portal-customer-nav-dropdown a:hover,
.portal-head-customer .portal-customer-nav-dropdown a.active{
  background:rgba(0,142,255,.18)!important;
  color:#fff!important;
}
@media (max-width:760px){
  .portal-head-customer{
    align-items:stretch!important;
    flex-direction:column!important;
    gap:10px!important;
    padding:12px 16px!important;
  }
  .portal-head-customer .portal-brand-title{
    display:inline-block!important;
  }
  .portal-head-customer .portal-nav-customer{
    justify-content:flex-start!important;
    width:100%!important;
  }
  .portal-head-customer .portal-customer-nav-dropdown{
    left:0!important;
    right:auto!important;
  }
}

/* FIMMIT CUSTOMER HEADER — same calm structure as admin, with customer modules. */
.portal-head-customer .portal-brand{
  min-width:0;
}
.portal-head-customer .portal-nav-customer{
  background:rgba(255,255,255,.025);
  border-radius:14px;
}
.portal-head-customer .portal-nav-customer > a{
  align-self:end;
  justify-self:end;
  color:#c4d2e1;
  text-decoration:none;
  padding:9px 11px;
  border-radius:9px;
  font-size:13px;
  font-weight:700;
  white-space:nowrap;
}
.portal-head-customer .portal-nav-customer > a:hover{
  color:#fff;
  background:rgba(0,142,255,.18);
}
.portal-head-customer .portal-nav-group.active-group .portal-nav-label{
  color:#fff!important;
}
@media (min-width:1201px){
  .portal-head-customer{
    grid-template-columns:220px minmax(0,1fr);
  }
  .portal-head-customer .portal-nav-customer{
    grid-template-columns:1fr 1.2fr 2fr 1fr 1.15fr auto;
  }
}
@media (min-width:761px) and (max-width:1200px){
  .portal-head-customer{
    grid-template-columns:220px minmax(0,1fr);
  }
  .portal-head-customer .portal-nav-customer{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .portal-head-customer .portal-nav-customer > a{
    justify-self:start;
    align-self:start;
  }
}
@media (max-width:760px){
  .portal-head-customer .portal-brand{
    display:flex;
    align-items:center;
    gap:12px;
    width:100%;
  }
  .portal-head-customer .portal-brand-title{
    display:inline-block;
  }
  .portal-head-customer .portal-nav-customer{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .portal-head-customer .portal-nav-customer > a{
    justify-self:start;
    align-self:start;
    margin:0;
  }
}
@media (max-width:430px){
  .portal-head-customer .portal-nav-customer{
    grid-template-columns:1fr;
  }
}

/* Activating a link must not alter the header's layout. */
.portal-head .portal-nav-links a,
.portal-head .portal-nav-links a.active{font-weight:700!important;min-height:34px}
@media (min-width:1201px){
  .portal-head{grid-template-columns:164px minmax(0,1fr);align-items:start}
  .portal-head .portal-nav-grouped{grid-template-columns:repeat(4,minmax(0,1fr)) max-content;min-height:58px}
  .portal-head .portal-nav-group{min-height:50px}
}


/* =========================================================
   FIMMIT ADMIN HEADER — STABLE V55
   Alleen layout/stabiliteit. Geen navigatie of functionaliteit verwijderd.
   ========================================================= */

/* Desktop: vaste kolommen zorgen ervoor dat Dashboard/Tickets/Klanten/etc.
   nooit van positie wisselen wanneer een andere menu-item actief is. */
@media (min-width:1201px){
  .portal-head{
    display:grid;
    grid-template-columns:164px minmax(0,1fr);
    align-items:start;
    gap:22px;
    min-height:76px;
  }

  .portal-head .portal-nav-grouped{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr)) auto;
    align-items:start;
    justify-content:stretch;
    width:100%;
    min-width:0;
    gap:8px 10px;
    padding:8px 10px;
    box-sizing:border-box;
    overflow:visible;
  }

  .portal-head .portal-nav-group{
    min-width:0;
    width:100%;
    box-sizing:border-box;
  }

  .portal-head .portal-nav-links{
    min-width:0;
    width:100%;
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    justify-content:flex-start;
    gap:3px;
  }

  .portal-head .portal-nav-links a{
    flex:0 0 auto;
  }

  .portal-head .logout-link{
    align-self:end;
    margin-left:4px;
  }
}

/* Middelgrote schermen: vier groepen worden twee rijen.
   Nog steeds geen horizontale scrollbar. */
@media (min-width:761px) and (max-width:1200px){
  .portal-head{
    display:grid;
    grid-template-columns:164px minmax(0,1fr);
    align-items:start;
    gap:18px;
    min-height:76px;
  }

  .portal-head .portal-nav-grouped{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    align-items:start;
    width:100%;
    min-width:0;
    gap:12px 10px;
    padding:8px 10px;
    box-sizing:border-box;
    overflow:visible;
  }

  .portal-head .portal-nav-group{
    min-width:0;
    width:100%;
    box-sizing:border-box;
    border-left:0;
    border-right:1px solid rgba(255,255,255,.10);
    padding-right:12px;
  }

  .portal-head .portal-nav-links{
    display:flex;
    flex-wrap:wrap;
    min-width:0;
    gap:3px;
  }

  .portal-head .logout-link{
    margin:0;
  }
}

/* Mobiel: logo en navigatie onder elkaar; ook hier blijft de positie
   per pagina identiek. */
@media (max-width:760px){
  .portal-head{
    display:flex;
    flex-direction:column;
    align-items:stretch;
    gap:10px;
    min-height:0;
    padding:12px 16px;
  }

  .portal-head > a{
    width:auto;
    margin:0;
  }

  .portal-head .portal-logo{
    width:145px;
  }

  .portal-head .portal-nav-grouped{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    width:100%;
    min-width:0;
    gap:12px 10px;
    padding:4px 0;
    box-sizing:border-box;
    overflow:visible;
  }

  .portal-head .portal-nav-group{
    min-width:0;
    width:100%;
    padding:0;
    border:0;
  }

  .portal-head .portal-nav-links{
    display:flex;
    flex-wrap:wrap;
    gap:3px;
    min-width:0;
  }

  .portal-head .portal-nav-links a{
    font-size:12px;
    padding:8px 9px;
  }

  .portal-head .logout-link{
    margin:0;
  }
}

@media (max-width:430px){
  .portal-head .portal-nav-grouped{
    grid-template-columns:1fr;
  }
}
