body {
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    background-color: #eef2f6;
    margin: 0;
    padding: 0;
    color: #1f2937;
    font-size: 14px;
    line-height: 1.35;
}
.container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    background: #fff;
    padding: 14px 18px;
    border-radius: 0;
    box-shadow: none;
    min-height: 100vh;
    box-sizing: border-box;
}
h1, h2, h3 {
    color: #2c3e50;
    text-align: left;
}

h1{ font-size: 26px; margin: 16px 0 8px; }
h2{ font-size: 17px; margin: 0 0 8px; }
h3{ font-size: 15px; margin: 0 0 6px; }
table {
    border-collapse: collapse;
    width: 100%;
}
th {
    background-color: #eef3f7;
    color: #111827;
    padding: 8px 10px;
    text-align: left;
    font-weight: 700;
    font-size: 13px;
}
td {
    padding: 8px 10px;
    font-size: 13px;
}
a {
    color: #3498db;
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}


/* --- v1 product styling additions --- */
.card{
  background:#fff;
  border:1px solid rgba(15, 23, 42, .08);
  border-radius:14px;
  padding:14px;
  margin-top:14px;
  box-shadow: 0 6px 24px rgba(15, 23, 42, 0.06);
}
.table th{ background-color:#eef3f7; }
.table td, .table th{ border-bottom:1px solid rgba(0,0,0,.08); }
.btn{
  display:inline-block;
  padding:7px 11px;
  border:1px solid rgba(15, 23, 42, .14);
  border-radius:12px;
  background:#fff;
  color:#111827;
  font-size:13px;
  font-weight: 600;
}
.btn:hover{ text-decoration:none; filter:brightness(0.98); }
.btn.primary{
  background:#eaf2ff;
  border-color:rgba(37, 99, 235, .22);
}
.btn.danger{
  background:#fff1f1;
  border-color:rgba(231, 76, 60, .35);
}

/* Compact icon buttons (volwassener) */
.icon-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:36px;
  height:36px;
  border-radius:12px;
  border:1px solid rgba(15, 23, 42, .14);
  background:#fff;
  color:#111827;
  text-decoration:none;
}
.icon-btn:hover{ text-decoration:none; filter:brightness(0.98); }
.icon-btn svg{ width:18px; height:18px; }
.icon-btn.primary{ background:#eaf2ff; border-color:rgba(37, 99, 235, .22); }
.icon-btn.danger{ background:#fff1f1; border-color:rgba(231, 76, 60, .35); }
.actionbar{ display:flex; justify-content:flex-end; gap:8px; flex-wrap:wrap; }
input, select, textarea{
  padding:7px 10px;
  border:1px solid rgba(0,0,0,.18);
  border-radius:10px;
  font-size:14px;
}

/* Kleine visuele feedback als indicator-gewicht binnenkomt */
.flash{
  box-shadow: 0 0 0 3px rgba(16, 185, 129, .25);
  transition: box-shadow .2s ease;
}
label{ font-size:13px; }
code{ background:#f3f5f7; padding:2px 6px; border-radius:6px; }

.topbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border:1px solid rgba(15, 23, 42, .08);
  border-radius:16px;
  background:#fff;
  position: sticky;
  top: 10px;
  z-index: 100;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

/* Dark topbar (volwassener “app feel”) */
.topbar.dark{
  background:#0b1220;
  border-color: rgba(255,255,255,.08);
  box-shadow: 0 10px 28px rgba(2, 6, 23, 0.35);
}
.topbar.dark .brand{ color:#f8fafc; }
.topbar.dark .brand small{ color: rgba(248,250,252,.65); }
.topbar.dark .nav-toggle{
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.10);
  color:#f8fafc;
}
.topbar.dark .nav-link{
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.10);
  color:#e5e7eb;
}
.topbar.dark .nav-link:hover{ filter: brightness(1.08); }
.topbar.dark .nav-link.active{
  background: rgba(59,130,246,.28);
  border-color: rgba(59,130,246,.35);
  color:#f8fafc;
}
.topbar.dark .userchip{
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.10);
  color:#e5e7eb;
}
.topbar.dark .nav-group .nav-dropdown{
  background:#0b1220;
  border-color: rgba(255,255,255,.10);
  box-shadow: 0 16px 34px rgba(2, 6, 23, 0.45);
}

.brand{
  font-size: 22px;
  font-weight: 800;
  letter-spacing: .2px;
  line-height: 1;
}

.brand small{
  display:block;
  font-size: 12px;
  font-weight: 600;
  color: rgba(0,0,0,.55);
  letter-spacing: .15px;
  margin-top: 4px;
}

.nav-toggle{
  display:none;
  border:1px solid rgba(0,0,0,.12);
  background:#fff;
  border-radius:12px;
  padding:10px 12px;
  font-size:16px;
  line-height:1;
  cursor:pointer;
}

.nav{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  justify-content:flex-end;
  align-items:center;
}

.nav-group{
  position:relative;
}

.nav-group summary{
  list-style:none;
  cursor:pointer;
}
.nav-group summary::-webkit-details-marker{ display:none; }

.nav-group .nav-dropdown{
  position:absolute;
  top:calc(100% + 8px);
  right:0;
  min-width: 220px;
  background:#fff;
  border:1px solid rgba(0,0,0,.12);
  border-radius:14px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  padding:9px;
  display:flex;
  flex-direction:column;
  gap:8px;
  z-index:50;
}

.nav-group:not([open]) .nav-dropdown{ display:none; }

.nav-right{
  display:flex;
  gap:10px;
  align-items:center;
}

.nav-link{
  display:inline-block;
  padding:7px 10px;
  border-radius:10px;
  border:1px solid rgba(15, 23, 42, .10);
  background:#fff;
  color:#111827;
  font-size:13px;
  font-weight: 600;
  text-decoration:none;
}
.nav-link:hover{ text-decoration:none; filter:brightness(0.98); }
.nav-link.active{
  background:#eef6ff;
  border-color: rgba(37, 99, 235, .25);
}

.userchip{
  font-size:13px;
  color:#111827;
  background:#f8fafc;
  border:1px solid rgba(15, 23, 42, .08);
  padding:8px 10px;
  border-radius:12px;
  white-space:nowrap;
}

.table-wrap{
  width:100%;
  overflow-x:auto;
  -webkit-overflow-scrolling: touch;
}

/* Altijd tonen (bijv. wegingsregels in bon) */
.table-wrap.always{ display:block !important; }

/* Desktop: liever bonnen als cards (grid). Table blijft beschikbaar voor kleinere schermen. */
.table-wrap{ display:none; }

@media (max-width: 1024px){
  .bon-cards{ display:none; }
  .table-wrap{ display:block; }
}

.table tr:hover td{ background:#fafcff; }

.filters{
  margin: 10px 0 14px;
  padding: 10px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, .08);
}
.filters-grid{
  display:grid;
  grid-template-columns: 2fr 1fr 1fr 1fr auto;
  gap:10px;
  align-items:end;
}
.filters-actions{ display:flex; gap:10px; justify-content:flex-end; align-items:end; }

.bon-cards{ display:grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap:10px; margin-top:10px; }
.bon-card{
  border:1px solid rgba(0,0,0,.10);
  border-radius:16px;
  padding:12px;
  background:#fff;
  box-shadow: 0 2px 12px rgba(0,0,0,0.03);
  margin-top:0;
}
.bon-card-head{ display:flex; justify-content:space-between; gap:12px; align-items:flex-start; }
.bon-card-title{ font-size:18px; font-weight:800; }
.bon-card-sub{ font-size:12px; color: rgba(0,0,0,.55); margin-top:2px; }
.bon-card-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:8px;
  margin-top:10px;
}
.bon-card-grid div{ background:#f8fafc; border:1px solid rgba(0,0,0,.06); border-radius:12px; padding:10px; }
.bon-card-grid span{ display:block; font-size:12px; color: rgba(0,0,0,.60); }
.bon-card-grid b{ font-size:14px; }
.bon-card-links{ display:flex; gap:14px; margin-top:12px; font-size:13px; }
.bon-card-links span{ display:inline-block; min-width:70px; color: rgba(0,0,0,.60); }
.bon-card-actions{ display:flex; flex-wrap:wrap; gap:10px; margin-top:12px; }

.status-badge{
  display:inline-block;
  padding:4px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:700;
  border:1px solid rgba(0,0,0,.10);
  background:#f8fafc;
}
.status-badge.open{ background:#e8f2ff; border-color: rgba(52,152,219,.25); }
.status-badge.finalized{ background:#eafaf1; border-color: rgba(39,174,96,.25); }
.status-badge.corrected{ background:#eef6ff; border-color: rgba(59,130,246,.25); }
.status-badge.cancelled{ background:#fff1f1; border-color: rgba(231,76,60,.25); }
.status-badge.deleted{ background:#f2f2f2; border-color: rgba(0,0,0,.18); }

.form-grid{
  display:grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr auto;
  gap:10px;
  align-items:end;
}

.alert{
  margin-top:14px;
  padding:12px 14px;
  border-radius:12px;
  border:1px solid rgba(241, 196, 15, .45);
  background:#fff8e6;
}

.alert.success{ border-color: rgba(39,174,96,.30); background:#eafaf1; }
.alert.danger{ border-color: rgba(231,76,60,.30); background:#fff1f1; }
.alert.warn{ border-color: rgba(241, 196, 15, .45); background:#fff8e6; }

/* KPI strip (dashboard) */
.kpi-grid{
  display:grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap:10px;
}
.kpi{
  background:#fff;
  border:1px solid rgba(15, 23, 42, .08);
  border-radius:14px;
  padding:12px 14px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}
.kpi span{ display:block; font-size:12px; color: rgba(0,0,0,.60); }
.kpi b{ display:block; font-size:20px; margin-top:4px; }

/* Sticky table header (lijstweergave) */
.table thead th{
  position: sticky;
  top: 0;
  z-index: 1;
}

/* Sticky actiebar (mobiel) */
.sticky-actionbar{
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: none;
  gap: 8px;
  padding: 10px;
  background: rgba(255,255,255,.92);
  border-top: 1px solid rgba(15, 23, 42, .10);
  backdrop-filter: blur(8px);
  z-index: 120;
}
.sticky-actionbar form{ margin:0; }
.sab-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(15, 23, 42, .14);
  background:#fff;
  color:#111827;
  font-weight: 700;
  font-size: 13px;
  text-decoration:none;
  min-width: 0;
  flex: 1;
}
.sab-btn.primary{ background:#eaf2ff; border-color:rgba(37, 99, 235, .22); }
.sab-btn:disabled{ opacity:.55; }

.muted{ color: rgba(0,0,0,.60); }

.grid-2{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.inline-details summary{ list-style:none; cursor:pointer; }
.inline-details summary::-webkit-details-marker{ display:none; }

@media (max-width: 900px){
  .grid-2{ grid-template-columns: 1fr; }
}

/* --- Mobile friendliness --- */
@media (max-width: 768px){
  body{ padding: 0; }
  .container{ padding: 10px; }
  .container{ padding-bottom: 86px; }
  .sticky-actionbar{ display:flex; }
  .topbar{ flex-wrap:wrap; align-items:flex-start; padding:10px; top: 0; border-radius: 0; }
  .brand{ font-size: 20px; }
  .nav-toggle{ display:inline-block; }
  .nav{ width:100%; justify-content:flex-start; align-items:stretch; display:none; }
  .nav.open{ display:flex; flex-direction:column; }
  .nav-link{ width:100%; }
  .nav-right{ width:100%; flex-direction:column; align-items:stretch; }
  .userchip{ width:100%; }

  .nav-group{ width:100%; }
  .nav-group .nav-dropdown{ position:static; min-width:unset; box-shadow:none; }

  /* Buttons: beter te bedienen */
  .btn{ padding: 10px 12px; border-radius: 14px; }

  /* Form elementen: volle breedte, geen gepriegel */
  input, select, textarea{ width: 100% !important; box-sizing: border-box; font-size: 16px; }
  .form-grid{ grid-template-columns: 1fr; }

  .filters-grid{ grid-template-columns: 1fr; }
  .filters-actions{ justify-content:stretch; }
  .filters-actions .btn{ width:100%; text-align:center; }

  .kpi-grid{ grid-template-columns: 1fr 1fr; }

  /* Dashboard: cards op mobiel, table verstoppen */
  .bon-cards{ display:block; }
  .table-wrap{ display:none; }

  .actionbar{ justify-content:stretch; }
  .icon-btn{ width:44px; height:44px; border-radius:14px; }

  th, td{ white-space: nowrap; }
}

/* v1.3 – Full-width "Laatst gewogen" banner (operator view) */
.last-weight-banner{
  position: sticky;
  top: 10px;
  z-index: 50;
  margin: 10px 0 14px 0;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid #0f172a;
  background: #0b1220;
  color: #ffffff;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
}
.last-weight-banner .label{font-size:12px; opacity:.85; letter-spacing:.2px;}
.last-weight-banner .value{font-size:72px; font-weight:900; line-height:1; letter-spacing:1px;}
.last-weight-banner .unit{font-size:22px; font-weight:700; opacity:.9; margin-left:6px;}
.last-weight-banner .meta{font-size:12px; opacity:.85; text-align:right; white-space:nowrap;}
.last-weight-banner .count{margin-top:2px; font-size:14px; font-weight:800; opacity:.95;}
.last-weight-banner .hint{margin-top:4px; opacity:.75;}

@media (max-width: 680px){
  .last-weight-banner .value{font-size:52px;}
  .last-weight-banner .unit{font-size:18px;}
}

/* ===== Login split layout (v1.2+) ===== */

.login-body{
  margin:0;
  padding:0;
  background:#eef2f6;
}

.login-shell{
  display:flex;
  min-height:100vh;
}

.login-left{
  width:520px;
  max-width:100%;
  background:#ffffff;
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow: 2px 0 18px rgba(15, 23, 42, 0.08);
  z-index:2;
}

.login-panel{
  width:100%;
  max-width: 420px;
  padding: 18px;
  box-sizing:border-box;
}

.login-panel h1{ margin: 12px 0 8px; }

.login-error{
  color:#b00;
  margin:0 0 10px 0;
  font-weight:600;
}

.login-right{
  flex:1;
  /* Als login.jpg bestaat, wordt die gebruikt. Anders zie je de gradient (netjes fallback). */
  background:
    linear-gradient(120deg, rgba(11,18,32,.55), rgba(11,18,32,.15)),
    url('assets/login.jpg') center center / cover no-repeat;
}

@media (max-width: 900px){
  .login-shell{ flex-direction:column; }
  .login-left{ width:100%; box-shadow:none; }
  .login-right{ min-height: 42vh; }
}


.weeg-console .form-grid{grid-template-columns:repeat(auto-fit,minmax(220px,1fr));}
.weeg-console .weight-input{font-size:2rem;font-weight:700;padding:16px 14px;}
.weeg-console .big-btn{font-size:1.2rem;padding:14px 22px;min-width:180px;}
.weeg-console label{font-weight:600;}

.weeg-console .weeg-actions{margin-top:8px;}
.weeg-console .weeg-actions .btn{min-height:48px;}
.open-status-pill{display:inline-block;padding:6px 10px;border-radius:999px;background:#eef6ff;border:1px solid rgba(59,130,246,.18);font-size:12px;font-weight:700;}


.weeg-phase-box{margin-top:16px;padding:16px 18px;border-radius:16px;border:1px solid rgba(15,23,42,.12);background:#f8fafc;}
.weeg-phase-box.phase-ready_in{background:#eef6ff;border-color:rgba(37,99,235,.20);}
.weeg-phase-box.phase-waiting_out{background:#fff8e6;border-color:rgba(241,196,15,.35);}
.weeg-phase-box.phase-complete{background:#eafaf1;border-color:rgba(39,174,96,.28);}
.weeg-phase-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;flex-wrap:wrap;}
.weeg-phase-kicker{font-size:12px;font-weight:700;letter-spacing:.3px;text-transform:uppercase;color:rgba(0,0,0,.55);}
.weeg-phase-title{font-size:24px;font-weight:900;line-height:1.1;margin-top:4px;}
.weeg-phase-next{font-size:14px;font-weight:600;}
.weeg-phase-text{margin-top:8px;font-size:14px;}
.weeg-step-strip{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:14px;}
.weeg-step{padding:10px 12px;border-radius:12px;border:1px dashed rgba(15,23,42,.16);font-weight:700;font-size:13px;text-align:center;background:rgba(255,255,255,.55);color:rgba(0,0,0,.55);}
.weeg-step.active{border-style:solid;background:#fff;color:#111827;}
.weigh-in-btn{background:#eaf2ff;border-color:rgba(37,99,235,.22);}
.weigh-out-btn{background:#fff8e6;border-color:rgba(241,196,15,.45);}
.inout-summary-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:12px;}
.inout-summary-box{padding:14px;border-radius:14px;border:1px solid rgba(15,23,42,.08);background:#fff;}
.inout-summary-box.in{background:#eef6ff;border-color:rgba(37,99,235,.18);}
.inout-summary-box.out{background:#fff8e6;border-color:rgba(241,196,15,.38);}
.inout-summary-box.net{background:#eafaf1;border-color:rgba(39,174,96,.24);}
.inout-summary-box b{display:block;font-size:22px;line-height:1.15;margin-top:4px;}
.weeg-console .weeg-actions .btn:disabled{opacity:.5;cursor:not-allowed;}
@media (max-width: 768px){.weeg-phase-title{font-size:20px;}.weeg-step-strip{grid-template-columns:1fr;}}
