/* ===== RESET / BASIS ===== */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;
  background: #f5f6f8;
  color: #111827;
}

a {
  color: #0b6bcb;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ===== LAYOUT ===== */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px;
}

.card {
  background: #fff;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}

.topbar {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.topbar nav a {
  margin-left: 12px;
  font-weight: 500;
}

/* ===== FORM ===== */
label {
  display: block;
  font-weight: 600;
  margin-bottom: 4px;
}

input,
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  font-size: 16px;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #0b6bcb;
}

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

.actions {
  margin-top: 16px;
}

/* ===== BUTTONS ===== */
button {
  font-size: 16px;
}

.btn {
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  padding: 10px 14px;
  cursor: pointer;
}

.btn:hover {
  background: #f3f4f6;
}

.btn-save {
  background: #16a34a;
  border: 1px solid #16a34a;
  color: #fff;
  border-radius: 14px;
  padding: 12px 16px;
  font-weight: 700;
  width: 100%;
}

.btn-save:hover {
  background: #15803d;
}

.btn-danger {
  background: #fff;
  border: 1px solid #dc2626;
  color: #dc2626;
  border-radius: 12px;
  padding: 10px 14px;
  cursor: pointer;
}

.btn-danger:hover {
  background: #fee2e2;
}

/* ===== TABLE (DESKTOP) ===== */
.table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
}

.table th {
  text-align: left;
  font-size: 14px;
  color: #374151;
  border-bottom: 1px solid #e5e7eb;
  padding: 8px;
}

.table td {
  padding: 8px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: top;
}

