:root {
  --green: #4CAF50;
  --green-d: #2f7f3d;
  --btn: #1e5627;
  --danger: #d9534f;
  --danger-d: #c9302c;
  --panel: rgba(0, 0, 0, 0.80);
  --panel-2: rgba(0, 0, 0, 0.85);
  --text: #fff;
  --muted: #d5d5d5;
  --border: #000;
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  color: var(--text);
  text-align: center;
  padding: 20px;
}

.bg-train {
  background: url('/Train%20scene.webp') no-repeat center center fixed;
  background-size: cover;
}

.content-wrapper {
  background: var(--panel);
  padding: 20px;
  border-radius: 10px;
  display: inline-block;
  width: min(95%, 1000px);
}

/* === Buttons === */
.btn {
  display: inline-block;
  padding: 15px 20px;
  font-size: 18px;
  margin: 10px;
  cursor: pointer;
  border: none;
  border-radius: 10px;
  background: var(--btn);
  color: #fff;
  transition: transform .2s, background .2s;
}
.btn:hover {
  background: var(--green-d);
  transform: scale(1.07);
}
.btn.block {
  display: block;
  width: min(90%, 250px);
  margin-inline: auto;
}
.btn.btn-warn {
  background: var(--danger);
}
.btn.btn-warn:hover {
  background: var(--danger-d);
}
.btn.ghost {
  background: #f0f0f0;
  color: #111;
}

/* === Inputs & Selects === */
.select, select, input[type="number"], input[type="text"], input[type="url"], input[type="tel"], input[type="date"] {
  font-size: 18px;
  padding: 12px;
  width: 90%;
  margin: 10px 0;
  border-radius: 8px;
  background: #222;
  color: #fff;
  border: 1px solid var(--green);
  text-align: center;
}

/* === Tables === */
.table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  background: #fff;
  color: #000;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid var(--border);
}
.table th, .table td {
  border: 2px solid var(--border);
  padding: 10px;
  text-align: center;
}
.table th {
  background: var(--green);
  color: #fff;
}
.table td.right, .table th.right {
  text-align: right;
}

/* === Product Grid === */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  width: 100%;
  max-width: 600px;
  margin-inline: auto;
}
.product-grid > div {
  display: flex;
  justify-content: center;
}

/* === Drink Buttons === */
.drink-btn {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 10px 15px;
  font-size: 18px;
  border: none;
  border-radius: 10px;
  background: var(--btn);
  color: #fff;
  transition: transform .2s, background .2s;
  width: 90%;
  max-width: 250px;
  text-align: left;
}
.drink-btn:hover {
  background: var(--green-d);
  transform: scale(1.07);
}
.drink-btn img {
  height: 40px;
  width: 40px;
  object-fit: contain;
  margin-right: 15px;
  border-radius: 5px;
}

/* === Toast === */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--green);
  color: #fff;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 18px;
  z-index: 1000;
  transition: opacity .5s;
}

/* === Flex utilities === */
.flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  max-width: 1000px;
  margin-inline: auto;
}

/* === Compact Tables (Finance, etc.) === */
.table.compact th, .table.compact td {
  padding: 5px 6px;
  line-height: 1.1;
  font-size: 0.85rem;
  border: 1px solid rgba(0, 0, 0, 0.15);
}
.table.compact th {
  background: var(--green);
  font-weight: bold;
}
.table.compact tr {
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}
.table.compact td.right, .table.compact th.right {
  text-align: right;
}

/* ========== Quantity-teller & Undo knop styling ========== */
.quantity-controls {
  margin: 20px auto;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}
.quantity-controls .quantity-label {
  font-size: 18px;
  color: var(--text);
  margin-right: 8px;
}
.quantity-controls .quantity-input {
  display: flex;
  align-items: center;
}
.quantity-controls .quantity-input button {
  font-size: 20px;
  width: 40px;
  height: 40px;
  padding: 0;
  margin: 0 5px;
}
.quantity-controls .quantity-input span {
  display: inline-block;
  min-width: 30px;
  text-align: center;
  font-size: 18px;
  color: var(--text);
}

/* Groepering: teller en undo-knop onder elkaar, gecentreerd */
.controls-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 20px;
}

/* ========== Animatie bij bulk-logging ========== */
.drink-btn.bulk-logging {
  animation: pop 0.3s ease-in-out;
}
@keyframes pop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.1); }
  100% { transform: scale(1); }
}
