/* ukryte elementy zawsze ukryte, niezależnie od klas układu (np. .row) */
[hidden] { display: none !important; }
:root {
  --bg: #0e0b14;
  --panel: #1a1524;
  --panel-2: #241d33;
  --text: #f3eefc;
  --muted: #9d93b3;
  --accent: #ff4fa3;
  --accent-2: #ffb547;
  --ok: #3ddc97;
  --err: #ff5c5c;
  --radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
button { font: inherit; cursor: pointer; border: 0; border-radius: 10px;
  padding: .6em 1em; background: var(--accent); color: #fff; font-weight: 600; }
button.secondary { background: var(--panel-2); color: var(--text); }
button:disabled { opacity: .5; }
select { font: inherit; padding: .6em; border-radius: 10px; background: var(--panel-2); color: var(--text); border: 0; }
input { font: inherit; width: 100%; padding: .8em 1em; border-radius: var(--radius);
  border: 1px solid var(--panel-2); background: var(--panel); color: var(--text); }
.muted { color: var(--muted); }
.wrap { max-width: 640px; margin: 0 auto; padding: 16px; }
.card { background: var(--panel); border-radius: var(--radius); padding: 14px 16px; margin: 12px 0; }
.row { display: flex; align-items: center; gap: 12px; }
.row .grow { flex: 1; min-width: 0; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: 10px 0; border-bottom: 1px solid var(--panel-2); }
.list li:last-child { border-bottom: 0; }
.progress { height: 6px; background: var(--panel-2); border-radius: 3px; overflow: hidden; }
.progress > div { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .5s linear; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: var(--panel-2); padding: .8em 1.2em; border-radius: var(--radius);
  opacity: 0; transition: opacity .3s; pointer-events: none; max-width: 90vw; }
.toast.show { opacity: 1; }
.toast.ok { border-left: 4px solid var(--ok); }
.toast.err { border-left: 4px solid var(--err); }
.badge { font-size: .75em; padding: .15em .5em; border-radius: 6px; background: var(--panel-2); color: var(--accent-2); }
h1 { font-size: 1.4em; margin: .4em 0; }
h2 { font-size: 1em; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 .5em; }
.list li.section { font-size: .8em; text-transform: uppercase; letter-spacing: .08em; color: var(--accent-2); border-bottom: 0; padding-top: 14px; }
.list li.section.muted { color: var(--muted); text-transform: none; letter-spacing: 0; }
.thumb { width: 64px; height: 36px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
/* przełącznik WŁ/WYŁ */
.switch-row { display: flex; align-items: center; gap: 12px; margin: 10px 0; cursor: pointer; }
.switch { position: relative; width: 58px; height: 32px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; inset: 0; background: var(--panel-2); border-radius: 32px; transition: background .2s; }
.switch .slider::before { content: ""; position: absolute; width: 24px; height: 24px; left: 4px; top: 4px;
  background: #fff; border-radius: 50%; transition: transform .2s; }
.switch input:checked + .slider { background: var(--ok); }
.switch input:checked + .slider::before { transform: translateX(26px); }
.switch input:disabled + .slider { opacity: .4; }
/* impreza */
.event-card { background: linear-gradient(90deg, var(--accent), #8a3ffc); }
.event-name { font-weight: 800; font-size: 1.1em; }
.event-banner { font-size: .9em; opacity: .9; }
/* okno zamówienia */
.sheet { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: flex; align-items: flex-end; justify-content: center; z-index: 30; }
.sheet[hidden] { display: none; }
.sheet-card { background: var(--panel); width: 100%; max-width: 640px; border-radius: 18px 18px 0 0; padding: 18px 16px 22px;
  max-height: 90vh; overflow-y: auto; }
.sheet summary { cursor: pointer; padding: 8px 0; font-weight: 600; }
textarea { font: inherit; width: 100%; padding: .8em 1em; border-radius: var(--radius); border: 1px solid var(--panel-2);
  background: var(--bg); color: var(--text); margin-top: 8px; resize: vertical; }
.filebtn { display: block; text-align: center; padding: .8em; border-radius: 10px; background: var(--panel-2); cursor: pointer; margin-top: 8px; font-weight: 600; }
.filebtn input { display: none; }
/* panel: formularze imprez */
.ev-form label { display: block; margin: 10px 0 4px; font-size: .9em; color: var(--muted); }
.ev-form label input, .ev-form label select, .ev-form label textarea, #lccard label select { margin-top: 4px; width: 100%; color: var(--text); }
#lccard > label:not(.switch-row) { display: block; margin: 8px 0; font-size: .9em; color: var(--muted); }
.ev-form .switch-row, #lccard .switch-row { color: var(--text); font-size: 1em; }
.ev-sub { margin: 12px 0 4px; font-size: .9em; }
.checks { display: flex; flex-wrap: wrap; gap: 6px; }
.check { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; background: var(--panel-2);
  border-radius: 20px; font-size: .9em; cursor: pointer; }
.check input { width: auto; margin: 0; }
.ev-active { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; margin: 8px 0;
  background: linear-gradient(90deg, var(--accent), #8a3ffc); }
.ev-item { flex-wrap: wrap; }
.ev-item .ev-actions { display: flex; gap: 6px; width: 100%; margin-top: 8px; }
.ev-start { flex: 1; background: linear-gradient(90deg, var(--accent), var(--accent-2)); font-size: 1.05em; }
.ded-item audio { width: 100%; margin-top: 6px; }
.switch-row .grow { flex: 1; min-width: 0; }
/* panel: zakładki */
.tabs { display: flex; gap: 6px; margin: 4px 0 12px; position: sticky; top: 0; z-index: 5; background: var(--bg); padding: 6px 0; }
.tab { flex: 1; text-align: center; padding: 10px; border-radius: 12px; background: var(--panel); color: var(--muted);
  text-decoration: none; font-weight: 600; }
.tab.active { background: linear-gradient(90deg, var(--accent), #8a3ffc); color: #fff; }
.fld { display: block; margin: 10px 0 4px; font-size: .9em; color: var(--muted); }
.fld input { margin-top: 4px; color: var(--text); }
.sysgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; font-size: .9em; }
.sysgrid div { background: var(--panel-2); border-radius: 10px; padding: 8px 10px; }
.sysgrid b { display: block; font-size: 1.1em; }
.wifi-dev { background: var(--panel-2); border-radius: 12px; padding: 10px 12px; margin: 6px 0; }
.wifi-net { cursor: pointer; }
.wifi-net .sig { font-variant-numeric: tabular-nums; }
.wifi-pass { display: flex; gap: 6px; margin-top: 8px; width: 100%; }
.ev-active[hidden], .wifi-dev[hidden] { display: none; }
.wifi-dev .btns { display: flex; gap: 6px; margin-top: 8px; }
.wifi-dev .btns button { flex: 1; }
.sysgrid .wide { grid-column: 1 / -1; }
.mixl { width: 8.5em; font-size: .9em; } .mixv { width: 3em; text-align: right; }
/* kafelki kategorii */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile { position: relative; aspect-ratio: 1.45; border-radius: 14px; padding: 10px 12px; text-align: left;
  display: flex; flex-direction: column; justify-content: flex-end; color: #fff; overflow: hidden;
  background-size: cover; background-position: center; font-weight: 700; box-shadow: 0 4px 14px rgba(0,0,0,.35); }
.tile-ico { position: absolute; top: 8px; right: 10px; font-size: 1.8em; opacity: .95; }
.tile-name { font-size: 1.05em; line-height: 1.15; text-shadow: 0 1px 4px rgba(0,0,0,.5); }
.tile-sub { font-size: .75em; font-weight: 500; opacity: .85; }
.back-row { display: flex; align-items: center; gap: 10px; padding: 4px 0 10px; }
.back-row button { padding: .45em .9em; }
.back-row .t { font-weight: 700; }
.plays { font-size: .75em; color: var(--accent-2); white-space: nowrap; }
/* barman */
.big-code-btn { width: 100%; font-size: 1.3em; padding: .9em; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.code-box { text-align: center; margin-top: 14px; padding: 14px; border-radius: 14px; background: var(--panel-2); }
.code-digits { font-size: 3.6em; font-weight: 800; letter-spacing: .25em; margin: 4px 0 2px; padding-left: .25em; color: var(--accent-2); font-variant-numeric: tabular-nums; }
.seg { display: flex; gap: 6px; }
.seg button { min-width: 2.6em; padding: .5em .7em; }
.seg button.on { background: var(--accent); }
.code-row .code-sm { font-size: 1.3em; letter-spacing: .12em; font-variant-numeric: tabular-nums; min-width: 3.4em; }
.code-row.dim { opacity: .5; }
/* gość: kod / limit */
.access-card .code-in { display: flex; gap: 8px; margin-top: 8px; }
.access-card .code-in input { font-size: 1.4em; letter-spacing: .3em; text-align: center; width: 7em; flex: 1; }

/* „Graj z telefonu” */
.bt-order { width: 100%; margin-bottom: 10px; }
.bt-turn { border: 2px solid var(--accent-2); }
.bt-turn.now { border-color: var(--accent); animation: btpulse 1.5s ease-in-out infinite; }
@keyframes btpulse { 50% { box-shadow: 0 0 18px rgba(255, 79, 163, .6); } }
.bt-steps { padding-left: 1.2em; font-size: .9em; line-height: 1.45; }
