/* ============================================================
   Owl's Vault gaming PLATFORM pages — shared structure
   (account.html, u.html, g.html, catalog.html, admin-accounts.html)
   ------------------------------------------------------------
   Load order: tokens.css?v=N -> gaming.css?v=N -> platform.css?v=N
   -> page <style> (bump the changed file's ?v= on every page that links it).
   Colors come ONLY from tokens.css (var()).
   COLORBLIND RULE: every colored status carries an icon + words.
   ============================================================ */

.ov-wrap { max-width:1180px; margin:0 auto; padding:16px 20px 72px; }
.ov-wrap.wide { max-width:1500px; }
.ov-head { display:flex; flex-wrap:wrap; gap:10px 18px; align-items:center; justify-content:space-between; }
.ov-brand { font-weight:800; letter-spacing:.02em; color:var(--ink); text-decoration:none; }
.ov-nav { display:flex; flex-wrap:wrap; gap:6px 18px; font-size:14px; }
.ov-nav a { color:var(--muted); text-decoration:none; padding:2px 0; }
.ov-nav a:hover { color:var(--ink); }
.ov-nav a[aria-current="page"] { color:var(--ink); font-weight:700; text-decoration:underline; text-underline-offset:4px; }
.ov-who { font-size:13px; color:var(--muted); }

