:root{
  --primary:#0294AD;
  --primary2:#4ad3e8;
  --dark:#0D171D;
  --text:#EAF6F8;
  --muted:rgba(234,246,248,.72);
  --card:rgba(255,255,255,.06);
  --card2:rgba(255,255,255,.03);
  --border:rgba(255,255,255,.14);
  --shadow:0 18px 55px rgba(0,0,0,.45);
  --danger:#b91c1c;
  --danger2:#991b1b;
  --ok:#10b981;
  --warn:#f59e0b;
  --bad:#ef4444;
}

*{box-sizing:border-box}

html,body{height:100%}

/* Alleen voor status-pagina: pagina zelf niet scrollen, alleen de orders-lijst */
body.status-page{overflow:hidden}

body.status-page .orders-scroll{
  max-height: calc(100vh - 210px); /* topbar + header in card */
  overflow-y: auto;
  padding-right: 6px; /* voorkomt "jump" door scrollbar */
}

/* nette scrollbar (Safari/Chrome) */
body.status-page .orders-scroll::-webkit-scrollbar{width:10px}
body.status-page .orders-scroll::-webkit-scrollbar-track{background:rgba(255,255,255,.04);border-radius:999px}
body.status-page .orders-scroll::-webkit-scrollbar-thumb{background:rgba(2,148,173,.45);border-radius:999px}
body.status-page .orders-scroll::-webkit-scrollbar-thumb:hover{background:rgba(2,148,173,.75)}

body{
  margin:0;
  font-family:system-ui, Segoe UI, Roboto, Arial;
  background:
    radial-gradient(900px 500px at 10% 10%, rgba(2,148,173,.32), transparent 60%),
    radial-gradient(900px 500px at 90% 30%, rgba(2,148,173,.20), transparent 55%),
    linear-gradient(180deg, var(--dark) 0%, #070B0E 100%);
  color:var(--text);
}

a{color:inherit;text-decoration:none}

::selection{background:rgba(2,148,173,.35)}

/* ====== layout primitives ====== */
.container{
  max-width:1200px;
  margin:18px auto;
  padding:0 16px;
}

.card{
  background:linear-gradient(180deg, var(--card), var(--card2));
  border:1px solid var(--border);
  border-radius:18px;
  box-shadow:var(--shadow);
  padding:18px;
}

.meta,.muted{
  color:var(--muted);
  font-size:12px;
  line-height:1.45;
}

hr.kd{
  border:0;
  border-top:1px solid var(--border);
  margin:14px 0;
}

/* ====== topbar ====== */
.top{
  background:linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.03));
  border-bottom:1px solid var(--border);
  padding:12px 16px;
  display:flex;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
}

.top-right{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

.badge{
  padding:6px 12px;
  border:1px solid var(--border);
  border-radius:999px;
  background:rgba(255,255,255,.06);
  color:var(--text);
  font-size:12px;
  font-weight:700;
}

.badge:hover{background:rgba(2,148,173,.18);border-color:rgba(2,148,173,.45)}

.badge.home{
  border:none;
  color:#001018;
  background:linear-gradient(135deg, var(--primary), var(--primary2));
}

.badge.danger{
  background:rgba(185,28,28,.28);
  border-color:rgba(185,28,28,.55);
}

/* ====== buttons ====== */
.btn,.btn2,.tinybtn{
  border-radius:12px;
  font-weight:800;
  cursor:pointer;
}

.btn{
  padding:9px 12px;
  border:0;
  background:linear-gradient(135deg, var(--primary), var(--primary2));
  color:#001018;
  font-size:12px;
}

.btn:hover{filter:brightness(1.06)}

.btn2{
  padding:9px 12px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.06);
  color:var(--text);
  font-size:12px;
}

.btn2:hover{background:rgba(2,148,173,.18);border-color:rgba(2,148,173,.45)}

.btnDanger{
  background:rgba(185,28,28,.35) !important;
  border:1px solid rgba(185,28,28,.6) !important;
  color:var(--text) !important;
}

.tinybtn{
  border:1px solid var(--border);
  background:rgba(255,255,255,.06);
  padding:5px 10px;
  border-radius:999px;
  font-size:12px;
  color:var(--text);
}

.tinybtn:hover{background:rgba(2,148,173,.18);border-color:rgba(2,148,173,.45)}

/* ====== forms ====== */
label{
  display:block;
  font-size:12px;
  color:var(--muted);
  margin:10px 0 6px;
}

input,textarea,select{
  width:100%;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid var(--border);
  background:rgba(0,0,0,.22);
  color:var(--text);
  outline:none;
}

input::placeholder,textarea::placeholder{color:rgba(234,246,248,.45)}

input:focus,textarea:focus,select:focus{
  border-color:rgba(2,148,173,.55);
  box-shadow:0 0 0 3px rgba(2,148,173,.16);
}

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

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

/* ====== messages ====== */
.msgOk{
  background:rgba(16,185,129,.12);
  border:1px solid rgba(16,185,129,.35);
  padding:10px;
  border-radius:12px;
  margin:10px 0;
}

.msgErr{
  background:rgba(239,68,68,.12);
  border:1px solid rgba(239,68,68,.35);
  padding:10px;
  border-radius:12px;
  margin:10px 0;
}

/* ====== order board ====== */
.row{
  background:rgba(255,255,255,.04);
  border:1px solid var(--border);
  border-radius:16px;
  padding:14px;
  margin:10px 0;
  display:grid;
  grid-template-columns:220px 1fr;
  gap:14px;
  position:relative;
}

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

.pill{
  display:inline-block;
  padding:4px 10px;
  border-radius:999px;
  color:#fff;
  font-size:12px;
  font-weight:800;
}

