/* QUIZ PRO LICENCE PANEL - look and feel (28 Nov 2026).
   Neon game-show brand, kept calm for a working tool: dark slate surfaces, every section in its own titled frame,
   caps headings, one button size. A fixed menu on the left; in a narrow window it shrinks to an icon rail. */
:root {
  --bg: #080918; --side: #0b0c1f; --frame: #10122a; --frame-head: #141738; --inset: #0b0d22; --line: #23264d; --line-soft: #1b1e40;
  --text: #e8e9ff; --dim: #9497c4; --faint: #61649a; --cyan: #22d8f0; --pink: #ff3fd2; --yellow: #ffd84d; --green: #3ee89a; --red: #ff5a76;
  --radius: 12px; --side-w: 236px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 "Segoe UI", system-ui, sans-serif; }
body { background: radial-gradient(1200px 500px at 70% -10%, rgba(34, 216, 240, .07), transparent 60%), var(--bg); background-attachment: fixed; }
a { color: inherit; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #262a55; border-radius: 99px; border: 2px solid var(--bg); }
* { scrollbar-width: thin; scrollbar-color: #262a55 transparent; }

/* ---------- the menu ---------- */
.side { position: fixed; inset: 0 auto 0 0; width: var(--side-w); display: flex; flex-direction: column; background: var(--side); border-right: 1px solid var(--line); z-index: 5; }
.brand { display: block; padding: 22px 22px 18px; text-decoration: none; border-bottom: 1px solid var(--line); }
.brand b { display: block; font-weight: 900; letter-spacing: .16em; font-size: 19px; color: var(--cyan); text-shadow: 0 0 12px rgba(34, 216, 240, .55); }
.brand b.short { display: none; }
.brand span { display: block; margin-top: 3px; font-size: 11px; font-weight: 800; letter-spacing: .26em; color: var(--pink); }
.side nav { flex: 1; overflow-y: auto; padding: 8px 0 12px; }
.side .group { margin: 16px 22px 6px; font-size: 10.5px; font-weight: 800; letter-spacing: .22em; color: var(--faint); }
.nav { display: flex; align-items: center; gap: 12px; margin: 1px 12px; padding: 9px 12px; border-radius: 9px; color: var(--dim); text-decoration: none; font-weight: 700; font-size: 13.5px; letter-spacing: .08em; position: relative; }
.nav span { flex: 1; white-space: nowrap; }
.nav .ico { opacity: .8; }
.nav:hover { color: var(--text); background: rgba(255, 255, 255, .035); }
.nav.on { color: var(--yellow); background: linear-gradient(90deg, rgba(255, 216, 77, .13), rgba(255, 216, 77, .02)); }
.nav.on::before { content: ''; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--yellow); box-shadow: 0 0 8px var(--yellow); }
.nav.on .ico { opacity: 1; filter: drop-shadow(0 0 4px rgba(255, 216, 77, .6)); }
.nav em { font-style: normal; font-size: 11.5px; font-weight: 700; min-width: 24px; text-align: center; padding: 1px 7px; border-radius: 99px; background: rgba(255, 255, 255, .06); color: var(--dim); }
.nav.on em { background: rgba(255, 216, 77, .16); color: var(--yellow); }
.nav .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 8px var(--red); }
.side-foot { padding: 14px 16px 16px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.keystate { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 10.5px; font-weight: 800; letter-spacing: .14em; padding: 7px; border-radius: 8px; background: var(--inset); border: 1px solid var(--line); }
.keystate i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.keystate.good { color: var(--green); } .keystate.good i { background: var(--green); box-shadow: 0 0 8px var(--green); }
.keystate.bad { color: var(--red); } .keystate.bad i { background: var(--red); box-shadow: 0 0 8px var(--red); }
.ico { width: 18px; height: 18px; flex: none; }

/* ---------- the page ---------- */
.content { margin-left: var(--side-w); min-height: 100vh; display: flex; flex-direction: column; }
main { width: 100%; max-width: 1240px; padding: 0 28px 28px; flex: 1; }
.pagehead { margin: 0 -28px 22px; padding: 24px 28px 18px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, rgba(20, 23, 56, .9), rgba(16, 18, 42, .4)); }
h1 { margin: 0 0 4px; font-size: 24px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; color: var(--yellow); text-shadow: 0 0 14px rgba(255, 216, 77, .35); }
.intro { margin: 0; color: var(--dim); max-width: 900px; font-size: 14px; }
.intro small { font-size: 12.5px; color: var(--faint); }
footer { color: var(--faint); font-size: 12px; padding: 12px 28px; border-top: 1px solid var(--line); }

