/* ==========================================================================
   Shared chrome for the account screens: sign in, sign up, dashboard.
   ==========================================================================
   Every colour and font here is a theme token, exactly like the game screens,
   so these pages reskin with the rest of the app and never hardcode a palette.
   ------------------------------------------------------------------------ */

* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}
body {
  background: var(--bg-deepest);
  font-family: var(--font-ui);
  color: var(--text);
  padding: 32px 16px;
  min-height: 100vh;
  /* A column flex, so the card and the dashboard can each centre themselves
     with auto margins. Auto margins centre when there is spare room and
     collapse when there is not — unlike justify-content, which clips the top
     of anything taller than the viewport. */
  display: flex;
  flex-direction: column;
}
@media (min-width: 720px) {
  body {
    padding: 48px 32px;
  }
}

.card {
  margin: auto;
  width: 100%;
  max-width: 430px;
  background: var(--bg-deep);
  border-radius: 14px;
  border: 1px solid rgba(var(--tint-rgb), 0.08);
  box-shadow: var(--card-shadow);
  padding: 38px 32px 32px;
  position: relative;
  isolation: isolate;
  background-image:
    radial-gradient(circle at 88% 6%, rgba(var(--tint-rgb), 0.05), transparent 40%),
    radial-gradient(circle at 8% 94%, rgba(var(--tint-rgb), 0.04), transparent 45%);
}

/*
 * The platform badge on a sign-in card: bigger than in the bar, and centred.
 *
 * This replaced an <img> of the venue's own logo, which every venue-neutral
 * theme hides via --brand-logo-display — so on the default skin the sign-in
 * screen had no mark on it at all.
 */
/* Scoped to .card so it wins over .brand-badge regardless of which rule
   happens to come first in this file. */
.card .card-badge {
  height: 64px;
  width: 64px;
  margin: 0 auto 16px;
}
.headline {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 40px;
  line-height: 0.92;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  color: var(--text);
  margin: 6px 0 2px;
}
.headline span {
  color: var(--accent);
}
.eyebrow {
  font-size: 9.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-bright);
  font-weight: 800;
  margin-bottom: 26px;
}
/* Only shown to an account running more than one venue — everyone else
   never sees it, since the context resolver picks their one venue for them.
   The [hidden] rule needs its own selector: an unconditional `display` on
   the bare class ties the UA stylesheet's [hidden]{display:none} on
   specificity, and being later in the cascade would otherwise win outright. */
.switch-venue-link {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  margin: -18px 0 26px;
}
.switch-venue-link[hidden] {
  display: none;
}
.switch-venue-link:hover {
  text-decoration: underline;
}

.field-label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-bright);
  margin-bottom: 8px;
  font-weight: 600;
}
.text-input {
  width: 100%;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 16px; /* 16px or iOS zooms the page on focus */
  color: var(--text);
  margin-bottom: 16px;
}
.text-input::placeholder {
  color: rgba(var(--tint-rgb), 0.3);
}
.text-input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.submit-btn {
  width: 100%;
  background: var(--accent);
  color: var(--ink);
  border: none;
  border-radius: 10px;
  padding: 16px;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
}
.submit-btn:disabled {
  opacity: 0.6;
  cursor: default;
}
.submit-btn:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}

.note {
  font-size: 11.5px;
  color: var(--text-dim);
  line-height: 1.55;
  margin-top: 20px;
  text-align: center;
}
.note a {
  color: var(--accent-bright);
  font-weight: 700;
}

.error {
  background: rgba(var(--alert-rgb), 0.14);
  border: 1px solid var(--alert);
  color: var(--alert-text);
  border-radius: 8px;
  padding: 11px 13px;
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 18px;
}

/* ---------- dashboard ---------- */

.dash {
  /* Wide enough that a desktop does not leave the page as a narrow island in
     the middle of the screen, and capped so a very wide monitor does not
     stretch three tiles into letterboxes.

     Auto margins rather than "0 auto": the dashboard is short by nature — a
     heading and a few tiles — so on a tall screen the leftover height is
     split above and below instead of all being dumped at the bottom. */
  margin: auto;
  width: 100%;
  max-width: 1180px;
}
.dash-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}
.logout-link {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 700;
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 14px;
  cursor: pointer;
  font-family: var(--font-ui);
}
.logout-link:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}
@media (min-width: 720px) {
  .tiles {
    gap: 24px;
    margin-bottom: 24px;
  }
}
.tile {
  display: flex;
  /* Column, so the note sits at the bottom and every tile in the row is the
     same height however long its wording is. */
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  background: var(--bg-deep);
  border: 1px solid rgba(var(--tint-rgb), 0.08);
  border-radius: 14px;
  padding: 34px 32px;
  min-height: 210px;
  /* For the corner arrow. */
  position: relative;
  overflow: hidden;
}
/* The admin tile is hidden via the `hidden` attribute for anyone who is not
   an owner (see host-dashboard.html). Without this, the unconditional
   `display: flex` above ties the UA stylesheet's [hidden]{display:none} on
   specificity and, being later in the cascade, wins — showing the tile to
   an ordinary venue anyway, even though the route itself still 404s them. */