/* ===== CHIPS (COLLEGA'S) ===== */
.chiplist {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip {
  background: #eef2ff;
  color: #1e3a8a;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 14px;
}

/* ===== LOGS – MOBILE CARDS ===== */
.logs-cards {
  display: grid;
  gap: 12px;
}

.log-card {
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #fff;
  padding: 14px;
}

.log-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.log-date {
  font-weight: 800;
}

.log-km {
  font-weight: 800;
}

.log-customer {
  font-weight: 700;
  margin-bottom: 4px;
}

.log-ref {
  color: #6b7280;
  margin-bottom: 8px;
}

.log-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.log-meta span {
  display: block;
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 2px;
}

.log-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ===== MUTED TEXT ===== */
.muted {
  color: #6b7280;
  font-size: 14px;
}

/* ===== MOBILE OVERRIDES ===== */
@media (max-width: 768px) {

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

  .grid-2 .grid-2 {
    grid-template-columns: 1fr;
  }
/*
  .table {
    display: none; /* tabel verbergen op mobiel 
}*/


  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .topbar nav a {
    margin-left: 0;
    margin-right: 12px;
  }
}

/* ===== DESKTOP ONLY ===== */
@media (min-width: 769px) {
  .logs-cards {
    display: none; /* cards enkel mobiel */
  }
}

/* Materialen onder elkaar in overzicht */
.materials-list{
  margin:0;
  padding-left:18px;
}

.materials-list li{
  margin:2px 0;
  line-height:1.3;
  white-space:nowrap;
}

.suggestions{
  position: relative;
  margin-top: 6px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  background: #fff;
  max-height: 260px;
  overflow: auto;
}

.sitem{
  padding: 10px 12px;
  cursor: pointer;
  border-bottom: 1px solid #f3f4f6;
}

.sitem:last-child{ border-bottom: 0; }
.sitem:hover{ background: #f9fafb; }
.sitem.add{ font-weight: 700; }

.field-autocomplete{ position: relative; }

.suggestions{
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 9999;
  display: none;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  background: #fff;
  max-height: 260px;
  overflow: auto;
  box-shadow: 0 12px 30px rgba(0,0,0,0.08);
}

.sitem{
  padding: 10px 12px;
  cursor: pointer;
  border-bottom: 1px solid #f3f4f6;
}
.sitem:last-child{ border-bottom: 0; }
.sitem:hover{ background: #f9fafb; }
.sitem.add{ font-weight: 700; }

.logcard{
  border:1px solid #e5e7eb;
  border-radius:14px;
  padding:10px 12px;
  background:#fff;
  margin:10px 0;
}

.loghead{
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:flex-start;
}

.badge-lock{
  display:inline-block;
  padding:4px 10px;
  border-radius:999px;
  background:#ffe5e5;
  border:1px solid #ffb3b3;
  color:#b00020;
  font-weight:800;
  font-size:12px;
  white-space:nowrap;
}

.badge-ok{
  display:inline-block;
  padding:4px 10px;
  border-radius:999px;
  background:#e8f7ee;
  border:1px solid #b7e3c8;
  color:#137a3a;
  font-weight:700;
  font-size:12px;
  white-space:nowrap;
}

.log-actions{
  margin-top:8px;
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap;
}/* ====== Edit worklog polish ====== */

.container{
  padding: 24px 18px;
}

.card{
  border-radius: 18px;
  box-shadow: 0 8px 26px rgba(0,0,0,.06);
  border: 1px solid #e5e7eb;
}

.card h2{
  margin: 0 0 6px;
  font-size: 26px;
  letter-spacing: -0.02em;
}

.card .muted{
  margin-top: 0;
}

/* Form blocks */
label{
  font-weight: 700;
  margin-bottom: 6px;
  display:block;
}

input[type="text"],
input[type="time"],
input[type="number"],
input[type="date"],
select,
textarea{
  width: 100%;
  border-radius: 12px;
  border: 1px solid #d1d5db;
  padding: 10px 12px;
  background: #fff;
  outline: none;
}

textarea{
  min-height: 90px;
  resize: vertical;
}

input:focus, textarea:focus, select:focus{
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37,99,235,.12);
}

/* Grid spacing */
.grid-2{
  gap: 14px !important;
}

/* Section titles */
h3{
  margin-top: 22px;
  margin-bottom: 10px;
  font-size: 18px;
  letter-spacing: -0.01em;
}

/* Colleague chips look like selectable pills */
.chiplist{
  display:flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip{
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background: #f9fafb;
  padding: 8px 12px;
}

.chip input[type="checkbox"]{
  transform: scale(1.1);
}

/* Table aesthetics */
.table{
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
}

.table thead th{
  background: #f9fafb;
  font-weight: 800;
  padding: 10px 12px;
  border-bottom: 1px solid #e5e7eb;
}

.table td{
  padding: 10px 12px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: top;
}

.table tr:last-child td{
  border-bottom: none;
}

/* Inputs inside table */
.table input[type="number"]{
  width: 110px !important;
  text-align: right;
}

.table input[type="text"]{
  width: 100%;
}

/* Actions: make save bar nicer */
.actions{
  margin-top: 16px;
  display:flex;
  align-items:center;
  gap: 10px;
  justify-content: flex-start;
}

/* Green save button – consistent */
.btn-save{
  background: #16a34a;
  border: 1px solid #12813b;
  color: #fff;
  font-weight: 800;
  padding: 12px 16px;
  border-radius: 14px;
  width: 100%;
}

.btn-save:hover{
  filter: brightness(0.97);
}

/* Secondary button */
.btn{
  border-radius: 12px;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  background:#fff;
}

/* Desktop: keep actions visible when scrolling long lists */
@media (min-width: 992px){
  .actions{
    position: sticky;
    bottom: 12px;
    background: rgba(255,255,255,.9);
    backdrop-filter: blur(8px);
    padding: 10px;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
  }
}
.alert-error{
  background:#fee2e2;
  border:1px solid #fca5a5;
  color:#7f1d1d;
  padding:14px 16px;
  border-radius:14px;
  margin-bottom:18px;
  font-weight:600;
}

.alert-success{
  background:#dcfce7;
  border:1px solid #86efac;
  color:#14532d;
  padding:14px 16px;
  border-radius:14px;
  margin-bottom:18px;
  font-weight:600;
}

.field-with-suggest{
  position: relative;
}

.suggestions{
  display:none;
  position:absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 9999;

  background:#fff;
  border:1px solid #d0d7de;
  border-radius:12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);

  max-height: 260px;
  overflow:auto;
}

.suggestions .sitem{
  padding:10px 12px;
  cursor:pointer;
  border-bottom:1px solid #f1f5f9;
}

.suggestions .sitem:last-child{
  border-bottom:none;
}

.suggestions .sitem:hover{
  background:#f8fafc;
}

.suggestions .sitem.add{
  font-weight:700;
}

/* Gefactureerde registraties */
tr.invoiced-row{
  background:#eaf7ea;          /* zachte groene tint */
  color:#4b6b4b;
}

/* Hover moet iets donkerder blijven */
tr.invoiced-row:hover{
  background:#dff0df;
}

/* checkbox iets duidelijker */
.inv-toggle{
  transform:scale(1.2);
  cursor:pointer;
}