/* ---------- frames: every section in its own box with a title strip ---------- */
.frame { background: var(--frame); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 20px; overflow: hidden; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); }
.frame-head { display: flex; align-items: center; gap: 10px; padding: 11px 18px; background: var(--frame-head); border-bottom: 1px solid var(--line);
  font-size: 12px; font-weight: 800; letter-spacing: .18em; color: var(--pink); }
.frame-head::before { content: ''; width: 6px; height: 6px; border-radius: 2px; background: var(--pink); box-shadow: 0 0 8px var(--pink); }
.frame-body { padding: 18px; }
.frame-body > *:last-child { margin-bottom: 0; }
/* things inside a frame don't need their own box any more */
.frame .card { background: none; border: 0; padding: 0; max-width: none; box-shadow: none; }
.frame form.card { max-width: 760px; }
.frame .facts.card { margin-bottom: 0; }
/* a table fills its frame edge to edge */
.tablewrap { overflow-x: auto; }
.frame-body > .tablewrap:first-child { margin: -18px -18px 0; }
.frame-body > .tablewrap { margin: 0 -18px; }
.frame-body > .tablewrap:last-child { margin-bottom: -18px; }
.frame-body > .bar + .tablewrap { margin-top: 0; border-top: 1px solid var(--line); }
.frame-body > .bar:first-child { margin: -18px -18px 0; padding: 14px 18px; border-bottom: 0; }
.frame-body > .bar:first-child:last-child { margin-bottom: -18px; }

/* ---------- boxes side by side inside a frame (actions) ---------- */
.actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 14px; }
.actions.two { grid-template-columns: 1fr 1fr; }
.actions .card, .frame .actions .card { background: var(--inset); border: 1px solid var(--line-soft); border-radius: 10px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.actions .card p { margin: 0; color: var(--dim); font-size: 13.5px; flex: 1; }
.actions form { display: flex; flex-direction: column; gap: 10px; }
.actions .card label { margin-bottom: 4px; }
.actions input[type=date] { margin: 0; }
.actions label.radio { margin: 0; }
.card.danger, .frame .actions .card.danger { border-color: rgba(255, 90, 118, .45); }
.frame .card.wide { background: var(--inset); border: 1px solid var(--line-soft); border-radius: 10px; padding: 16px; }
.card.wide p { color: var(--dim); font-size: 13.5px; margin: 0 0 12px; }
h3 { margin: 0; font-size: 12.5px; font-weight: 800; letter-spacing: .16em; color: var(--cyan); }

/* ---------- facts grid ---------- */
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0; border: 1px solid var(--line-soft); border-radius: 10px; overflow: hidden; }
.frame-body > .facts.card:first-child { margin: -18px -18px 18px; border: 0; border-radius: 0; border-bottom: 1px solid var(--line); }
.frame-body > .facts.card:first-child:last-child { margin-bottom: -18px; border-bottom: 0; }
.facts > div { padding: 12px 16px; border-right: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); margin: 0 -1px -1px 0; }
.facts > div > span { display: block; font-size: 10.5px; font-weight: 800; letter-spacing: .16em; color: var(--faint); margin-bottom: 3px; }
.facts b { font-weight: 600; overflow-wrap: anywhere; }
.facts small, .card p small { color: var(--dim); font-weight: 400; }
.facts small.dim { display: block; font-size: 12px; margin-top: 2px; }
.facts a { color: var(--text); }
.card .facts { margin-bottom: 16px; }

