/* shared look for cashier + admin */
:root {
  --bg: #0e0f12;
  --panel: #17191e;
  --panel2: #1f2229;
  --line: #2b2f38;
  --text: #eceef2;
  --muted: #98a0ae;
  --accent: #ff9100;
  --accent-d: #c96f00;
  --green: #17b34a;
  --green-d: #108a38;
  --red: #e5484d;
  --blue: #3b82f6;
  --ball: #d9531e;
  --ball2: #a93a10;
  --yellow: #f4d21f;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 15px/1.4 "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }
.muted { color: var(--muted); }
.err { color: #ff8a8a; min-height: 1.3em; margin: 6px 0; }
.hidden { display: none !important; }

input, select, textarea {
  background: #0d0e11; border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; width: 100%;
}
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
label { display: block; margin: 10px 0; font-size: 13px; color: var(--muted); }
label input, label select { margin-top: 4px; color: var(--text); font-size: 15px; }

.btn { border: 0; border-radius: 6px; padding: 9px 16px; font-weight: 600; background: var(--panel2); border: 1px solid var(--line); }
.btn:hover { filter: brightness(1.15); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #1a1000; }
.btn.green { background: var(--green); border-color: var(--green); color: #fff; }
.btn.danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn.ghost { background: transparent; }
.btn.small { padding: 4px 10px; font-size: 13px; }
.btn:disabled { opacity: .45; cursor: not-allowed; filter: none; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; margin-top: 14px; }

/* modal */
.modal-back { position: fixed; inset: 0; background: rgba(0, 0, 0, .65); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 16px; }
.modal { background: #fff; color: #222; border-radius: 6px; width: min(1100px, 100%); max-height: 94vh; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.modal.small { width: min(460px, 100%); }
.modal.mid { width: min(760px, 100%); }
.modal-h { background: var(--accent); color: #1a1000; padding: 14px 20px; font-size: 18px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; }
.modal-x { background: none; border: 0; font-size: 28px; line-height: 1; color: #1a1000; opacity: .7; }
.modal-b { padding: 18px 22px; overflow: auto; }
.modal label { color: #555; }
.modal input, .modal select { background: #fff; color: #222; border-color: #c9ccd3; }
.modal .btn { background: #eee; color: #222; border-color: #ccc; }
.modal .btn.primary { background: var(--accent); color: #1a1000; border-color: var(--accent); }
.modal .btn.green { background: var(--green); color: #fff; border-color: var(--green); }
.modal .btn.danger { background: var(--red); color: #fff; border-color: var(--red); }
.modal .muted { color: #6b7280; }
.confirm-msg { font-size: 16px; margin: 4px 0 8px; }

/* toasts */
#toasts { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: #2b2f38; color: #fff; padding: 10px 18px; border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,.5); font-weight: 600; transition: opacity .4s; max-width: 90vw; }
.toast.ok { background: var(--green-d); }
.toast.err { background: #b3261e; }
.toast.out { opacity: 0; }

/* tables */
table.t { width: 100%; border-collapse: collapse; }
table.t th { text-align: left; font-weight: 600; padding: 10px 12px; border-bottom: 2px solid #e4e6ea; white-space: nowrap; }
table.t td { padding: 10px 12px; border-bottom: 1px solid #e4e6ea; white-space: nowrap; }
table.t td.n, table.t th.n { text-align: right; }
table.t tr.clickable { cursor: pointer; }
table.t tr.clickable:hover td { background: #fff4e0; }

/* keno balls in lists */
.kball { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; font-weight: 700; font-size: 12px; color: #1b1b1b; margin: 1px; box-shadow: inset -2px -3px 5px rgba(0,0,0,.25), inset 2px 2px 4px rgba(255,255,255,.55); }
.kball.lo { background: radial-gradient(circle at 35% 30%, #fff7a8, var(--yellow) 60%, #c9a800); }
.kball.hi { background: radial-gradient(circle at 35% 30%, #ffd08a, #f08a1c 60%, #b45f08); }
.kball.hit { outline: 3px solid #16a34a; outline-offset: 1px; }

.chip { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: #e5e7eb; color: #333; }
.chip.won { background: #16a34a; color: #fff; }
.chip.paid { background: #0ea5e9; color: #fff; }
.chip.lost { background: #9ca3af; color: #fff; }
.chip.open, .chip.pending { background: #f59e0b; color: #1a1000; }
.chip.cancelled, .chip.expired { background: #ef4444; color: #fff; }

.kbusy { pointer-events: none; opacity: .65; }

/* v34: connection problem bar (the page keeps its content) */
#kuNet { position: fixed; z-index: 90; top: 0; left: 0; right: 0; padding: 6px 12px; background: #fff4d6; color: #6b4a00; border-bottom: 1px solid #f0d58a; font-size: 13px; text-align: center; }