.ov-card { background:var(--panel); border:1px solid var(--line); border-radius:10px; padding:16px; margin:14px 0; }
.ov-card > h2 { font-size:16px; margin:0 0 10px; }
.ov-card > h2 .sub { font-size:12px; font-weight:400; color:var(--muted); margin-left:6px; }
.ov-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(280px, 1fr)); gap:14px; }
.ov-grid2 { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
@media (max-width:900px) { .ov-grid2 { grid-template-columns:1fr; } }

.ov-row { display:flex; flex-wrap:wrap; gap:8px 10px; align-items:center; }
.ov-row.between { justify-content:space-between; }
.ov-stack > * + * { margin-top:10px; }
.ov-muted { color:var(--muted); }
.ov-small { font-size:12.5px; }
.ov-mono { font-family:ui-monospace, SFMono-Regular, Menlo, monospace; font-size:12.5px; }

/* buttons */
.btn { display:inline-flex; align-items:center; gap:6px; border:1px solid var(--line); background:var(--panel-2); color:var(--ink);
  border-radius:8px; padding:7px 13px; font:600 13.5px/1.2 inherit; cursor:pointer; text-decoration:none; white-space:nowrap; }
.btn:hover { border-color:var(--accent); text-decoration:none; }
.btn:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
.btn.primary { background:var(--accent); border-color:var(--accent); color:var(--bg); }
.btn.danger { background:var(--warn); border-color:var(--warn); color:var(--on-warn); }
.btn.quiet { background:transparent; }
.btn:disabled { opacity:.55; cursor:default; }
.btn .ico { font-size:15px; line-height:1; }

/* form fields */
.field { display:flex; flex-direction:column; gap:4px; min-width:0; }
.field > label, .field > .lab { font-size:11px; color:var(--muted); text-transform:uppercase; letter-spacing:.04em; font-weight:700; }
.field input[type=text], .field input[type=search], .field input[type=password], .field input[type=number], .field input[type=date], .field select, .field textarea,
.ov-input { font:14px/1.3 inherit; padding:7px 9px; border:1px solid var(--line); border-radius:7px; background:var(--bg); color:var(--ink); min-width:0; }
.field input:focus, .field select:focus, .ov-input:focus { outline:2px solid var(--accent); outline-offset:1px; }
.field .help { font-size:12px; color:var(--muted); }
fieldset.choice { border:1px solid var(--line); border-radius:8px; padding:8px 12px; margin:0; }
fieldset.choice legend { font-size:11px; color:var(--muted); text-transform:uppercase; letter-spacing:.04em; font-weight:700; padding:0 4px; }
fieldset.choice label { display:flex; gap:8px; align-items:flex-start; padding:5px 0; cursor:pointer; }
fieldset.choice label small { display:block; color:var(--muted); font-size:12px; }

/* status chips + banners: icon + words, never hue alone */
.chip { display:inline-flex; align-items:center; gap:4px; font-size:11.5px; font-weight:700; border-radius:10px; padding:1px 9px; border:1px solid var(--line); background:var(--neutral-bg); color:var(--ink); white-space:nowrap; }
.chip.ok { background:var(--ok-bg); border-color:var(--ok); }
.chip.warn { background:var(--warn-bg); border-color:var(--warn); }
.chip.info { background:var(--info-bg); border-color:var(--accent); }
.chip.steam { border-color:var(--steam); }
.chip.psn { border-color:var(--psn); }
.chip.xbox { border-color:var(--xbox); }
.chip.ra { border-color:var(--ra); }
.banner { border:1px solid var(--line); border-left-width:4px; border-radius:8px; padding:10px 14px; margin:12px 0; background:var(--panel-2); font-size:14px; }
.banner.ok { border-left-color:var(--ok); background:var(--ok-bg); }
.banner.warn { border-left-color:var(--warn); background:var(--warn-bg); }
.banner.info { border-left-color:var(--accent); background:var(--info-bg); }
.banner b.lead { margin-right:6px; }

/* progress bar with the number in text (never color alone) */
.progress { position:relative; height:20px; background:var(--line); border-radius:10px; overflow:hidden; }
.progress > span { position:absolute; inset:0 auto 0 0; background:var(--accent); border-radius:10px; transition:width .25s ease; }
.progress > b { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; font-size:11.5px; font-weight:800; color:var(--ink); text-shadow:0 0 3px var(--bg), 0 0 3px var(--bg); }

/* summary tiles */
.tiles { display:grid; grid-template-columns:repeat(auto-fit, minmax(140px, 1fr)); gap:10px; }
.tile { background:var(--panel); border:1px solid var(--line); border-radius:9px; padding:12px 14px; }
.tile .v { font-size:22px; font-weight:800; line-height:1.1; font-variant-numeric:tabular-nums; }
.tile .k { font-size:11px; color:var(--muted); text-transform:uppercase; letter-spacing:.03em; margin-top:3px; }
.tile.accent { border-left:3px solid var(--accent); }

/* tables */
.ov-table-wrap { overflow-x:auto; -webkit-overflow-scrolling:touch; }
.ov-table { width:100%; border-collapse:collapse; font-size:13px; }
.ov-table th, .ov-table td { text-align:left; padding:7px 9px; border-bottom:1px solid var(--line); vertical-align:middle; }
.ov-table th { color:var(--muted); font-weight:600; white-space:nowrap; }
.ov-table th button.sort { background:none; border:0; color:inherit; font:inherit; cursor:pointer; padding:0; }
.ov-table th button.sort[aria-sort="ascending"]::after { content:" ▲"; }
.ov-table th button.sort[aria-sort="descending"]::after { content:" ▼"; }
.ov-table td.num, .ov-table th.num { text-align:right; font-variant-numeric:tabular-nums; }
.ov-table tr:hover td { background:var(--panel-2); }
.ov-ico { width:32px; height:32px; border-radius:5px; object-fit:cover; background:var(--well); flex:0 0 auto; }
.ov-cap { width:92px; height:43px; border-radius:5px; object-fit:cover; background:var(--well); flex:0 0 auto; }

.ov-empty { padding:26px 10px; text-align:center; color:var(--muted); }
.ov-avatar { width:64px; height:64px; border-radius:12px; object-fit:cover; background:var(--well); border:1px solid var(--line); }
.ov-avatar.sm { width:28px; height:28px; border-radius:6px; }
.sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
.hidden { display:none !important; }

/* status line (aria-live) */
.ov-status { font-size:13px; color:var(--muted); min-height:1.2em; }

footer.ov-foot { max-width:1180px; margin:30px auto 20px; padding:0 20px; font-size:12px; color:var(--muted); display:flex; flex-wrap:wrap; gap:6px 16px; }
footer.ov-foot a { color:var(--muted); }

@media (max-width:560px) {
  .ov-wrap { padding:12px 12px 60px; }
  .ov-card { padding:12px; }
  .tile .v { font-size:19px; }
  .btn { padding:7px 10px; }
}