.pill.prio{background:#dc2626;color:#fff}

.row.high-prio::before{
  content:"";
  position:absolute;
  left:0;top:0;bottom:0;
  width:6px;
  background:#dc2626;
  border-top-left-radius:16px;
  border-bottom-left-radius:16px;
}

.actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-top:10px;
}

/* live indicator */
.liveWrap{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.liveDot{display:inline-block;width:8px;height:8px;border-radius:999px;background:var(--ok);margin-right:6px}
.liveOff{background:#9ca3af}

/* ====== tables (admin) ====== */
.tableWrap{overflow:auto}

table.kd-table{
  width:100%;
  border-collapse:separate;
  border-spacing:0 10px;
}

table.kd-table tr{
  background:rgba(255,255,255,.04);
  border:1px solid var(--border);
}

table.kd-table td, table.kd-table th{
  padding:12px;
  vertical-align:top;
}

table.kd-table .row{
  border-radius:16px;
}

/* ====== login page ====== */
.center{
  min-height:100vh;
  display:flex;
  justify-content:center;
  align-items:center;
  padding:24px;
}

.loginCard{max-width:520px;width:100%}

h2{margin:0}



/* ===== SNIJ PAGES (cards/rows/topbar) ===== */

.top{
  background:linear-gradient(180deg, var(--card), rgba(255,255,255,.03));
  border-bottom:1px solid var(--border);
  padding:12px 16px;
  display:flex;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}

.top-right{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
}

.badge{
  padding:6px 12px;
  border-radius:999px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.08);
  font-size:12px;
  color:var(--text);
  font-weight:700;
  display:inline-flex;
  align-items:center;
  gap:6px;
}

.badge:hover{ background:rgba(2,148,173,.18); }

.badge.home{
  background:linear-gradient(135deg,#0294AD,#4ad2e8);
  border:none;
  color:#001018;
}

.badge.danger{
  background:#7f1d1d;
  border-color:#991b1b;
}

.container{
  max-width:1200px;
  margin:18px auto;
  padding:0 16px;
}

/* Let op: index gebruikt ook .container. Voor index heb je die container al als card.
   Als je index hierdoor anders wordt: geef index zijn eigen class (bijv .idx-box).
   Maar in jouw screenshot werkt index goed, dus laat dit zo. */

.card{
  background:linear-gradient(180deg, var(--card), rgba(255,255,255,.03));
  border:1px solid var(--border);
  border-radius:20px;
  box-shadow:var(--shadow);
  padding:22px;
}

.row{
  background:rgba(255,255,255,.04);
  border:1px solid var(--border);
  border-radius:16px;
  padding:16px;
  margin:12px 0;
  display:grid;
  grid-template-columns:220px 1fr;
  gap:14px;
  position:relative;
}

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

.meta{
  color:var(--muted);
  font-size:12px;
  line-height:1.4;
}

.actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-top:10px;
}

.btn{
  padding:8px 12px;
  border-radius:12px;
  border:none;
  background:var(--primary);
  color:#001018;
  cursor:pointer;
  font-size:12px;
  font-weight:800;
}

.btn2{
  padding:8px 12px;
  border-radius:12px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.06);
  color:var(--text);
  cursor:pointer;
  font-size:12px;
  font-weight:800;
}

.btn2:hover{ background:rgba(2,148,173,.18); }

.btnDanger{
  background:#7f1d1d;
  color:var(--text);
  border:1px solid #991b1b;
}

.pill{
  display:inline-block;
  padding:4px 10px;
  border-radius:999px;
  color:#fff;
  font-size:12px;
  font-weight:900;
}

.pill.prio{ background:#dc2626; }

.row.high-prio::before{
  content:"";
  position:absolute;
  left:0;
  top:0;
  bottom:0;
  width:6px;
  background:#dc2626;
  border-top-left-radius:16px;
  border-bottom-left-radius:16px;
}

/* optioneel: highlight animaties (als je die gebruikt) */
.flash-new{ outline:2px solid rgba(16,185,129,.55); }
.flash-change{ outline:2px solid rgba(245,158,11,.55); }


/* HIGH PRIORITY – extreem duidelijk */
.high.cell{
  position: relative;
  border-color: rgba(239,68,68,.55);
  box-shadow: 0 0 0 2px rgba(239,68,68,.15) inset;
}

.high.cell::before{
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 10px;
  background: #ef4444;
  border-radius: 16px 0 0 16px;
}

/* Badge onder artikelnummer */
.prioBadge{
  display: inline-block;
  margin-top: 12px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(239,68,68,.15);
  border: 2px solid rgba(239,68,68,.55);
  color: #fecaca;
  font-size: 20px;
  font-weight: 950;
  letter-spacing: .12em;
}

/* === MODAL: minder doorzichtig (fix) === */

/* achtergrond achter de popup */
.modal-overlay,
.modalOverlay,
.modal-backdrop,
.modalBackdrop,
#editModalOverlay,
#orderEditOverlay {
  background: rgba(0,0,0,0.70) !important; /* was te licht */
  backdrop-filter: blur(2px) !important;   /* minder blur = beter leesbaar */
  -webkit-backdrop-filter: blur(2px) !important;
}

/* popup venster zelf */
.modal,
.modalContent,
.modal-content,
#editModal,
#orderEditModal {
  background: rgba(17,24,39,0.96) !important; /* bijna “solid” */
  border: 1px solid rgba(255,255,255,0.12) !important;
  box-shadow: 0 20px 60px rgba(0,0,0,0.60) !important;
}

/* header balkje van de popup (als je die hebt) */
.modal-header,
.modalHeader {
  background: rgba(17,24,39,0.98) !important;
}