.tile[hidden] {
  display: none;
}

/* Icon, title, description — stacked from the top, the way the dashboard
   mockups set them. Nothing is pushed to the bottom: an icon above the title
   fills the tile properly, where a bottom-anchored note just left a hole in
   the middle. Spacing follows the mockup: 18px under the icon, 8px under the
   title. */
.tile-icon {
  font-size: 34px;
  line-height: 1;
  margin-bottom: 18px;
  /* Hug the glyph. As a flex item it would otherwise stretch the full width
     of the tile and run its box under the corner arrow. */
  align-self: flex-start;
}
.tile-arrow {
  position: absolute;
  top: 30px;
  right: 30px;
  font-size: 20px;
  line-height: 1;
  opacity: 0.55;
}
.tile:hover .tile-arrow {
  opacity: 1;
}
.tile:hover {
  border-color: var(--accent);
}
.tile.primary {
  background: var(--accent);
  color: var(--ink);
}
.tile.primary .tile-note {
  color: var(--ink);
  opacity: 0.85;
}
.tile-title {
  font-family: var(--font-display);
  font-weight: 800;
  /*
   * 34px, not more. The badge and these titles take each theme's display
   * face, and Bungee (Kween Kezza) is the widest by some way: at 38px
   * "Theme Library" wraps to a second line and that tile grows past the
   * 210px the others hold, breaking the row. Every other face has room to
   * 42px. This is the largest size that stays on one line in all of them.
   */
  font-size: 34px;
  line-height: 1.05;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 8px;
}
.tile-note {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-dim);
}

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}
.fact {
  /* --bg-panel, not --bg-panel-2: several themes give --bg-panel-2 the same
     value as --bg-deepest, which is the page behind these, so a recessed tone
     would leave these tiles invisible on the light skins. */
  background: var(--bg-panel);
  border: 1px solid rgba(var(--tint-rgb), 0.06);
  border-radius: 12px;
  padding: 26px 26px;
}
.fact-label {
  font-size: 9.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-bright);
  font-weight: 800;
  margin-bottom: 7px;
}
.fact-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 21px;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

/* ---------- owner-only accounts table ---------- */

