:root {
  --afs-blue: #172169;
  --afs-blue-2: #283b8a;
  --afs-teal: #009a9c;
  --afs-teal-soft: #e7f7f7;
  --bg: #f5f6f9;
  --card: #ffffff;
  --text: #18203a;
  --muted: #687087;
  --line: #e1e4ec;
  --green: #2b8a57;
  --orange: #d98718;
  --red: #c84444;
  --gray: #69707f;
  --shadow: 0 8px 24px rgba(31,45,120,.08);
  --radius: 16px;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }

.app-header {
  background: linear-gradient(135deg, #f8fbff 0%, #e8f0fb 52%, #d7e5f7 100%);
  color: var(--afs-blue);
  border-bottom: 3px solid rgba(0,154,156,.75);
  box-shadow: 0 4px 18px rgba(23,33,105,.12);
}
.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  min-height: 104px;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.afs-logo {
  width: 220px;
  height: 78px;
  object-fit: contain;
  flex: 0 0 auto;
  display: block;
  border-radius: 16px;
  box-shadow: 0 7px 18px rgba(23,33,105,.14);
}
.header-title-wrap { flex: 1; min-width: 0; }
.eyebrow { color: var(--afs-teal); font-size: 13px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; }
h1 { margin: 3px 0 0; font-size: clamp(24px, 3vw, 34px); color: var(--afs-blue); }
.header-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

.page-shell { max-width: 1280px; margin: 0 auto; padding: 20px; }
.status-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; margin-bottom: 16px; }
.stat-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.stat-number { font-size: 30px; font-weight: 800; color: var(--afs-blue); }
.stat-label { font-size: 13px; color: var(--muted); margin-top: 3px; }
.stat-card.stat-valid { border-color: #b9dfc9; background: #eef9f3; }
.stat-card.stat-valid .stat-number, .stat-card.stat-valid .stat-label { color: var(--green); }
.stat-card.stat-soon { border-color: #efd3a4; background: #fff7e9; }
.stat-card.stat-soon .stat-number, .stat-card.stat-soon .stat-label { color: var(--orange); }
.stat-card.stat-expired { border-color: #efc2c2; background: #fff0f0; }
.stat-card.stat-expired .stat-number, .stat-card.stat-expired .stat-label { color: var(--red); }
.field-help { margin-top: 5px; font-size: 11px; color: var(--muted); line-height: 1.35; }
.admin-list { display: grid; gap: 8px; }
.admin-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 11px; background: #fafbfe; }
.admin-row-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.mini-badge { display: inline-flex; padding: 6px 9px; border-radius: 999px; background: var(--afs-teal-soft); color: #057777; font-size: 11px; font-weight: 800; }


.toolbar-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; margin-bottom: 18px; }
.search-row { display: grid; grid-template-columns: minmax(0,1fr) 210px; gap: 10px; }
.search-box { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; background: #fff; }
.search-box input { width: 100%; border: 0; outline: 0; padding: 12px 2px; color: var(--text); background: transparent; min-width: 0; }
.select-control, .field input, .field select, .field textarea { width: 100%; border: 1px solid var(--line); border-radius: 11px; padding: 11px 12px; background: #fff; color: var(--text); }
.business-row, .category-row { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.filter-label { width: 76px; flex: 0 0 76px; font-size: 11px; font-weight: 800; color: var(--afs-blue); text-transform: uppercase; letter-spacing: .35px; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; flex: 1; }
.chip { border: 1px solid var(--line); background: #fafbfe; color: var(--text); border-radius: 999px; padding: 8px 12px; font-size: 13px; }
.chip.active { background: var(--afs-blue); color: #fff; border-color: var(--afs-blue); }

.content-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin: 18px 0 12px; }
.content-head h2 { margin: 0; color: var(--afs-blue); }
.muted { color: var(--muted); margin: 4px 0 0; font-size: 13px; }

.asset-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.asset-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; transition: transform .15s ease, box-shadow .15s ease; }
.asset-card:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(31,45,120,.13); }
.asset-photo { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; background: #eef0f6; }
.asset-photo.placeholder { display: grid; place-items: center; font-size: 42px; color: #9ba3b7; }
.asset-body { padding: 14px; }
.asset-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.asset-name { margin: 0; font-size: 18px; color: var(--afs-blue); }
.asset-number { font-size: 12px; color: var(--muted); margin-top: 2px; }
.meta { display: grid; gap: 5px; margin-top: 10px; font-size: 13px; color: var(--muted); }
.status-pill { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: 12px; padding: 7px 10px; border-radius: 999px; white-space: nowrap; }
.status-geldig { background: #e8f6ee; color: var(--green); }
.status-binnenkort { background: #fff2dc; color: var(--orange); }
.status-verlopen, .status-afgekeurd { background: #fde9e9; color: var(--red); }
.status-niet_gekeurd, .status-buiten_gebruik { background: #eef0f3; color: var(--gray); }
.appointment-note { margin-top: 10px; background: var(--afs-teal-soft); color: #057777; padding: 9px 10px; border-radius: 10px; font-size: 12px; font-weight: 700; }
.card-actions { display: flex; gap: 8px; margin-top: 12px; }
.card-actions .btn { flex: 1; }

.btn { border: 0; border-radius: 11px; padding: 10px 14px; font-weight: 750; font-size: 14px; }
.btn-primary { background: var(--afs-blue); color: #fff; }
.btn-primary:hover { background: var(--afs-blue-2); }
.btn-light { background: #fff; color: var(--afs-blue); }
.btn-outline { background: #fff; color: var(--afs-blue); border: 1px solid var(--afs-blue); }
.btn-teal { background: var(--afs-teal); color: #fff; }
.btn-danger { background: #fde9e9; color: var(--red); }
.btn-ghost { background: transparent; color: var(--afs-blue); border: 1px solid var(--line); }
.btn-small { padding: 8px 10px; font-size: 12px; }

.empty-state { background: #fff; border: 1px dashed var(--line); border-radius: var(--radius); padding: 52px 20px; text-align: center; color: var(--muted); }
.footer { text-align: center; color: #b9c2e0; background: var(--afs-blue); padding: 18px; margin-top: 34px; font-size: 12px; }

.modal-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(13,20,60,.55); display: grid; place-items: center; padding: 16px; overflow: auto; }
.modal { width: min(640px,100%); max-height: 92vh; overflow: auto; background: #fff; border-radius: 18px; box-shadow: 0 24px 60px rgba(0,0,0,.24); padding: 20px; }
.modal.wide { width: min(860px,100%); }
.modal h3 { margin: 0 0 14px; color: var(--afs-blue); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 12px; font-weight: 800; color: var(--afs-blue); margin-bottom: 5px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.detail-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.detail-cell { background: #f7f8fb; border-radius: 11px; padding: 10px; }
.detail-key { font-size: 11px; text-transform: uppercase; color: var(--muted); letter-spacing: .3px; }
.detail-value { font-weight: 750; margin-top: 3px; word-break: break-word; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill,minmax(120px,1fr)); gap: 8px; margin-top: 10px; }
.gallery img { width: 100%; height: 115px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.section-title { margin: 18px 0 8px; color: var(--afs-blue); font-size: 15px; }
.history { display: grid; gap: 8px; }
.history-item { padding: 10px; border: 1px solid var(--line); border-radius: 11px; }
.history-item strong { color: var(--afs-blue); }
.login-note { font-size: 13px; color: var(--muted); line-height: 1.45; }
.qr-wrap { text-align: center; }
.qr-wrap img { width: min(280px,80vw); border: 1px solid var(--line); padding: 8px; border-radius: 12px; background: #fff; }
.photo-previews { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.photo-previews img { width: 76px; height: 76px; object-fit: cover; border-radius: 10px; }

.toast-root { position: fixed; z-index: 80; right: 16px; bottom: 16px; display: grid; gap: 8px; width: min(360px, calc(100vw - 32px)); }
.toast { background: #111827; color: #fff; border-radius: 12px; padding: 12px 14px; box-shadow: 0 12px 28px rgba(0,0,0,.24); font-size: 13px; }
.toast.error { background: #8f2626; }
.toast.success { background: #1f6f47; }

@media (max-width: 980px) {
  .asset-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .status-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .header-inner { align-items: flex-start; }
  .afs-logo { width: 190px; height: 70px; }
}

@media (max-width: 680px) {
  .header-inner { min-height: 0; padding: 12px; gap: 10px; flex-wrap: wrap; }
  .afs-logo { width: 155px; height: 58px; max-width: 155px; }
  .header-title-wrap { min-width: 160px; }
  .eyebrow { font-size: 10px; }
  h1 { font-size: 20px; }
  .header-actions { width: 100%; justify-content: stretch; }
  .header-actions .btn { flex: 1; }
  .page-shell { padding: 12px; }
  .search-row { grid-template-columns: 1fr; }
  .business-row, .category-row { align-items: stretch; flex-direction: column; }
  .filter-label { width: auto; flex: 0 0 auto; }
  .content-head { align-items: stretch; flex-direction: column; }
  .asset-grid { grid-template-columns: 1fr; }
  .status-grid { gap: 8px; }
  .stat-card { padding: 13px; }
  .stat-number { font-size: 24px; }
  .grid-2, .detail-grid { grid-template-columns: 1fr; }
  .modal { padding: 16px; border-radius: 15px; }
}

.category-manage-list { display: grid; gap: 10px; margin-top: 10px; }
.category-manage-group { border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: #fafbfe; }
.category-manage-group h4 { margin: 0 0 8px; color: var(--afs-blue); }
.category-manage-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.category-manage-row:first-of-type { border-top: 0; }
.category-manage-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.business-chip { border-color: #cbd3eb; }
.business-chip.active { background: var(--afs-teal); border-color: var(--afs-teal); color: #fff; }

/* Project/categorie beheer */
.project-manage-card{border:1px solid var(--line);border-radius:14px;padding:12px;margin:10px 0;background:#fff}
.project-manage-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}
.subcategory-list{margin-top:10px;padding-left:12px;border-left:3px solid var(--teal-soft)}
.subcategory-empty{margin:10px 0 0 12px}
.category-manage-row.sub{box-shadow:none;background:var(--bg)}
.permission-check{display:block;padding:10px 12px;border:1px solid var(--line);border-radius:10px;margin:8px 0;background:var(--bg)}
.permission-check input{margin-right:8px}
.permission-summary{font-size:12px;color:var(--muted)}
@media(max-width:700px){.project-manage-head{flex-direction:column}.project-manage-head .category-manage-actions{width:100%;flex-wrap:wrap}}


/* Stapsgewijze bedrijfsnavigatie */
.hierarchy-nav{margin:18px 0}
.level-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin-bottom:14px}
.level-head h2{margin:2px 0 0;color:var(--afs-blue);font-size:28px}
.eyebrow.dark{color:var(--afs-teal);font-weight:900}
.hierarchy-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.hierarchy-card{appearance:none;text-align:left;background:#fff;border:1px solid var(--line);border-radius:18px;padding:18px;box-shadow:var(--shadow);color:var(--text);transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease;min-height:220px}
.hierarchy-card:hover{transform:translateY(-3px);box-shadow:0 14px 30px rgba(31,45,120,.14);border-color:#b9c6ef}
.hierarchy-card-top{display:flex;justify-content:space-between;align-items:center}
.hierarchy-icon{width:44px;height:44px;border-radius:13px;display:grid;place-items:center;background:linear-gradient(135deg,var(--afs-teal-soft),#fff);color:var(--afs-blue);font-size:22px;font-weight:900;border:1px solid #d7e7eb}
.hierarchy-icon.project{background:#eef1ff;border-color:#d9def6}
.open-arrow{font-size:32px;color:#98a2bd;line-height:1}
.hierarchy-card h3{margin:14px 0 5px;color:var(--afs-blue);font-size:21px}
.location-line{font-size:12px;color:var(--muted);font-weight:700}
.hierarchy-desc{color:var(--muted);font-size:13px;line-height:1.45;min-height:38px;margin:8px 0}
.counter-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:16px}
.counter-grid.two{grid-template-columns:repeat(2,1fr)}
.counter-grid>div{background:#f7f8fb;border-radius:11px;padding:10px;text-align:center}
.counter-grid strong{display:block;font-size:20px;color:var(--afs-blue)}
.counter-grid span{display:block;font-size:10px;text-transform:uppercase;color:var(--muted);font-weight:800;margin-top:2px}
.area-alerts{display:flex;gap:6px;flex-wrap:wrap;margin-top:12px}
.mini-status{font-size:11px;font-weight:800;padding:6px 8px;border-radius:999px}
.mini-status.soon{background:#fff2dc;color:var(--orange)}
.mini-status.expired{background:#fde9e9;color:var(--red)}
.mini-status.valid{background:#e8f6ee;color:var(--green)}
.breadcrumb{display:flex;align-items:center;gap:8px;color:var(--muted);font-size:13px;margin-bottom:12px;flex-wrap:wrap}
.crumb-btn{border:0;background:transparent;color:var(--afs-blue);font-weight:800;padding:4px 0}
.area-manage-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;padding-bottom:8px}
.area-manage-head h4{font-size:17px;margin:0;color:var(--afs-blue)}
@media(max-width:980px){.hierarchy-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:680px){.hierarchy-grid{grid-template-columns:1fr}.level-head{align-items:stretch;flex-direction:column}.hierarchy-card{min-height:0}.area-manage-head{flex-direction:column}.counter-grid{gap:6px}}

.admin-menu-stack{display:flex;flex-direction:column;gap:10px;margin:14px 0 4px}.admin-menu-stack .btn{width:100%;justify-content:center}

.asset-status-wrap{display:flex;flex-direction:column;align-items:flex-end;gap:7px}
.countdown-chip{display:inline-flex;align-items:center;justify-content:center;padding:5px 9px;border-radius:999px;font-size:12px;font-weight:800;white-space:nowrap}
.countdown-valid{background:#e8f7ed;color:#147a3b;border:1px solid #bfe6ca}
.countdown-soon{background:#fff3df;color:#a55b00;border:1px solid #ffd59a}
.countdown-expired{background:#fde8e8;color:#b42318;border:1px solid #f7b7b7}
.detail-countdown{margin-top:5px;font-size:13px;font-weight:800;color:#172169}

.hierarchy-logo-header{height:112px;margin:-18px -18px 14px;border-radius:18px 18px 12px 12px;overflow:hidden;background:linear-gradient(135deg,#f7f9fd,#eef3fa);border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:center}
.hierarchy-logo-header img{width:100%;height:100%;object-fit:contain;padding:12px;box-sizing:border-box}
.category-logo-chip{display:inline-flex;align-items:center;gap:7px;padding-left:7px}
.category-chip-logo{width:34px;height:24px;border-radius:6px;overflow:hidden;background:#fff;display:inline-flex;align-items:center;justify-content:center;border:1px solid rgba(0,0,0,.06)}
.category-chip-logo img{width:100%;height:100%;object-fit:contain;padding:2px;box-sizing:border-box}
.structure-logo-preview{height:120px;border:1px solid var(--line);border-radius:12px;background:#f8fafc;display:flex;align-items:center;justify-content:center;overflow:hidden;margin-bottom:10px}
.structure-logo-preview img{width:100%;height:100%;object-fit:contain;padding:10px;box-sizing:border-box}
.field-help{font-size:12px;color:var(--muted);margin-top:6px}
.remove-logo-check{display:flex;align-items:center;gap:8px;margin-top:9px;font-size:13px;color:var(--muted)}
.manage-name-with-logo{display:flex;align-items:center;gap:10px;min-width:0}
.manage-logo-thumb{width:64px;height:36px;border-radius:7px;object-fit:contain;background:#f8fafc;border:1px solid var(--line);padding:3px;box-sizing:border-box;flex:0 0 auto}
.manage-logo-thumb.area{width:82px;height:46px}

.manage-logo-thumb.project{width:72px;height:38px;object-fit:contain;border-radius:8px;background:#f7f9fd;border:1px solid var(--line);padding:3px;box-sizing:border-box}


/* Vaste tegelindeling: alle kaarten houden dezelfde verticale structuur */
.hierarchy-grid{align-items:stretch}
.hierarchy-card{
  padding:0;
  overflow:hidden;
  display:grid;
  grid-template-rows:122px 1fr;
  min-height:390px;
  height:100%;
}
.hierarchy-logo-header{
  height:122px;
  min-height:122px;
  margin:0;
  border-radius:18px 18px 0 0;
  position:relative;
  flex:none;
}
.hierarchy-logo-header img{
  width:100%;
  height:100%;
  object-fit:contain;
  padding:18px 22px;
}
.hierarchy-logo-placeholder{
  width:100%;
  height:100%;
  display:grid;
  place-items:center;
  background:linear-gradient(135deg,#f6f9fd,#edf3fa);
  color:#9ba7c7;
  font-size:36px;
  font-weight:800;
}
.hierarchy-logo-placeholder.project{font-size:34px;color:var(--afs-blue)}
.header-arrow{
  position:absolute;
  top:12px;
  right:14px;
  width:30px;
  height:30px;
  border-radius:999px;
  display:grid;
  place-items:center;
  background:rgba(255,255,255,.92);
  box-shadow:0 3px 10px rgba(23,33,105,.12);
}
.hierarchy-card-body{
  padding:18px;
  display:grid;
  grid-template-rows:54px 32px 52px auto 34px;
  gap:0;
  min-height:0;
}
.hierarchy-title-slot{
  min-height:54px;
  display:flex;
  align-items:flex-start;
}
.hierarchy-title-slot h3{
  margin:0;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
  line-height:1.22;
}
.hierarchy-location-slot{
  min-height:32px;
  display:flex;
  align-items:flex-start;
  font-size:13px;
  font-weight:700;
  color:var(--muted);
  line-height:1.35;
  overflow:hidden;
  white-space:nowrap;
  text-overflow:ellipsis;
}
.hierarchy-description-slot{
  min-height:52px;
  max-height:52px;
  overflow:hidden;
}
.hierarchy-description-slot .hierarchy-desc{
  margin:0;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
  line-height:1.45;
}
.slot-placeholder{color:#aab1c2}
.hierarchy-card .counter-grid{
  margin-top:10px;
  align-self:end;
}
.hierarchy-card .area-alerts{
  min-height:34px;
  display:flex;
  align-items:flex-end;
  align-self:end;
  margin-top:8px;
}

/* Middelenkaarten hebben ook vaste rijen */
.asset-grid{align-items:stretch}
.asset-card{
  display:grid;
  grid-template-rows:auto 1fr;
  height:100%;
}
.asset-body{
  display:grid;
  grid-template-rows:70px 130px 58px auto;
  min-height:330px;
}
.asset-top{
  min-height:70px;
  overflow:hidden;
}
.asset-name{
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
  line-height:1.25;
}
.asset-status-wrap{min-width:118px}
.fixed-meta{
  min-height:130px;
  max-height:130px;
  overflow:hidden;
  align-content:start;
}
.fixed-meta>div{
  min-height:20px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.appointment-slot{
  min-height:58px;
  max-height:58px;
  overflow:hidden;
}
.appointment-note{
  margin-top:8px;
  min-height:42px;
  box-sizing:border-box;
  display:flex;
  align-items:center;
}
.appointment-placeholder{
  visibility:hidden;
}
.card-actions{
  align-self:end;
  min-height:38px;
}
.action-spacer{flex:1}

@media(max-width:680px){
  .hierarchy-card{min-height:390px}
  .hierarchy-card-body{grid-template-rows:54px 32px 52px auto 34px}
  .asset-body{min-height:330px}
}

.header-arrow{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;padding:0;line-height:1}
.header-arrow::before{content:"";width:8px;height:8px;border-top:3px solid #7180aa;border-right:3px solid #7180aa;transform:translateX(-2px) rotate(45deg);box-sizing:border-box}
.nav-back-circle{width:38px;height:38px;min-width:38px;border-radius:50%;border:1px solid #d7deec;background:#fff;box-shadow:0 3px 10px rgba(23,33,105,.08);position:relative;cursor:pointer}
.nav-back-circle::before{content:"";position:absolute;width:9px;height:9px;top:50%;left:52%;border-left:3px solid var(--afs-blue);border-bottom:3px solid var(--afs-blue);transform:translate(-50%,-50%) rotate(45deg)}
.nav-back-circle:hover{background:#f5f8fc;border-color:#bfc9df}
.breadcrumb-with-back{display:flex;align-items:center;gap:12px;margin-bottom:14px}
.breadcrumb-trail{display:flex;align-items:center;gap:8px;min-width:0;flex-wrap:wrap}
.breadcrumb-text{display:flex;align-items:center;min-height:38px}
.hierarchy-logo-placeholder.subproject{color:var(--afs-teal);font-size:32px}
.hierarchy-logo-placeholder.direct{font-size:32px;color:#8894b5}
.subproject-manage-list{display:flex;flex-direction:column;gap:10px;margin:10px 0 6px 18px}
.subproject-manage-card{border:1px solid #dce3ef;border-radius:12px;background:#fbfcfe;padding:10px}
.manage-subtitle{font-size:12px;font-weight:800;color:#7b86a3;text-transform:uppercase;letter-spacing:.3px;margin:8px 0}
.direct-category-list{margin-left:18px}
.fixed-meta{min-height:150px;max-height:150px}
.asset-body{grid-template-rows:70px 150px 58px auto}

.structure-transfer-note{font-size:13px;color:var(--muted);line-height:1.45}
.category-manage-actions{flex-wrap:wrap}
.category-manage-actions .btn{white-space:nowrap}

/* Eén duidelijke keuringscounter per middel */
.asset-status-wrap{
  min-width:190px;
  max-width:250px;
  align-items:flex-end;
}
.asset-status-wrap .countdown-chip{
  max-width:240px;
  text-align:center;
  white-space:normal;
  line-height:1.2;
  min-height:34px;
  padding:7px 11px;
  border-radius:999px;
  font-size:12px;
  font-weight:800;
}
.countdown-neutral{
  background:#eef1f6;
  color:#66718e;
  border:1px solid #d8deea;
}
@media(max-width:680px){
  .asset-status-wrap{min-width:145px;max-width:180px}
  .asset-status-wrap .countdown-chip{max-width:180px;font-size:11px}
}

.home-logo-btn{
  border:0;
  background:transparent;
  padding:0;
  margin:0;
  display:block;
  cursor:pointer;
  border-radius:16px;
  flex:0 0 auto;
}
.home-logo-btn:hover .afs-logo{
  transform:translateY(-1px);
  box-shadow:0 9px 22px rgba(23,33,105,.18);
}
.home-logo-btn:focus-visible{
  outline:3px solid rgba(0,154,156,.45);
  outline-offset:4px;
}
.afs-logo{
  transition:transform .15s ease, box-shadow .15s ease;
}



.tool-icon-field{grid-column:1/-1}.tool-icon-current{display:flex;align-items:center;gap:10px;margin:6px 0 10px;color:var(--muted);font-size:13px}.tool-icon-current img{width:54px;height:54px;border-radius:50%;object-fit:contain;background:#fff;border:1px solid var(--line);padding:6px;box-sizing:border-box}.tool-icon-library{display:grid;grid-template-columns:repeat(auto-fit,minmax(104px,1fr));gap:9px;margin-top:8px}.tool-icon-option{position:relative;border:1px solid var(--line);border-radius:12px;min-height:94px;background:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;padding:8px;cursor:pointer;text-align:center}.tool-icon-option:hover{border-color:#aebbd7;box-shadow:0 3px 10px rgba(23,33,105,.08)}.tool-icon-option input{position:absolute;top:7px;right:7px}.tool-icon-option img{width:46px;height:46px;object-fit:contain}.tool-icon-option small{font-size:11px;font-weight:700;color:#56617d;line-height:1.15}.tool-icon-auto,.tool-icon-none{width:46px;height:46px;border-radius:50%;display:grid;place-items:center;background:#f0f4fa;color:var(--afs-blue);font-weight:900;font-size:21px}.tool-icon-upload{margin-top:12px}.asset-title-plain{display:flex;align-items:flex-start;gap:12px;min-width:0}.tool-icon-badge{width:54px;height:54px;flex:0 0 54px;border-radius:50%;overflow:hidden;display:grid;place-items:center;background:#fff;border:1px solid rgba(23,33,105,.14);box-shadow:0 4px 12px rgba(23,33,105,.12)}.tool-icon-badge img{width:80%;height:80%;object-fit:contain}.tool-icon-badge.detail{width:62px;height:62px;flex-basis:62px}.detail-tool-heading{display:flex;align-items:center;gap:12px;margin-bottom:16px;font-size:20px;color:var(--afs-blue)}.asset-photo.tool-hero{display:flex;align-items:center;justify-content:center;background:linear-gradient(180deg,#f8fbff,#eef4fb)}.asset-tool-hero-icon{width:min(70%,140px);height:min(70%,140px);object-fit:contain;filter:drop-shadow(0 8px 18px rgba(23,33,105,.10))}.hierarchy-lock-panel{grid-column:1/-1;background:#f7f9fc;border:1px solid var(--line);border-radius:12px;padding:12px}.hierarchy-lock-row{display:grid;grid-template-columns:120px 1fr;gap:10px;padding:5px 0;border-bottom:1px solid #e7ebf3}.hierarchy-lock-row:last-of-type{border-bottom:0}.hierarchy-lock-row span{color:var(--muted);font-size:13px}.direct-area-card .hierarchy-logo-placeholder{color:var(--afs-teal)}@media(max-width:680px){.tool-icon-library{grid-template-columns:repeat(3,1fr)}.tool-icon-badge{width:46px;height:46px;flex-basis:46px}.hierarchy-lock-row{grid-template-columns:100px 1fr}}


/* Compact explicit tool icons in category buttons and tool tiles */
.category-tool-chip{display:inline-flex;align-items:center;gap:7px;height:40px;padding:8px 12px;box-sizing:border-box}
.category-tool-chip-icon{width:20px;height:20px;flex:0 0 20px;display:inline-flex;align-items:center;justify-content:center}
.category-tool-chip-icon img{width:20px;height:20px;object-fit:contain;display:block}
.category-tool-chip.active .category-tool-chip-icon img{filter:brightness(0) invert(1)}
.tool-title-icon{width:34px;height:34px;flex:0 0 34px;display:inline-flex;align-items:center;justify-content:center;margin-top:1px}
.tool-title-icon img{width:34px;height:34px;object-fit:contain;display:block}
.asset-title-plain{display:flex;align-items:flex-start;gap:10px;min-width:0;max-width:calc(100% - 170px)}
.asset-title-plain>div{min-width:0}
@media(max-width:680px){
  .category-tool-chip{height:38px;padding:7px 10px;gap:6px}
  .category-tool-chip-icon,.category-tool-chip-icon img{width:18px;height:18px}
  .tool-title-icon,.tool-title-icon img{width:30px;height:30px}
  .tool-title-icon{flex-basis:30px}
  .asset-title-plain{max-width:calc(100% - 150px)}
}


/* Categorie-icoon is de enige bron voor iconen op categorieknoppen en Tool-tegels */
.category-chip-with-icon{
  display:inline-flex;
  align-items:center;
  gap:7px;
}
.category-button-icon{
  width:20px;
  height:20px;
  flex:0 0 20px;
  display:grid;
  place-items:center;
  overflow:hidden;
}
.category-button-icon img{
  width:100%;
  height:100%;
  object-fit:contain;
}

.category-tool-hero{
  display:flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(180deg,#f8fbff,#eef4fb);
}
.category-tool-hero-icon{
  width:min(64%,132px);
  height:min(64%,132px);
  object-fit:contain;
  display:block;
}
.category-tool-title-icon{
  width:36px;
  height:36px;
  flex:0 0 36px;
  display:grid;
  place-items:center;
  overflow:hidden;
}
.category-tool-title-icon img{
  width:100%;
  height:100%;
  object-fit:contain;
}
.asset-title-with-icon{
  display:flex;
  align-items:flex-start;
  gap:10px;
  min-width:0;
}
.category-icon-source-note{
  grid-column:1/-1;
}
@media(max-width:680px){
  .category-button-icon{width:18px;height:18px;flex-basis:18px}
  .category-tool-title-icon{width:32px;height:32px;flex-basis:32px}
}

.boot-status{
  margin:0 0 14px;
  padding:11px 14px;
  border-radius:12px;
  font-size:13px;
  font-weight:700;
}
.boot-status.loading{background:#eef4ff;color:#263b82;border:1px solid #cfd9f2}
.boot-status.error{background:#fff0f0;color:#a61f1f;border:1px solid #efb0b0}


/* Vergrote en visueel duidelijkere iconen in categorieknoppen en tool-tegels */
.category-chip-with-icon{gap:9px;}
.category-button-icon{width:22px;height:22px;flex:0 0 22px;display:grid;place-items:center;overflow:hidden;}
.category-button-icon img{width:100%;height:100%;object-fit:contain;transform:scale(1.45);transform-origin:center center;display:block;}

.asset-photo.tool-hero, .category-tool-hero{display:flex;align-items:center;justify-content:center;background:linear-gradient(180deg,#f8fbff,#eef4fb);padding:16px;box-sizing:border-box;overflow:hidden;}
.asset-tool-hero-icon, .category-tool-hero-icon{width:min(78%,190px);height:min(78%,190px);object-fit:contain;display:block;transform:scale(1.35);transform-origin:center center;filter:drop-shadow(0 10px 18px rgba(23,33,105,.12));}

.tool-title-icon, .category-tool-title-icon{width:34px;height:34px;flex:0 0 34px;display:grid;place-items:center;overflow:hidden;}
.tool-title-icon img, .category-tool-title-icon img{width:100%;height:100%;object-fit:contain;transform:scale(1.45);transform-origin:center center;display:block;}
.asset-title-plain{display:flex;align-items:flex-start;gap:10px;min-width:0;}
.asset-title-plain > div{min-width:0;}

@media(max-width:680px){
  .category-button-icon{width:20px;height:20px;flex-basis:20px;}
  .asset-tool-hero-icon, .category-tool-hero-icon{width:min(74%,150px);height:min(74%,150px);transform:scale(1.25);}
  .tool-title-icon, .category-tool-title-icon{width:30px;height:30px;flex-basis:30px;}
}


/* Extra vergroting tool-iconen zonder buttons of tegels te vergroten */
.category-chip-with-icon{gap:10px;}
.category-button-icon{width:24px;height:24px;flex:0 0 24px;}
.category-button-icon img{transform:scale(1.75);}

.asset-photo.tool-hero, .category-tool-hero{padding:12px;}
.asset-tool-hero-icon, .category-tool-hero-icon{width:min(84%,220px);height:min(84%,220px);transform:scale(1.55);}

.tool-title-icon, .category-tool-title-icon{width:40px;height:40px;flex:0 0 40px;}
.tool-title-icon img, .category-tool-title-icon img{transform:scale(1.75);}

@media(max-width:680px){
  .category-button-icon{width:22px;height:22px;flex-basis:22px;}
  .category-button-icon img{transform:scale(1.6);}
  .asset-tool-hero-icon, .category-tool-hero-icon{width:min(80%,170px);height:min(80%,170px);transform:scale(1.4);}
  .tool-title-icon, .category-tool-title-icon{width:36px;height:36px;flex-basis:36px;}
  .tool-title-icon img, .category-tool-title-icon img{transform:scale(1.6);}
}


/* Compact beheeracties: één vast 3-lijnen-menu rechts per rij */
.area-manage-head,
.project-manage-head,
.category-manage-row{
  position:relative;
  align-items:center;
}
.category-manage-actions{
  margin-left:auto;
  flex:0 0 auto;
  display:flex;
  justify-content:flex-end;
  align-items:center;
  min-width:46px;
}
.manage-action-menu{
  position:relative;
  margin-left:auto;
}
.manage-action-trigger{
  width:40px;
  height:40px;
  border:1px solid #d7deec;
  background:#fff;
  border-radius:12px;
  display:grid;
  place-items:center;
  cursor:pointer;
  list-style:none;
  box-shadow:0 2px 7px rgba(23,33,105,.06);
  transition:background .15s ease,border-color .15s ease,box-shadow .15s ease;
}
.manage-action-trigger::-webkit-details-marker{display:none}
.manage-action-trigger::marker{display:none;content:""}
.manage-action-trigger:hover,
.manage-action-menu[open] .manage-action-trigger{
  background:#f4f7fb;
  border-color:#aebbd7;
  box-shadow:0 4px 12px rgba(23,33,105,.10);
}
.manage-menu-lines{
  width:18px;
  height:14px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
}
.manage-menu-lines i{
  display:block;
  width:18px;
  height:2px;
  border-radius:999px;
  background:var(--afs-blue);
}
.manage-action-panel{
  position:absolute;
  right:0;
  top:46px;
  z-index:60;
  width:max-content;
  min-width:190px;
  max-width:260px;
  padding:7px;
  background:#fff;
  border:1px solid #d7deec;
  border-radius:12px;
  box-shadow:0 14px 30px rgba(23,33,105,.16);
  display:flex;
  flex-direction:column;
  gap:4px;
}
.manage-action-panel .manage-menu-item{
  width:100%;
  min-height:38px;
  justify-content:flex-start;
  text-align:left;
  border-radius:8px;
  padding:8px 11px;
  border-color:transparent;
  background:transparent;
  box-shadow:none;
  white-space:nowrap;
}
.manage-action-panel .manage-menu-item:hover{
  background:#f3f6fb;
  border-color:transparent;
}
.manage-action-panel .manage-menu-item.btn-primary{
  color:var(--afs-blue);
  background:#eef2ff;
}
.manage-action-panel .manage-menu-item.btn-danger{
  color:#d13b3b;
  background:#fff2f2;
}
.manage-action-panel .manage-menu-item.btn-danger:hover{background:#ffe7e7}

/* Alle menuknoppen staan exact op dezelfde rechterlijn. */
.area-manage-head > .category-manage-actions,
.project-manage-head > .category-manage-actions,
.category-manage-row > .category-manage-actions{
  align-self:center;
  margin-left:auto;
}

@media(max-width:680px){
  .manage-action-trigger{width:38px;height:38px}
  .manage-action-panel{min-width:180px;max-width:230px;right:0}
}


/* v37 icon scaling + language toggle */
#languageBtn{min-width:132px}
.category-button-icon{width:30px;height:30px;flex:0 0 30px;display:grid;place-items:center;overflow:visible;}
.category-button-icon img{width:100%;height:100%;object-fit:contain;transform:scale(2.15);transform-origin:center center;display:block;}
.asset-tool-hero-icon, .category-tool-hero-icon{width:min(94%,280px);height:min(94%,280px);object-fit:contain;display:block;transform:scale(2.25);transform-origin:center center;filter:drop-shadow(0 12px 20px rgba(23,33,105,.14));}
.tool-title-icon, .category-tool-title-icon{width:56px;height:56px;flex:0 0 56px;display:grid;place-items:center;overflow:visible;}
.tool-title-icon img, .category-tool-title-icon img{width:100%;height:100%;object-fit:contain;transform:scale(2.3);transform-origin:center center;display:block;}
@media(max-width:760px){
  #languageBtn{min-width:110px}
  .category-button-icon{width:26px;height:26px;flex-basis:26px}
  .category-button-icon img{transform:scale(1.95)}
  .asset-tool-hero-icon, .category-tool-hero-icon{width:min(88%,210px);height:min(88%,210px);transform:scale(1.9)}
  .tool-title-icon, .category-tool-title-icon{width:44px;height:44px;flex-basis:44px}
  .tool-title-icon img, .category-tool-title-icon img{transform:scale(1.95)}
}


/* v38 - compacte keuringsstatus, actieve keurmaand rood */
.asset-status-wrap{
  min-width:128px;
  max-width:150px;
}
.countdown-chip{
  width:100%;
  box-sizing:border-box;
  white-space:normal;
  line-height:1.08;
  padding:7px 9px;
}
.countdown-line{
  display:block;
  text-align:center;
}
.countdown-number{
  font-size:1.08em;
  font-weight:900;
  margin:2px 0;
}
.countdown-inspection{
  background:#fff0f0 !important;
  color:#c92a2a !important;
  border:1px solid #ff8787 !important;
}
.detail-countdown.countdown-inspection{
  margin-top:6px;
  padding:8px 10px;
  border-radius:10px;
  font-weight:800;
  max-width:220px;
}
.detail-countdown .countdown-line{
  text-align:left;
}
.detail-countdown .countdown-number{
  font-size:1.12em;
}

/* Detailacties compact in één menu */
.detail-actions-compact{
  justify-content:flex-end;
  align-items:flex-end;
  gap:10px;
}
.detail-action-menu{
  position:relative;
}
.detail-menu-trigger{
  list-style:none;
  cursor:pointer;
  min-width:124px;
  text-align:center;
}
.detail-menu-trigger::-webkit-details-marker{display:none}
.detail-action-panel{
  position:absolute;
  right:0;
  bottom:calc(100% + 8px);
  min-width:230px;
  background:#fff;
  border:1px solid var(--line);
  border-radius:14px;
  box-shadow:0 14px 34px rgba(23,33,105,.18);
  padding:7px;
  z-index:30;
}
.detail-action-item{
  width:100%;
  border:0;
  background:transparent;
  color:var(--afs-blue);
  text-align:left;
  padding:11px 12px;
  border-radius:9px;
  font:inherit;
  font-weight:750;
  cursor:pointer;
}
.detail-action-item:hover{
  background:#f1f5fb;
}
@media(max-width:680px){
  .asset-status-wrap{min-width:116px;max-width:132px}
  .detail-action-panel{
    position:fixed;
    left:14px;
    right:14px;
    bottom:78px;
    min-width:0;
  }
  .detail-actions-compact{
    position:sticky;
    bottom:0;
    background:#fff;
    padding-top:10px;
    z-index:20;
  }
}


/* v39 - keurstatus weer compact en oranje */
.asset-status-wrap{
  min-width:112px;
  max-width:136px;
}
.countdown-chip{
  width:auto;
  min-width:0;
  max-width:136px;
  padding:6px 9px;
  white-space:normal;
  line-height:1.08;
  border-radius:999px;
  font-size:12px;
}
.countdown-line{
  display:block;
  text-align:center;
}
.countdown-soon{
  background:#fff4df !important;
  color:#a65f00 !important;
  border:1px solid #f2bd63 !important;
}
.detail-countdown.countdown-soon{
  display:inline-block;
  width:auto;
  max-width:210px;
  padding:7px 10px;
  border-radius:10px;
  margin-top:6px;
  font-weight:800;
}
.detail-countdown.countdown-soon .countdown-line{
  text-align:left;
}

/* oude rode keurmaandstijl overschrijven */
.countdown-inspection{
  background:#fff4df !important;
  color:#a65f00 !important;
  border:1px solid #f2bd63 !important;
}

@media(max-width:680px){
  .asset-status-wrap{
    min-width:104px;
    max-width:124px;
  }
  .countdown-chip{
    max-width:124px;
    font-size:11px;
    padding:6px 8px;
  }
}


/* v40 - volledig fotobeheer */
.photo-manage-gallery{
  grid-template-columns:repeat(auto-fill,minmax(170px,1fr));
  gap:12px;
}
.photo-manage-card{
  border:1px solid var(--line);
  border-radius:13px;
  background:#fff;
  overflow:hidden;
  box-shadow:0 2px 8px rgba(23,33,105,.05);
}
.photo-manage-card.is-primary{
  border:2px solid var(--afs-teal);
}
.photo-preview-btn{
  display:block;
  width:100%;
  border:0;
  padding:0;
  background:#eef2f8;
  cursor:pointer;
}
.photo-preview-btn img{
  width:100%;
  height:145px;
  display:block;
  object-fit:cover;
  border:0;
  border-radius:0;
}
.photo-manage-meta{
  min-height:30px;
  padding:8px 9px 3px;
  display:flex;
  flex-direction:column;
  gap:4px;
}
.photo-primary-badge{
  display:inline-flex;
  width:max-content;
  max-width:100%;
  padding:3px 7px;
  border-radius:999px;
  background:#e8f8ef;
  color:#16854a;
  font-size:11px;
  font-weight:850;
}
.photo-description{
  color:var(--muted);
  font-size:12px;
}
.photo-manage-actions{
  display:flex;
  gap:6px;
  padding:8px 9px 10px;
  flex-wrap:wrap;
}
.photo-manage-actions .btn{
  flex:1 1 auto;
  min-width:0;
  white-space:normal;
  line-height:1.1;
}
.photo-large-preview{
  display:flex;
  justify-content:center;
  align-items:center;
  background:#f4f7fb;
  border-radius:14px;
  padding:10px;
}
.photo-large-preview img{
  display:block;
  max-width:100%;
  max-height:70vh;
  object-fit:contain;
  border-radius:10px;
}
@media(max-width:680px){
  .photo-manage-gallery{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .photo-preview-btn img{
    height:120px;
  }
}


/* v41 - desktop drag & drop structuurvolgorde */
.desktop-drag-hint{
  color:var(--afs-teal);
  font-weight:750;
}
@media(pointer:fine) and (min-width:900px){
  .desktop-draggable{
    cursor:grab;
    transition:transform .12s ease, box-shadow .12s ease, opacity .12s ease;
  }
  .desktop-draggable:active{
    cursor:grabbing;
  }
  .desktop-draggable.is-dragging{
    opacity:.55;
    box-shadow:0 10px 24px rgba(23,33,105,.16);
  }
  .desktop-draggable.drag-over-before{
    box-shadow:inset 0 3px 0 var(--afs-teal);
  }
  .desktop-draggable.drag-over-after{
    box-shadow:inset 0 -3px 0 var(--afs-teal);
  }
  .manage-name-with-logo::before{
    content:"⋮⋮";
    letter-spacing:-3px;
    color:#9aa7bd;
    font-weight:900;
    font-size:18px;
    margin-right:5px;
    opacity:.7;
  }
}
@media(pointer:coarse), (max-width:899px){
  .desktop-drag-hint{display:none}
  .desktop-draggable{cursor:default}
}


/* v42 - de drie-streepjesknop is op pc ook de sleephendel */
.manage-menu-lines{
  width:18px;
  height:16px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:space-between;
}
.manage-menu-lines i{
  width:18px;
  height:3px;
  flex:0 0 3px;
}
@media(pointer:fine) and (min-width:900px){
  .structure-drag-handle{
    cursor:grab !important;
    user-select:none;
  }
  .structure-drag-handle:active,
  .structure-drag-handle.is-dragging-handle{
    cursor:grabbing !important;
    background:#eaf1fb;
    border-color:var(--afs-teal);
  }
  .desktop-draggable{
    cursor:default;
  }
}

/* Toolfoto blijft in hetzelfde vaste bovenste tegelvak, maar vult niet meer het hele vak */
.asset-photo.photo-stage{
  display:flex;
  align-items:center;
  justify-content:center;
  padding:16px;
  box-sizing:border-box;
  background:linear-gradient(180deg,#f8fbff,#eef4fb);
  overflow:hidden;
}
.asset-photo-frame{
  width:min(78%,310px);
  aspect-ratio:16/9;
  max-height:78%;
  border-radius:14px;
  overflow:hidden;
  background:#fff;
  border:1px solid #dce4f0;
  box-shadow:0 7px 18px rgba(23,33,105,.10);
}
.asset-photo-framed{
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
}

/* desktop kaderkeuze / focal-point editor */
.photo-position-editor{
  margin:10px 0 16px;
}
.photo-position-help{
  margin-bottom:8px;
  color:var(--muted);
  font-size:13px;
}
.photo-crop-frame{
  width:min(100%,640px);
  aspect-ratio:16/9;
  margin:0 auto;
  position:relative;
  overflow:hidden;
  border-radius:14px;
  background:#edf2f8;
  border:2px solid #d7dfed;
  cursor:default;
  touch-action:none;
}
@media(pointer:fine) and (min-width:900px){
  .photo-crop-frame{
    cursor:grab;
  }
  .photo-crop-frame.is-positioning{
    cursor:grabbing;
    border-color:var(--afs-teal);
    box-shadow:0 0 0 3px rgba(0,166,166,.12);
  }
}
.photo-crop-frame img{
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
  user-select:none;
  pointer-events:none;
}
.photo-crop-guide{
  position:absolute;
  inset:0;
  pointer-events:none;
  border:1px solid rgba(255,255,255,.65);
  box-shadow:inset 0 0 0 1px rgba(23,33,105,.12);
}
.photo-crop-guide::before,
.photo-crop-guide::after{
  content:"";
  position:absolute;
  background:rgba(255,255,255,.55);
}
.photo-crop-guide::before{
  top:33.333%;
  left:0;
  right:0;
  height:1px;
  box-shadow:0 calc(100% * 0 + 0px) 0 transparent;
}
.photo-crop-guide::after{
  top:0;
  bottom:0;
  left:33.333%;
  width:1px;
}
.photo-position-readout{
  text-align:center;
  margin-top:6px;
  font-size:11px;
  color:#8490a8;
}

/* thumbnails gebruiken ook hetzelfde gekozen zichtbare deel */
.photo-preview-btn img{
  object-fit:cover;
}

@media(max-width:680px){
  .asset-photo.photo-stage{padding:12px}
  .asset-photo-frame{width:84%;max-height:80%}
}


/* v44 - heldere detailsecties */
.tool-detail-section{margin:18px 0 0}
.tool-detail-section-title{
  margin:0 0 10px;
  padding-bottom:7px;
  border-bottom:2px solid #e5ebf4;
  color:var(--afs-blue);
  font-size:15px;
  font-weight:900;
}
.detail-status-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:34px;
  max-width:180px;
  padding:6px 11px;
  border-radius:12px;
  box-sizing:border-box;
  font-weight:850;
  text-align:center;
}
.detail-status-badge.countdown-soon{background:#fff4df;color:#a65f00;border:1px solid #f2bd63}
.detail-status-badge.countdown-expired{background:#fff0f0;color:#c92a2a;border:1px solid #ff8787}
.detail-status-badge.countdown-valid{background:#eaf8ef;color:#198754;border:1px solid #a6dfba}
.detail-status-badge.countdown-neutral{background:#f1f4f8;color:#5a6680;border:1px solid #d9e0eb}

/* uitklapbare keuringshistorie */
.inspection-history-list{display:flex;flex-direction:column;gap:9px}
.inspection-history-item{border:1px solid var(--line);border-radius:12px;background:#fff;overflow:hidden}
.inspection-history-item>summary{list-style:none;cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 13px;background:#fbfcfe}
.inspection-history-item>summary::-webkit-details-marker{display:none}
.inspection-history-item>summary::after{content:"⌄";font-size:18px;color:#78849b;transition:transform .15s ease}
.inspection-history-item[open]>summary::after{transform:rotate(180deg)}
.inspection-history-summary-main{display:flex;flex-direction:column;gap:3px;min-width:0}
.inspection-history-count{margin-left:auto;color:#6c7890;font-size:12px;white-space:nowrap}
.inspection-history-body{padding:13px;border-top:1px solid #edf0f5}
.inspection-history-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.inspection-history-grid>div{background:#f6f8fb;border-radius:9px;padding:9px 10px}
.inspection-history-grid .full{grid-column:1/-1}
.inspection-history-grid span{display:block;color:#71809a;font-size:11px;margin-bottom:3px}
.inspection-history-grid strong{display:block;color:var(--afs-blue);white-space:pre-wrap;word-break:break-word}

/* keuringsbijlagen */
.inspection-attachment-section{margin-top:12px}
.inspection-attachment-section h5{margin:0 0 7px;color:var(--afs-blue)}
.inspection-attachment-list{display:flex;flex-direction:column;gap:6px}
.inspection-attachment-row{display:flex;align-items:center;gap:8px;padding:7px 8px;border:1px solid #e1e7f0;border-radius:9px;background:#fff}
.inspection-attachment-link{flex:1 1 auto;min-width:0;display:flex;gap:7px;align-items:center;color:var(--afs-blue);font-weight:750;text-decoration:none}
.inspection-attachment-link span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.inspection-add-attachment{display:flex;align-items:center;gap:8px;margin-top:9px;flex-wrap:wrap}
.inspection-add-attachment input[type=file]{flex:1 1 250px;min-width:180px}

@media(max-width:680px){
  .inspection-history-grid{grid-template-columns:1fr}
  .inspection-history-grid .full{grid-column:auto}
  .inspection-attachment-row{align-items:flex-start;flex-direction:column}
  .inspection-attachment-row .btn{width:100%}
}


/* v45 - Tool formulier volgt dezelfde indeling als detailweergave */
.tool-form-section{
  margin:0 0 18px;
}
.tool-form-section + .tool-form-section{
  padding-top:4px;
}
.tool-form-section .tool-detail-section-title{
  margin-bottom:12px;
}
.full-field{
  grid-column:1/-1;
}
.asset-form-lock{
  margin-top:2px;
}
.tool-card-meta{
  grid-template-rows:repeat(6,minmax(0,auto));
}
.detail-action-danger{
  color:#c83232 !important;
}
.detail-action-danger:hover{
  background:#fff0f0 !important;
}


/* v46 - Tool verwijderen los naast Acties */
.detail-actions-compact{
  display:flex;
  justify-content:flex-end;
  align-items:center;
  gap:9px;
}
.detail-delete-tool{
  order:0;
}
.detail-action-menu{
  order:1;
}
#closeBtn{
  order:2;
}
@media(max-width:680px){
  .detail-actions-compact{
    display:grid;
    grid-template-columns:1fr 1fr;
  }
  .detail-delete-tool,
  .detail-action-menu .detail-menu-trigger{
    width:100%;
  }
  #closeBtn{
    grid-column:1/-1;
    width:100%;
  }
}


/* v47 - snelle lege plus-tegel voor nieuwe Tool */
.asset-add-card{
  min-height:100%;
  border:2px dashed #c7d2e5;
  background:linear-gradient(180deg,#fbfdff,#f4f8fc);
  color:var(--afs-blue);
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  transition:border-color .15s ease, box-shadow .15s ease, transform .15s ease, background .15s ease;
}
.asset-add-card:hover{
  border-color:var(--afs-teal);
  box-shadow:0 10px 26px rgba(23,33,105,.10);
  transform:translateY(-1px);
  background:#f8fcff;
}
.asset-add-card-inner{
  min-height:260px;
  width:100%;
  padding:28px 18px;
  box-sizing:border-box;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:8px;
  text-align:center;
}
.asset-add-plus{
  width:72px;
  height:72px;
  border-radius:50%;
  display:grid;
  place-items:center;
  font-size:46px;
  line-height:1;
  font-weight:500;
  color:var(--afs-teal);
  background:#fff;
  border:1px solid #dce4f0;
  box-shadow:0 8px 22px rgba(23,33,105,.08);
}
.asset-add-card strong{font-size:18px;color:var(--afs-blue)}
.asset-add-card span:last-child{font-size:13px;color:var(--muted)}
@media(max-width:680px){
  .asset-add-card-inner{min-height:210px}
  .asset-add-plus{width:62px;height:62px;font-size:40px}
}


/* v49 - plus-tegel op elk structuurniveau */
.hierarchy-add-card{
  border:2px dashed #c7d2e5 !important;
  background:linear-gradient(180deg,#fbfdff,#f4f8fc) !important;
  min-height:100%;
  cursor:pointer;
  display:flex;
  align-items:stretch;
  justify-content:stretch;
  transition:border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.hierarchy-add-card:hover{
  border-color:var(--afs-teal) !important;
  box-shadow:0 10px 26px rgba(23,33,105,.10);
  transform:translateY(-1px);
}
.hierarchy-add-card-inner{
  min-height:285px;
  width:100%;
  padding:26px 18px;
  box-sizing:border-box;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  gap:8px;
  text-align:center;
}
.hierarchy-add-plus{
  width:72px;
  height:72px;
  border-radius:50%;
  display:grid;
  place-items:center;
  font-size:46px;
  line-height:1;
  color:var(--afs-teal);
  background:#fff;
  border:1px solid #dce4f0;
  box-shadow:0 8px 22px rgba(23,33,105,.08);
}
.hierarchy-add-card strong{
  color:var(--afs-blue);
  font-size:19px;
}
.hierarchy-add-card span:last-child{
  color:var(--muted);
  font-size:13px;
}
.category-add-chip{
  border-style:dashed !important;
  color:var(--afs-teal) !important;
  font-weight:800 !important;
}
@media(max-width:680px){
  .hierarchy-add-card-inner{min-height:225px}
  .hierarchy-add-plus{width:62px;height:62px;font-size:40px}
}


/* v50 - meldingsinstellingen */
.notification-settings{
  display:flex;
  flex-direction:column;
  gap:14px;
}
.notification-intro{
  margin:0;
  color:var(--muted);
  line-height:1.45;
}
.notification-setting-block{
  display:flex;
  flex-direction:column;
  gap:8px;
  padding:13px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#f8faff;
}
.notification-radio{
  display:flex;
  align-items:center;
  gap:9px;
  padding:9px 10px;
  background:#fff;
  border:1px solid #e0e6ef;
  border-radius:9px;
  cursor:pointer;
}
.notification-radio input{
  width:18px;
  height:18px;
}
.notification-critical-info{
  padding:13px;
  border-radius:12px;
  background:#fff4df;
  border:1px solid #f2bd63;
  color:#7a4b00;
}
.notification-critical-info p{
  margin:6px 0 0;
  line-height:1.45;
}
.notification-device-status{
  padding:10px 12px;
  border-radius:10px;
  background:#f1f4f8;
  color:#657189;
  font-weight:750;
}
.notification-device-status.active{
  background:#e9f8ef;
  color:#16834a;
}
.notification-actions{
  flex-wrap:wrap;
}


/* v51 - keuze tussen camera en bestaande foto's/bestanden */
.photo-source-choice{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
  margin-bottom:14px;
}
.photo-source-card{
  border:1px solid var(--line);
  border-radius:14px;
  padding:16px;
  background:#f8faff;
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
  gap:7px;
}
.photo-source-icon{
  font-size:34px;
  line-height:1;
}
.photo-source-card strong{
  color:var(--afs-blue);
  font-size:15px;
}
.photo-source-card > span{
  color:var(--muted);
  font-size:12px;
  min-height:30px;
}
.photo-source-button{
  position:relative;
  cursor:pointer;
  margin-top:3px;
}
.visually-hidden-file{
  position:absolute !important;
  width:1px !important;
  height:1px !important;
  opacity:0 !important;
  overflow:hidden !important;
  pointer-events:none !important;
}
@media(max-width:680px){
  .photo-source-choice{
    grid-template-columns:1fr;
  }
}


/* v52 - klikbare KPI-tegels en globaal keuringsoverzicht */
.stat-card[role="button"]{
  cursor:pointer;
  transition:transform .15s ease, box-shadow .15s ease;
}
.stat-card[role="button"]:hover{
  transform:translateY(-2px);
  box-shadow:0 10px 24px rgba(23,33,105,.12);
}
.stat-card[role="button"]:focus-visible{
  outline:3px solid rgba(40,178,176,.45);
  outline-offset:3px;
}

.inspection-dashboard{
  display:flex;
  flex-direction:column;
  gap:14px;
}
.inspection-dashboard-intro{
  color:var(--muted);
  line-height:1.45;
}
.inspection-dashboard-filters{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
  padding:12px;
  border:1px solid var(--line);
  background:#f8faff;
  border-radius:12px;
}
.inspection-dashboard-summary{
  display:flex;
  align-items:baseline;
  gap:7px;
}
.inspection-dashboard-summary strong{
  color:var(--afs-blue);
  font-size:26px;
}
.inspection-dashboard-summary span{
  color:var(--muted);
}
.inspection-dashboard-list{
  display:flex;
  flex-direction:column;
  gap:8px;
  max-height:55vh;
  overflow:auto;
  padding-right:2px;
}
.inspection-dashboard-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:12px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fff;
}
.inspection-dashboard-main{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:5px;
}
.inspection-dashboard-name{
  font-size:16px;
  font-weight:900;
  color:var(--afs-blue);
}
.inspection-dashboard-meta,
.inspection-dashboard-identifiers{
  display:flex;
  flex-wrap:wrap;
  gap:5px 8px;
  color:var(--muted);
  font-size:12px;
}
.inspection-dashboard-identifiers strong{
  color:#3f4b63;
}
.inspection-dashboard-side{
  display:flex;
  align-items:center;
  gap:8px;
  flex:0 0 auto;
}
@media(max-width:760px){
  .inspection-dashboard-filters{
    grid-template-columns:1fr;
  }
  .inspection-dashboard-row{
    align-items:stretch;
    flex-direction:column;
  }
  .inspection-dashboard-side{
    justify-content:space-between;
  }
}


/* v53 - volledige foto-editor voor mobiel en desktop */
.enhanced-photo-editor{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin:12px 0 15px;
}
.enhanced-photo-editor.hidden{display:none}
.enhanced-photo-toolbar{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
}
.enhanced-photo-frame{
  position:relative;
  width:100%;
  aspect-ratio:16/9;
  overflow:hidden;
  border:2px solid #d7dfeb;
  border-radius:12px;
  background:
    linear-gradient(45deg,#eef2f7 25%,transparent 25%),
    linear-gradient(-45deg,#eef2f7 25%,transparent 25%),
    linear-gradient(45deg,transparent 75%,#eef2f7 75%),
    linear-gradient(-45deg,transparent 75%,#eef2f7 75%);
  background-size:20px 20px;
  background-position:0 0,0 10px,10px -10px,-10px 0;
  cursor:grab;
  touch-action:none;
  user-select:none;
}
.enhanced-photo-frame.is-dragging{cursor:grabbing}
.enhanced-photo-frame img{
  position:absolute;
  left:50%;
  top:50%;
  max-width:none;
  max-height:none;
  width:auto;
  height:auto;
  transform-origin:center center;
  pointer-events:none;
  user-select:none;
  will-change:transform;
}
.enhanced-photo-grid{
  position:absolute;
  inset:0;
  pointer-events:none;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.55);
  background:
    linear-gradient(to right,transparent 33.1%,rgba(255,255,255,.42) 33.2%,rgba(255,255,255,.42) 33.5%,transparent 33.6%,transparent 66.4%,rgba(255,255,255,.42) 66.5%,rgba(255,255,255,.42) 66.8%,transparent 66.9%),
    linear-gradient(to bottom,transparent 33.1%,rgba(255,255,255,.42) 33.2%,rgba(255,255,255,.42) 33.5%,transparent 33.6%,transparent 66.4%,rgba(255,255,255,.42) 66.5%,rgba(255,255,255,.42) 66.8%,transparent 66.9%);
}
.enhanced-photo-zoom{
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  gap:9px;
  align-items:center;
  color:var(--afs-blue);
  font-weight:800;
}
.enhanced-photo-zoom input[type=range]{width:100%}
.enhanced-photo-zoom output{
  min-width:46px;
  text-align:right;
  color:var(--muted);
  font-size:12px;
}
@media(max-width:680px){
  .enhanced-photo-toolbar .btn{flex:1 1 auto}
  .enhanced-photo-frame{border-radius:10px}
}


/* v54 - uniforme keuringsstatus */
.countdown-chip,
.detail-status-badge{
  display:inline-flex;
  align-items:center;
  justify-content:flex-start;
  gap:8px;
  min-height:38px;
  box-sizing:border-box;
  border-radius:10px;
  font-weight:850;
  line-height:1.15;
  white-space:nowrap;
}
.countdown-chip{
  padding:7px 10px;
}
.detail-status-badge{
  width:100%;
  max-width:none !important;
  padding:9px 12px;
}
.detail-status-cell .detail-value{
  width:100%;
}
.status-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:20px;
  font-size:18px;
  font-weight:950;
  line-height:1;
}
.countdown-line{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.countdown-valid,
.detail-status-badge.countdown-valid{
  background:#e9f8ef !important;
  color:#16834a !important;
  border:1px solid #9bd9b2 !important;
}
.countdown-soon,
.detail-status-badge.countdown-soon{
  background:#fff4df !important;
  color:#a86100 !important;
  border:1px solid #f2bd63 !important;
}
.countdown-urgent,
.detail-status-badge.countdown-urgent{
  background:#fff0d7 !important;
  color:#a14d00 !important;
  border:1px solid #ef9b37 !important;
}
.countdown-month,
.detail-status-badge.countdown-month{
  background:#ffe8e8 !important;
  color:#c62929 !important;
  border:1px solid #ef8f8f !important;
}
.countdown-scheduled,
.detail-status-badge.countdown-scheduled{
  background:#e6f7f7 !important;
  color:#047c7b !important;
  border:1px solid #8bd2d1 !important;
}
.countdown-blocked,
.detail-status-badge.countdown-blocked{
  background:#222936 !important;
  color:#fff !important;
  border:1px solid #222936 !important;
}
.countdown-neutral,
.detail-status-badge.countdown-neutral{
  background:#f1f4f8 !important;
  color:#5a6680 !important;
  border:1px solid #d9e0eb !important;
}
.asset-status-wrap .countdown-chip{
  max-width:100% !important;
  min-width:190px;
}
.inspection-advice-button{
  width:100%;
  margin-top:10px;
  border:0;
  border-radius:10px;
  min-height:42px;
  padding:9px 12px;
  font-weight:900;
  cursor:pointer;
  text-align:center;
}
.inspection-advice-needed{
  background:#fff4df;
  color:#9d5b00;
  border:1px solid #f2bd63;
}
.inspection-advice-scheduled{
  background:#e6f7f7;
  color:#047c7b;
  border:1px solid #8bd2d1;
}
.appointment-asset-summary{
  margin-bottom:12px;
  padding:12px;
  background:#f8faff;
  border:1px solid var(--line);
  border-radius:12px;
}
.appointment-summary-title{
  color:var(--afs-blue);
  font-weight:900;
  margin-bottom:8px;
}
.appointment-summary-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:7px;
}
.appointment-summary-grid > div{
  background:#fff;
  border:1px solid #e4e9f1;
  border-radius:8px;
  padding:8px 9px;
}
.appointment-summary-grid .wide{
  grid-column:1/-1;
}
.appointment-summary-grid span{
  display:block;
  color:var(--muted);
  font-size:10px;
  margin-bottom:2px;
}
.appointment-summary-grid strong{
  color:var(--afs-blue);
  font-size:13px;
}
.btn-warning{
  background:#fff4df;
  color:#9d5b00;
  border:1px solid #f2bd63;
}
@media(max-width:680px){
  .countdown-chip,
  .detail-status-badge{
    min-height:40px;
  }
  .asset-status-wrap .countdown-chip{
    min-width:0;
    width:100%;
  }
  .appointment-summary-grid{
    grid-template-columns:1fr;
  }
  .appointment-summary-grid .wide{
    grid-column:auto;
  }
}


/* v55 - status volledig over de breedte en hele Tool-tegel klikbaar */
.asset-card[role="button"]{
  cursor:pointer;
}
.asset-card[role="button"]:focus-visible{
  outline:3px solid rgba(40,178,176,.45);
  outline-offset:3px;
}
.asset-card[role="button"]:hover{
  transform:translateY(-1px);
}
.asset-top-title-only{
  align-items:flex-start;
  margin-bottom:8px;
}
.asset-status-full{
  width:100%;
  margin:0 0 12px;
}
.asset-status-full .countdown-chip{
  width:100%;
  max-width:none !important;
  min-width:0 !important;
  justify-content:flex-start;
  white-space:nowrap;
  overflow:hidden;
}
.asset-status-full .countdown-line{
  flex:1 1 auto;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.tool-card-meta{
  margin-top:0;
}
@media(max-width:680px){
  .asset-status-full .countdown-chip{
    font-size:13px;
  }
}


/* v56 - Tool-tegel status over volle breedte + metadata compacter */
.asset-card .asset-body{
  display:flex;
  flex-direction:column;
}
.asset-card .asset-top-title-only{
  margin-bottom:8px !important;
}
.asset-card .asset-status-full{
  width:100%;
  margin:0 0 10px !important;
}
.asset-card .tool-card-status-chip{
  position:relative;
  width:100% !important;
  max-width:none !important;
  min-width:0 !important;
  min-height:42px;
  display:grid !important;
  grid-template-columns:32px minmax(0,1fr) 32px;
  align-items:center;
  padding:8px 10px !important;
  box-sizing:border-box;
}
.asset-card .tool-card-status-chip .status-icon{
  grid-column:1;
  justify-self:start;
  min-width:0;
  width:24px;
  font-size:18px;
}
.asset-card .tool-card-status-chip .countdown-line{
  grid-column:2;
  justify-self:center;
  text-align:center;
  width:100%;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.asset-card .tool-card-meta{
  margin-top:0 !important;
  padding-top:0 !important;
  flex:none !important;
  min-height:0 !important;
  height:auto !important;
  grid-template-rows:none !important;
}
.asset-card .fixed-meta{
  min-height:0 !important;
  height:auto !important;
}
.asset-card .appointment-slot{
  margin-top:10px !important;
  min-height:0 !important;
  height:auto !important;
  position:static !important;
}
.asset-card .appointment-note-card{
  position:static !important;
  margin:0 !important;
  width:100%;
  box-sizing:border-box;
  text-align:left;
  line-height:1.25;
}
.asset-card .card-actions{
  margin-top:auto;
  padding-top:12px;
}
@media(max-width:680px){
  .asset-card .tool-card-status-chip{
    grid-template-columns:28px minmax(0,1fr) 28px;
    min-height:40px;
    font-size:13px;
  }
}


/* v57 - bredere statusbuttons op Tool-tegels */
.asset-card .asset-status-full{
  width:100% !important;
}
.asset-card .tool-card-status-chip{
  width:100% !important;
  max-width:none !important;
  min-width:0 !important;
  box-sizing:border-box;
  padding-left:12px !important;
  padding-right:12px !important;
}
.asset-card .tool-card-status-chip .countdown-line{
  max-width:none !important;
  width:100% !important;
  overflow:visible !important;
  text-overflow:clip !important;
}


/* v58 - uniforme kaartknoppen en kortere statusteksten */
.asset-card .tool-card-status-chip{
  min-height:40px !important;
  height:40px !important;
  border-radius:11px !important;
  padding:7px 12px !important;
}
.asset-card .tool-card-status-chip .countdown-line{
  font-size:13px;
  font-weight:850;
  text-align:center;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  white-space:nowrap !important;
}
.asset-card .appointment-note-card{
  min-height:40px;
  display:flex;
  align-items:center;
  padding:8px 10px !important;
  border-radius:10px;
  font-size:12px;
  font-weight:800;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.asset-card .uniform-card-actions{
  display:grid !important;
  grid-template-columns:1fr 1fr !important;
  gap:8px !important;
  align-items:stretch;
}
.asset-card .uniform-card-actions .btn,
.asset-card .uniform-card-actions .action-spacer-fixed{
  width:100% !important;
  min-width:0 !important;
  min-height:40px !important;
  height:40px !important;
  box-sizing:border-box;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  line-height:1.05;
  border-radius:10px;
  padding:6px 8px !important;
}
.asset-card .uniform-card-actions .appointment-btn{
  font-size:12px;
  white-space:normal;
}
.asset-card .action-spacer-fixed{
  visibility:hidden;
}
@media(max-width:680px){
  .asset-card .uniform-card-actions{
    grid-template-columns:1fr 1fr !important;
  }
}


/* v59 - onderste Tool-knoppen exact uniform */
.asset-card .card-actions.uniform-card-actions{
  width:100% !important;
  max-width:none !important;
  align-self:stretch !important;
  display:grid !important;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr) !important;
  gap:8px !important;
  margin-top:auto !important;
  padding-top:12px !important;
  box-sizing:border-box !important;
}
.asset-card .card-actions.uniform-card-actions > .btn,
.asset-card .card-actions.uniform-card-actions > .action-spacer-fixed{
  width:100% !important;
  min-width:0 !important;
  max-width:none !important;
  height:42px !important;
  min-height:42px !important;
  max-height:42px !important;
  margin:0 !important;
  padding:6px 8px !important;
  box-sizing:border-box !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  border-radius:10px !important;
  font-size:12px !important;
  font-weight:800 !important;
  line-height:1.05 !important;
  text-align:center !important;
}
.asset-card .card-actions.uniform-card-actions > .btn{
  white-space:normal !important;
  overflow:hidden !important;
}
.asset-card .card-actions.uniform-card-actions > .action-spacer-fixed{
  visibility:hidden !important;
}


/* v60 - bovenste kaartstatus blijft keuringsstatus; afspraakstatus staat alleen apart onderaan */


/* v61 - statusbuttons op tooltegels nooit meer afkappen */
.asset-card .tool-card-status-chip{
  min-height:48px !important;
  height:auto !important;
  padding:8px 12px !important;
  align-items:center !important;
}
.asset-card .tool-card-status-chip .countdown-line{
  white-space:normal !important;
  overflow:visible !important;
  text-overflow:clip !important;
  word-break:break-word !important;
  overflow-wrap:anywhere !important;
  line-height:1.15 !important;
  display:block !important;
  max-width:none !important;
}
.asset-card .tool-card-status-chip .status-icon{
  align-self:center !important;
}
.asset-card .appointment-note-card{
  min-height:44px !important;
  height:auto !important;
  white-space:normal !important;
  overflow:visible !important;
  text-overflow:clip !important;
  overflow-wrap:anywhere !important;
  line-height:1.2 !important;
}


/* v62 - foto bewerken op desktop en mobiel */
.photo-manage-actions {
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}


/* v63 - foto-orientatie automatisch herkennen */
.asset-photo-frame,
.enhanced-photo-frame,
.photo-preview-btn,
.photo-large-preview{
  --photo-frame-ratio:16 / 9;
}
.asset-photo-frame{
  aspect-ratio:var(--photo-frame-ratio) !important;
}
.asset-photo-frame.photo-portrait,
.enhanced-photo-frame.photo-portrait,
.photo-preview-btn.photo-portrait,
.photo-large-preview.photo-portrait{
  --photo-frame-ratio:4 / 5;
}
.asset-photo-frame.photo-square,
.enhanced-photo-frame.photo-square,
.photo-preview-btn.photo-square,
.photo-large-preview.photo-square{
  --photo-frame-ratio:1 / 1;
}
.asset-photo-frame.photo-landscape,
.enhanced-photo-frame.photo-landscape,
.photo-preview-btn.photo-landscape,
.photo-large-preview.photo-landscape{
  --photo-frame-ratio:16 / 9;
}
.enhanced-photo-frame{
  aspect-ratio:var(--photo-frame-ratio) !important;
  max-height:70vh;
}
.photo-large-preview{
  aspect-ratio:var(--photo-frame-ratio);
  display:flex;
  align-items:center;
  justify-content:center;
  background:#f4f7fb;
}
.photo-large-preview img{
  max-width:100%;
  max-height:75vh;
  object-fit:contain;
}
.photo-preview-btn.photo-portrait{
  aspect-ratio:4 / 5;
}
.photo-preview-btn.photo-square{
  aspect-ratio:1 / 1;
}
.photo-preview-btn.photo-landscape{
  aspect-ratio:16 / 9;
}


/* v64 - definitieve Tooltegels + KPI iconen */
.status-grid.status-grid-five{
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:12px;
}
.stat-card{
  position:relative;
  min-height:132px;
  padding:16px 16px 14px !important;
}
.stat-card .stat-icon{
  position:absolute;
  top:12px;
  left:14px;
  width:34px;
  height:34px;
  object-fit:contain;
}
.stat-card.stat-total .stat-icon{
  width:40px;
  height:40px;
  top:10px;
  left:12px;
}
.stat-card .stat-number{
  margin-top:27px;
  font-size:30px;
}
.stat-card .stat-label{
  font-size:13px;
  font-weight:900;
}
.stat-card .stat-sub{
  margin-top:4px;
  font-size:11px;
  color:var(--muted);
}
.stat-card.stat-out-of-service{
  border:1.5px solid #454a52 !important;
  background:#edf0f2 !important;
}
.stat-card.stat-out-of-service .stat-number,
.stat-card.stat-out-of-service .stat-label{
  color:#252b33 !important;
}

.asset-title-status-row{
  display:grid;
  grid-template-columns:64px minmax(0,1fr) 64px;
  align-items:center;
  gap:6px;
  min-height:70px;
  margin-bottom:8px;
}
.tool-title-icon-large{
  width:58px !important;
  height:58px !important;
  display:flex !important;
  align-items:center;
  justify-content:center;
}
.tool-title-icon-large img{
  width:54px !important;
  height:54px !important;
  object-fit:contain;
}
.tool-title-fallback{
  font-size:38px;
}
.asset-title-centered{
  min-width:0;
  text-align:center;
}
.asset-title-centered .asset-name{
  margin:0;
  text-align:center;
  font-size:19px;
  line-height:1.15;
}
.asset-title-centered .asset-number{
  margin-top:4px;
  text-align:center;
}
.tool-card-status-icon{
  width:50px;
  height:50px;
  justify-self:end;
  object-fit:contain;
}
.asset-card .tool-card-meta{
  margin-top:0 !important;
}
.asset-status-bottom{
  width:100%;
  margin:12px 0 0 !important;
}
.tool-card-status-text{
  width:100%;
  min-height:44px;
  box-sizing:border-box;
  border-radius:10px;
  padding:10px 12px;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  font-weight:900;
  line-height:1.2;
  white-space:normal;
  overflow:visible;
}
.tool-card-status-text.countdown-valid{
  background:#e9f8ef;
  color:#16834a;
  border:1px solid #9bd9b2;
}
.tool-card-status-text.countdown-soon{
  background:#fff4df;
  color:#a86100;
  border:1px solid #f2bd63;
}
.tool-card-status-text.countdown-urgent{
  background:#fff0d7;
  color:#a14d00;
  border:1px solid #ef9b37;
}
.tool-card-status-text.countdown-month{
  background:#ffe8e8;
  color:#c62929;
  border:1px solid #ef8f8f;
}
.tool-card-status-text.countdown-blocked{
  background:#edf0f2;
  color:#252b33;
  border:1px solid #8a9199;
}
.asset-card .appointment-slot{
  display:none !important;
}
.phone-action-icon{
  font-size:18px;
  line-height:1;
  margin-right:6px;
}
.asset-card .uniform-card-actions{
  padding-top:10px !important;
}

@media(max-width:1050px){
  .status-grid.status-grid-five{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
}
@media(max-width:720px){
  .status-grid.status-grid-five{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .asset-title-status-row{
    grid-template-columns:54px minmax(0,1fr) 54px;
  }
  .tool-title-icon-large{
    width:50px !important;
    height:50px !important;
  }
  .tool-title-icon-large img{
    width:48px !important;
    height:48px !important;
  }
  .tool-card-status-icon{
    width:44px;
    height:44px;
  }
}
@media(max-width:460px){
  .status-grid.status-grid-five{
    grid-template-columns:1fr;
  }
}


/* v65 - KPI iconen uniform rechtsboven, teller linksboven */
.status-grid.status-grid-five .stat-card{
  position:relative;
  min-height:132px;
  padding:14px 16px 14px !important;
}
.status-grid.status-grid-five .stat-card .stat-icon,
.status-grid.status-grid-five .stat-card.stat-total .stat-icon{
  position:absolute !important;
  top:12px !important;
  right:14px !important;
  left:auto !important;
  width:38px !important;
  height:38px !important;
  max-width:38px !important;
  max-height:38px !important;
  object-fit:contain !important;
}
.status-grid.status-grid-five .stat-card .stat-number{
  position:absolute;
  top:12px;
  left:16px;
  margin:0 !important;
  font-size:30px;
  line-height:38px;
}
.status-grid.status-grid-five .stat-card .stat-label{
  margin-top:50px !important;
  font-size:13px;
  font-weight:900;
}
.status-grid.status-grid-five .stat-card .stat-sub{
  margin-top:4px;
}

/* v65 - statusbalk op Tool-tegel altijd volledige beschikbare breedte */
.asset-card .asset-status-wrap.asset-status-bottom{
  width:100% !important;
  max-width:none !important;
  min-width:0 !important;
  align-self:stretch !important;
  display:block !important;
  margin:12px 0 0 !important;
}
.asset-card .asset-status-bottom .tool-card-status-text{
  width:100% !important;
  max-width:none !important;
  min-width:0 !important;
  box-sizing:border-box !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  text-align:center !important;
  padding:10px 14px !important;
  min-height:46px !important;
}


/* v66 - maandpicker in Tool bekijken + readonly aanmelder */
.detail-month-picker{
  width:100%;
  min-height:38px;
  box-sizing:border-box;
  border:0;
  background:transparent;
  padding:0;
  color:inherit;
  font:inherit;
  font-weight:800;
  opacity:1;
}
.detail-month-picker:disabled{
  color:inherit;
  -webkit-text-fill-color:currentColor;
  opacity:1;
}
#aContact[readonly]{
  background:#f3f6fa;
  color:#526079;
}


/* v67 - reparatie / schade workflow */
.card-actions-three{
  grid-template-columns:repeat(3,minmax(0,1fr)) !important;
}
.btn-repair{
  background:#f3f8fb;
  color:var(--afs-blue);
  border:1px solid #9fb7cf;
}
.btn-repair img{
  width:22px;
  height:22px;
  object-fit:contain;
  margin-right:5px;
}
.repair-card-indicator{
  width:100%;
  margin-top:9px;
}
.repair-card-indicator:empty{
  display:none;
}
.repair-strip{
  width:100%;
  min-height:38px;
  box-sizing:border-box;
  border-radius:9px;
  padding:7px 10px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  font-weight:850;
  cursor:pointer;
}
.repair-strip img{
  width:24px;
  height:24px;
  object-fit:contain;
}
.repair-strip-needed{
  background:#edf0f2;
  color:#263443;
  border:1px solid #9aa7b4;
}
.repair-strip-scheduled{
  background:#eaf5fb;
  color:#174d75;
  border:1px solid #9ac6e3;
}
.repair-summary{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.repair-summary-head{
  display:flex;
  align-items:center;
  gap:12px;
  padding:12px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#f7fafc;
}
.repair-summary-head img{
  width:46px;
  height:46px;
  object-fit:contain;
}
.repair-summary-head div{
  display:flex;
  flex-direction:column;
  gap:2px;
}
.repair-summary-head strong{
  color:var(--afs-blue);
}
.repair-summary-head span{
  color:var(--muted);
  font-size:12px;
}
.repair-scheduled-note{
  padding:10px 12px;
  border-radius:10px;
  background:#eaf5fb;
  border:1px solid #9ac6e3;
  display:flex;
  flex-direction:column;
  gap:3px;
}
.repair-scheduled-note strong{
  color:#174d75;
}
.repair-scheduled-note span{
  font-size:12px;
  color:#526079;
}
.repair-out-toggle{
  display:flex;
  align-items:flex-start;
  gap:10px;
  padding:12px;
  border:1px solid var(--line);
  border-radius:10px;
  background:#f8faff;
  cursor:pointer;
}
.repair-out-toggle input{
  width:18px;
  height:18px;
  margin-top:1px;
}
.repair-detail-button{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
}
.repair-detail-button img{
  width:26px;
  height:26px;
  object-fit:contain;
}
.detail-action-icon{
  width:20px;
  height:20px;
  object-fit:contain;
  vertical-align:middle;
  margin-right:5px;
}
.repair-modal-actions{
  flex-wrap:wrap;
}

@media(max-width:760px){
  .card-actions-three{
    grid-template-columns:1fr !important;
  }
  .asset-card .card-actions-three > .btn,
  .asset-card .card-actions-three > .action-spacer-fixed{
    width:100% !important;
  }
}


/* v68 - buiten gebruik & reparatiefoto's */
.repair-out-since{
  margin-top:10px;
  padding:9px 11px;
  border-radius:9px;
  background:#edf0f2;
  border:1px solid #9aa2aa;
  color:#30363d;
}
.repair-photo-section{
  margin-top:12px;
}
.repair-photo-section h5{
  margin:0 0 8px;
  color:var(--afs-blue);
  font-size:13px;
}
.repair-photo-badge{
  display:flex;
  align-items:center;
  gap:5px;
  color:#174d75;
  font-weight:850;
}
.repair-photo-badge img{
  width:20px;
  height:20px;
  object-fit:contain;
}
.repair-photo-date{
  color:var(--muted);
  font-size:11px;
}
.dashboard-repair-photos{
  display:flex;
  gap:6px;
  margin-top:7px;
}
.dashboard-repair-photos img{
  width:54px;
  height:54px;
  object-fit:cover;
  border-radius:7px;
  border:1px solid #d8e0ea;
}
.dashboard-out-date{
  color:#333b45 !important;
}


/* v69 - compacte KPI-tegels op telefoon */
@media (max-width: 680px){
  .status-grid.status-grid-five{
    display:grid !important;
    grid-template-columns:repeat(5,minmax(0,1fr)) !important;
    gap:5px !important;
    width:100% !important;
    overflow:visible !important;
  }

  .status-grid.status-grid-five .stat-card{
    min-width:0 !important;
    min-height:72px !important;
    aspect-ratio:1 / 1 !important;
    padding:6px 4px !important;
    border-radius:10px !important;
    display:grid !important;
    grid-template-columns:auto auto !important;
    grid-template-rows:auto 1fr !important;
    align-items:center !important;
    justify-content:center !important;
    column-gap:3px !important;
    row-gap:2px !important;
    box-sizing:border-box !important;
  }

  .status-grid.status-grid-five .stat-card .stat-icon,
  .status-grid.status-grid-five .stat-card.stat-total .stat-icon{
    position:static !important;
    width:22px !important;
    height:22px !important;
    max-width:22px !important;
    max-height:22px !important;
    object-fit:contain !important;
    margin:0 !important;
    align-self:center !important;
    justify-self:end !important;
  }

  .status-grid.status-grid-five .stat-card .stat-number{
    position:static !important;
    margin:0 !important;
    font-size:17px !important;
    line-height:1 !important;
    align-self:center !important;
    justify-self:start !important;
  }

  .status-grid.status-grid-five .stat-card .stat-label{
    grid-column:1 / -1 !important;
    margin:0 !important;
    padding:0 1px !important;
    align-self:start !important;
    justify-self:center !important;
    text-align:center !important;
    font-size:9px !important;
    line-height:1.08 !important;
    font-weight:900 !important;
    white-space:normal !important;
    word-break:normal !important;
  }

  .status-grid.status-grid-five .stat-card .stat-sub{
    display:none !important;
  }
}

/* Zeer smalle telefoons: nog steeds vijf naast elkaar, alleen iets compacter */
@media (max-width: 420px){
  .status-grid.status-grid-five{
    gap:3px !important;
  }
  .status-grid.status-grid-five .stat-card{
    min-height:64px !important;
    padding:5px 2px !important;
    border-radius:8px !important;
  }
  .status-grid.status-grid-five .stat-card .stat-icon,
  .status-grid.status-grid-five .stat-card.stat-total .stat-icon{
    width:19px !important;
    height:19px !important;
    max-width:19px !important;
    max-height:19px !important;
  }
  .status-grid.status-grid-five .stat-card .stat-number{
    font-size:15px !important;
  }
  .status-grid.status-grid-five .stat-card .stat-label{
    font-size:8px !important;
  }
}
