:root{
  --bg:#0b0f14; --panel:#0f1622; --panel2:#0b1220; --text:#e8eef6; --muted:#aab6c5;
  --border:#223042; --primary:#2b6cb0; --primary2:#1b4d91; --amber:#fbbf24;
}
body{margin:0;font-family:Arial,sans-serif;background:var(--bg);color:var(--text);}
.wrap{max-width:1200px;margin:0 auto;padding:18px;}
.spacer{height:12px;}
.topbar{display:flex;justify-content:space-between;align-items:baseline;gap:12px;}
.toplinks{display:flex;gap:10px;flex-wrap:wrap;}
.card{background:var(--panel);border:1px solid var(--border);border-radius:14px;padding:14px;}
.row{display:flex;gap:12px;flex-wrap:wrap;align-items:end;}
h1{margin:0 0 12px 0;font-size:22px;} h2{margin:0 0 10px 0;font-size:18px;}
label{font-size:12px;color:var(--muted);display:block;margin-bottom:6px;}
input,select{width:100%;padding:10px;border-radius:12px;border:1px solid var(--border);background:var(--panel2);color:var(--text);}
.field{min-width:220px;} .date-field{width:160px;min-width:160px;} .machine-field{flex:1;min-width:320px;} .small{font-size:12px;}
.grid{display:grid;grid-template-columns:180px 1fr;gap:10px 12px;align-items:center;}
.btn{display:inline-block;padding:10px 14px;border-radius:12px;border:1px solid var(--border);background:var(--panel2);color:var(--text);cursor:pointer;text-decoration:none;font-weight:700;}
.btn.primary{background:var(--primary2);border-color:var(--primary);} .btn.big{font-size:18px;padding:14px 18px;border-radius:16px;} .btn.danger{color:#ffb4b4;}
hr{border:none;border-top:1px solid var(--border);margin:14px 0;}
.muted{color:var(--muted);}
.pill{padding:6px 10px;border-radius:999px;border:1px solid var(--border);background:var(--panel);font-size:12px;color:var(--muted);}
code{background:#0b1220;border:1px solid var(--border);padding:2px 6px;border-radius:8px;}
.list{display:flex;flex-direction:column;gap:10px;}
.item{display:flex;justify-content:space-between;align-items:center;border:1px solid var(--border);border-radius:16px;padding:12px;background:var(--panel2);}
.item.done{opacity:.65;} .left{display:flex;gap:14px;align-items:flex-start;} .right{display:flex;gap:8px;align-items:center;}
.idx{width:42px;height:42px;border-radius:14px;display:flex;align-items:center;justify-content:center;background:var(--panel);border:1px solid var(--border);font-weight:800;}
.line1{font-size:16px;} .line2{margin-top:4px;font-size:13px;color:var(--muted);}
/* kiosk */
.kiosk{background:#070a0f;}
.kioskHead{display:flex;justify-content:space-between;align-items:flex-end;padding:14px 18px;border-bottom:1px solid var(--border);position:sticky;top:0;background:rgba(11,15,20,.95);backdrop-filter:blur(6px);}
.kioskTitle{font-size:24px;font-weight:900;}
.two-days{display:flex;gap:14px;} .day-col{flex:1;min-width:0;} .day-head{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:10px;padding:0 2px;} .day-title{font-size:16px;font-weight:900;letter-spacing:.5px;}
/* billing */
.stat{min-width:220px;} .stat-label{font-size:12px;color:var(--muted);margin-bottom:6px;} .stat-value{font-size:20px;font-weight:900;}
.table{display:flex;flex-direction:column;gap:6px;margin-top:8px;} .trow{display:grid;grid-template-columns:1fr 180px;gap:10px;padding:10px;border:1px solid var(--border);border-radius:12px;background:var(--panel2);} .trow.thead{background:var(--panel);font-weight:900;}
/* hall */
.hall{background:#06080c;}
.hallHead{display:flex;justify-content:space-between;align-items:center;padding:16px 20px;border-bottom:1px solid var(--border);}
.hallTitle{font-size:26px;font-weight:900;letter-spacing:.6px;}
.hallMeta{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end;}
.hallGrid{display:grid;grid-template-columns:1.7fr 1fr;gap:14px;padding:14px;}
.hallSectionTitle{font-size:14px;font-weight:900;color:var(--muted);letter-spacing:.8px;margin-bottom:10px;}
.hallPlans,.hallBonus{background:var(--panel);border:1px solid var(--border);border-radius:16px;padding:14px;min-height:calc(100vh - 110px);}
.machinesGrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;}
.machineCard{background:var(--panel2);border:1px solid var(--border);border-radius:14px;padding:12px;}
.machineHead{display:flex;justify-content:space-between;align-items:baseline;gap:10px;margin-bottom:10px;}
.machineName{font-weight:900;font-size:16px;} .machineCode{color:var(--muted);font-size:12px;}
.machineDays{display:grid;grid-template-columns:1fr 1fr;gap:10px;}
.machineDay{border:1px dashed rgba(255,255,255,.10);border-radius:12px;padding:10px;}
.dayBadge{font-size:11px;font-weight:900;color:var(--amber);letter-spacing:.6px;margin-bottom:6px;}
.miniRow{display:flex;gap:8px;align-items:baseline;padding:6px 0;border-bottom:1px solid rgba(255,255,255,.06);}
.miniRow:last-child{border-bottom:none;} .miniRow.done{opacity:.6;}
.miniIdx{width:26px;height:26px;border-radius:10px;display:flex;align-items:center;justify-content:center;background:rgba(255,255,255,.06);font-weight:900;font-size:12px;}
.miniTxt{font-size:12px;color:var(--text);}
.bonusStats{display:grid;grid-template-columns:1fr;gap:10px;margin-bottom:12px;}
.bonusStat{background:var(--panel2);border:1px solid var(--border);border-radius:14px;padding:12px;}
.chipBinWrap{display:flex;justify-content:center;align-items:center;padding:10px 0 0 0;}
.chipBin{width:280px;height:520px;border-radius:22px;border:2px solid rgba(255,255,255,.10);background:radial-gradient(120% 80% at 30% 20%, rgba(255,255,255,.08), rgba(0,0,0,0));position:relative;overflow:hidden;box-shadow:0 20px 60px rgba(0,0,0,.45);}
.chipFill{position:absolute;bottom:0;left:0;width:100%;height:0%;transition:height 1.2s ease;}
.chipTexture{width:100%;height:100%;background:repeating-linear-gradient(130deg, rgba(45,212,191,.22) 0px, rgba(45,212,191,.22) 6px, rgba(251,191,36,.18) 6px, rgba(251,191,36,.18) 12px);filter:contrast(1.1) saturate(1.2);opacity:.95;}
.chipGauge{position:absolute;top:14px;left:14px;right:14px;display:flex;flex-direction:column;align-items:flex-start;gap:4px;z-index:2;}
.pct{font-size:40px;font-weight:900;}
@media (max-width:1100px){.hallGrid{grid-template-columns:1fr;}.machinesGrid{grid-template-columns:1fr;}.hallPlans,.hallBonus{min-height:auto;}.chipBin{height:420px;}}


/* --- Hallboard: DONE = zelena (hotovo na kiosku) --- */
.miniRow.done{
  opacity: 1 !important;
  background: rgba(34,197,94,0.16);
  border-bottom: 1px solid rgba(34,197,94,0.22);
  border-radius: 10px;
  padding: 6px 8px;
}
.miniRow.done .miniIdx{
  background: rgba(34,197,94,0.28);
  border: 1px solid rgba(34,197,94,0.35);
}
.miniRow.done .miniTxt{
  color: #d1fae5;
}


/* --- Chip container (SVG) styles --- */
.chipContainer{ width: 320px; height: auto; max-width: 100%; }
.binBase{ fill: rgba(15,22,34,0.92); stroke: rgba(255,255,255,0.12); stroke-width: 2; }
.wheel{ fill: rgba(190,200,215,0.85); stroke: rgba(20,25,35,0.6); stroke-width: 2; }
.wheelHub{ fill: rgba(60,70,85,0.9); }

.binBody{ fill: rgba(10,14,20,0.92); stroke: rgba(255,255,255,0.14); stroke-width: 2.4; }
.binInner{ fill: rgba(255,255,255,0.04); }

.binLip{ fill: rgba(10,14,20,0.96); stroke: rgba(255,255,255,0.14); stroke-width: 2; }
.stripe{ fill: rgba(251,191,36,0.85); opacity: 0.90; }
.binEdge{ fill: none; stroke: rgba(255,255,255,0.16); stroke-width: 4; opacity: 0.7; }

.pctBadge .pctBg{ fill: rgba(15,22,34,0.92); stroke: rgba(255,255,255,0.14); stroke-width: 2; }
.pctBadge .pctText{ fill: rgba(232,238,246,0.98); font-size: 26px; font-weight: 900; font-family: Arial, sans-serif; }
.pctBadge .pctSub{ fill: rgba(170,182,197,0.9); font-size: 12px; font-weight: 700; font-family: Arial, sans-serif; }

/* --- Industrial chip container --- */
.binBody{ fill:#5c616d; stroke:#1c1f25; stroke-width:2; }
.binBase{ fill:#4a4f5a; }
.binHandle{ fill:#4f5560; }
.wheel{ fill:#6b707c; stroke:#1c1f25; stroke-width:2; }
.pctBg{ fill:#0f1622; stroke:#ffffff22; stroke-width:2; }
.pctText{ fill:#e8eef6; font-size:32px; font-weight:900; font-family:Arial,sans-serif; }


/* FIX: make container body translucent so chip fill is visible */
.binBody{
  fill: rgba(92,97,109,0.28) !important;
  stroke: rgba(0,0,0,0.65) !important;
  stroke-width: 2 !important;
}

/* Fill polygon styling */
.chipFillPoly{ opacity: 0.95; }


/* --- Chip container shell with window --- */
.binShell{
  fill: rgba(92,97,109,0.95);
  stroke: rgba(0,0,0,0.65);
  stroke-width: 2;
}

/* --- Bin shell (with window) --- */
.binShell{ fill: rgba(92,97,109,0.95); stroke: rgba(0,0,0,0.65); stroke-width: 2; }
.chipFillPoly{ opacity: 0.95; }
.binHandle{ fill: rgba(79,85,96,0.95); }

.bonusMessage{
  margin-top: 14px;
  font-size: 20px;
  font-weight: 700;
  color: #fbbf24;
}

.over100Bg{
  fill: rgba(251,191,36,0.9);
}
.over100Text{
  fill:#111;
  font-size:18px;
  font-weight:900;
}
.over100Sub{
  fill:#111;
  font-size:14px;
  font-weight:700;
}
.overGlow{
  filter: drop-shadow(0 0 25px rgba(251,191,36,0.8));
}

/* Gold overfill hump (bonus) */
.overfillHump{
  fill: rgba(197, 167, 59, 0.95);
  stroke: rgba(70, 55, 15, 0.75);
  stroke-width: 2;
  filter: drop-shadow(0 10px 18px rgba(0,0,0,0.35));
}

/* Over-100 badge: ensure single line fits */
.over100Text{ font-size: 16px !important; }
.over100Sub{ font-size: 13px !important; }

/* =========================
   TV / HALLBOARD FULLSCREEN
   ========================= */
html, body.hall {
  height: 100%;
  width: 100%;
  margin: 0;
  overflow: hidden; /* no scroll */
}

body.hall {
  cursor: none;                 /* hide cursor */
  user-select: none;            /* disable selection */
  -webkit-user-select: none;
  -ms-user-select: none;
  overscroll-behavior: none;
}

body.hall * {
  user-select: none;
  -webkit-user-select: none;
}

.hallHead, .hallGrid {
  max-width: none;
}

.hallGrid {
  height: calc(100vh - 74px);
  padding-bottom: 0;
}

.hallPlans, .hallBonus {
  min-height: calc(100vh - 110px);
}

@media (max-width: 1100px){
  .hallGrid{ height: auto; }
  body.hall{ overflow: auto; cursor: auto; }
}


/* Kiosk: 2 columns layout */
.kioskGrid2{display:grid;grid-template-columns:1fr 1fr;gap:12px;}
@media (max-width:900px){.kioskGrid2{grid-template-columns:1fr;}}

/* Hallboard: single-day cards */
.machineDays{ grid-template-columns: 1fr !important; }

/* Kiosk: 2 fixed columns, numbering 1-10 then 11+ */
.kioskCols{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.kioskCol{
  display: flex;
  flex-direction: column;
  gap: 12px;
}
@media (max-width: 900px){
  .kioskCols{ grid-template-columns: 1fr; }
}

/* Admin: scrollable queue list */
.adminScroll{
  max-height: 60vh;
  overflow-y: auto;
  padding-right: 6px;
}

.hallPage{ width:100%; }
.machinesPages{ position:relative; }

/* Hall paging fallback */
.hallPage[data-page="2"]{ display:none; }

/* Hall paging items */
.hallPageItem{ }

/* Hall machine: 4 columns x 6 items */
.hall4cols{
  display:grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 10px;
  margin-top: 6px;
}
.hallCol{
  display:flex;
  flex-direction: column;
  gap: 6px;
}

/* Moved from previous day (rollover) */
.moved{
  border: 1px solid rgba(239,68,68,0.55) !important;
  box-shadow: 0 0 0 1px rgba(239,68,68,0.18) inset;
}
.movedBadge{
  display:inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  color: rgba(255,255,255,0.95);
  background: rgba(239,68,68,0.55);
  border: 1px solid rgba(239,68,68,0.55);
}
.miniRow.moved{
  background: rgba(239,68,68,0.10) !important;
}


/* ===== PRESUNUTO (moved) - strong red highlight ===== */
.item.moved{
  border: 2px solid rgba(239,68,68,0.75) !important;
  background: rgba(239,68,68,0.10) !important;
}
.item.moved .idx{
  background: rgba(239,68,68,0.18) !important;
  border-color: rgba(239,68,68,0.55) !important;
}
.item.moved .line1 b{
  color: rgba(255,220,220,0.98) !important;
}
.movedBadge{
  background: rgba(239,68,68,0.75) !important;
  border-color: rgba(239,68,68,0.85) !important;
}

/* Hall rows */
.miniRow.moved{
  background: rgba(239,68,68,0.22) !important;
  border: 1px solid rgba(239,68,68,0.55) !important;
  border-radius: 10px;
  padding: 6px 8px;
}
.hallCol .miniRow.moved{
  background: rgba(239,68,68,0.22) !important;
  border: 1px solid rgba(239,68,68,0.55) !important;
}
.miniRow.done.moved{
  opacity: 1 !important;
}

/* Simple moved indicator (red dot) */
.movedDot{
  margin-left: 8px;
  font-size: 18px;
  line-height: 1;
  color: rgba(239,68,68,0.95);
  text-shadow: 0 0 10px rgba(239,68,68,0.55);
  vertical-align: middle;
}

.movedMeta{ margin-left:8px; font-size:12px; color: rgba(255,180,180,0.95); font-weight:800;}
.movedDot{ margin-left:8px; font-size:18px; color: rgba(239,68,68,0.95); text-shadow: 0 0 10px rgba(239,68,68,0.55);}

/* ===== HALL 4K PROFILE (3840x2160) ===== */
@media (min-width: 3000px) {
  body.hall{ font-size: 22px; }
  .hallTitle{ font-size: 46px !important; }
  .machineName{ font-size: 26px !important; }
  .miniIdx{ width: 42px !important; height: 42px !important; font-size: 16px !important; }
  .miniTxt{ font-size: 16px !important; }
  .machineCard{ padding: 20px !important; }
  .chipContainer{ width: 700px !important; }
  .bonusStat .stat-value{ font-size: 34px !important; }
}