/* ---------- buttons: one size everywhere ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; height: 42px; min-width: 170px; padding: 0 20px; border-radius: 9px; border: 1px solid var(--cyan);
  background: linear-gradient(180deg, rgba(34, 216, 240, .2), rgba(34, 216, 240, .07)); color: #f1fdff; font: 800 13px "Segoe UI", system-ui, sans-serif; letter-spacing: .12em;
  text-transform: uppercase; text-decoration: none; cursor: pointer; white-space: nowrap; box-shadow: 0 0 0 1px rgba(34, 216, 240, .08), 0 0 14px rgba(34, 216, 240, .18); transition: box-shadow .15s, background .15s; }
.btn:hover { background: linear-gradient(180deg, rgba(34, 216, 240, .3), rgba(34, 216, 240, .1)); box-shadow: 0 0 18px rgba(34, 216, 240, .45); }
.btn.ghost { border-color: var(--line); background: transparent; box-shadow: none; color: var(--dim); }
.btn.ghost:hover { color: var(--text); border-color: #3a3e74; background: rgba(255, 255, 255, .03); }
.btn.warnbtn { border-color: var(--red); background: linear-gradient(180deg, rgba(255, 90, 118, .2), rgba(255, 90, 118, .06)); box-shadow: 0 0 14px rgba(255, 90, 118, .2); }
.btn[disabled] { opacity: .4; cursor: not-allowed; box-shadow: none; }
.btn.small { height: 34px; min-width: 96px; font-size: 12px; padding: 0 14px; }
.btn.full { width: 100%; min-width: 0; height: 38px; }
.btn .ico { width: 16px; height: 16px; }
.bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.bar.top { margin-top: 16px; }
.card .bar { margin: 8px 0 0; }
.search { display: flex; gap: 10px; flex: 1; min-width: 260px; }
.search input { margin: 0; height: 42px; }

/* ---------- forms ---------- */
.card { background: var(--frame); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; max-width: 760px; }
.card.narrow { max-width: 440px; }
label { display: block; font-weight: 800; letter-spacing: .1em; font-size: 11.5px; margin-bottom: 14px; color: var(--cyan); }
label em { color: var(--faint); font-style: normal; font-weight: 600; letter-spacing: 0; text-transform: none; font-size: 12px; }
label small { display: block; color: var(--dim); font-weight: 400; letter-spacing: 0; font-size: 12.5px; margin-top: 2px; }
input, textarea, select { display: block; width: 100%; margin-top: 6px; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--inset); color: var(--text); font: 15px "Segoe UI", system-ui, sans-serif; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(34, 216, 240, .15); }
fieldset { border: 1px solid var(--line-soft); border-radius: 10px; padding: 12px 16px 4px; margin: 0 0 16px; background: rgba(11, 13, 34, .5); }
legend { font-weight: 800; letter-spacing: .14em; font-size: 11px; color: var(--pink); padding: 0 6px; }
fieldset select { margin-bottom: 14px; }
label.radio { color: var(--text); font-size: 13.5px; letter-spacing: .06em; }
label.radio input[type=radio], label.radio input[type=checkbox] { display: inline-block; width: auto; margin: 0 8px 0 0; vertical-align: middle; accent-color: var(--cyan); }
label.radio.game { display: block; padding: 10px 0; border-bottom: 1px solid var(--line-soft); margin: 0; }
label.radio.game:last-of-type { border-bottom: 0; }
form.row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
form.row label.radio { margin: 0; }
input.big { font-size: 26px; letter-spacing: .25em; text-align: center; }