.dash .table-wrap,
.table-wrap {
  background: var(--bg-deep);
  border: 1px solid rgba(var(--tint-rgb), 0.08);
  border-radius: 14px;
  box-shadow: var(--card-shadow);
  /* The table is wider than a phone; it scrolls inside its own box rather
     than making the whole page scroll sideways. */
  overflow-x: auto;
}
.accounts {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  min-width: 640px;
}
.accounts th {
  text-align: left;
  font-size: 9.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-bright);
  font-weight: 800;
  padding: 16px 18px 10px;
  border-bottom: 1px solid var(--line);
}
.accounts td {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(var(--tint-rgb), 0.07);
  vertical-align: middle;
}
.accounts tr:last-child td {
  border-bottom: none;
}
.accounts .muted {
  color: var(--text-dim);
}
.accounts .empty {
  text-align: center;
  color: var(--text-dim);
  padding: 28px;
}
.badge {
  display: inline-block;
  background: var(--accent);
  color: var(--ink);
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  vertical-align: middle;
}
.accounts select.plan {
  background: var(--bg-panel);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 10px;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
}
.accounts .danger {
  background: none;
  color: var(--alert-text);
  border: 1px solid var(--alert);
  border-radius: 8px;
  padding: 7px 13px;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.accounts .danger:hover {
  background: rgba(var(--alert-rgb), 0.16);
}

/* ---------- header bar ---------- */

/* Full-bleed: the bar spans the window while its contents line up with the
   page below. The negative margins undo the body padding, which is why they
   match it at each breakpoint. A solid --bg-deepest fill, matching every
   nav bar in the handoff (Dashboard.html, Checkout.html, ChoosePlan.html —
   all `background:#201417`, never left to the page's own tally-mark texture
   underneath): without it the body's own background shows straight through,
   texture and all, since the bar itself paints nothing. */
.topbar {
  margin: -32px -16px 0;
  padding: 16px;
  background: var(--bg-deepest);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
@media (min-width: 720px) {
  .topbar {
    margin: -48px -32px 0;
    padding: 18px 32px;
  }
}

.topbar-inner {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand-left {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

/*
 * The platform badge, drawn from theme tokens rather than shipped as an
 * image. Two reasons: it reskins with everything else instead of staying one
 * fixed set of colours, and this is a multi-venue product — the PNG in
 * assets/ is the Head of Steam's own logo, which every venue-neutral theme
 * deliberately hides via --brand-logo-display.
 */
.brand-badge {
  display: block;
  height: 40px;
  width: 40px;
  flex: none;
}
.brand-badge text {
  font-family: var(--font-display);
  font-weight: 800;
}
.brand-sep {
  width: 1px;
  height: 26px;
  background: var(--line-strong);
  flex: none;
}
/*
 * Brand, then divider, then page. The wordmark is the display face; the page
 * name is the UI face, smaller and quieter. Keeping them in different sizes
 * and weights stops the line reading as one run of shouting capitals, and
 * gives the divider something real to separate.
 */
.brand-wordmark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 19px;
  line-height: 1;
  text-transform: uppercase;
  /* Uppercase display type set tight reads as a smudge at this size. */
  letter-spacing: 0.06em;
  color: var(--text);
  white-space: nowrap;
}
.brand-wordmark .accent {
  color: var(--accent);
}
.brand-page {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 11px;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-dim);
  white-space: nowrap;
}

/* On a phone the bar keeps the badge and the wordmark; the page name is
   already the heading directly below it, so it goes rather than wrapping. */
@media (max-width: 560px) {
  .brand-sep,
  .brand-page {
    display: none;
  }
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: none;
}

/* Padding rather than margin: a top margin would override the auto margin
   that centres the page, stranding it back against the bar. */
.has-topbar .dash {
  padding-top: 40px;
}

/* Assigned skins, in the owner's accounts table. */
.accounts .joined {
  font-size: 11px;
  margin-top: 3px;
}
.accounts .skins {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.accounts .skin {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--text-dim);
  cursor: pointer;
  white-space: nowrap;
}
.accounts .skin input {
  accent-color: var(--accent);
  width: 15px;
  height: 15px;
  cursor: pointer;
}
.accounts .skin:hover {
  color: var(--text);
}

/* One venue an account runs, in the owner's accounts table — an account on
   the recommended multi-venue billing model can hold several of these
   stacked in the one "Venues" cell. */
.accounts .venue-block {
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
}
.accounts .venue-block:first-child {
  padding-top: 0;
}
.accounts .venue-name {
  font-weight: 700;
  font-size: 12.5px;
  margin-bottom: 6px;
}
.accounts .add-venue {
  background: none;
  color: var(--accent);
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  padding: 6px 12px;
  margin-top: 10px;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.accounts .add-venue:hover {
  border-color: var(--accent);
  background: var(--accent-deep);
}

/* ---------- add-a-venue confirmation (host-venue-add.html) ---------- */

/* Replaces the form in place once the linked venue exists — there is no
   session to redirect through, so this is the whole of the "done" state. */
.venue-ready {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  text-align: left;
}
.venue-ready-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  margin-bottom: 6px;
}
.venue-ready-email {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.5;
}
.venue-ready-email strong {
  color: var(--text);
  font-weight: 700;
}
.venue-actions {
  display: flex;
  gap: 12px;
}
.btn-secondary {
  flex: 1;
  background: none;
  border: 1px solid var(--line-strong);
  color: var(--text);
  border-radius: 10px;
  padding: 14px;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------- linked venues (host-dashboard.html) ---------- */

.linked-venues {
  margin-top: 24px;
}
.linked-venues-title {
  font-size: 9.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-bright);
  font-weight: 800;
  margin-bottom: 12px;
}
.linked-venue {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--bg-panel);
  border: 1px solid rgba(var(--tint-rgb), 0.06);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 10px;
}
.linked-venue-name {
  font-weight: 700;
  font-size: 14px;
}
.linked-venue-email {
  font-size: 12px;
  color: var(--text-dim);
}
.linked-venue-reset {
  background: none;
  color: var(--text-dim);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 14px;
  font-family: var(--font-ui);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  flex: none;
}
.linked-venue-reset:hover {
  color: var(--text);
  border-color: var(--line-strong);
}
