/* =====================================================================
   Arcade Scout - shared styles (landing page, owner console, player page,
   printable labels). Dark "arcade at night" look with neon accents.
   ===================================================================== */
:root {
  --bg: #0b0b1a;          /* page background */
  --panel: #15152b;       /* cards */
  --panel2: #1d1d3a;      /* inputs, table stripes */
  --line: #2c2c52;        /* borders */
  --text: #ecebff;
  --muted: #9c9bc4;
  --pink: #ff2bd6;
  --cyan: #22e4ff;
  --yellow: #ffe14d;
  --green: #39ff88;
  --orange: #ff9f2b;
  --red: #ff4d5e;
  --accent: var(--pink);
  --radius: 12px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --display: "Arial Black", "Segoe UI Black", Impact, system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.45 var(--font); }
a { color: var(--cyan); }
h1, h2, h3 { font-family: var(--display); letter-spacing: .02em; margin: 0 0 .5em; line-height: 1.15; }
h1 { font-size: 28px; } h2 { font-size: 21px; } h3 { font-size: 16px; }
.muted { color: var(--muted); } .small { font-size: 13px; } .tiny { font-size: 12px; }
.hidden { display: none !important; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; }
.right { margin-left: auto; }
.mt { margin-top: 14px; } .mb { margin-bottom: 14px; }
.nowrap { white-space: nowrap; }

/* ---- Logo -------------------------------------------------------------- */
.logo { white-space: nowrap; font-family: var(--display); font-size: 18px; letter-spacing: .08em; text-decoration: none; color: var(--text); display: inline-flex; align-items: center; gap: 8px; }
.logo b { color: var(--pink); text-shadow: 0 0 10px rgba(255,43,214,.7); }
.logo i { font-style: normal; color: var(--cyan); text-shadow: 0 0 10px rgba(34,228,255,.6); }
.logo img { width: 28px; height: 28px; }

/* ---- Buttons ------------------------------------------------------------ */
button, .btn {
  font: 600 14px var(--font); border-radius: 10px; border: 1px solid var(--line); background: var(--panel2); color: var(--text);
  padding: 9px 14px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; justify-content: center;
}
button:hover, .btn:hover { border-color: var(--cyan); }
button:disabled { opacity: .5; cursor: default; }
.primary { background: linear-gradient(135deg, var(--pink), #a32bff); border-color: transparent; color: #fff; box-shadow: 0 0 16px rgba(255,43,214,.35); }
.primary:hover { border-color: transparent; filter: brightness(1.1); }
.ghost { background: transparent; }
.danger { color: var(--red); border-color: rgba(255,77,94,.4); }
.small-btn { padding: 5px 10px; font-size: 13px; border-radius: 8px; }
.icon-btn { padding: 6px 9px; }

/* ---- Forms -------------------------------------------------------------- */
label { display: block; font-weight: 600; font-size: 13px; color: var(--muted); margin: 10px 0 4px; }
input, select, textarea {
  width: 100%; font: 15px var(--font); color: var(--text); background: var(--panel2); border: 1px solid var(--line);
  border-radius: 9px; padding: 9px 11px;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(34,228,255,.15); }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--pink); transform: scale(1.15); }
input[type=color] { padding: 2px; height: 38px; width: 70px; }
textarea { min-height: 80px; resize: vertical; }
.check { display: flex; gap: 9px; align-items: flex-start; font-weight: 500; color: var(--text); font-size: 14px; margin: 10px 0; }
.check input { margin-top: 3px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 16px; }
@media (max-width: 700px) { .grid2, .grid3 { grid-template-columns: 1fr; } }