/* ---------- tables ---------- */
table { width: 100%; border-collapse: collapse; min-width: 560px; }
th { text-align: left; font-size: 10.5px; font-weight: 800; letter-spacing: .16em; color: var(--faint); padding: 11px 18px; background: rgba(11, 13, 34, .6); border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 11px 18px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
tbody tr:hover td { background: rgba(255, 255, 255, .02); }
tr:last-child td { border-bottom: 0; }
td a { color: var(--text); font-weight: 700; text-decoration: none; border-bottom: 1px dotted rgba(232, 233, 255, .35); }
td a:hover { color: var(--cyan); border-bottom-color: var(--cyan); }
td small { color: var(--dim); }
td.right { text-align: right; width: 1%; white-space: nowrap; }
.nowrap { white-space: nowrap; }

/* ---------- small bits ---------- */
.msg { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-weight: 600; font-size: 14px; border: 1px solid; }
.msg.bad { color: #ffc2cd; border-color: rgba(255, 90, 118, .6); background: rgba(255, 90, 118, .09); }
.msg.good { color: #bdf8dc; border-color: rgba(62, 232, 154, .5); background: rgba(62, 232, 154, .07); }
.empty { padding: 26px; text-align: center; color: var(--dim); border: 1px dashed var(--line); border-radius: 10px; }
.frame-body > .empty:only-child { border: 0; padding: 18px; }
.meta { color: var(--faint); font-size: 12.5px; }
.mono { font-family: Consolas, "Cascadia Mono", monospace; letter-spacing: .05em; }
.dim { color: var(--dim); }
p.note { margin: 0 0 14px; font-size: 13.5px; max-width: 900px; }
.chip { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 10.5px; font-weight: 800; letter-spacing: .1em; border: 1px solid; white-space: nowrap; vertical-align: middle; }
.chip.good { color: var(--green); border-color: rgba(62, 232, 154, .55); background: rgba(62, 232, 154, .08); }
.chip.warn { color: var(--yellow); border-color: rgba(255, 216, 77, .55); background: rgba(255, 216, 77, .08); }
.chip.bad { color: var(--red); border-color: rgba(255, 90, 118, .55); background: rgba(255, 90, 118, .08); }
img.qr { display: block; width: 210px; height: 210px; image-rendering: pixelated; border-radius: 8px; margin: 4px 0; }
.codes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; font-size: 19px; }
.codes div { padding: 10px; border: 1px dashed var(--line); border-radius: 8px; text-align: center; background: var(--inset); }

/* ---------- updates ---------- */
form.inline { display: inline; margin: 0; }
.switch { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px 0 6px; border-radius: 99px; border: 1px solid var(--line); background: var(--inset); color: var(--dim); font: 800 10.5px "Segoe UI", system-ui, sans-serif; letter-spacing: .12em; cursor: pointer; white-space: nowrap; }
.switch i { width: 30px; height: 18px; border-radius: 99px; background: #2a2d58; position: relative; transition: background .15s; }
.switch i::after { content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #8d90c0; transition: left .15s, background .15s; }
.switch.on { color: var(--green); border-color: rgba(62, 232, 154, .45); }
.switch.on i { background: rgba(62, 232, 154, .35); }
.switch.on i::after { left: 14px; background: var(--green); box-shadow: 0 0 8px var(--green); }
.exportrow { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.exportrow > div { flex: 1; min-width: 260px; }
.exportrow p.note:last-child { margin-bottom: 0; }
details.exportlog { margin-top: 14px; border: 1px solid var(--line-soft); border-radius: 10px; background: var(--inset); }
details.exportlog summary { cursor: pointer; padding: 10px 14px; font-size: 13px; color: var(--dim); }
details.exportlog pre { margin: 0; padding: 12px 14px; border-top: 1px solid var(--line-soft); max-height: 320px; overflow: auto; font: 12.5px/1.5 Consolas, "Cascadia Mono", monospace; color: var(--text); white-space: pre-wrap; }
.ver { float: right; font-family: Consolas, "Cascadia Mono", monospace; letter-spacing: .06em; color: var(--faint); }

/* ---------- needs your attention ---------- */
ul.attn { list-style: none; margin: 0; padding: 0; }
ul.attn li { display: flex; align-items: center; gap: 14px; padding: 10px 2px; border-bottom: 1px solid var(--line-soft); }
ul.attn li:first-child { padding-top: 0; }
ul.attn li:last-child { border-bottom: 0; padding-bottom: 0; }
ul.attn li span { flex: 1; font-size: 14px; }
ul.attn li i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
ul.attn li.bad i { background: var(--red); box-shadow: 0 0 8px var(--red); }
ul.attn li.warn i { background: var(--yellow); box-shadow: 0 0 8px var(--yellow); }
ul.attn li.info i { background: var(--cyan); box-shadow: 0 0 6px var(--cyan); opacity: .8; }
.allgood { color: var(--green); font-size: 14px; } .allgood b { letter-spacing: .1em; }

/* ---------- messages to customers ---------- */
.msgpick { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.msgpick select { width: auto; min-width: 240px; margin: 0; flex: 1; max-width: 420px; }
.msgbox textarea { font: 14px/1.5 "Segoe UI", system-ui, sans-serif; resize: vertical; margin: 0; }
.btn.copied { border-color: var(--green); color: var(--green); }
select.kindsel { width: auto; margin: 0; height: 42px; padding: 0 10px; }

/* ---------- home tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.tile { display: flex; flex-direction: column; background: var(--inset); border: 1px solid var(--line-soft); border-radius: 10px; padding: 16px; color: var(--text); text-decoration: none; position: relative; transition: border-color .15s, box-shadow .15s, transform .15s; }
.tile::after { content: ''; position: absolute; left: 16px; right: 16px; top: 0; height: 2px; border-radius: 0 0 2px 2px; background: var(--pink); opacity: .7; }
a.tile:hover { border-color: rgba(255, 63, 210, .55); box-shadow: 0 0 18px rgba(255, 63, 210, .18); transform: translateY(-1px); }
.tt { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 12.5px; letter-spacing: .14em; color: var(--pink); }
.tt .ico { width: 20px; height: 20px; filter: drop-shadow(0 0 5px rgba(255, 63, 210, .5)); }
.tn { font-size: 34px; font-weight: 900; margin: 6px 0 2px; }
.tx { color: var(--dim); font-size: 13px; }

/* ---------- log in / first run: no menu, one box ---------- */
body.solo { display: flex; flex-direction: column; align-items: center; min-height: 100vh; }
body.solo main { max-width: 480px; padding-top: 5vh; }
body.solo .pagehead { margin: 0 0 16px; padding: 0; border: 0; background: none; text-align: center; }
body.solo .card.narrow { max-width: none; box-shadow: 0 12px 40px rgba(0, 0, 0, .4); }
body.solo .btn { width: 100%; }
.solo-brand { margin-top: 10vh; text-align: center; }
.solo-brand { font-weight: 900; letter-spacing: .16em; font-size: 24px; color: var(--cyan); text-shadow: 0 0 12px rgba(34, 216, 240, .55); }
.solo-brand span { display: block; font-size: 11px; letter-spacing: .3em; color: var(--pink); margin-top: 4px; text-shadow: none; }
body.solo footer { border: 0; }

/* ---------- narrower windows ---------- */
@media (max-width: 1150px) {
  .actions { grid-template-columns: 1fr 1fr; }
}
/* the menu becomes a slim icon rail (hover an icon to see its name) */
@media (max-width: 980px) {
  :root { --side-w: 68px; }
  .brand { padding: 18px 0 14px; text-align: center; }
  .brand b.full, .brand span { display: none; }
  .brand b.short { display: block; font-size: 18px; letter-spacing: .1em; }
  .side .group { margin: 10px 14px 4px; height: 1px; background: var(--line); font-size: 0; }
  .nav { justify-content: center; margin: 2px 8px; padding: 11px 0; }
  .nav span { display: none; }
  .nav em { position: absolute; top: 3px; right: 3px; min-width: 18px; padding: 0 5px; font-size: 10px; line-height: 16px; }
  .nav .dot { position: absolute; top: 6px; left: 8px; }
  .nav .ico { width: 20px; height: 20px; }
  .nav.on::before { left: -8px; }
  .side-foot { padding: 10px 8px 12px; }
  .keystate { padding: 9px 0; } .keystate span { display: none; }
  .btn.full span { display: none; }
  .btn.full { padding: 0; }
  main { padding: 0 18px 18px; }
  .pagehead { margin: 0 -18px 18px; padding: 20px 18px 14px; }
  footer { padding: 12px 18px; }
  .actions, .actions.two { grid-template-columns: 1fr; }
  table { min-width: 0; }
  th, td { padding-left: 12px; padding-right: 12px; }
  td small { display: block; }
  .hide-narrow { display: none; }
  .codes { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .frame-body { padding: 14px; }
  .frame-body > .tablewrap:first-child, .frame-body > .bar:first-child { margin: -14px -14px 0; }
  .frame-body > .tablewrap { margin: 0 -14px; }
  .frame-body > .tablewrap:last-child { margin-bottom: -14px; }
  .frame-body > .facts.card:first-child { margin: -14px -14px 14px; }
  .search { min-width: 0; flex-basis: 100%; }
  .btn { min-width: 0; }
  h1 { font-size: 20px; }
}