/* ---- Cards, tables, pills --------------------------------------------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.card + .card { margin-top: 16px; }
.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat .n { font-family: var(--display); font-size: 30px; line-height: 1.1; }
.stat .l { color: var(--muted); font-size: 13px; }
.stats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 16px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; white-space: nowrap; }
tr.click { cursor: pointer; } tr.click:hover td { background: var(--panel2); }
.table-wrap { overflow-x: auto; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 700; border: 1px solid currentColor; white-space: nowrap; }
.s-working { color: var(--green); } .s-issues { color: var(--yellow); } .s-down { color: var(--red); } .s-repair { color: var(--orange); }
.s-storage, .s-sold { color: var(--muted); }
.sev-high { color: var(--red); } .sev-medium { color: var(--yellow); } .sev-low { color: var(--cyan); }
.r-new { color: var(--pink); } .r-acknowledged { color: var(--yellow); } .r-fixed { color: var(--green); } .r-not_a_problem { color: var(--muted); }
.badge { background: var(--pink); color: #fff; border-radius: 99px; font-size: 11px; font-weight: 800; padding: 1px 7px; margin-left: auto; }
.empty { text-align: center; color: var(--muted); padding: 30px 10px; }

/* ---- Toasts & tooltips & modal ------------------------------------------ */
#toasts { position: fixed; right: 16px; bottom: 16px; z-index: 1000; display: flex; flex-direction: column; gap: 8px; max-width: 360px; }
.toast { background: var(--panel2); border: 1px solid var(--line); border-left: 4px solid var(--green); padding: 11px 14px; border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.4); }
.toast.err { border-left-color: var(--red); }
#tip { position: fixed; z-index: 2000; max-width: 320px; background: #fffbe0; color: #1a1a2e; font-size: 13px; line-height: 1.4; padding: 8px 11px; border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,.5); pointer-events: none; display: none; }
.modal-bg { position: fixed; inset: 0; background: rgba(5,5,15,.75); z-index: 900; display: flex; align-items: flex-start; justify-content: center; padding: 6vh 14px; overflow-y: auto; }
.modal { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; width: 100%; max-width: 560px; padding: 20px; }
.modal h2 { margin-bottom: 12px; }
.modal .actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }

/* ---- Owner console layout --------------------------------------------- */
.shell { display: grid; grid-template-columns: 230px 1fr; min-height: 100vh; }
.side { background: #0f0f22; border-right: 1px solid var(--line); padding: 16px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; }
.side nav { display: flex; flex-direction: column; gap: 2px; margin-top: 18px; }
.side nav a { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; padding: 9px 10px; border-radius: 9px; font-weight: 600; }
.side nav a:hover { background: var(--panel2); }
.side nav a.on { background: linear-gradient(90deg, rgba(255,43,214,.22), rgba(255,43,214,0)); box-shadow: inset 3px 0 0 var(--pink); }
.side nav .sep { height: 1px; background: var(--line); margin: 10px 4px; }
.side .who { margin-top: auto; padding-top: 14px; font-size: 13px; color: var(--muted); }
.main { padding: 22px 26px 60px; min-width: 0; }
.topbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.topbar h1 { margin: 0; }
.mobile-bar { display: none; }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 800; left: 0; width: 260px; transform: translateX(-100%); transition: transform .2s; }
  .side.open { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.6); }
  .mobile-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: #0f0f22; position: sticky; top: 0; z-index: 700; }
  .main { padding: 16px 14px 60px; }
}

/* ---- Charts (plain SVG) --------------------------------------------- */
.bars { display: flex; align-items: flex-end; gap: 2px; height: 120px; padding-top: 6px; }
.bars div { flex: 1; background: linear-gradient(180deg, var(--cyan), rgba(34,228,255,.3)); border-radius: 3px 3px 0 0; min-height: 2px; position: relative; }
.bars div.r { background: linear-gradient(180deg, var(--pink), rgba(255,43,214,.3)); }
.health-bar { display: flex; height: 18px; border-radius: 99px; overflow: hidden; background: var(--panel2); }
.health-bar span { display: block; height: 100%; }
.list-line { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); align-items: center; }
.list-line:last-child { border-bottom: none; }

/* ---- Game photo / misc ---------------------------------------------- */
.game-photo { width: 100%; max-width: 320px; border-radius: 12px; border: 1px solid var(--line); display: block; }
.photos { display: flex; gap: 10px; flex-wrap: wrap; }
.photos img { width: 150px; height: 150px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); cursor: zoom-in; }
.qr-box { background: #fff; padding: 8px; border-radius: 10px; width: 150px; }
.qr-box img { width: 100%; display: block; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 6px 12px; font-size: 14px; }
.kv div:nth-child(odd) { color: var(--muted); }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
button.on { border-color: var(--pink); color: var(--pink); }
.stars { color: var(--yellow); letter-spacing: 1px; }
.drag { cursor: grab; color: var(--muted); }
/* Game-name suggestions (catalog) */
.sugg { position: absolute; z-index: 50; left: 0; right: 0; top: 100%; margin-top: 4px; background: var(--panel2); border: 1px solid var(--cyan); border-radius: 10px; max-height: 360px; overflow-y: auto; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.sugg-item { padding: 8px 10px; cursor: pointer; border-bottom: 1px solid var(--line); }
.sugg-item:hover, .sugg-item.on { background: rgba(34,228,255,.12); }
